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
5059d721
Commit
5059d721
authored
Sep 12, 2014
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wb build, plc xtthelp file converted to html for all volumes
parent
ca12d82d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
17 deletions
+54
-17
wb/lib/wb/src/wb_build.cpp
wb/lib/wb/src/wb_build.cpp
+54
-17
No files found.
wb/lib/wb/src/wb_build.cpp
View file @
5059d721
...
...
@@ -1241,6 +1241,9 @@ void wb_build::webhandler( pwr_tOid oid)
pwr_tTime
xtthelp_time
,
html_time
;
char
*
s
;
pwr_tStatus
fsts
;
pwr_tStatus
sts
;
char
line
[
200
];
wb_object
o
=
m_session
.
object
(
oid
);
if
(
!
o
)
{
...
...
@@ -1302,26 +1305,60 @@ void wb_build::webhandler( pwr_tOid oid)
m_sts
=
PWRB__SUCCESS
;
}
// Check if plc xtthelp should be converted to html
sprintf
(
srcname
,
pwr_cNamePlcXttHelp
,
cdh_VolumeIdToFnString
(
0
,
oid
.
vid
));
dcli_translate_filename
(
fname
,
srcname
);
fsts
=
dcli_file_time
(
fname
,
&
xtthelp_time
);
if
(
EVEN
(
fsts
))
return
;
sprintf
(
fname
,
"$pwrp_web/xtthelp_%s_plc_index.html"
,
cdh_VolumeIdToFnString
(
0
,
oid
.
vid
));
// Convert plc xtthelp files to html for all volumes
strcpy
(
fname
,
pwr_cNameVolumeList
);
dcli_translate_filename
(
fname
,
fname
);
fsts
=
dcli_file_time
(
fname
,
&
html_time
);
if
(
opt
.
force
||
EVEN
(
fsts
)
||
time_Acomp
(
&
xtthelp_time
,
&
html_time
)
==
1
)
{
char
msg
[
200
];
pwr_tCmd
cmd
;
sprintf
(
cmd
,
"co_convert -d $pwrp_web -t %s"
,
srcname
);
system
(
cmd
);
ifstream
fpm
(
fname
,
ios
::
in
);
if
(
!
fpm
)
{
m_sts
=
0
;
return
;
}
while
(
fpm
.
getline
(
line
,
sizeof
(
line
)))
{
int
nr
;
char
vol_array
[
7
][
80
];
pwr_tVid
vid
;
if
(
line
[
0
]
==
'#'
)
continue
;
nr
=
dcli_parse
(
line
,
" "
,
""
,
(
char
*
)
vol_array
,
sizeof
(
vol_array
)
/
sizeof
(
vol_array
[
0
]),
sizeof
(
vol_array
[
0
]),
0
);
if
(
cdh_NoCaseStrcmp
(
vol_array
[
2
],
"RootVolume"
)
==
0
||
cdh_NoCaseStrcmp
(
vol_array
[
2
],
"SubVolume"
)
==
0
||
cdh_NoCaseStrcmp
(
vol_array
[
2
],
"SharedVolume"
)
==
0
)
{
sts
=
cdh_StringToVolumeId
(
vol_array
[
1
],
&
vid
);
if
(
EVEN
(
sts
))
{
m_sts
=
0
;
return
;
}
sprintf
(
msg
,
"Build: WebHandler plc xtthelp-file converted to html"
);
MsgWindow
::
message
(
'I'
,
msg
,
msgw_ePop_No
,
oid
);
m_sts
=
PWRB__SUCCESS
;
sprintf
(
srcname
,
pwr_cNamePlcXttHelp
,
cdh_VolumeIdToFnString
(
0
,
vid
));
dcli_translate_filename
(
fname
,
srcname
);
fsts
=
dcli_file_time
(
fname
,
&
xtthelp_time
);
if
(
ODD
(
fsts
))
{
sprintf
(
fname
,
"$pwrp_web/xtthelp_%s_plc_index.html"
,
cdh_VolumeIdToFnString
(
0
,
vid
));
dcli_translate_filename
(
fname
,
fname
);
fsts
=
dcli_file_time
(
fname
,
&
html_time
);
if
(
opt
.
force
||
EVEN
(
fsts
)
||
time_Acomp
(
&
xtthelp_time
,
&
html_time
)
==
1
)
{
char
msg
[
200
];
pwr_tCmd
cmd
;
sprintf
(
cmd
,
"co_convert -d $pwrp_web -t %s"
,
srcname
);
system
(
cmd
);
sprintf
(
msg
,
"Build: WebHandler plc xtthelp-file for volume %s converted to html"
,
vol_array
[
0
]);
MsgWindow
::
message
(
'I'
,
msg
,
msgw_ePop_No
,
oid
);
m_sts
=
PWRB__SUCCESS
;
}
}
}
}
fpm
.
close
();
// Generate wb history html file
pwr_tCmd
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