forked from JuliaLang/juliaup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildmsix.ps1
30 lines (24 loc) · 1.74 KB
/
buildmsix.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$versions = Get-Content versions.json | ConvertFrom-Json
[version]$bundledVersion = $versions.JuliaAppPackage.BundledJuliaVersion
$bundledVersionAsString = $versions.JuliaAppPackage.BundledJuliaVersion
mkdir -Force target\bundledjulia\downloads
mkdir -Force target\bundledjulia\extracted
if (-Not (Test-Path "target\bundledjulia\downloads\julia-$($bundledVersionAsString)-win64.tar.gz"))
{
Invoke-WebRequest "https://julialang-s3.julialang.org/bin/winnt/x64/$($bundledVersion.Major).$($bundledVersion.Minor)/julia-$($bundledVersionAsString)-win64.tar.gz" -OutFile "target\bundledjulia\downloads\julia-$($bundledVersionAsString)-win64.tar.gz"
mkdir -Force target\bundledjulia\extracted\x64
Remove-Item target\bundledjulia\extracted\x64\* -Force -Recurse
tar -xvzf "target\bundledjulia\downloads\julia-$($bundledVersion)-win64.tar.gz" -C target\bundledjulia\extracted\x64 --strip-components=1
}
if (-Not (Test-Path "target\bundledjulia\downloads\julia-$($bundledVersionAsString)-win32.tar.gz"))
{
Invoke-WebRequest "https://julialang-s3.julialang.org/bin/winnt/x86/$($bundledVersion.Major).$($bundledVersion.Minor)/julia-$($bundledVersionAsString)-win32.tar.gz" -OutFile "target\bundledjulia\downloads\julia-$($bundledVersionAsString)-win32.tar.gz"
mkdir -Force target\bundledjulia\extracted\x86
Remove-Item target\bundledjulia\extracted\x86\* -Force -Recurse
tar -xvzf "target\bundledjulia\downloads\julia-$($bundledVersion)-win32.tar.gz" -C target\bundledjulia\extracted\x86 --strip-components=1
}
push-location msix
&"C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\MakeAppx.exe" build /f PackagingLayout.xml /op ..\target\msix
# /pv $version /bv $version
pop-location
# Move-Item .\build\msix\*.appxbundle .\output -Force