Skip to content

Commit

Permalink
Move script around
Browse files Browse the repository at this point in the history
  • Loading branch information
davidanthoff committed Jul 10, 2023
1 parent b7596b4 commit 2d0a6dd
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 50 deletions.
29 changes: 0 additions & 29 deletions download_bundled_julia.ps1

This file was deleted.

21 changes: 21 additions & 0 deletions scripts/build_msi.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
if (Test-Path -Path $PSScriptRoot\..\target\x86_64-pc-windows-gnu\release) {
Write-Output "Creating x64 installer..."
md $PSScriptRoot\..\target\msi\x86_64-pc-windows-gnu\release -force | Out-Null
Copy-Item $PSScriptRoot\..\target\x86_64-pc-windows-gnu\release\*.exe $PSScriptRoot\..\target\msi\x86_64-pc-windows-gnu\release
Copy-Item $PSScriptRoot\..\deploy\msi\Bitmaps $PSScriptRoot\..\target\msi\x86_64-pc-windows-gnu\release -Recurse -Force
wix build -ext WixToolset.UI.wixext $PSScriptRoot\..\deploy\msi\Julia.wxs -b $PSScriptRoot\..\target\msi\x86_64-pc-windows-gnu\release -arch x64 -o $PSScriptRoot\..\target\msi\Julia-x64.msi
}
else {
Write-Output "Skipping x64 installer."
}

if (Test-Path -Path $PSScriptRoot\..\target\i686-pc-windows-gnu\release) {
Write-Output "Creating x86 installer..."
md $PSScriptRoot\..\target\msi\i686-pc-windows-gnu\release -force | Out-Null
Copy-Item $PSScriptRoot\..\target\i686-pc-windows-gnu\release\*.exe $PSScriptRoot\..\target\msi\i686-pc-windows-gnu\release
Copy-Item $PSScriptRoot\..\deploy\msi\Bitmaps $PSScriptRoot\..\target\msi\i686-pc-windows-gnu\release -Recurse -Force
wix build -ext WixToolset.UI.wixext $PSScriptRoot\..\deploy\msi\Julia.wxs -b $PSScriptRoot\..\target\msi\i686-pc-windows-gnu\release -arch x86 -o $PSScriptRoot\..\target\msi\Julia-x86.msi
}
else {
Write-Output "Skipping x86 installer."
}
28 changes: 28 additions & 0 deletions scripts/download_bundled_julia.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
$x64Versions = Get-Content $PSScriptRoot\..\versiondb\versiondb-x86_64-pc-windows-msvc.json | ConvertFrom-Json
$x64VersionFromChannel = $x64Versions.AvailableChannels.release.Version
$x64DownloadUrl = $x64Versions.AvailableVersions.$x64VersionFromChannel.UrlPath
$x64Filename = Split-Path $x64DownloadUrl -leaf

$x86Versions = Get-Content $PSScriptRoot\..\versiondb\versiondb-i686-pc-windows-msvc.json | ConvertFrom-Json
$x86VersionFromChannel = $x86Versions.AvailableChannels.release.Version
$x86DownloadUrl = $x86Versions.AvailableVersions.$x86VersionFromChannel.UrlPath
$x86Filename = Split-Path $x86DownloadUrl -leaf

mkdir -Force $PSScriptRoot\..\target\bundledjulia\downloads
mkdir -Force $PSScriptRoot\..\target\bundledjulia\extracted

if (-Not (Test-Path $PSScriptRoot\..\"target\bundledjulia\downloads\$x64Filename"))
{
Invoke-WebRequest "https://julialang-s3.julialang.org/$x64DownloadUrl" -OutFile $PSScriptRoot\..\"target\bundledjulia\downloads\$x64Filename"
mkdir -Force $PSScriptRoot\..\target\bundledjulia\extracted\x64
Remove-Item $PSScriptRoot\..\target\bundledjulia\extracted\x64\* -Force -Recurse
tar -xvzf $PSScriptRoot\..\"target\bundledjulia\downloads\$x64Filename" -C $PSScriptRoot\..\target\bundledjulia\extracted\x64 --strip-components=1
}

if (-Not (Test-Path $PSScriptRoot\..\"target\bundledjulia\downloads\$x86Filename"))
{
Invoke-WebRequest "https://julialang-s3.julialang.org/$x86DownloadUrl" -OutFile $PSScriptRoot\..\"target\bundledjulia\downloads\$x86Filename"
mkdir -Force $PSScriptRoot\..\target\bundledjulia\extracted\x86
Remove-Item $PSScriptRoot\..\target\bundledjulia\extracted\x86\* -Force -Recurse
tar -xvzf $PSScriptRoot\..\"target\bundledjulia\downloads\$x86Filename" -C $PSScriptRoot\..\target\bundledjulia\extracted\x86 --strip-components=1
}
21 changes: 0 additions & 21 deletions scripts/msi/build_msi.ps1

This file was deleted.

0 comments on commit 2d0a6dd

Please sign in to comment.