View unanswered posts | View active topics



Reply to topic  [ 2 posts ] 
Installer Changes 
Author Message
Member

Joined: Fri Dec 16, 2011 11:21 am
Posts: 1
Reply with quote
Hi guys,

I'm the sysadmin for a games company using your application and we love it, the problem I had is that I need to resort to silent installation/deployment to save myself the manhours going back and forth putting it on every users PC manually and having it download the flex and AIR SDK's every time.

As a result I've modified the NSIS script to look for and use a copy of the SDK zip files if they are kept in the same folder as the installer exe. As a result I can now deploy the app silently using the /S flag.

I've also fixed what I think(?) is a logic bug in the deployment script on lines 392 and 462? From what I can tell the IfFileExists check should skip 7 lines not 6 in both cases?

Anyway, here's the diff taken against svn rev 2176 if it is of any use.

Thanks,
Craig

Code:
Index: Installer.nsi
===================================================================
--- Installer.nsi   (revision 2176)
+++ Installer.nsi   (working copy)
@@ -388,8 +388,14 @@
    ; Connect to internet
    Call ConnectInternet
 
+   ; If the Flex SDK exists in the installer directory then copy that to $TEMP to
+   ; avoid downloading it multiple times. Helps with bulk silent deployments.
+   ; 2011-12-15 cmarsden
+   IfFileExists "$EXEDIR\flex_sdk_${FLEX}.zip" 0 +2
+   CopyFiles "$EXEDIR\flex_sdk_${FLEX}.zip" $TEMP
+   
    ; Download Flex SDK zip file. If the extract failed previously, use the old file.
-   IfFileExists "$TEMP\flex_sdk_${FLEX}.zip" +6 0
+   IfFileExists "$TEMP\flex_sdk_${FLEX}.zip" +7 0
    NSISdl::download /TIMEOUT=30000 http://fpdownload.adobe.com/pub/flex/sdk/builds/flex4.6/flex_sdk_${FLEX}.zip "$TEMP\flex_sdk_${FLEX}.zip"
    Pop $R0
    StrCmp $R0 "success" +4
@@ -458,8 +464,14 @@
    ; Connect to internet
    Call ConnectInternet
 
+   ; If the AIR SDK exists in the installer directory then copy that to $TEMP to
+   ; avoid downloading it multiple times. Helps with bulk silent deployments.
+   ; 2011-12-15 cmarsden
+   IfFileExists "$EXEDIR\air_sdk_${AIR}.zip" 0 +2
+   CopyFiles "$EXEDIR\air_sdk_${AIR}.zip" $TEMP
+   
    ; Download AIR SDK zip file. If the extract failed previously, use the old file.
-   IfFileExists "$TEMP\air_sdk_${AIR}.zip" +6 0
+   IfFileExists "$TEMP\air_sdk_${AIR}.zip" +7 0
    NSISdl::download /TIMEOUT=30000 http://airdownload.adobe.com/air/win/download/3.1/AdobeAIRSDK.zip "$TEMP\air_sdk_${AIR}.zip"
    Pop $R0
    StrCmp $R0 "success" +4
@@ -511,6 +523,15 @@
    CreateDirectory "$INSTDIR\Tools\flexlibs\runtimes\player\11.1\win\"
    
    ; Download Flash debug player
+   
+   ; If it already exists in the installer directory then copy that the
+   ; destination to avoid downloading it multiple times.
+   ; 2011-12-15 cmarsden
+   IfFileExists "$EXEDIR\flashplayer_11_sa_debug_32bit.exe" 0 +4
+   CopyFiles "$EXEDIR\flashplayer_11_sa_debug_32bit.exe" "$INSTDIR\Tools\flexlibs\runtimes\player\11.1\win\FlashPlayerDebugger.exe"
+   Pop $R0
+   StrCmp $R0 "success" +8
+
    NSISdl::download /TIMEOUT=30000 http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_sa_debug_32bit.exe "$INSTDIR\Tools\flexlibs\runtimes\player\11.1\win\FlashPlayerDebugger.exe"
    Pop $R0
    StrCmp $R0 "success" +4


Fri Dec 16, 2011 11:32 am
Profile
Admin

Joined: Tue Aug 30, 2005 6:14 pm
Posts: 3046
Location: Finland
Reply with quote
Thanks, nice catch with the logic errors. Forgot to update those when i added logging lines there.

This one was on my todo list. :) Applied to SVN slightly modified.


Fri Dec 16, 2011 1:34 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.