Changeset 812


Ignore:
Timestamp:
03/09/11 17:19:12 (8 years ago)
Author:
beliar
Message:

Patch by Beliar

  • Using a better way to install the PARPG python module
Location:
branches/active/character_customization
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • branches/active/character_customization/setup.nsi

    r811 r812  
    99!define EXEC_SCRIPT_NAME "parpg-run.py" 
    1010# MUI 1.67 compatible ------ 
    11 !include "MUI.nsh" 
     11!include "MUI2.nsh" 
    1212!include "AdvUninstLog2.nsh" 
     13!include "python-module.nsh" 
    1314 
    1415# MUI Settings 
     
    3031!define MUI_PAGE_CUSTOMFUNCTION_PRE SelectFilesPARPG 
    3132!insertmacro MUI_PAGE_DIRECTORY 
     33!insertmacro PAGE_PYTHON_MODULE 
    3234# Instfiles page PARPG 
    3335!insertmacro MUI_PAGE_INSTFILES 
     
    117119  SectionIn RO 
    118120  DetailPrint "Installing PARPG python package" 
    119   MessageBox MB_ICONINFORMATION|MB_OK "Setup will now call the PARPG python module installer. Please do not abort the installation." 
    120   SetOutPath "$TEMP" 
    121   File "parpg-module.exe" 
    122   ExecWait "$TEMP/parpg-module.exe" $0 
    123   Delete "parpg-module.exe" 
     121  SetOutPath "$PythonPath\lib\site-packages" 
     122  SetOverwrite try 
     123  FILE /r /x *svn* "${PARPG_DIR}\parpg"  
     124  SetAutoClose true 
    124125SectionEnd 
    125126#------------ Main. Packages PARPG code -------------- 
    126127Section "PARPG Datafiles" PARPG-data 
    127128  SectionIn RO 
     129  SetOverwrite try 
     130   
     131  # get all the core PARPG files 
     132  SetOutPath "$INSTDIR\dialogue" 
     133  !insertmacro UNINSTALL.LOG_OPEN_INSTALL 
     134  FILE /r /x *svn* "${PARPG_DIR}\dialogue\"  
     135  !insertmacro UNINSTALL.LOG_CLOSE_INSTALL 
     136  SetOutPath "$INSTDIR\fonts" 
     137  !insertmacro UNINSTALL.LOG_OPEN_INSTALL 
     138  FILE /r /x *svn* "${PARPG_DIR}\fonts\"  
     139  !insertmacro UNINSTALL.LOG_CLOSE_INSTALL 
     140  SetOutPath "$INSTDIR\gui" 
     141  !insertmacro UNINSTALL.LOG_OPEN_INSTALL 
     142  FILE /r /x *svn* "${PARPG_DIR}\gui\"  
     143  !insertmacro UNINSTALL.LOG_CLOSE_INSTALL 
     144  SetOutPath "$INSTDIR\maps" 
     145  !insertmacro UNINSTALL.LOG_OPEN_INSTALL 
     146  FILE /r /x *svn* "${PARPG_DIR}\maps\"  
     147  !insertmacro UNINSTALL.LOG_CLOSE_INSTALL 
     148  SetOutPath "$INSTDIR\music" 
     149  !insertmacro UNINSTALL.LOG_OPEN_INSTALL 
     150  FILE /r /x *svn* "${PARPG_DIR}\music\"  
     151  !insertmacro UNINSTALL.LOG_CLOSE_INSTALL 
     152  SetOutPath "$INSTDIR\objects" 
     153  !insertmacro UNINSTALL.LOG_OPEN_INSTALL 
     154  FILE /r /x *svn* "${PARPG_DIR}\objects\"  
     155  !insertmacro UNINSTALL.LOG_CLOSE_INSTALL 
     156  SetOutPath "$INSTDIR\quests" 
     157  !insertmacro UNINSTALL.LOG_OPEN_INSTALL 
     158  FILE /r /x *svn* "${PARPG_DIR}\quests\"  
     159  !insertmacro UNINSTALL.LOG_CLOSE_INSTALL 
     160  SetOutPath "$INSTDIR\character_scripts" 
     161  !insertmacro UNINSTALL.LOG_OPEN_INSTALL 
     162  FILE /r /x *svn* "${PARPG_DIR}\character_scripts\" 
     163  !insertmacro UNINSTALL.LOG_CLOSE_INSTALL 
     164 
    128165  SetOutPath "$INSTDIR" 
    129166  !insertmacro UNINSTALL.LOG_OPEN_INSTALL 
    130   SetOverwrite try 
    131    
    132   # get all the core PARPG files 
    133   FILE /r /x *svn* "${PARPG_DIR}\fonts"  
    134   FILE /r /x *svn* "${PARPG_DIR}\gui"  
    135   FILE /r /x *svn* "${PARPG_DIR}\maps"  
    136   FILE /r /x *svn* "${PARPG_DIR}\music"  
    137   FILE /r /x *svn* "${PARPG_DIR}\objects"  
    138   FILE /r /x *svn* "${PARPG_DIR}\quests"  
    139   FILE /r /x *svn* "${PARPG_DIR}\character_scripts" 
    140  
    141167  FILE "${PARPG_DIR}\README" 
    142168  FILE "${PARPG_DIR}\run.py" 
     
    192218  !insertmacro UNINSTALL.LOG_PREPARE_INSTALL 
    193219  !insertmacro SetSectionFlag ${PARPG} ${SF_RO} 
     220  StrCpy $PythonPath "" 
     221  StrCpy $PythonVer "Custom" 
    194222  InitPluginsDir 
    195223FunctionEnd 
Note: See TracChangeset for help on using the changeset viewer.