diff options
author | Patrick Lehmann <Patrick.Lehmann@tu-dresden.de> | 2015-01-21 02:23:58 +0100 |
---|---|---|
committer | Patrick Lehmann <Patrick.Lehmann@tu-dresden.de> | 2015-01-21 02:23:58 +0100 |
commit | 7603c2ac9167cd4425f92025ae21b1814c49eed0 (patch) | |
tree | f9e027c581926aa97dbfb2472ce0accece7f486d /dist | |
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')
-rw-r--r-- | dist/mcode/winbuild.ps1 | 21 | ||||
-rw-r--r-- | dist/mcode/windows/complib.ps1 | 36 |
2 files changed, 47 insertions, 10 deletions
diff --git a/dist/mcode/winbuild.ps1 b/dist/mcode/winbuild.ps1 index ef662a100..badd9bc4f 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
diff --git a/dist/mcode/windows/complib.ps1 b/dist/mcode/windows/complib.ps1 index 5706557e3..29b07daca 100644 --- a/dist/mcode/windows/complib.ps1 +++ b/dist/mcode/windows/complib.ps1 @@ -254,8 +254,8 @@ elseif ($Compile) foreach ($SourceFile in $SourceFiles[$VHDLSrcLibrary])
{ Write-Host " file: v87\$SourceFile.v87"
if ($Script_EnableVerbose) { Write-Host " ghdlfilter (-v87)" }
- Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw
- | & $GHDLFilterExecutable @('-v87')
+ Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw `
+ | & $GHDLFilterExecutable @('-v87') `
| Out-File "$SourceFile.v87" -Encoding Ascii
#Write-Host "Press any key to continue..."
@@ -296,7 +296,9 @@ elseif ($Compile) foreach ($SourceFile in $SourceFiles[$VHDLSrcLibrary])
{ Write-Host " file: v87\$SourceFile.v87"
if ($Script_EnableVerbose) { Write-Host " ghdlfilter (-v87)" }
- Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw | & $GHDLFilterExecutable @('-v87') | Out-File "$SourceFile.v87" -Encoding Ascii
+ Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw `
+ | & $GHDLFilterExecutable @('-v87') `
+ | Out-File "$SourceFile.v87" -Encoding Ascii
$GHDLParameters = @("-a", "-C", "--std=87", "-P..\std", "--work=$VHDLDestLibrary", "$SourceFile.v87")
if ($Script_EnableVerbose) { Write-Host (" ghdl analyse (" + ($GHDLParameters -join " ") + ")") }
@@ -341,7 +343,9 @@ elseif ($Compile) foreach ($SourceFile in $SourceFiles[$VHDLSrcLibrary])
{ Write-Host " file: v87\$SourceFile.v87"
if ($Script_EnableVerbose) { Write-Host " ghdlfilter (-v87)" }
- Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw | & $GHDLFilterExecutable @('-v87') | Out-File "$SourceFile.v87" -Encoding Ascii
+ Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw `
+ | & $GHDLFilterExecutable @('-v87') `
+ | Out-File "$SourceFile.v87" -Encoding Ascii
$GHDLParameters = @("-a", "-C", "--std=87", "-P..\std", "--work=$VHDLDestLibrary", "$SourceFile.v87")
if ($Script_EnableVerbose) { Write-Host (" ghdl analyse (" + ($GHDLParameters -join " ") + ")") }
@@ -412,7 +416,9 @@ elseif ($Compile) foreach ($SourceFile in $SourceFiles[$VHDLSrcLibrary])
{ Write-Host " file: v93\$SourceFile.v93"
if ($Script_EnableVerbose) { Write-Host " ghdlfilter (-v93)" }
- Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw | & $GHDLFilterExecutable @('-v93') | Out-File "$SourceFile.v93" -Encoding Ascii
+ Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw `
+ | & $GHDLFilterExecutable @('-v93') `
+ | Out-File "$SourceFile.v93" -Encoding Ascii
$GHDLParameters = @("-a", "-C", "--std=93", "--bootstrap", "--work=$VHDLDestLibrary", "$SourceFile.v93")
if ($Script_EnableVerbose) { Write-Host (" ghdl analyse (" + ($GHDLParameters -join " ") + ")") }
@@ -446,7 +452,9 @@ elseif ($Compile) foreach ($SourceFile in $SourceFiles[$VHDLSrcLibrary])
{ Write-Host " file: v93\$SourceFile.v93"
if ($Script_EnableVerbose) { Write-Host " ghdlfilter (-v93)" }
- Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw | & $GHDLFilterExecutable @('-v93') | Out-File "$SourceFile.v93" -Encoding Ascii
+ Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw `
+ | & $GHDLFilterExecutable @('-v93') `
+ | Out-File "$SourceFile.v93" -Encoding Ascii
$GHDLParameters = @("-a", "-C", "--std=93", "-P..\std", "--work=$VHDLDestLibrary", "$SourceFile.v93")
if ($Script_EnableVerbose) { Write-Host (" ghdl analyse (" + ($GHDLParameters -join " ") + ")") }
@@ -502,7 +510,9 @@ elseif ($Compile) foreach ($SourceFile in $SourceFiles[$VHDLSrcLibrary])
{ Write-Host " file: v93\$SourceFile.v93"
if ($Script_EnableVerbose) { Write-Host " ghdlfilter (-v93)" }
- Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw | & $GHDLFilterExecutable @('-v93') | Out-File "$SourceFile.v93" -Encoding Ascii
+ Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw `
+ | & $GHDLFilterExecutable @('-v93') `
+ | Out-File "$SourceFile.v93" -Encoding Ascii
$GHDLParameters = @("-a", "-C", "--std=93", "-P..\std", "--work=$VHDLDestLibrary", "$SourceFile.v93")
if ($Script_EnableVerbose) { Write-Host (" ghdl analyse (" + ($GHDLParameters -join " ") + ")") }
@@ -569,7 +579,9 @@ elseif ($Compile) foreach ($SourceFile in $SourceFiles[$VHDLSrcLibrary])
{ Write-Host " file: v93\$SourceFile.v93"
if ($Script_EnableVerbose) { Write-Host " ghdlfilter (-v93)" }
- Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw | & $GHDLFilterExecutable @('-v93') | Out-File "$SourceFile.v93" -Encoding Ascii
+ Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw `
+ | & $GHDLFilterExecutable @('-v93') `
+ | Out-File "$SourceFile.v93" -Encoding Ascii
$GHDLParameters = @("-a", "-C", "--std=93", "-P..\std", "--work=$VHDLDestLibrary", "$SourceFile.v93")
if ($Script_EnableVerbose) { Write-Host (" ghdl analyse (" + ($GHDLParameters -join " ") + ")") }
@@ -651,7 +663,9 @@ elseif ($Compile) foreach ($SourceFile in $SourceFiles[$VHDLSrcLibrary])
{ Write-Host " file: v08\$SourceFile.v08"
if ($Script_EnableVerbose) { Write-Host " ghdlfilter (-v08)" }
- Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw | & $GHDLFilterExecutable @('-v08') | Out-File "$SourceFile.v08" -Encoding Ascii
+ Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw `
+ | & $GHDLFilterExecutable @('-v08') `
+ | Out-File "$SourceFile.v08" -Encoding Ascii
$GHDLParameters = @("-a", "-C", "--std=08", "--bootstrap", "--work=$VHDLDestLibrary", "$SourceFile.v08")
if ($Script_EnableVerbose) { Write-Host (" ghdl analyse (" + ($GHDLParameters -join " ") + ")") }
@@ -685,7 +699,9 @@ elseif ($Compile) foreach ($SourceFile in $SourceFiles[$VHDLSrcLibrary])
{ Write-Host " file: v08\$SourceFile.v08"
if ($Script_EnableVerbose) { Write-Host " ghdlfilter (-v08)" }
- Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw | & $GHDLFilterExecutable @('-v08') | Out-File "$SourceFile.v08" -Encoding Ascii
+ Get-Content "$VHDLSourceLibraryDir\$VHDLSrcLibrary\$SourceFile.vhdl" -Encoding Ascii -Raw `
+ | & $GHDLFilterExecutable @('-v08') `
+ | Out-File "$SourceFile.v08" -Encoding Ascii
$GHDLParameters = @("-a", "-C", "--std=08", "-P..\std", "--work=$VHDLDestLibrary", "$SourceFile.v08")
if ($Script_EnableVerbose) { Write-Host (" ghdl analyse (" + ($GHDLParameters -join " ") + ")") }
|