Last active
December 30, 2015 18:19
-
-
Save schnell18/7866739 to your computer and use it in GitHub Desktop.
Sample script to use cava packager to build standalone wx_perl binary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set PATH=C:\Program Files\Cava Packager 2.0\bin;D:\strawberryperl\perl\bin;D:\utils;%PATH% | |
echo %PATH% | |
set RET=0 | |
for /F %%i in ('where perl') do set PERL_EXE=%%i | |
for /F %%i in ('cd') do set WS_DIR=%%i | |
set PERL_EXE=%PERL_EXE:\=/% | |
set WS_DIR=%WS_DIR:\=/% | |
rem rewrite the cava project file w/ appropriate pathes | |
rem perl executable extra Module Search Paths script path and resource path | |
rem localnode is host specific, you need replace it with the value on your build host | |
sqlite3 dist\gui\cava20.cpkgproj "update local_config_values set config_value='%PERL_EXE%' where config_name='perlpath'; update local_config_values set config_value='%WS_DIR%/src' where config_name='extrapaths'; update local_config_values set config_value='%WS_DIR%/src/res' where config_name='resource_path'; update local_path set localpath='%WS_DIR%/src/parser_gui.pl' where pathkey='parser_gui.pl'; update script set file_path='%WS_DIR%/src/parser_gui.pl' where script_key='parser_gui.pl'; update local_path set localnode='EB9697D8-70CA-1014-ADD2-DF1A3D831AAC' where pathkey='parser_gui.pl'; update local_config_values set localnode='EB9697D8-70CA-1014-ADD2-DF1A3D831AAC';" | |
if not %ERRORLEVEL% == 0 ( | |
echo Failed to update cava packager project file | |
set RET=1 | |
goto CLEAN_UP | |
) | |
rem build the GUI client | |
cavaconsole -S -B -project dist\gui | |
if not %ERRORLEVEL% == 0 ( | |
echo Failed to build executable | |
set RET=2 | |
goto CLEAN_UP | |
) | |
:CLEAN_UP | |
rem restore the cava project file | |
svn revert dist\gui\cava20.cpkgproj | |
cd dist\gui\release\XXX | |
rd /S /Q bin | |
if exist '%WS_DIR%\dist\gui\release\XXX\xxx-gui-win64.zip' del xxx-gui-win64.zip | |
zip -r -9 xxx-gui-win64.zip . | |
exit /B %RET% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment