Author | Topic: Copy routine for Xbase++ 2.0 installation, suitable for SUBSTed environments | |
---|---|---|
Thomas Braun | Copy routine for Xbase++ 2.0 installation, suitable for SUBSTed environments on Fri, 10 Oct 2014 14:37:56 +0200 Hi, now that I have prepared something that basically seems to be working, I wanted to show my "solution" for a way to keep my environment switcher via SUBST command. This is what I did: Installed Xbase++ with all options apart from the environment change Call the following batch file to copy files to the "correct" location so switching environments via SUBST works In case of updates, just install them via the workbench and call the batch again. In my specific case, the Xbase++ installation is inside a VM running on VM workstation - so as a final step, I need to copy the resulting directrory structure from the VM to my development machine. One additional benefit of this could be that you are able to see any header file changes between releases. Here is the current version of the batch file, it also takes into account that the WAA directory might be missing. Porting this to a powershell script could nmake the parameter handling more elegant, but it also does the job as a .cmd batch. @echo OFF REM REM Parameters: REM ------------ REM %1 -> Target build number REM %2 -> target directory REM REM If you omit both parameters, the build is taken from the current date and the REM target dir is taken from IF NOT "%2"... a few lines down IF NOT "%1"=="" (SET "build=%1") ELSE (SET "build=%date:~-4,4%-%date:~-7,2%-%date:~0,2%") REM If you always have the same target dir, just change the default in the ELSE branch REM and omit the 2nd parameter when calling the batch IF NOT "%2"=="" (SET "target_dir=%2") ELSE (SET "target_dir=%USERPROFILE%\Documents\Alaska") @echo Target = %target_dir% @echo Build = %build% IF NOT EXIST "%target_dir%" MD "%target_dir%" IF NOT EXIST "%target_dir%\%build%" MD "%target_dir%\%build%" IF NOT EXIST "%target_dir%\%build%\book" MD "%target_dir%\%build%\book" IF NOT EXIST "%target_dir%\%build%\source" MD "%target_dir%\%build%\source" @echo. @echo Copying "Alaska Software\xpp20" @echo. XCOPY "%programFiles(x86)%\Alaska Software\xpp20\*.*" %target_dir%\%build% /E /Q /Y @echo. @echo Copying "Alaska Software\help" @echo. XCOPY "%programFiles(x86)%\Alaska Software\help20\*.*" %target_dir%\%build%\book /E /Q /Y @echo. @echo Copying "Alaska Software\source" @echo. XCOPY "%USERPROFILE%\Documents\Xbase++\source\*.*" %target_dir%\%build%\source /E /Q /Y IF NOT EXIST "%programFiles(x86)%\Alaska Software\waa20" GOTO END @echo. @echo Copying "Alaska Software\waa20" @echo. SET "WAA_COPY=true" XCOPY "%programFiles(x86)%\Alaska Software\waa20\*.*" %target_dir%\%build% /E /Q /Y IF NOT "%WAA_COPY%"=="true" GOTO END REM copy waa lib and dll files to the correct locations XCOPY "%programFiles(x86)%\Alaska Software\waa20\server\waa1*.dll" %target_dir%\%build%\lib /E /Q /Y XCOPY "%programFiles(x86)%\Alaska Software\waa20\server\waa1*.lib" %target_dir%\%build%\lib /E /Q /Y :END PAUSE | |
Raymond Fischbach | Re: Copy routine for Xbase++ 2.0 installation, suitable for SUBSTed environments on Fri, 10 Oct 2014 18:09:01 +0200 Thomas Braun a pensé très fort : > now that I have prepared something that basically seems to be working, I > wanted to show my "solution" for a way to keep my environment switcher via > SUBST command. Hello Thomas, Thank you for sharing this, Raymond |