Commit 988e4ad8 authored by claes's avatar claes

Wb build WebGraph modified for read of pwg files

parent 03583387
...@@ -812,6 +812,7 @@ void wb_build::xttgraph( pwr_tOid oid) ...@@ -812,6 +812,7 @@ void wb_build::xttgraph( pwr_tOid oid)
void wb_build::webgraph( pwr_tOid oid) void wb_build::webgraph( pwr_tOid oid)
{ {
pwr_tFileName dest_fname; pwr_tFileName dest_fname;
pwr_tFileName src_fname;
pwr_tCmd cmd; pwr_tCmd cmd;
pwr_tString80 java_name; pwr_tString80 java_name;
pwr_tString80 name; pwr_tString80 name;
...@@ -828,6 +829,7 @@ void wb_build::webgraph( pwr_tOid oid) ...@@ -828,6 +829,7 @@ void wb_build::webgraph( pwr_tOid oid)
char dev[80], type[80]; char dev[80], type[80];
int version; int version;
pwr_tString80 appletsignature = ""; pwr_tString80 appletsignature = "";
char *s;
wb_object o = m_session.object(oid); wb_object o = m_session.object(oid);
if ( !o) { if ( !o) {
...@@ -862,6 +864,7 @@ void wb_build::webgraph( pwr_tOid oid) ...@@ -862,6 +864,7 @@ void wb_build::webgraph( pwr_tOid oid)
return; return;
} }
if ( isupper(java_name[0])) {
cdh_ToLower( java_name, java_name); cdh_ToLower( java_name, java_name);
java_name[0] = toupper(java_name[0]); java_name[0] = toupper(java_name[0]);
...@@ -959,6 +962,51 @@ void wb_build::webgraph( pwr_tOid oid) ...@@ -959,6 +962,51 @@ void wb_build::webgraph( pwr_tOid oid)
m_sts = PWRB__SUCCESS; m_sts = PWRB__SUCCESS;
} }
} }
}
else {
// Copy from $pwrp_pop to $pwrp_web
strcpy( graph_name, cdh_Low(java_name));
cdh_ToLower( graph_name, graph_name);
strcpy( src_fname, "$pwrp_pop/");
strcat( src_fname, graph_name);
if ( strstr( src_fname, ".pwg") == 0)
strcat( src_fname, ".pwg");
dcli_translate_filename( src_fname, src_fname);
m_sts = dcli_file_time( src_fname, &src_time);
if ( evenSts()) {
m_sts = PWRB__NOBUILT;
return;
}
strcpy( dest_fname, "$pwrp_web/");
strcat( dest_fname, graph_name);
if ( strstr( dest_fname, ".pwg") == 0)
strcat( dest_fname, ".pwg");
dcli_translate_filename( dest_fname, dest_fname);
m_sts = dcli_file_time( dest_fname, &dest_time);
if ( opt.force || evenSts() || src_time.tv_sec > dest_time.tv_sec) {
sprintf( cmd, "cp %s %s", src_fname, dest_fname);
system( cmd);
sprintf( cmd, "Build: WebGraph copy $pwrp_pop/%s -> $pwrp_web", graph_name);
MsgWindow::message( 'I', cmd, msgw_ePop_No, oid);
strcpy( name, graph_name);
if (( s = strrchr( name, '.')))
*s = 0;
wb_log::log( wlog_eCategory_GeBuild, name, 0);
m_sts = PWRB__SUCCESS;
}
else
m_sts = PWRB__NOBUILT;
}
} }
void wb_build::appgraph( pwr_tOid oid) void wb_build::appgraph( pwr_tOid oid)
......
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