Skip to content

Commit

Permalink
updated installer definition & script
Browse files Browse the repository at this point in the history
  • Loading branch information
flyx committed Mar 9, 2019
1 parent 390e0f5 commit b2ba5d2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ bin
.#*#
*~
*.exe
gnatinspect.db
gnatinspect.db
src/gl/generated/WrapperList.md
*.dll
*-loc.xml
2 changes: 1 addition & 1 deletion install/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ target
tmp
*.wixobj
*.wixpdb
OpenGLAda.msi
*.msi
6 changes: 3 additions & 3 deletions install/OpenGLAda.wix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
InstallerVersion="100" Languages="1033" Compressed="yes"
SummaryCodepage="1252" />
<Media Id="1" Cabinet="OpenGLAda.cab" EmbedCab="yes" />
<Property Id="INSTALLDIR" Value="C:\GNAT\2017" />
<SetProperty Id="INSTALLDIR" Value="C:\GNAT\2018" After="AppSearch"/>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="INSTALLDIR" Name="GNAT" ComponentGuidGenerationSeed="005645a9-cb2e-43da-a920-68b7e8d3ae11">
<Component Id="dummy" Guid="fd86164a-4408-496d-a3fb-633a56f1a955" KeyPath="yes" />
Expand Down Expand Up @@ -55,12 +55,12 @@
</Directory>
</Directory>

<Feature Id="Complete" Title="OpenGLAda 0.6.0"
<Feature Id="Complete" Title="OpenGLAda 0.7.0"
Description="OpenGLAda package – Please ensure that the selected install path points to your GNAT installation!"
Display="expand" Level="1" Absent="disallow"
ConfigurableDirectory="INSTALLDIR"
AllowAdvertise="no">
<!-- this one is necessary to disable the "will be installed to run from networt" option in GUI -->
<!-- this one is necessary to disable the "will be installed to run from network" option in GUI -->
<ComponentRef Id="dummy" />

<Feature Id="Core" Title="Core" Absent="disallow"
Expand Down
18 changes: 9 additions & 9 deletions install/create-msi.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ $candle = "${env:WIX}bin\candle.exe"
$light = "${env:WIX}bin\light.exe"

if (-Not ($wixonly -or $skipdownloads)) {
Remove-Item -Path $tmp -Recurse
Remove-Item -Path $target -Recurse
Remove-Item -Path $tmp -Recurse -ErrorAction Ignore
Remove-Item -Path $target -Recurse -ErrorAction Ignore

mkdir -Force $tmp
mkdir -Force "$target\lib"
Expand All @@ -25,17 +25,17 @@ if (-Not ($wixonly -or $skipdownloads)) {

# GLFW

$glfw_url = "https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.bin.WIN32.zip"
$glfw_destination = "$tmp\glfw-3.2.1.bin.WIN32.zip"
$glfw_url = "https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.bin.WIN64.zip"
$glfw_destination = "$tmp\glfw-3.2.1.bin.WIN64.zip"
Invoke-WebRequest -Uri $glfw_url -OutFile $glfw_destination
$zip = [IO.Compression.ZipFile]::OpenRead($glfw_destination)
$zip.Entries | where {$_.FullName -eq "glfw-3.2.1.bin.WIN32/lib-mingw/libglfw3.a"} | `
$zip.Entries | where {$_.FullName -eq "glfw-3.2.1.bin.WIN64/lib-mingw-w64/libglfw3.a"} | `
foreach {[IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$target\lib\libglfw3.a", $true)}
$zip.Dispose()

# FreeType

$freetype_url = "https://github.com/ubawurinna/freetype-windows-binaries/raw/1089f5da22ddbdebbd72bfffab971e3159dad7cc/win32/freetype.dll"
$freetype_url = "https://github.com/ubawurinna/freetype-windows-binaries/raw/master/win64/freetype.dll"
$freetype_destination = "$target\lib\freetype.dll"
Invoke-WebRequest -Uri $freetype_url -OutFile $freetype_destination -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::FireFox
}
Expand All @@ -47,11 +47,11 @@ if (-Not $wixonly) {
"-XFreeType_Linker_Param=-l:freetype.dll", "-XGLFW_Linker_Param=-l:libglfw3.a")

$env:LD_LIBRARY_PATH = "$target\lib"
$project = "..\opengl-full.gpr"
$project = "..\openglada.gpr"

&"gprclean" $scenario $project
&"gprbuild" -p $scenario $project
&"gprinstall" -p --prefix=target $scenario $project
&"gprinstall" -p --prefix=target -m $scenario $project
}

# Create file lists for WiX
Expand Down Expand Up @@ -83,5 +83,5 @@ $heatArgs = @("-ag", "-scom", "-sreg", "-sfrag", "-srd")
&$light -ext WixUIExtension OpenGLAda.wixobj CoreFragments.wixobj FreetypeFragments.wixobj `
GlfwFragments.wixobj SoilFragments.wixobj TextFragments.wixobj `
CoreIncludes.wixobj FreetypeIncludes.wixobj `
GlfwIncludes.wixobj SoilIncludes.wixobj TextIncludes.wixobj -o OpenGLAda-win32.msi `
GlfwIncludes.wixobj SoilIncludes.wixobj TextIncludes.wixobj -o OpenGLAda-win64.msi `
-dWixUILicenseRtf="$PSScriptRoot\license.rtf"

0 comments on commit b2ba5d2

Please sign in to comment.