Skip to content

Commit

Permalink
fix installers build
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalak committed Aug 1, 2022
1 parent b5ae12e commit 2effca5
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 27 deletions.
51 changes: 37 additions & 14 deletions bld/setupgui/mkdisk/langdat.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* Open Watcom Project
*
* Copyright (c) 2002-2021 The Open Watcom Contributors. All Rights Reserved.
* Copyright (c) 2002-2022 The Open Watcom Contributors. All Rights Reserved.
* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
*
* ========================================================================
Expand Down Expand Up @@ -428,6 +428,39 @@ static char *NextWord( char *p )
return( FirstWord( p + strlen( p ) + 1 ) );
}

static char *GetNextPathOrFile( char *p )
{
char c;
char quotechar;
char *start;

p += strlen( p ) + 1;
SKIP_BLANKS( p );
if( *p == '\0' )
return( NULL );
quotechar = ( *p == '"' ) ? *p++ : ' ';
start = p;
while( (c = *p) != '\0' ) {
if( c == quotechar ) {
*p = '\0';
return( start );
}
#ifdef __UNIX__
if( c == '\\' ) {
*p = '/';
}
#else
if( c == '/' ) {
*p = '\\';
}
#endif
p++;
}
*p++ = '\0';
*p = '\0';
return( start );
}

bool checkWord( char *p, ctl_file *word_list )
{
ctl_file *w;
Expand Down Expand Up @@ -768,23 +801,13 @@ static void ProcessCtlFile( const char *name )
p = FirstWord( p + 1 );
if( stricmp( p, "INCLUDE" ) == 0 ) {
if( IncludeStk->skipping == 0 ) {
char inc_file[_MAX_PATH];

p = GetPathOrFile( p, inc_file );
PushInclude( inc_file );
PushInclude( GetNextPathOrFile( p ) );
}
}
else if( stricmp( p, "LOG" ) == 0 ) {
if( IncludeStk->skipping == 0 ) {
char log_name[_MAX_PATH];

p = GetPathOrFile( p, &log_name );
p = GetWord( p, &word );
if( *word == '\0' || strcmp( word, "]" ) == 0 ) {
BackupLog( log_name, LogBackup );
} else {
BackupLog( log_name, strtoul( word, NULL, 0 ) );
}
log_name = GetNextPathOrFile( p );
p = NextWord( log_name );
if( LogFile == NULL ) {
OpenLog( log_name );
}
Expand Down
6 changes: 3 additions & 3 deletions distrib/ow/builder.ctl
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ set PROJNAME=install

set PROJDIR=<CWD>

[ INCLUDE <OWROOT>/build/prolog.ctl ]
[ INCLUDE "<OWROOT>/build/prolog.ctl" ]

cdsay <PROJDIR>
cdsay "<PROJDIR>"

echo Installer Build: <1> <2> <3> <4> <5>

Expand All @@ -32,4 +32,4 @@ echo Installer Build: <1> <2> <3> <4> <5>

[ BLOCK . . ]

[ INCLUDE <OWROOT>/build/epilog.ctl ]
[ INCLUDE "<OWROOT>/build/epilog.ctl" ]
25 changes: 15 additions & 10 deletions distrib/ow/master.mif
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,16 @@ distrib_bindir = ../bin
!ifdef missing

all: .SYMBOLIC
@rm -f *.__c
langdat -l filelist $(langdat_keys) -r $(bld_ver) c
mkinf -x -i../include $(mkinf_opt_$(host_os)) c filelist $(%OWRELROOT)
mkinf -x -i../include $(mkinf_opt_$(host_os)) c filelist "$(%OWRELROOT)"
langdat -l filelist $(langdat_keys) -r $(bld_ver) f77
mkinf -x -i../include $(mkinf_opt_$(host_os)) f77 filelist $(%OWRELROOT)
mkinf -x -i../include $(mkinf_opt_$(host_os)) f77 filelist "$(%OWRELROOT)"
!ifdef debug
@%ren filelist filelist.__c
!else
@rm -rf filelist
!endif

!else

Expand All @@ -94,10 +99,10 @@ $(distrib_bindir)/$(installer_c) : ../files.dat $(distrib_bindir) $(setup_c) .AL
@%make clean_inf
langdat -l filelist $(langdat_keys) -r $(bld_ver) -c $[@ c
@copy $]@ setup.exe
mkinf -i.. -i../../include -dBldVer=$(bld_ver_str) -dDstDir=$(dstdir) $(mkinf_opt_$(host_os)) c filelist $(%OWRELROOT)
@copy setup.inf $(%OWRELROOT)/setup.inf
uzip setup.zip instarch.lst $(%OWRELROOT)
@rm $(%OWRELROOT)/setup.inf
mkinf -i.. -i../../include -dBldVer=$(bld_ver_str) -dDstDir=$(dstdir) $(mkinf_opt_$(host_os)) c filelist "$(%OWRELROOT)"
@copy setup.inf "$(%OWRELROOT)/setup.inf"
uzip setup.zip instarch.lst "$(%OWRELROOT)"
@rm "$(%OWRELROOT)/setup.inf"
@rm setup.exe
!ifdef debug
@%ren filelist filelist.__c
Expand All @@ -114,10 +119,10 @@ $(distrib_bindir)/$(installer_f77) : ../files.dat $(distrib_bindir) $(setup_f77)
@%make clean_inf
langdat -l filelist $(langdat_keys) -r $(bld_ver) -c $[@ f77
@copy $]@ setup.exe
mkinf -i.. -i../../include -dBldVer=$(bld_ver_str) -dDstDir=$(dstdir) $(mkinf_opt_$(host_os)) f77 filelist $(%OWRELROOT)
@copy setup.inf $(%OWRELROOT)/setup.inf
uzip setup.zip instarch.lst $(%OWRELROOT)
@rm $(%OWRELROOT)/setup.inf
mkinf -i.. -i../../include -dBldVer=$(bld_ver_str) -dDstDir=$(dstdir) $(mkinf_opt_$(host_os)) f77 filelist "$(%OWRELROOT)"
@copy setup.inf "$(%OWRELROOT)/setup.inf"
uzip setup.zip instarch.lst "$(%OWRELROOT)"
@rm "$(%OWRELROOT)/setup.inf"
@rm setup.exe
!ifdef debug
@%ren filelist filelist.__f
Expand Down

0 comments on commit 2effca5

Please sign in to comment.