Changeset 2348 for gaphor-win32-installer
- Timestamp:
- 08/21/08 03:23:29 (3 months ago)
- Files:
-
- gaphor-win32-installer/trunk/detect.nsi (modified) (1 diff)
- gaphor-win32-installer/trunk/gaphor-setup.nsi (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gaphor-win32-installer/trunk/detect.nsi
r2317 r2348 29 29 ; Prefer the current user's installation of GTK, fall back to the local machine 30 30 31 Function DetectGTK32 ReadRegStr $R6 HKCU "SOFTWARE\GTK\2.0" "DllPath"33 ${If} $R6 == ''34 ReadRegStr $R6 HKLM "SOFTWARE\GTK\2.0" "DllPath"35 ${If} $R6 == ''36 Push "No GTK registry key found"37 Push "NOK"38 Return39 ${EndIf}40 ${EndIf}41 42 ${If} ${FileExists} "$R6\libgtk-win32-2.0-0.dll"43 Push "$R6"44 Push "OK"45 ${Else}46 Push "No libgtk-win32-2.0-0.dll found in'$R6'"47 Push "NOK"48 ${EndIf}49 FunctionEnd31 ;Function DetectGTK 32 ; ReadRegStr $R6 HKCU "SOFTWARE\GTK\2.0" "DllPath" 33 ; ${If} $R6 == '' 34 ; ReadRegStr $R6 HKLM "SOFTWARE\GTK\2.0" "DllPath" 35 ; ${If} $R6 == '' 36 ; Push "No GTK registry key found" 37 ; Push "NOK" 38 ; Return 39 ; ${EndIf} 40 ; ${EndIf} 41 ; 42 ; ${If} ${FileExists} "$R6\libgtk-win32-2.0-0.dll" 43 ; Push "$R6" 44 ; Push "OK" 45 ; ${Else} 46 ; Push "No libgtk-win32-2.0-0.dll found in'$R6'" 47 ; Push "NOK" 48 ; ${EndIf} 49 ;FunctionEnd 50 50 51 51 ;-------------------------------------------------------------------- 52 52 ; Are necessary PyGTK bits and pieces available? 53 53 54 Function DetectPyGTK55 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\gtk\__init__.py"56 Push "OK"57 ${Else}58 Push "NOK"59 ${EndIf}60 FunctionEnd54 ;Function DetectPyGTK 55 ; ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\gtk\__init__.py" 56 ; Push "OK" 57 ; ${Else} 58 ; Push "NOK" 59 ; ${EndIf} 60 ;FunctionEnd 61 61 62 Function DetectPyCairo63 ${If} ${FileExists} "$PYPATH\Lib\site-packages\cairo\__init__.py"64 Push "OK"65 ${Else}66 Push "NOK"67 ${EndIf}68 FunctionEnd62 ;Function DetectPyCairo 63 ; ${If} ${FileExists} "$PYPATH\Lib\site-packages\cairo\__init__.py" 64 ; Push "OK" 65 ; ${Else} 66 ; Push "NOK" 67 ; ${EndIf} 68 ;FunctionEnd 69 69 70 Function DetectPyGObject71 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\gobject\__init__.py"72 Push "OK"73 ${Else}74 Push "NOK"75 ${EndIf}76 FunctionEnd70 ;Function DetectPyGObject 71 ; ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\gobject\__init__.py" 72 ; Push "OK" 73 ; ${Else} 74 ; Push "NOK" 75 ; ${EndIf} 76 ;FunctionEnd 77 77 78 78 ;-------------------------------------------------------------------- gaphor-win32-installer/trunk/gaphor-setup.nsi
r2347 r2348 75 75 Var /GLOBAL GTKOK 76 76 Var /GLOBAL GTKPATH 77 Var /GLOBAL PYGTKOK78 Var /GLOBAL PYGOBJECTOK79 Var /GLOBAL PYCAIROOK77 ;Var /GLOBAL PYGTKOK 78 ;Var /GLOBAL PYGOBJECTOK 79 ;Var /GLOBAL PYCAIROOK 80 80 81 81 Var /GLOBAL PATH … … 136 136 137 137 138 Section "PyGobject" SecPyGobject139 DetailPrint "--- DOWNLOAD PYGOBJECT ---"140 ${If} $PYOK == 'OK'141 !insertmacro downloadAndInstall "PyGObject" ${PYGOBJECT_URL} ${PYGOBJECT_FN} ${PYGOBJECT_CMD}142 Call DetectPyGObject143 Pop $PYGOBJECTOK144 ${EndIf}145 SectionEnd146 147 148 Section "PyCairo" SecPyCairo149 DetailPrint "--- DOWNLOAD PYCAIRO ---"150 ${If} $PYOK == 'OK'151 !insertmacro downloadAndInstall "PyCairo" ${PYCAIRO_URL} ${PYCAIRO_FN} ${PYCAIRO_CMD}152 Call DetectPyCairo153 Pop $PYCAIROOK154 ${EndIf}155 SectionEnd156 157 158 Section "PyGtk" SecPyGtk159 DetailPrint "--- DOWNLOAD PYGTK ---"160 ${If} $PYOK == 'OK'161 !insertmacro downloadAndInstall "PyGTK" ${PYGTK_URL} ${PYGTK_FN} ${PYGTK_CMD}162 Call DetectPyGTK163 Pop $PYGTKOK164 ${EndIf}165 SectionEnd138 ;Section "PyGobject" SecPyGobject 139 ; DetailPrint "--- DOWNLOAD PYGOBJECT ---" 140 ; ${If} $PYOK == 'OK' 141 ; !insertmacro downloadAndInstall "PyGObject" ${PYGOBJECT_URL} ${PYGOBJECT_FN} ${PYGOBJECT_CMD} 142 ; Call DetectPyGObject 143 ; Pop $PYGOBJECTOK 144 ; ${EndIf} 145 ;SectionEnd 146 147 148 ;Section "PyCairo" SecPyCairo 149 ; DetailPrint "--- DOWNLOAD PYCAIRO ---" 150 ; ${If} $PYOK == 'OK' 151 ; !insertmacro downloadAndInstall "PyCairo" ${PYCAIRO_URL} ${PYCAIRO_FN} ${PYCAIRO_CMD} 152 ; Call DetectPyCairo 153 ; Pop $PYCAIROOK 154 ; ${EndIf} 155 ;SectionEnd 156 157 158 ;Section "PyGtk" SecPyGtk 159 ; DetailPrint "--- DOWNLOAD PYGTK ---" 160 ; ${If} $PYOK == 'OK' 161 ; !insertmacro downloadAndInstall "PyGTK" ${PYGTK_URL} ${PYGTK_FN} ${PYGTK_CMD} 162 ; Call DetectPyGTK 163 ; Pop $PYGTKOK 164 ; ${EndIf} 165 ;SectionEnd 166 166 167 167 Section "Gaphor" SecGaphor … … 174 174 ${ElseIf} $GTKOK != 'OK' 175 175 MessageBox MB_OK "PyGTK GUI cannot be installed, because GTK+ 2.x was not found on this system.$\nIf you do want to use the PyGTK GUI, please check the installation instructions$\n$\n(GTKPATH=$GTKPATH)" 176 ${ElseIf} $PYGTKOK != "OK"177 MessageBox MB_OK "PyGTK GUI cannot be installed, because PyGTK was not found on this system.$\nPlease check the installation instructions.$\n$\n(PYPATH=$PYPATH)"178 ${ElseIf} $PYCAIROOK != "OK"179 MessageBox MB_OK "PyGTK GUI cannot be installed, because PyCairo was not found on this system.$\nPlease check the installation instructions.$\n$\n(PYPATH=$PYPATH)"180 ${ElseIf} $PYGOBJECTOK != "OK"181 MessageBox MB_OK "PyGTK GUI cannot be installed, because PyGObject was not found on this system.$\nPlease check the installation instructions.$\n$\n(PYPATH=$PYPATH)"176 ; ${ElseIf} $PYGTKOK != "OK" 177 ; MessageBox MB_OK "PyGTK GUI cannot be installed, because PyGTK was not found on this system.$\nPlease check the installation instructions.$\n$\n(PYPATH=$PYPATH)" 178 ; ${ElseIf} $PYCAIROOK != "OK" 179 ; MessageBox MB_OK "PyGTK GUI cannot be installed, because PyCairo was not found on this system.$\nPlease check the installation instructions.$\n$\n(PYPATH=$PYPATH)" 180 ; ${ElseIf} $PYGOBJECTOK != "OK" 181 ; MessageBox MB_OK "PyGTK GUI cannot be installed, because PyGObject was not found on this system.$\nPlease check the installation instructions.$\n$\n(PYPATH=$PYPATH)" 182 182 ${Else} 183 183 ;MessageBox MB_OK "Python: $PYPATH, GTK: $GTKPATH" … … 192 192 193 193 DetailPrint "Installing setuptools..." 194 ExecWait "$ PYPATH\python.exe $PYPATH\ez_setup.py" $0194 ExecWait "$\"$PYPATH\python.exe$\" $\"$PYPATH\ez_setup.py$\"" $0 195 195 DetailPrint "Return code: $0" 196 196 … … 201 201 202 202 DetailPrint "Installing zope.interface..." 203 ExecWait "$ PYPATH\Scripts\easy_install.exezope.interface==3.3.0"203 ExecWait "$\"$PYPATH\Scripts\easy_install.exe$\" zope.interface==3.3.0" 204 204 DetailPrint "Return code: $0" 205 205 … … 210 210 211 211 DetailPrint "Installing gaphor..." 212 ExecWait "$ PYPATH\Scripts\easy_install.exegaphor==${VERSION}"212 ExecWait "$\"$PYPATH\Scripts\easy_install.exe$\" gaphor==${VERSION}" 213 213 DetailPrint "Return code: $0" 214 214 … … 255 255 Pop $PYPATH 256 256 257 Call DetectGTK258 Pop $GTKOK259 Pop $GTKPATH257 ;Call DetectGTK 258 ;Pop $GTKOK 259 ;Pop $GTKPATH 260 260 261 261 ;Call DetectGlade … … 263 263 ;Pop $GLADEPATH 264 264 265 Call DetectPyGTK266 Pop $PYGTKOK267 268 Call DetectPyGObject269 Pop $PYGOBJECTOK270 271 Call DetectPyCairo272 Pop $PYCAIROOK265 ;Call DetectPyGTK 266 ;Pop $PYGTKOK 267 268 ;Call DetectPyGObject 269 ;Pop $PYGOBJECTOK 270 271 ;Call DetectPyCairo 272 ;Pop $PYCAIROOK 273 273 274 StrCpy $PATH "$DEFAULTPATH;$PYPATH;$GTKPATH" 274 ;StrCpy $PATH "$DEFAULTPATH;$PYPATH;$GTKPATH" 275 StrCpy $PATH "$DEFAULTPATH;$PYPATH" 275 276 276 277 ${If} $PYOK == "OK" 277 278 !insertMacro UnselectSection ${SecPython} 278 279 ${EndIf} 279 ${If} $GTKOK == "OK"280 !insertMacro UnselectSection ${SecGtk}281 ${EndIf}282 ${If} $PYGTKOK == "OK"283 !insertMacro UnselectSection ${SecPyGtk}284 ${EndIf}285 ${If} $PYGOBJECTOK == "OK"286 !insertMacro UnselectSection ${SecPyGobject}287 ${EndIf}288 ${If} $PYCAIROOK == "OK"289 !insertMacro UnselectSection ${SecPyCairo}290 ${EndIf}280 ;${If} $GTKOK == "OK" 281 ; !insertMacro UnselectSection ${SecGtk} 282 ;${EndIf} 283 ;${If} $PYGTKOK == "OK" 284 ; !insertMacro UnselectSection ${SecPyGtk} 285 ;${EndIf} 286 ;${If} $PYGOBJECTOK == "OK" 287 ; !insertMacro UnselectSection ${SecPyGobject} 288 ;${EndIf} 289 ;${If} $PYCAIROOK == "OK" 290 ; !insertMacro UnselectSection ${SecPyCairo} 291 ;${EndIf} 291 292 FunctionEnd 292 293
