61 lines
1.6 KiB
Plaintext
61 lines
1.6 KiB
Plaintext
#if 0
|
|
[Files]
|
|
#endif
|
|
//process list of 32bit PIKA files that are installed on x64 (for TWAIN support)
|
|
#pragma option -e-
|
|
|
|
#define protected
|
|
|
|
#define FileHandle
|
|
#define FileLine
|
|
|
|
#define ReplPos
|
|
#define ReplStr
|
|
|
|
#define Line=0
|
|
#define SRC_DIR PIKA_DIR32
|
|
|
|
//avoid too much nesting
|
|
#sub DoActualWork
|
|
#if Copy(FileLine,Len(FileLine),1)=="\"
|
|
//include whole directory
|
|
Source: "{#SRC_DIR}\{#FileLine}*"; DestDir: "{app}\32\{#Copy(FileLine,1,Len(FileLine)-1)}"; Components: pika32on64; Flags: recursesubdirs restartreplace replacesameversion uninsrestartdelete ignoreversion
|
|
#else
|
|
//include files from a certain directory
|
|
#define OutputDir Copy(FileLine,1,RPos("\",FileLine)-1)
|
|
Source: "{#SRC_DIR}\{#FileLine}"; DestDir: "{app}\32\{#OutputDir}"; Components: pika32on64; Flags: restartreplace replacesameversion uninsrestartdelete ignoreversion
|
|
#endif
|
|
#endsub
|
|
|
|
#sub Process32on64Line
|
|
#if !defined(Finished)
|
|
//show that something's happening
|
|
#expr Line=Line+1
|
|
#pragma message "Processing 32on64.list line " + Str(Line)
|
|
|
|
#if Copy(FileLine,1,1)=="#" || FileLine==""
|
|
//skip comments and empty lines
|
|
#elif Copy(FileLine,1,1)=="!"
|
|
#if Copy(FileLine,2)=="PIKA"
|
|
#expr SRC_DIR=PIKA_DIR32
|
|
#elif Copy(FileLine,2)=="GTK"
|
|
#expr SRC_DIR=DEPS_DIR32
|
|
#elif Copy(FileLine,2)=="end"
|
|
#define public Finished 1
|
|
//finished
|
|
#else
|
|
#error "Unknown command: "+FileLine
|
|
#endif
|
|
#else
|
|
#expr DoActualWork
|
|
#endif
|
|
#endif
|
|
#endsub
|
|
|
|
#for {FileHandle = FileOpen(AddBackslash(SourcePath)+"32on64.list"); \
|
|
FileHandle && !FileEof(FileHandle); FileLine = FileRead(FileHandle)} \
|
|
Process32on64Line
|
|
#if FileHandle
|
|
#expr FileClose(FileHandle)
|
|
#endif
|