Commit 18eb5a17 authored by Claes Sjofors's avatar Claes Sjofors

jpwr_opwind.sh started with OpPlaceWeb as argument

parent c62e0bdf
...@@ -14,9 +14,9 @@ public class JopOp { ...@@ -14,9 +14,9 @@ public class JopOp {
boolean packFrame = false; boolean packFrame = false;
//Construct the application //Construct the application
public JopOp() { public JopOp( String pwrPlace) {
JopOpWindowFrame frame = new JopOpWindowFrame(); JopOpWindowFrame frame = new JopOpWindowFrame( pwrPlace);
//Validate frames that have preset sizes //Validate frames that have preset sizes
//Pack frames that have useful preferred size info, e.g. from their layout //Pack frames that have useful preferred size info, e.g. from their layout
if (packFrame) { if (packFrame) {
...@@ -73,8 +73,13 @@ public class JopOp { ...@@ -73,8 +73,13 @@ public class JopOp {
//Main method //Main method
public static void main(String[] args) { public static void main(String[] args) {
if ( args.length > 0) String pwrPlace = null;
System.out.println("Arg: " + args[0]); if ( args.length < 1) {
System.out.println( "OpPlaceWeb object is missing");
System.exit(0);
}
pwrPlace = args[0];
System.out.println("Arg: " + args[0]);
try { try {
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
// UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); // UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
...@@ -83,7 +88,7 @@ public class JopOp { ...@@ -83,7 +88,7 @@ public class JopOp {
System.out.println("setLookAndFeel exception"); System.out.println("setLookAndFeel exception");
// e.printStackTrace(); // e.printStackTrace();
} }
new JopOp(); new JopOp( pwrPlace);
byte[] buff = new byte[100]; byte[] buff = new byte[100];
try { try {
System.in.read(buff); System.in.read(buff);
......
...@@ -62,11 +62,11 @@ public class JopOpWindowFrame extends JFrame implements GdhApplIfc { ...@@ -62,11 +62,11 @@ public class JopOpWindowFrame extends JFrame implements GdhApplIfc {
Object root; Object root;
PwrtObjid utilityObjid; PwrtObjid utilityObjid;
public JopOpWindowFrame() { public JopOpWindowFrame( String pwrPlace) {
engine = new JopEngine( 1000, this); engine = new JopEngine( 1000, this);
session = new JopSession( engine, (Object)this); session = new JopSession( engine, (Object)this);
root = (Object) this; root = (Object) this;
localPanel = new JopOpWindow( session, (Object)this); localPanel = new JopOpWindow( session, (Object)this, pwrPlace);
init(); init();
pack(); pack();
} }
......
#!/bin/bash #!/bin/bash
#
# Proview Open Source Process Control.
# Copyright (C) 2005-2016 SSAB EMEA AB.
#
# This file is part of Proview.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Proview. If not, see <http://www.gnu.org/licenses/>
#
# Linking Proview statically or dynamically with other modules is
# making a combined work based on Proview. Thus, the terms and
# conditions of the GNU General Public License cover the whole
# combination.
#
# In addition, as a special exception, the copyright holders of
# Proview give you permission to, from the build function in the
# Proview Configurator, combine Proview with modules generated by the
# Proview PLC Editor to a PLC program, regardless of the license
# terms of these modules. You may copy and distribute the resulting
# combined work under the terms of your choice, provided that every
# copy of the combined work is accompanied by a complete copy of
# the source code of Proview (the version used to produce the
# combined work), being distributed under the terms of the GNU
# General Public License plus this exception.
#
if [ -z $1 ]; then
echo ""
echo " jpwr_opwind.sh Start java operator environment."
echo ""
echo " Arguments: Name of OpPlaceWeb object"
echo ""
echo " Example"
echo ""
echo " > jpwr_opwind.sh Nodes-DemoNode-OpPlaces-Web"
echo ""
exit;
fi
# Get systemname from bootfile # Get systemname from bootfile
zero="0000" zero="0000"
...@@ -9,7 +57,7 @@ bootfile=$pwrp_load/ld_boot_${nname}_${zero:0:4-${#PWR_BUS_ID}}${PWR_BUS_ID}.dat ...@@ -9,7 +57,7 @@ bootfile=$pwrp_load/ld_boot_${nname}_${zero:0:4-${#PWR_BUS_ID}}${PWR_BUS_ID}.dat
if [ ! -e "$bootfile" ]; then if [ ! -e "$bootfile" ]; then
echo "Unable to find bootfile: $bootfile" echo "Unable to find bootfile: $bootfile"
return; exit;
fi fi
let i=0 let i=0
...@@ -25,4 +73,4 @@ echo $systemname ...@@ -25,4 +73,4 @@ echo $systemname
export CLASSPATH=$pwr_lib/pwr_rt.jar:$pwr_lib/pwr_jop.jar:$pwr_lib/pwr_jopg.jar:$pwr_lib/pwr_jopc.jar:$pwr_lib/pwr_bcomp.jar:$pwr_lib/pwr_bcompfc.jar:$pwr_lib/pwr_abb.jar:$pwrp_lib/pwrp_$systemname.jar export CLASSPATH=$pwr_lib/pwr_rt.jar:$pwr_lib/pwr_jop.jar:$pwr_lib/pwr_jopg.jar:$pwr_lib/pwr_jopc.jar:$pwr_lib/pwr_bcomp.jar:$pwr_lib/pwr_bcompfc.jar:$pwr_lib/pwr_abb.jar:$pwrp_lib/pwrp_$systemname.jar
export LD_LIBRARY_PATH=$pwr_exe export LD_LIBRARY_PATH=$pwr_exe
$jdk/bin/java jpwr.jop.JopOp $jdk/bin/java jpwr.jop.JopOp $1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment