Changeset 422


Ignore:
Timestamp:
12/03/09 00:57:43 (9 years ago)
Author:
Kaydeth_parpg
Message:

Ticket #113. Patch by Kaydeth. Added publisher and version information to the packaging script. Also added the options to install Python, Pyaml, and OpenAL dependencies for PARPG. fixes[s:trac, t:113]

Location:
trunk/game
Files:
9 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/packaging/windows_packaging.nsi

    r401 r422  
    11!define PRODUCT_NAME "PARPG" 
    2 ;!define PRODUCT_VERSION "1.0" 
    3 ;!define PRODUCT_PUBLISHER "PARPG" 
     2!define PRODUCT_VERSION "0.1" 
     3!define PRODUCT_PUBLISHER "PARPG Development Team" 
    44!define PRODUCT_WEB_SITE "http://blog.parpg.net/" 
    55!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" 
     
    1818; Welcome page 
    1919!insertmacro MUI_PAGE_WELCOME 
     20 
     21!insertmacro MUI_PAGE_COMPONENTS 
     22 
    2023; License page 
    2124!insertmacro MUI_PAGE_LICENSE "${PARPG_DIR}\LICENSE" 
     
    4447ShowUnInstDetails show 
    4548 
    46 Section "MainSection" SEC01 
     49;------------ Main. Packages PARPG code -------------- 
     50Section "PARPG" PARPG 
    4751  SetOutPath "$INSTDIR" 
    4852  SetOverwrite try 
     
    9397  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninstall.exe" 
    9498  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\gui\icons\window_icon.ico" 
    95 ;  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" 
     99  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" 
    96100  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" 
    97 ;  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" 
     101  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" 
    98102SectionEnd 
    99103 
     
    151155  SetAutoClose true 
    152156SectionEnd 
     157 
     158;---------- DOWNLOAD PYTHON ------- 
     159Section "ActivePython (required)" Python 
     160  SetDetailsPrint textonly 
     161 
     162  DetailPrint "Downloading Python" 
     163  NSISdl::download http://downloads.activestate.com/ActivePython/windows/2.6/ActivePython-2.6.4.8-win32-x86.msi $TEMP/pysetup.msi 
     164  Pop $R0 ;Get the return value 
     165    StrCmp $R0 "success" +3 
     166      MessageBox MB_OK "Failed to download Python installer: $R0" 
     167      Quit 
     168 
     169  DetailPrint "Installing Python" 
     170  ExecWait '"msiexec" /i "$TEMP\pysetup.msi"' 
     171 
     172  DetailPrint "Deleting Python installer" 
     173  Delete $TEMP\pysetup.msi 
     174SectionEnd 
     175 
     176;------------ PyYAML -------------- 
     177Section "PyYAML (required)" PyYAML 
     178  SetDetailsPrint textonly 
     179 
     180  SetOutPath "$SYSDIR"        ;Some Systems need this DLL to install PyYAML properly 
     181  ;SetOverwrite ifnewer 
     182  ;File "requs\msvcr71.dll" 
     183  ;SetOverwrite on 
     184   
     185  NSISdl::download http://pyyaml.org/download/pyyaml/PyYAML-3.09.win32-py2.6.exe $TEMP\pyaml_setup.exe 
     186  Pop $R0 ;Get the return value 
     187    StrCmp $R0 "success" +3 
     188      MessageBox MB_OK "Failed to download PyYAML installer: $R0" 
     189      Quit 
     190 
     191   
     192  SetOutPath "$TEMP" 
     193  DetailPrint "Installing PyYAML" 
     194  ExecWait "$TEMP\pyaml_setup.exe" 
     195 
     196  DetailPrint "Deleting PyYAML installer" 
     197  Delete "$TEMP\PyYAML_setup.exe" 
     198SectionEnd 
     199;----------- OPEN AL -------------- 
     200Section "OpenAL (required)" OpenAL 
     201  SetDetailsPrint textonly 
     202 
     203  ;oalinst.exe must be downloaded seperately and put into the 
     204  ;dependencies directory for packaging to be successful 
     205  SetOutPath "$TEMP" 
     206  File ".\dependencies\oalinst.exe" 
     207  DetailPrint "Installing OpenAL" 
     208  ExecWait "$TEMP\oalinst.exe" 
     209 
     210  DetailPrint "Deleting OpenAL installer" 
     211  Delete "$TEMP\oalinst.exe" 
     212SectionEnd 
     213;--------- SECTION END ------------ 
     214 
     215LangString DESC_PARPG ${LANG_ENGLISH} "PARPG - The game code" 
     216LangString DESC_Python ${LANG_ENGLISH} "ActivePython 2.6.4.8 - Required to run PARPG. Requires an active internet connection to install." 
     217LangString DESC_PyYAML ${LANG_ENGLISH} "PyYAML 3.09 - Required Python Module. Requires an active internet connection to install." 
     218LangString DESC_OpenAL ${LANG_ENGLISH} "OpenAL - Required for sound and music" 
     219 
     220!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN 
     221  !insertmacro MUI_DESCRIPTION_TEXT ${PARPG} $(DESC_PARPG) 
     222  !insertmacro MUI_DESCRIPTION_TEXT ${ActivePython} $(DESC_Python) 
     223  !insertmacro MUI_DESCRIPTION_TEXT ${PyYAML} $(DESC_PyYAML) 
     224  !insertmacro MUI_DESCRIPTION_TEXT ${OpenAL} $(DESC_OpenAL) 
     225!insertmacro MUI_FUNCTION_DESCRIPTION_END 
Note: See TracChangeset for help on using the changeset viewer.