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
c74971b4
Commit
c74971b4
authored
Oct 06, 2010
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade script for 4.7.1
parent
6f6df6ce
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
71 deletions
+61
-71
src/exp/com/src/os_linux/upgrade.sh
src/exp/com/src/os_linux/upgrade.sh
+30
-20
src/exp/com/src/os_linux/upgrade_dmp.awk
src/exp/com/src/os_linux/upgrade_dmp.awk
+22
-10
src/exp/com/src/os_linux/upgrade_pb.pwr_com
src/exp/com/src/os_linux/upgrade_pb.pwr_com
+9
-0
xtt/lib/ge/src/os_linux/hw_x86_64/lib_local.mk
xtt/lib/ge/src/os_linux/hw_x86_64/lib_local.mk
+0
-41
No files found.
src/exp/com/src/os_linux/upgrade.sh
View file @
c74971b4
...
@@ -87,11 +87,12 @@ reload_classvolumes()
...
@@ -87,11 +87,12 @@ reload_classvolumes()
list
=
`
eval ls
-1d
$pwrp_db
/
*
.wb_load
`
list
=
`
eval ls
-1d
$pwrp_db
/
*
.wb_load
`
echo
""
echo
""
echo
"Found classvolumes: "
for
file
in
$list
;
do
for
file
in
$list
;
do
volume
=
`
eval
grep
pwr_eClass_ClassVolume
$fil
e
|
awk
'{ print $2 }'
`
volume
=
`
eval
head
-n
1
$file
|
grep
pwr_eClass_ClassVolum
e |
awk
'{ print $2 }'
`
if
[
"
$volume
"
==
""
]
;
then
if
[
"
$volume
"
==
""
]
;
then
volume
=
`
eval
grep
ClassVolume
$fil
e
|
awk
'{ print $2 }'
`
volume
=
`
eval
head
-n
1
$file
|
grep
ClassVolum
e |
awk
'{ print $2 }'
`
volumelow
=
`
eval
grep
ClassVolume
$fil
e
|
awk
'{ print tolower($2) }'
`
volumelow
=
`
eval
head
-n
1
$file
|
grep
ClassVolum
e |
awk
'{ print tolower($2) }'
`
fi
fi
if
[
"
$volume
"
!=
""
]
;
then
if
[
"
$volume
"
!=
""
]
;
then
echo
$file
echo
$file
...
@@ -263,6 +264,17 @@ reload_cnvobjects()
...
@@ -263,6 +264,17 @@ reload_cnvobjects()
return
return
fi
fi
echo
"***"
echo
"*** Note! "
echo
"*** This pass should only be executed of you upgrade"
echo
"*** from V4.6, not if you upgrade from V4.7.0 "
echo
"***"
echo
-n
"Do you want to execute this pass ? [y/n] "
read
repl
if
[
"
$repl
"
==
"y"
]
;
then
reload_continue
"Pass convert objects in loaded db"
reload_continue
"Pass convert objects in loaded db"
list
=
`
eval ls
-1d
$pwrp_db
/
*
.db
`
list
=
`
eval ls
-1d
$pwrp_db
/
*
.db
`
...
@@ -274,6 +286,7 @@ reload_cnvobjects()
...
@@ -274,6 +286,7 @@ reload_cnvobjects()
wb_cmd
-v
$file
@
$pwr_exe
/upgrade_pb.pwr_com
wb_cmd
-v
$file
@
$pwr_exe
/upgrade_pb.pwr_com
fi
fi
done
done
fi
reload_status
=
$reload__success
reload_status
=
$reload__success
}
}
...
@@ -542,18 +555,15 @@ usage()
...
@@ -542,18 +555,15 @@ usage()
{
{
cat
<<
EOF
cat
<<
EOF
upgrade.sh Upgrade from V4.
6 to V4.7
upgrade.sh Upgrade from V4.
7.0 to V4.7.1
Pass
Pass
dumpdb Dump database to textfile
\$
pwrp_db/'volume'.wb_dmp
directorystructure Change directory structure.
classvolumes Create loadfiles for classvolumes.
classvolumes Create loadfiles for classvolumes.
renamedb Rename old databases.
renamedb Rename old databases.
dirvolume Create directory volume
.
cnvdump Convert the dump files
.
loaddb Load dumpfiles.
loaddb Load dumpfiles.
cnvobjects Convert objects in the database.
compile Compile all plcprograms in the database
compile Compile all plcprograms in the database
createload Create new loadfiles.
createload Create new loadfiles.
createboot Create bootfiles for all nodes in the project.
createboot Create bootfiles for all nodes in the project.
...
@@ -594,14 +604,14 @@ for db in $tmp; do
...
@@ -594,14 +604,14 @@ for db in $tmp; do
fi
fi
done
done
passes
=
"
dumpdb directorystructure classvolumes renamedb dirvolume loaddb cnvobjects
compile createload createboot"
passes
=
"
classvolumes renamedb cnvdump loaddb
compile createload createboot"
#echo "Pass: $passes"
#echo "Pass: $passes"
echo
""
echo
""
echo
-n
"Enter start pass [
dumpdb
] > "
echo
-n
"Enter start pass [
classvolumes
] > "
read
start_pass
read
start_pass
if
[
-z
$start_pass
]
;
then
if
[
-z
$start_pass
]
;
then
start_pass
=
"
dumpdb
"
start_pass
=
"
classvolumes
"
fi
fi
for
cpass
in
$passes
;
do
for
cpass
in
$passes
;
do
...
...
src/exp/com/src/os_linux/upgrade_dmp.awk
View file @
c74971b4
BEGIN
{
BEGIN
{
innum
=
0
;
innum
=
0
;
inbody
=
0
;
inbody
=
0
;
pos
=
0
;
par
=
""
;
par
=
""
;
}
}
{
{
if
(
$3
==
"CStoNumSp"
)
{
if
(
$3
==
"BaseFcPPO5PbModule"
||
$3
==
"BaseFcPPO3PbModule"
||
$3
==
"ABB_ACS_PPO5"
||
$3
==
"ABB_ACC_PPO5"
)
{
innum
=
1
;
innum
=
1
;
inbody
=
0
;
inbody
=
0
;
}
}
if
(
innum
)
{
if
(
innum
)
{
if
(
$1
==
"Body"
&&
$2
==
"
Dev
Body"
)
{
if
(
$1
==
"Body"
&&
$2
==
"
Rt
Body"
)
{
inbody
=
1
;
inbody
=
1
;
}
}
if
(
inbody
)
{
if
(
inbody
)
{
if
(
$1
==
"EndBody"
)
{
if
(
$1
==
"EndBody"
)
{
printf
(
"Attr Object = \"%s\"\n"
,
par
);
printf
(
"%s\n"
,
$0
);
printf
(
"%s\n"
,
$0
);
innum
=
0
;
innum
=
0
;
}
}
...
@@ -23,13 +24,24 @@ BEGIN {
...
@@ -23,13 +24,24 @@ BEGIN {
innum
=
0
;
innum
=
0
;
printf
(
"%s\n"
,
$0
);
printf
(
"%s\n"
,
$0
);
}
}
else
if
(
$1
==
"Attr"
&&
$2
==
"Object"
)
{
else
if
(
$1
==
"Attr"
)
{
par
=
substr
(
$4
,
2
,
length
(
$4
)
-
2
);
pos
=
index
(
$2
,
"."
);
if
(
pos
!=
0
)
{
a1
=
substr
(
$2
,
1
,
pos
-
1
);
a2
=
substr
(
$2
,
pos
+
1
,
length
(
$2
)
-
pos
+
1
);
if
(
substr
(
a1
,
1
,
2
)
==
"I_"
||
substr
(
a1
,
1
,
2
)
==
"O_"
)
{
# printf( "Attr Io.%s.%s = %s\n", a1, a2, $4);
$2
=
"Io."
$2
;
printf
(
" %s\n"
,
$0
);
}
else
{
printf
(
"%s\n"
,
$0
);
}
}
else
{
printf
(
"%s\n"
,
$0
);
}
}
else
if
(
$1
==
"Attr"
&&
$2
==
"Parameter"
)
{
par
=
par
"."
substr
(
$4
,
2
,
length
(
$4
)
-
2
);
printf
(
"Attr Object = \"%s\"\n"
,
par
);
innum
=
0
;
}
}
else
{
else
{
printf
(
"%s\n"
,
$0
);
printf
(
"%s\n"
,
$0
);
...
...
src/exp/com/src/os_linux/upgrade_pb.pwr_com
View file @
c74971b4
...
@@ -40,9 +40,18 @@ main
...
@@ -40,9 +40,18 @@ main
int i;
int i;
string rttconfig;
string rttconfig;
string webhandler;
string webhandler;
string c;
!verify(1);
!verify(1);
op = GetNodeObject();
op = op + "-OpDefault";
c = GetObjectClass( op);
if ( c != "")
printf( "Database is already converted\n");
exit();
endif
! For all OpPlace objects
! For all OpPlace objects
op = GetClassList( "OpPlace");
op = GetClassList( "OpPlace");
while ( op != "")
while ( op != "")
...
...
xtt/lib/ge/src/os_linux/hw_x86_64/lib_local.mk
deleted
100644 → 0
View file @
6f6df6ce
ifndef
lib_local_mk
lib_local_mk
:=
1
vpath %.pwsg $(hw_source)
:
$(os_source):$(co_source)
vpath %.dat $(hw_source)
:
$(os_source):$(co_source)
pwsg_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/pwr_
*
.pwsg
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
export_pwsg
:=
$(
addprefix
$(exe_dir)
/,
$(pwsg_sources)
)
clean_pwsg
:=
$(
patsubst
%.pwsg, clean_%.pwsg,
$(pwsg_sources)
)
l_copy
:=
$(export_pwsg)
$(exe_dir)
/pwr_ge_setup.dat
$(src_dir)
/ge_colors.dat
l_clean_copy
:=
$(clean_pwsg)
clean_dat
clean_dat
:
@
$(rm)
$(rmflags)
$(exe_dir)
/pwr_ge_setup.dat
@
$(rm)
$(rmflags)
$(src_dir)
/ge_colors.dat
$(exe_dir)/pwr_ge_setup.dat
:
pwr_ge_setup.dat
@
$(log_export)
@
copy/nolog
$(source)
$(target)
$(src_dir)/ge_colors.dat
:
ge_colors.dat
@
$(log_export)
@
$(cp)
$(source)
$(target)
$(exe_dir)/%.pwsg
:
%.pwsg
@
$(log_export)
@
$(cp)
$(source)
$(target)
$(clean_pwsg)
:
clean_%.pwsg : %.pwsg
@
$(rm)
$(rmflags)
$(exe_dir)
/
$(
notdir
$<
)
endif
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