From c9d9b752a1e5baefdd7aa38a2711185dfb55a567 Mon Sep 17 00:00:00 2001 From: aurhat Date: Sat, 25 Nov 2017 03:06:06 +0100 Subject: [PATCH] Update scripts for preparing Windows installer Also cleanup --- config/scripts.cfg | 2 +- source/vcpp/buildEnv/ac.nsi | 48 +++++++++---------- source/vcpp/buildEnv/build_1_exportACdev.bat | 2 +- .../buildEnv/build_2_prepareACdirectory.bat | 3 +- 4 files changed, 28 insertions(+), 27 deletions(-) diff --git a/config/scripts.cfg b/config/scripts.cfg index 5fea5877..b4497507 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -375,7 +375,7 @@ const pushselections [ selectionwalk [] [ selsets = (concat $selsets "; addselection" $sw_cursel) ] push popselections (concat "resetselections" (pop selsets) "; pop popselections") ][ - echo no selction + echo no selection ] ] tempalias popselections [ echo no selections stored ] diff --git a/source/vcpp/buildEnv/ac.nsi b/source/vcpp/buildEnv/ac.nsi index b3abd071..63410a39 100644 --- a/source/vcpp/buildEnv/ac.nsi +++ b/source/vcpp/buildEnv/ac.nsi @@ -27,12 +27,12 @@ StrCmp $1 "" found IntOp $3 $3 + 1 Goto loop - + found: StrCpy $1 $0 $3 StrCmp $2 " " +2 StrCpy $1 '$1"' - + Pop $0 Exec '$1 $0' Pop $1 @@ -56,7 +56,6 @@ SetCompressor /SOLID lzma !define AC_FULLVERSION "v${AC_FULLVERSIONINT}" !define AC_SHORTNAME "AssaultCube" !define AC_FULLNAME "AssaultCube ${AC_FULLVERSION}" -!define AC_FULLNAMESAVE "AssaultCube_${AC_FULLVERSION}" !define AC_URLPROTOCOL "assaultcube" !define AC_MAJORVERSIONINT 1 !define AC_MINORVERSIONINT 2 @@ -64,8 +63,9 @@ SetCompressor /SOLID lzma ; path to profile folder in "MYDOCUMENTS" directory, should be the same as in assaultcube.bat !define AC_PROFILEPATH "My Games\AssaultCube\v${AC_MAJORVERSIONINT}.${AC_MINORVERSIONINT}" -Name "AssaultCube" +Name "${AC_SHORTNAME}" VAR StartMenuFolder +!define AC_STARTMENUFOLDER "$SMPROGRAMS\$StartMenuFolder" OutFile "AssaultCube_${AC_FULLVERSION}.exe" InstallDir "$PROGRAMFILES\${AC_SHORTNAME}" InstallDirRegKey HKLM "Software\${AC_SHORTNAME}" "" @@ -425,21 +425,21 @@ Section "AssaultCube ${AC_FULLVERSION}" AC WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${AC_SHORTNAME}" "NoRepair" 1 WriteUninstaller "$INSTDIR\Uninstall.exe" - + ; create shortcuts - + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - + SetShellVarContext current StrCpy $0 $DOCUMENTS SetShellVarContext all - CreateDirectory "$SMPROGRAMS\$StartMenuFolder" - CreateShortCut "$SMPROGRAMS\$StartMenuFolder\${AC_SHORTNAME}.lnk" "$INSTDIR\assaultcube.bat" "" "$INSTDIR\docs\images\favicon.ico" 0 SW_SHOWMINIMIZED - CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\docs\images\favicon.ico" 0 - CreateShortCut "$SMPROGRAMS\$StartMenuFolder\README.lnk" "$INSTDIR\README.html" "" "" 0 - CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Profile folder.lnk" "$0\${AC_PROFILEPATH}" + CreateDirectory "${AC_STARTMENUFOLDER}" + CreateShortCut "${AC_STARTMENUFOLDER}\${AC_SHORTNAME}.lnk" "$INSTDIR\assaultcube.bat" "" "$INSTDIR\docs\images\favicon.ico" 0 SW_SHOWMINIMIZED + CreateShortCut "${AC_STARTMENUFOLDER}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\docs\images\favicon.ico" 0 + CreateShortCut "${AC_STARTMENUFOLDER}\README.lnk" "$INSTDIR\README.html" "" "" 0 + CreateShortCut "${AC_STARTMENUFOLDER}\Profile folder.lnk" "$0\${AC_PROFILEPATH}" !insertmacro MUI_STARTMENU_WRITE_END @@ -470,7 +470,7 @@ Section "Register URL protocol" REGISTERURL SectionEnd Section "Uninstall" - + SetShellVarContext all ; delete installation directory @@ -499,22 +499,22 @@ Section "Uninstall" ; delete shortcuts - Delete "$DESKTOP\AssaultCube.lnk" - + Delete "$DESKTOP\${AC_SHORTNAME}.lnk" + !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder - - Delete "$SMPROGRAMS\$StartMenuFolder\${AC_SHORTNAME}.lnk" - Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" - Delete "$SMPROGRAMS\$StartMenuFolder\README.lnk" - Delete "$SMPROGRAMS\$StartMenuFolder\Profile folder.lnk" - RMDir "$SMPROGRAMS\$StartMenuFolder" - + + Delete "${AC_STARTMENUFOLDER}\${AC_SHORTNAME}.lnk" + Delete "${AC_STARTMENUFOLDER}\Uninstall.lnk" + Delete "${AC_STARTMENUFOLDER}\README.lnk" + Delete "${AC_STARTMENUFOLDER}\Profile folder.lnk" + RMDir "${AC_STARTMENUFOLDER}" + ; delete reg keys - + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${AC_SHORTNAME}" DeleteRegKey HKLM "SOFTWARE\${AC_SHORTNAME}" DeleteRegKey HKCR "${AC_URLPROTOCOL}" - + SectionEnd diff --git a/source/vcpp/buildEnv/build_1_exportACdev.bat b/source/vcpp/buildEnv/build_1_exportACdev.bat index 4b64187d..de7146ed 100644 --- a/source/vcpp/buildEnv/build_1_exportACdev.bat +++ b/source/vcpp/buildEnv/build_1_exportACdev.bat @@ -13,7 +13,7 @@ del tmpFile rem get AC files from latest local release tag cd ..\..\..\ -git archive --format zip --output source\vcpp\buildEnv\%ACDIR%\%NEWACTAG%.zip experimental +git archive --format zip --output source\vcpp\buildEnv\%ACDIR%\%NEWACTAG%.zip %NEWACTAG% cd source\vcpp\buildEnv\%ACDIR% 7z x %NEWACTAG%.zip 7z x %NEWACTAG%.zip -o..\%ACDIRTESTING% diff --git a/source/vcpp/buildEnv/build_2_prepareACdirectory.bat b/source/vcpp/buildEnv/build_2_prepareACdirectory.bat index 5be7cb7d..4bebd002 100644 --- a/source/vcpp/buildEnv/build_2_prepareACdirectory.bat +++ b/source/vcpp/buildEnv/build_2_prepareACdirectory.bat @@ -6,7 +6,8 @@ echo make sure, that you compiled new binaries in %ACDIRTESTING% folder, tested pause rem copy binaries -copy /Y %ACDIRTESTING%\bin_win32\ac_* %ACDIR%\bin_win32\ +copy /Y %ACDIRTESTING%\bin_win32\ac_client.exe %ACDIR%\bin_win32\ +copy /Y %ACDIRTESTING%\bin_win32\ac_server.exe %ACDIR%\bin_win32\ rem copy mapmodelattributes.cfg copy /Y %ACDIRTESTING%\profile\config\mapmodelattributes.cfg %ACDIR%\config\