Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
e65cf387
Commit
e65cf387
authored
Dec 21, 2011
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Web site can be opened from another than the process/operator station
parent
645fa0ba
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
117 additions
and
7 deletions
+117
-7
java/jpwr/jop/src/JopApplet.java
java/jpwr/jop/src/JopApplet.java
+6
-0
java/jpwr/jop/src/JopOpWindowApplet.java
java/jpwr/jop/src/JopOpWindowApplet.java
+1
-0
java/jpwr/rt_client/src/Gdh.java
java/jpwr/rt_client/src/Gdh.java
+6
-5
src/exp/com/src/os_linux/ge_javac.sh
src/exp/com/src/os_linux/ge_javac.sh
+39
-1
src/wbl/pwrb/src/pwrb_c_webhandler.wb_load
src/wbl/pwrb/src/pwrb_c_webhandler.wb_load
+40
-0
wb/lib/wb/src/wb_build.cpp
wb/lib/wb/src/wb_build.cpp
+25
-1
No files found.
java/jpwr/jop/src/JopApplet.java
View file @
e65cf387
...
...
@@ -55,6 +55,7 @@ public class JopApplet extends JApplet
{
public
JopSession
session
;
public
JopEngine
engine
;
String
pwrHost
;
public
JopApplet
()
{
...
...
@@ -62,6 +63,8 @@ public class JopApplet extends JApplet
public
void
init
()
{
String
instance
=
this
.
getParameter
(
"instance"
);
pwrHost
=
getParameter
(
"pwrhost"
);
System
.
out
.
println
(
"Parameter pwrhost: "
+
pwrHost
);
engine
=
new
JopEngine
(
1000
,
(
Object
)
this
);
session
=
new
JopSession
(
engine
,
(
Object
)
this
);
...
...
@@ -89,4 +92,7 @@ public class JopApplet extends JApplet
public
String
[][]
getParameterInfo
()
{
return
null
;
}
public
String
getPwrHost
()
{
return
pwrHost
;
}
}
java/jpwr/jop/src/JopOpWindowApplet.java
View file @
e65cf387
...
...
@@ -105,6 +105,7 @@ public class JopOpWindowApplet extends JopApplet
size
=
new
Dimension
(
300
,
900
);
setSize
(
size
);
engine
.
setFrameReady
();
}
public
void
start
()
{
...
...
java/jpwr/rt_client/src/Gdh.java
View file @
e65cf387
...
...
@@ -136,12 +136,13 @@ public class Gdh
{
try
{
URL
url
=
((
JApplet
)
root
).
getCodeBase
();
if
(
trace
)
{
System
.
out
.
println
(
"Opening socket to "
+
url
.
getHost
()
);
String
pwrHost
=
((
jpwr
.
jop
.
JopApplet
)
root
).
getPwrHost
();
if
(
pwrHost
==
null
)
{
URL
url
=
((
JApplet
)
root
).
getDocumentBase
();
pwrHost
=
url
.
getHost
(
);
}
gdhSocket
=
new
Socket
(
url
.
getHost
(),
4445
);
System
.
out
.
println
(
"Opening socket to "
+
pwrHost
);
gdhSocket
=
new
Socket
(
pwrHost
,
4445
);
out
=
new
ObjectOutputStream
(
new
BufferedOutputStream
(
gdhSocket
.
getOutputStream
()));
in
=
new
ObjectInputStream
(
new
BufferedInputStream
(
gdhSocket
.
getInputStream
()));
...
...
src/exp/com/src/os_linux/ge_javac.sh
View file @
e65cf387
...
...
@@ -39,6 +39,7 @@
function
=
$1
src_file
=
$2
systemname
=
$3
signature
=
$4
if
[
$function
==
"java_web"
]
;
then
...
...
@@ -73,6 +74,25 @@ if [ $function == "java_web" ]; then
jar
-uf
$jarfile
*
.jpg
fi
if
[
"
$signature
"
!=
""
]
;
then
storepass
=
${
signature
#*/
}
passopt
=
""
if
[
"
$storepass
"
!=
"
$signature
"
]
;
then
signature
=
${
signature
%/*
}
passopt
=
"-storepass "
$storepass
fi
jars
=
`
eval ls
$pwrp_web
/
*
.jar
`
for
jarfile
in
$jars
;
do
ok
=
"jar verified."
res
=
`
eval
jarsigner
-verify
$jarfile
$signature
`
if
[
"
$res
"
!=
"
$ok
"
]
;
then
echo
"-- Signature
$signature
set to
$jarfile
"
jarsigner
$passopt
$jarfile
$signature
fi
done
fi
fi
fi
...
...
@@ -117,7 +137,25 @@ if [ $function == "java" ]; then
jar
-uf
$jarfile
*
.jpg
jar
-uf
$jarfileweb
*
.jpg
fi
if
[
"
$signature
"
!=
""
]
;
then
storepass
=
${
signature
#*/
}
passopt
=
""
if
[
"
$storepass
"
!=
"
$signature
"
]
;
then
signature
=
${
signature
%/*
}
passopt
=
"-storepass "
$storepass
fi
jars
=
`
eval ls
$pwrp_web
/
*
.jar
`
for
jarfile
in
$jars
;
do
ok
=
"jar verified."
res
=
`
eval
jarsigner
-verify
$jarfile
$signature
`
if
[
"
$res
"
!=
"
$ok
"
]
;
then
echo
"-- Signature
$signature
set to
$jarfile
"
jarsigner
$passopt
$jarfile
$signature
fi
done
fi
fi
fi
...
...
src/wbl/pwrb/src/pwrb_c_webhandler.wb_load
View file @
e65cf387
...
...
@@ -234,6 +234,46 @@ SObject pwrb:Class
EndBody
EndObject
!/**
! Name of Proview host when web interface is opened from another
! site than the process or operator station.
!*/
Object PwrHost $Attribute 18
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! @Summary Signature alias set to the project archive.
! To be able to open the web interface from another site than
! the process or operator station, the host name of the process
! station has to be stated in PwrHost and a signature has to be
! applied to the jar-files of the web site. The signature is an
! alias created by keytool and is stated in AppletSignature.
!
! In this example a signature with the alias pwrkey is created with
! a validity of 100 years
!
! > keytool -genkey -alias pwrkey
! > keytool -selfcert -alias pwrkey -validity 36500
!
! The alias should be signed to all jarfiles in $pwrp_web,
! pwr_rt_client.jar, pwr_jop.jar, pwr_jopc.jar etc. This is done with
! jarsigner
!
! > jarsigner $pwrp_web/pwr_rt_client.jar pwrkey
!
! The project specific jarfile will automatically be signed if the
! alias is stated in AppletSignature. Note that the passphrase for the
! keystore has to be entered in the terminal window. It is possible to
! state the passphrase in the AppletSignature after the alias and a '/',
! eg 'pwrkey/mypassphrase'.
!*/
Object AppletSignature $Attribute 19
Body SysBody
Attr TypeRef = "pwrs:Type-$String80"
EndBody
EndObject
!/**
! A message created by an ASup or DSup object gets the
! same identity as the supervised object. Messages
! produced in an application by means of mh_ApplMessage
...
...
wb/lib/wb/src/wb_build.cpp
View file @
e65cf387
...
...
@@ -771,6 +771,7 @@ void wb_build::webgraph( pwr_tOid oid)
pwr_tFileName
graph_name
,
dir
;
char
dev
[
80
],
type
[
80
];
int
version
;
pwr_tString80
appletsignature
=
""
;
wb_object
o
=
m_session
.
object
(
oid
);
if
(
!
o
)
{
...
...
@@ -861,8 +862,31 @@ void wb_build::webgraph( pwr_tOid oid)
MsgWindow
::
message
(
'W'
,
cmd
,
msgw_ePop_No
,
oid
);
}
else
{
// Get signature from WebHandler
for
(
wb_object
p
=
o
.
parent
();
p
.
oddSts
();
p
=
p
.
parent
())
{
if
(
p
.
cid
()
==
pwr_cClass_WebHandler
)
{
wb_attribute
a
=
m_session
.
attribute
(
p
.
oid
(),
"RtBody"
,
"AppletSignature"
);
if
(
!
a
)
{
m_sts
=
a
.
sts
();
return
;
}
a
.
value
(
appletsignature
);
if
(
!
a
)
{
m_sts
=
a
.
sts
();
return
;
}
dcli_trim
(
appletsignature
,
appletsignature
);
break
;
}
}
Ge
*
gectx
=
m_wnav
->
ge_new
(
graph_name
,
1
);
if
(
strcmp
(
appletsignature
,
""
)
==
0
)
strcpy
(
cmd
,
"export java"
);
else
sprintf
(
cmd
,
"export java /signature=
\"
%s
\"
"
,
appletsignature
);
m_sts
=
gectx
->
command
(
cmd
);
if
(
evenSts
())
{
msg_GetMsg
(
m_sts
,
cmd
,
sizeof
(
cmd
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment