win-pvdrivers

changeset 648:4d399b73ae5d

remove old nsis installer
author James Harper <james.harper@bendigoit.com.au>
date Mon Sep 07 13:25:55 2009 +1000 (2009-09-07)
parents 3804bcbab502
children cbd4e4ae9527
files installer.nsi
line diff
     1.1 --- a/installer.nsi	Tue Aug 25 22:13:56 2009 +1000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,415 +0,0 @@
     1.4 -!include "MUI.nsh"
     1.5 -!include "winver.nsh"
     1.6 -
     1.7 -Var MYPROGRAMFILES
     1.8 -Var ARCH_SPEC
     1.9 -
    1.10 -!define AppName "Xen PV Drivers"
    1.11 -!define StartMenu "$SMPROGRAMS\${AppName}"
    1.12 -!define Version "0.9.12-pre15"
    1.13 -#!define Version "$%VERSION%"
    1.14 -Name "${AppName}"
    1.15 -
    1.16 -#InstallDir "$MYPROGRAMFILES\${AppName}"
    1.17 -OutFile "${AppName} ${Version}.exe"
    1.18 -
    1.19 -# make sure /GPLPV is not currently active
    1.20 -
    1.21 -#!define MUI_PAGE_CUSTOMFUNCTION_PRE WelcomePageSetupLinkPre
    1.22 -#!define MUI_PAGE_CUSTOMFUNCTION_SHOW WelcomePageSetupLinkShow
    1.23 -!define MUI_STARTMENUPAGE
    1.24 -!define MUI_COMPONENTSPAGE
    1.25 -!define MUI_DIRECTORYPAGE
    1.26 -!insertmacro MUI_PAGE_WELCOME
    1.27 -!insertmacro MUI_PAGE_COMPONENTS
    1.28 -!insertmacro MUI_PAGE_INSTFILES
    1.29 -!define MUI_UNINSTALLER
    1.30 -!insertmacro MUI_LANGUAGE "English"
    1.31 -
    1.32 -Section "Common Files"
    1.33 -  SectionIn RO
    1.34 -  SetOutPath $INSTDIR
    1.35 -  File .\doc\Building.txt
    1.36 -  File .\doc\Installing.txt
    1.37 -  File .\doc\Readme.txt
    1.38 -  File .\doc\TODO.txt
    1.39 -  File .\doc\xennet.txt
    1.40 -  ExecWait 'NET STOP ShutdownMon'
    1.41 -  StrCmp $ARCH_SPEC "amd64" amd64
    1.42 -  File .\target\winxp\i386\copyconfig.exe
    1.43 -  File .\target\winxp\i386\shutdownmon.exe
    1.44 -  File $%DDK_PATH%\redist\DIFx\DPInst\EngMui\x86\DPInst.exe
    1.45 -  Goto amd64_done
    1.46 -amd64:
    1.47 -  File .\target\winnet\amd64\copyconfig.exe
    1.48 -  File .\target\winnet\amd64\shutdownmon.exe
    1.49 -  File $%DDK_PATH%\redist\DIFx\DPInst\EngMui\amd64\DPInst.exe
    1.50 -amd64_done:
    1.51 -  CreateDirectory "${StartMenu}\"
    1.52 -  CreateShortCut "${StartMenu}\Building.lnk" "$INSTDIR\Building.txt"
    1.53 -  CreateShortCut "${StartMenu}\Installing.lnk" "$INSTDIR\Installing.txt"
    1.54 -  CreateShortCut "${StartMenu}\Readme.lnk" "$INSTDIR\Readme.txt"
    1.55 -  CreateShortCut "${StartMenu}\TODO.lnk" "$INSTDIR\TODO.txt"
    1.56 -  CreateShortCut "${StartMenu}\Wiki Page.lnk" "http://wiki.xensource.com/xenwiki/XenWindowsGplPv" 
    1.57 -  WriteUninstaller $INSTDIR\Uninstall.exe
    1.58 -  CreateShortCut "${StartMenu}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
    1.59 -SectionEnd
    1.60 -
    1.61 -Section "Windows XP" winxp
    1.62 -  SetOutPath $INSTDIR
    1.63 -  File /nonfatal .\ca.cer
    1.64 -  SetOutPath $INSTDIR\drivers
    1.65 -  File .\target\winxp\xenpci.inf
    1.66 -  File .\target\winxp\xennet.inf
    1.67 -  File .\target\winxp\xenvbd.inf
    1.68 -  File .\target\winxp\xenscsi.inf
    1.69 -  File .\target\winxp\xenstub.inf
    1.70 -  File /nonfatal .\target\winxp\xengplpv.cat
    1.71 -  SetOutPath $INSTDIR\drivers\i386
    1.72 -  File .\target\winxp\i386\xenpci.sys
    1.73 -  File .\target\winxp\i386\xenhide.sys
    1.74 -  File .\target\winxp\i386\xennet.sys
    1.75 -  File .\target\winxp\i386\xenvbd.sys
    1.76 -  File .\target\winxp\i386\xenscsi.sys
    1.77 -  File .\target\winxp\i386\xenstub.sys
    1.78 -SectionEnd
    1.79 -
    1.80 -Section "Windows 2003 x32" win2k3x32
    1.81 -  SetOutPath $INSTDIR
    1.82 -  File /nonfatal .\ca.cer
    1.83 -  SetOutPath $INSTDIR\drivers
    1.84 -  File .\target\winnet\xenpci.inf
    1.85 -  File .\target\winnet\xennet.inf
    1.86 -  File .\target\winnet\xenvbd.inf
    1.87 -  File .\target\winnet\xenscsi.inf
    1.88 -  File .\target\winnet\xenstub.inf
    1.89 -  File /nonfatal .\target\winnet\xengplpv.cat
    1.90 -  SetOutPath $INSTDIR\drivers\i386
    1.91 -  File .\target\winnet\i386\xenpci.sys
    1.92 -  File .\target\winnet\i386\xenhide.sys
    1.93 -  File .\target\winnet\i386\xennet.sys
    1.94 -  File .\target\winnet\i386\xenvbd.sys
    1.95 -  File .\target\winnet\i386\xenscsi.sys
    1.96 -  File .\target\winnet\i386\xenstub.sys
    1.97 -SectionEnd
    1.98 -
    1.99 -Section "Windows 2003 x64" win2k3x64
   1.100 -  SetOutPath $INSTDIR
   1.101 -  File /nonfatal .\ca.cer
   1.102 -  SetOutPath $INSTDIR\drivers
   1.103 -  File .\target\winnet\xenpci.inf
   1.104 -  File .\target\winnet\xennet.inf
   1.105 -  File .\target\winnet\xenvbd.inf
   1.106 -  File .\target\winnet\xenscsi.inf
   1.107 -  File .\target\winnet\xenstub.inf
   1.108 -  File /nonfatal .\target\winnet\xengplpv.cat
   1.109 -  SetOutPath $INSTDIR\drivers\amd64
   1.110 -  File .\target\winnet\amd64\xenpci.sys
   1.111 -  File .\target\winnet\amd64\xenhide.sys
   1.112 -  File .\target\winnet\amd64\xennet.sys
   1.113 -  File .\target\winnet\amd64\xenvbd.sys
   1.114 -  File .\target\winnet\amd64\xenscsi.sys
   1.115 -  File .\target\winnet\amd64\xenstub.sys
   1.116 -SectionEnd
   1.117 -
   1.118 -Section "Windows 2008 x32" win2k8x32
   1.119 -  SetOutPath $INSTDIR
   1.120 -  File /nonfatal .\ca.cer
   1.121 -  SetOutPath $INSTDIR\drivers
   1.122 -  File .\target\winlh\xenpci.inf
   1.123 -  File .\target\winlh\xennet.inf
   1.124 -  File .\target\winlh\xenvbd.inf
   1.125 -  File .\target\winlh\xenscsi.inf
   1.126 -  File .\target\winlh\xenstub.inf
   1.127 -  File /nonfatal .\target\winlh\xengplpv.cat
   1.128 -  SetOutPath $INSTDIR\drivers\i386
   1.129 -  File .\target\winlh\i386\xenpci.sys
   1.130 -  File .\target\winlh\i386\xenhide.sys
   1.131 -  File .\target\winlh\i386\xennet.sys
   1.132 -  File .\target\winlh\i386\xenvbd.sys
   1.133 -  File .\target\winlh\i386\xenscsi.sys
   1.134 -  File .\target\winlh\i386\xenstub.sys
   1.135 -SectionEnd
   1.136 -
   1.137 -Section "Windows 2008 x64" win2k8x64
   1.138 -  SetOutPath $INSTDIR
   1.139 -  File /nonfatal .\ca.cer
   1.140 -  SetOutPath $INSTDIR\drivers
   1.141 -  File .\target\winlh\xenpci.inf
   1.142 -  File .\target\winlh\xennet.inf
   1.143 -  File .\target\winlh\xenvbd.inf
   1.144 -  File .\target\winlh\xenscsi.inf
   1.145 -  File .\target\winlh\xenstub.inf
   1.146 -  File /nonfatal .\target\winlh\xengplpv.cat
   1.147 -  SetOutPath $INSTDIR\drivers\amd64
   1.148 -  File .\target\winlh\amd64\xenpci.sys
   1.149 -  File .\target\winlh\amd64\xenhide.sys
   1.150 -  File .\target\winlh\amd64\xennet.sys
   1.151 -  File .\target\winlh\amd64\xenvbd.sys
   1.152 -  File .\target\winlh\amd64\xenscsi.sys
   1.153 -  File .\target\winlh\amd64\xenstub.sys
   1.154 -SectionEnd
   1.155 -
   1.156 -Section /o "Install Cert" installcert
   1.157 -  # For some reason this next line doesn't need any double quotes around
   1.158 -  # the filename, and in fact it breaks when they are included...
   1.159 -  ExecWait 'rundll32.exe cryptext.dll,CryptExtAddCER $INSTDIR\ca.cer'
   1.160 -SectionEnd
   1.161 -
   1.162 -Section "Install Drivers" installdrivers
   1.163 -  ExecWait '"$INSTDIR\DPInst.exe" /PATH "$INSTDIR\drivers" /LM /SA /SE /SW'
   1.164 -!if false
   1.165 -  Push "$INSTDIR\drivers"
   1.166 -  Push "$INSTDIR\drivers\xennet.inf"
   1.167 -  Push "XEN\VIF"
   1.168 -  Call InstallUpgradeDriver
   1.169 -
   1.170 -  Push "$INSTDIR\drivers"
   1.171 -  Push "$INSTDIR\drivers\xenvbd.inf"
   1.172 -  Push "XEN\VBD"
   1.173 -  Call InstallUpgradeDriver
   1.174 -
   1.175 -  Push "$INSTDIR\drivers"
   1.176 -  Push "$INSTDIR\drivers\xenscsi.inf"
   1.177 -  Push "XEN\VSCSI"
   1.178 -  Call InstallUpgradeDriver
   1.179 -
   1.180 -  Push "$INSTDIR\drivers"
   1.181 -  Push "$INSTDIR\drivers\xenstub.inf"
   1.182 -  Push "XEN\CONSOLE"
   1.183 -  Call InstallUpgradeDriver
   1.184 -
   1.185 -  Push "$INSTDIR\drivers"
   1.186 -  Push "$INSTDIR\drivers\xenstub.inf"
   1.187 -  Push "XEN\VFB"
   1.188 -  Call InstallUpgradeDriver
   1.189 -
   1.190 -  Push "$INSTDIR\drivers"
   1.191 -  Push "$INSTDIR\drivers\xenstub.inf"
   1.192 -  Push "XEN\VKBD"
   1.193 -  Call InstallUpgradeDriver
   1.194 -
   1.195 -  Push "$INSTDIR\drivers"
   1.196 -  Push "$INSTDIR\drivers\xenpci.inf"
   1.197 -  Push "PCI\VEN_5853&DEV_0001"
   1.198 -  Call InstallUpgradeDriver
   1.199 -!endif
   1.200 -SectionEnd
   1.201 -
   1.202 -Section "Shutdown Monitor Service" shutdownmon
   1.203 -  ExecWait '"$INSTDIR\ShutdownMon.exe" -o'
   1.204 -  ExecWait '"$INSTDIR\ShutdownMon.exe" -u'
   1.205 -  ExecWait '"$INSTDIR\ShutdownMon.exe" -i'
   1.206 -  ExecWait 'NET START ShutdownMon'
   1.207 -SectionEnd
   1.208 -  
   1.209 -Section /o "Copy Network Config" copynetworkconfig
   1.210 -  MessageBox MB_OKCANCEL "This will copy the network IP configuration from the qemu network adapter to the gplpv xennet network adapter. Ensure that all the drivers are loaded for all the network adapters before clicking OK" IDCANCEL done
   1.211 -  ExecWait '"$INSTDIR\copyconfig.exe"'
   1.212 -done:
   1.213 -SectionEnd
   1.214 -
   1.215 -Var arch
   1.216 -
   1.217 -Function .onInit
   1.218 -  Push $0
   1.219 - 
   1.220 -  ReadRegStr $0 HKLM SYSTEM\CurrentControlSet\Control SystemStartOptions
   1.221 -  Push $0
   1.222 -  Push "GPLPV"
   1.223 -  Call StrContains
   1.224 -  Pop $0
   1.225 -  StrCmp $0 "" no_GPLPV
   1.226 -
   1.227 -  ReadRegStr $0 HKLM SYSTEM\CurrentControlSet\Services\XenHide DisplayName
   1.228 -  StrCmp $0 "" 0 no_GPLPV
   1.229 -
   1.230 -  MessageBox MB_OK "Warning - GPLPV specified on boot but drivers not installed yet. You should cancel now and boot without GPLPV"
   1.231 -no_GPLPV:
   1.232 -  
   1.233 -  Call GetWindowsVersion
   1.234 -  Pop $R0
   1.235 -
   1.236 -  ReadRegStr $0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" PROCESSOR_ARCHITECTURE
   1.237 -  StrCmp $0 "AMD64" is_amd64
   1.238 -  StrCpy $MYPROGRAMFILES $PROGRAMFILES
   1.239 -  StrCpy $ARCH_SPEC "i386"
   1.240 -  Goto amd64_done
   1.241 -is_amd64:
   1.242 -  StrCpy $MYPROGRAMFILES $PROGRAMFILES64
   1.243 -  StrCpy $ARCH_SPEC "amd64"
   1.244 -amd64_done:
   1.245 -  StrCpy $INSTDIR "$MYPROGRAMFILES\${AppName}"
   1.246 -  
   1.247 -  StrCmp $R0 "XP" 0 check_2k3
   1.248 -  StrCpy $arch "winxp"
   1.249 -  Goto version_done
   1.250 -check_2k3:
   1.251 -  StrCmp $R0 "2003" 0 check_2k8
   1.252 -  ReadRegStr $0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" PROCESSOR_ARCHITECTURE
   1.253 -  StrCmp $0 "AMD64" version_2k3x64
   1.254 -  StrCpy $arch "win2k3x32"
   1.255 -  Goto version_done
   1.256 -version_2k3x64:
   1.257 -  StrCpy $arch "win2k3x64"
   1.258 -  Goto version_done
   1.259 -check_2k8:
   1.260 -  StrCmp $R0 "Vista" 0 version_error
   1.261 -  ReadRegStr $0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" PROCESSOR_ARCHITECTURE
   1.262 -  StrCmp $0 "AMD64" version_2k8x64
   1.263 -  StrCpy $arch "win2k8x32"
   1.264 -  Goto version_done
   1.265 -version_2k8x64:
   1.266 -  StrCpy $arch "win2k8x64"
   1.267 -  Goto version_done
   1.268 -version_error:
   1.269 -  MessageBox MB_OK "Unable to detect windows version - proceed with caution"
   1.270 -  StrCpy $arch ""
   1.271 -
   1.272 -version_done:
   1.273 -  Call SelectSection
   1.274 -
   1.275 -#  SectionGetFlags ${sec1} $0
   1.276 -#  IntOp $0 $0 | ${SF_SELECTED}
   1.277 -#  SectionSetFlags ${sec1} $0
   1.278 - 
   1.279 -  Pop $0
   1.280 -FunctionEnd
   1.281 -
   1.282 -Var NewArch
   1.283 -
   1.284 -Function .onSelChange
   1.285 -  Push $0
   1.286 -  
   1.287 -  StrCpy $newarch $arch
   1.288 -  StrCmp $arch "winxp" check_2k3x32
   1.289 -  SectionGetFlags ${winxp} $0
   1.290 -  IntOp $0 $0 & ${SF_SELECTED}
   1.291 -  IntCmp $0 ${SF_SELECTED} 0 check_2k3x32 check_2k3x32
   1.292 -  StrCpy $newarch "winxp"
   1.293 -check_2k3x32:
   1.294 -  StrCmp $arch "win2k3x32" check_2k3x64
   1.295 -  SectionGetFlags ${win2k3x32} $0
   1.296 -  IntOp $0 $0 & ${SF_SELECTED}
   1.297 -  IntCmp $0 ${SF_SELECTED} 0 check_2k3x64 check_2k3x64
   1.298 -  StrCpy $newarch "win2k3x32"
   1.299 -check_2k3x64:
   1.300 -  StrCmp $arch "win2k3x64" check_2k8x32
   1.301 -  SectionGetFlags ${win2k3x64} $0
   1.302 -  IntOp $0 $0 & ${SF_SELECTED}
   1.303 -  IntCmp $0 ${SF_SELECTED} 0 check_2k8x32 check_2k8x32
   1.304 -  StrCpy $newarch "win2k3x64"
   1.305 -check_2k8x32:
   1.306 -  StrCmp $arch "win2k8x32" check_2k8x64
   1.307 -  SectionGetFlags ${win2k8x32} $0
   1.308 -  IntOp $0 $0 & ${SF_SELECTED}
   1.309 -  IntCmp $0 ${SF_SELECTED} 0 check_2k8x64 check_2k8x64
   1.310 -  StrCpy $newarch "win2k8x32"
   1.311 -check_2k8x64:
   1.312 -  StrCmp $arch "win2k8x64" done
   1.313 -  SectionGetFlags ${win2k8x64} $0
   1.314 -  IntOp $0 $0 & ${SF_SELECTED}
   1.315 -  IntCmp $0 ${SF_SELECTED} 0 done done
   1.316 -  StrCpy $newarch "win2k8x64"
   1.317 -done:
   1.318 -  StrCpy $arch $newarch
   1.319 -  Call SelectSection
   1.320 -
   1.321 -  Pop $0
   1.322 -FunctionEnd
   1.323 -
   1.324 -Function SelectSection
   1.325 -  Push $0
   1.326 -
   1.327 -  StrCmp $arch "winxp" set_winxp
   1.328 -  SectionGetFlags ${winxp} $0
   1.329 -  IntOp $0 $0 & ${SECTION_OFF}
   1.330 -  SectionSetFlags ${winxp} $0
   1.331 -  goto check_2k3x32
   1.332 -set_winxp:
   1.333 -  SectionGetFlags ${winxp} $0
   1.334 -  IntOp $0 $0 | ${SF_SELECTED}
   1.335 -  SectionSetFlags ${winxp} $0  
   1.336 -check_2k3x32:
   1.337 -  StrCmp $arch "win2k3x32" set_2k3x32
   1.338 -  SectionGetFlags ${win2k3x32} $0
   1.339 -  IntOp $0 $0 & ${SECTION_OFF}
   1.340 -  SectionSetFlags ${win2k3x32} $0
   1.341 -  goto check_2k3x64
   1.342 -set_2k3x32:
   1.343 -  SectionGetFlags ${win2k3x32} $0
   1.344 -  IntOp $0 $0 | ${SF_SELECTED}
   1.345 -  SectionSetFlags ${win2k3x32} $0  
   1.346 -check_2k3x64:
   1.347 -  StrCmp $arch "win2k3x64" set_2k3x64
   1.348 -  SectionGetFlags ${win2k3x64} $0
   1.349 -  IntOp $0 $0 & ${SECTION_OFF}
   1.350 -  SectionSetFlags ${win2k3x64} $0
   1.351 -  goto check_2k8x32
   1.352 -set_2k3x64:
   1.353 -  SectionGetFlags ${win2k3x64} $0
   1.354 -  IntOp $0 $0 | ${SF_SELECTED}
   1.355 -  SectionSetFlags ${win2k3x64} $0  
   1.356 -check_2k8x32:
   1.357 -  StrCmp $arch "win2k8x32" set_2k8x32
   1.358 -  SectionGetFlags ${win2k8x32} $0
   1.359 -  IntOp $0 $0 & ${SECTION_OFF}
   1.360 -  SectionSetFlags ${win2k8x32} $0
   1.361 -  goto check_2k8x64
   1.362 -set_2k8x32:
   1.363 -  SectionGetFlags ${win2k8x32} $0
   1.364 -  IntOp $0 $0 | ${SF_SELECTED}
   1.365 -  SectionSetFlags ${win2k8x32} $0  
   1.366 -check_2k8x64:
   1.367 -  StrCmp $arch "win2k8x64" set_2k8x64
   1.368 -  SectionGetFlags ${win2k8x64} $0
   1.369 -  IntOp $0 $0 & ${SECTION_OFF}
   1.370 -  SectionSetFlags ${win2k8x64} $0
   1.371 -  goto done
   1.372 -set_2k8x64:
   1.373 -  SectionGetFlags ${win2k8x64} $0
   1.374 -  IntOp $0 $0 | ${SF_SELECTED}
   1.375 -  SectionSetFlags ${win2k8x64} $0  
   1.376 -done:
   1.377 -  Pop $0
   1.378 -
   1.379 -FunctionEnd
   1.380 -
   1.381 -Section "Uninstall"
   1.382 -  Delete "${StartMenu}\Uninstall.lnk"
   1.383 -  RMDir "${StartMenu}\"
   1.384 -  Delete $INSTDIR\uninstall.exe
   1.385 -  RMDir $INSTDIR
   1.386 -SectionEnd
   1.387 -
   1.388 -Var STR_HAYSTACK
   1.389 -Var STR_NEEDLE
   1.390 -Var STR_CONTAINS_VAR_1
   1.391 -Var STR_CONTAINS_VAR_2
   1.392 -Var STR_CONTAINS_VAR_3
   1.393 -Var STR_CONTAINS_VAR_4
   1.394 -Var STR_RETURN_VAR
   1.395 - 
   1.396 -Function StrContains
   1.397 -  Exch $STR_NEEDLE
   1.398 -  Exch 1
   1.399 -  Exch $STR_HAYSTACK
   1.400 -  ; Uncomment to debug
   1.401 -  ;MessageBox MB_OK 'STR_NEEDLE = $STR_NEEDLE STR_HAYSTACK = $STR_HAYSTACK '
   1.402 -    StrCpy $STR_RETURN_VAR ""
   1.403 -    StrCpy $STR_CONTAINS_VAR_1 -1
   1.404 -    StrLen $STR_CONTAINS_VAR_2 $STR_NEEDLE
   1.405 -    StrLen $STR_CONTAINS_VAR_4 $STR_HAYSTACK
   1.406 -    loop:
   1.407 -      IntOp $STR_CONTAINS_VAR_1 $STR_CONTAINS_VAR_1 + 1
   1.408 -      StrCpy $STR_CONTAINS_VAR_3 $STR_HAYSTACK $STR_CONTAINS_VAR_2 $STR_CONTAINS_VAR_1
   1.409 -      StrCmp $STR_CONTAINS_VAR_3 $STR_NEEDLE found
   1.410 -      StrCmp $STR_CONTAINS_VAR_1 $STR_CONTAINS_VAR_4 done
   1.411 -      Goto loop
   1.412 -    found:
   1.413 -      StrCpy $STR_RETURN_VAR $STR_NEEDLE
   1.414 -      Goto done
   1.415 -    done:
   1.416 -   Pop $STR_NEEDLE ;Prevent "invalid opcode" errors and keep the
   1.417 -   Exch $STR_RETURN_VAR  
   1.418 -FunctionEnd