From 4b998eba9efe225976983a878fa667c9578f8af8 Mon Sep 17 00:00:00 2001 From: driAn Date: Sun, 5 Oct 2008 00:38:07 +0000 Subject: [PATCH] win98 fix: test existence of %appdata% first git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2825 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/vcpp/buildEnv/ac.nsi | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/source/vcpp/buildEnv/ac.nsi b/source/vcpp/buildEnv/ac.nsi index 3d5483be..02840d28 100644 --- a/source/vcpp/buildEnv/ac.nsi +++ b/source/vcpp/buildEnv/ac.nsi @@ -407,6 +407,22 @@ Function FinishPage FunctionEnd +Function ConfigureWithoutAppdata + + ; remove shortcuts to user data directory + + Delete "$SMPROGRAMS\AssaultCube\AssaultCube User Data.lnk" + Delete "$INSTDIR\User Data.lnk" + + ; configure ac without home dir + + FileOpen $9 "$INSTDIR\AssaultCube.bat" w + FileWrite $9 "bin_win32\ac_client.exe --init %1 %2 %3 %4 %5$\r$\n" + FileWrite $9 "pause$\r$\n" + FileClose $9 + +FunctionEnd + ; Installer Sections Section "AssaultCube v1.0" AC @@ -499,17 +515,16 @@ SectionEnd Section /o "Single User Only" NOAPPDATA - ; remove shortcuts to user data directory + Call ConfigureWithoutAppdata - Delete "$SMPROGRAMS\AssaultCube\AssaultCube User Data.lnk" - Delete "$INSTDIR\User Data.lnk" +SectionEnd + +Section "-Force Single User Only" ; for systems not supporting %appdata% (win98) + + IfFileExists "%appdata%" done 0 + Call ConfigureWithoutAppdata - ; configure ac without home dir - - FileOpen $9 "$INSTDIR\AssaultCube.bat" w - FileWrite $9 "bin_win32\ac_client.exe --init %1 %2 %3 %4 %5$\r$\n" - FileWrite $9 "pause$\r$\n" - FileClose $9 + done: SectionEnd