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
c874e779
Commit
c874e779
authored
Jun 30, 2009
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Directory db changed from BerkelyDb to wb_load format
parent
e016f53f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
3 deletions
+60
-3
src/exp/com/src/os_linux/reload.sh
src/exp/com/src/os_linux/reload.sh
+2
-3
wb/lib/wb/src/wb_erep.cpp
wb/lib/wb/src/wb_erep.cpp
+58
-0
No files found.
src/exp/com/src/os_linux/reload.sh
View file @
c874e779
...
...
@@ -118,7 +118,7 @@ reload_renamedb()
return
fi
reload_continue
"Pass
copy
rename old database"
reload_continue
"Pass rename old database"
for
cdb
in
$databases
;
do
reload_save_file
$pwrp_db
/
$cdb
.db
...
...
@@ -340,7 +340,6 @@ usage()
dumpdb Dump database to textfile
\$
pwrp_db/'volume'.wb_dmp
classvolumes Create structfiles and loadfiles for classvolumes
renamedb Rename the old database
dirvolume Load directory volume
loaddb Load the dump into the new database
compile Compile all plcprograms in the database
createload Create new loadfiles.
...
...
@@ -379,7 +378,7 @@ echo ""
echo
"-- Reloading volume
$databases
"
echo
""
passes
=
"dumpdb classvolumes renamedb
dirvolume
loaddb compile createload createboot"
passes
=
"dumpdb classvolumes renamedb loaddb compile createload createboot"
echo
"Pass:
$passes
"
echo
""
echo
-n
"Enter start pass [dumpdb] > "
...
...
wb/lib/wb/src/wb_erep.cpp
View file @
c874e779
...
...
@@ -28,6 +28,7 @@
#include "wb_vrepdb.h"
#include "wb_vrepdbms.h"
#include "wb_vrepced.h"
#include "wb_vrepmem.h"
#include "wb_vrepref.h"
#include "wb_vrepext.h"
#include "wb_cdrep.h"
...
...
@@ -545,6 +546,7 @@ void wb_erep::loadMeta( pwr_tStatus *status, char *db)
*
status
=
LDH__PROJCONFIG
;
// Load directory volume
#if 0
strcpy( vname, "$pwrp_db/directory.db");
dcli_translate_filename( vname, vname);
...
...
@@ -556,6 +558,19 @@ void wb_erep::loadMeta( pwr_tStatus *status, char *db)
addDb( &sts, vrepdb);
MsgWindow::message( 'I', "Directory database opened", vname);
}
#endif
strcpy
(
vname
,
"$pwrp_db/directory.wb_load"
);
dcli_translate_filename
(
vname
,
vname
);
sts
=
dcli_search_file
(
vname
,
found_file
,
DCLI_DIR_SEARCH_INIT
);
dcli_search_file
(
vname
,
found_file
,
DCLI_DIR_SEARCH_END
);
if
(
ODD
(
sts
))
{
wb_vrepmem
*
vrepmem
=
new
wb_vrepmem
(
this
);
vrepmem
->
loadWbl
(
vname
,
&
sts
);
vrepmem
->
name
(
"directory"
);
addDb
(
&
sts
,
vrepmem
);
MsgWindow
::
message
(
'I'
,
"Directory database opened"
,
vname
);
}
return
;
}
...
...
@@ -819,6 +834,7 @@ void wb_erep::loadMeta( pwr_tStatus *status, char *db)
if
(
!
db
||
(
db
&&
cdh_NoCaseStrcmp
(
"directory"
,
db
)
==
0
))
{
char
uname
[
80
];
#if 0
strcpy( vname, "$pwrp_db/directory.db");
dcli_translate_filename( vname, vname);
...
...
@@ -858,6 +874,48 @@ void wb_erep::loadMeta( pwr_tStatus *status, char *db)
vrepdb->name("directory");
addDb( &sts, vrepdb);
MsgWindow::message( 'I', "Database opened", vname);
#endif
strcpy
(
vname
,
"$pwrp_db/directory.wb_load"
);
dcli_translate_filename
(
vname
,
vname
);
sts
=
dcli_search_file
(
vname
,
found_file
,
DCLI_DIR_SEARCH_INIT
);
dcli_search_file
(
vname
,
found_file
,
DCLI_DIR_SEARCH_END
);
if
(
EVEN
(
sts
))
{
*
status
=
LDH__PROJCONFIG
;
return
;
}
if
(
wb_dblock
::
is_locked
(
vname
,
uname
))
{
char
msg
[
120
];
sprintf
(
msg
,
"Database directory is locked by user %s"
,
uname
);
MsgWindow
::
message
(
'E'
,
msg
,
msgw_ePop_No
);
CoWow
*
wow
=
MsgWindow
::
get_wow
();
if
(
wow
)
{
int
res
=
wow
->
CreateModalDialog
(
"Database Locked"
,
msg
,
"Exit"
,
0
,
"Remove lock"
,
"$pwr_exe/wtt_padlock.png"
);
switch
(
res
)
{
case
wow_eModalDialogReturn_NYI
:
case
wow_eModalDialogReturn_Button2
:
case
wow_eModalDialogReturn_Button1
:
case
wow_eModalDialogReturn_Deleted
:
exit
(
0
);
case
wow_eModalDialogReturn_Button3
:
// Remove lock
wb_dblock
::
dbunlock
(
vname
);
break
;
}
}
else
exit
(
0
);
}
wb_vrepmem
*
vrepmem
=
new
wb_vrepmem
(
this
);
vrepmem
->
loadWbl
(
vname
,
&
sts
);
vrepmem
->
name
(
"directory"
);
addDb
(
&
sts
,
vrepmem
);
MsgWindow
::
message
(
'I'
,
"Database opened"
,
vname
);
}
if
(
!
vol_cnt
)
...
...
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