diff options
author | Patrick Lehmann | 2015-01-21 02:23:58 +0100 |
---|---|---|
committer | Patrick Lehmann | 2015-01-21 02:23:58 +0100 |
commit | 7603c2ac9167cd4425f92025ae21b1814c49eed0 (patch) | |
tree | f9e027c581926aa97dbfb2472ce0accece7f486d /dist/mcode/winbuild.ps1 | |
parent | 57e9abd616275b7f82fb835b582917fdab70b816 (diff) | |
download | ghdl-7603c2ac9167cd4425f92025ae21b1814c49eed0.tar.gz ghdl-7603c2ac9167cd4425f92025ae21b1814c49eed0.tar.bz2 ghdl-7603c2ac9167cd4425f92025ae21b1814c49eed0.zip |
winbuild: Added check for PSCX extension if '-CreatePackage -Zip' is executed.
Diffstat (limited to 'dist/mcode/winbuild.ps1')
-rw-r--r-- | dist/mcode/winbuild.ps1 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/dist/mcode/winbuild.ps1 b/dist/mcode/winbuild.ps1 index ef662a1..badd9bc 100644 --- a/dist/mcode/winbuild.ps1 +++ b/dist/mcode/winbuild.ps1 @@ -66,6 +66,8 @@ Param( [switch]$CreatePackage,
# creates a zip-file for xcopy deployment
[switch]$Zip,
+ # creates a exe-file (installer generated by NSIS)
+ [switch]$Nsis,
# install all files into a directory (xcopy deployment)
[switch]$Install,
@@ -330,6 +332,19 @@ else Write-Host "Creating an installation package for GHDL $GHDLVersion for Windows"
if ($Zip)
+ { if ((Get-Module -ListAvailable | Where {$_.Name -like "PSCX"}).Version -ge "3.1.0.0")
+ { Write-Host "Loading PowerShell Community Extensions (PSCX) " -NoNewline
+ Import-Module Pscx
+ Write-Host "[Done]" -ForegroundColor Green
+ }
+ else
+ { $Script_ExitCode = 1
+ Write-Host "[FAILED]" -ForegroundColor RED
+ }
+ }
+
+ # create zip-file
+ if (($Script_ExitCode -eq 0) -and $Zip)
{ Write-Host "Output format: zip-file"
Write-Host " Removing old directory '$GHDLZipPackageDir'."
@@ -348,6 +363,12 @@ else $file = Get-ChildItem $GHDLZipPackageDir -Recurse | Write-Zip -IncludeEmptyDirectories -EntryPathRoot $GHDLZipPackageDir -OutputPath $GHDLZipPackageFile
Write-Host " $([math]::round(($file.Length / 1MB), 3)) MiB written to disk"
}
+ elseif (($Script_ExitCode -eq 0) -and $Nsis)
+ { Write-Host "Output format: exe-file (created by NSIS)"
+
+ $Script_ExitCode = 1
+ Write-Host "ERROR: Not Implemented." -ForegroundColor RED
+ }
else
{ $Script_ExitCode = 1
Write-Host "No package format selected." -ForegroundColor Red
|