@@ -41,55 +41,63 @@ function PackPerFlavorReleases() {
41
41
" Target" = " i686-pc-windows-msvc" ;
42
42
" PackZip" = $true ;
43
43
" PackTar" = $false ;
44
+ " PackMsix" = $true ;
44
45
" CopyDebian" = $false ;
45
46
};
46
47
" windows.x64" = [PsCustomObject ]@ {
47
48
" Root" = " Build.Build.windowsx64" ;
48
49
" Target" = " x86_64-pc-windows-msvc" ;
49
50
" PackZip" = $true ;
50
51
" PackTar" = $false ;
52
+ " PackMsix" = $true ;
51
53
" CopyDebian" = $false ;
52
54
};
53
55
" windows.arm64" = [PsCustomObject ]@ {
54
56
" Root" = " Build.Build.windowsarm64" ;
55
57
" Target" = " aarch64-pc-windows-msvc" ;
56
58
" PackZip" = $true ;
57
59
" PackTar" = $false ;
60
+ " PackMsix" = $true ;
58
61
" CopyDebian" = $false ;
59
62
};
60
63
" linux.x86" = [PsCustomObject ]@ {
61
64
" Root" = " Build.Build.linuxx86" ;
62
65
" Target" = " i686-unknown-linux-gnu" ;
63
66
" PackZip" = $false ;
64
67
" PackTar" = $true ;
68
+ " PackMsix" = $false ;
65
69
" CopyDebian" = $true ;
66
70
};
67
71
" linux.x64" = [PsCustomObject ]@ {
68
72
" Root" = " Build.Build.linuxx64" ;
69
73
" Target" = " x86_64-unknown-linux-gnu" ;
70
74
" PackZip" = $false ;
71
75
" PackTar" = $true ;
76
+ " PackMsix" = $false ;
72
77
" CopyDebian" = $true ;
73
78
};
74
79
" linux.arm" = [PsCustomObject ]@ {
75
80
" Root" = " Build.Build.linuxarm" ;
76
81
" Target" = " arm-unknown-linux-gnueabi" ;
77
82
" PackZip" = $false ;
78
83
" PackTar" = $true ;
84
+ " PackMsix" = $false ;
79
85
" CopyDebian" = $true ;
80
86
};
81
87
" linux.arm64" = [PsCustomObject ]@ {
82
88
" Root" = " Build.Build.linuxarm64" ;
83
89
" Target" = " aarch64-unknown-linux-gnu" ;
84
90
" PackZip" = $false ;
85
91
" PackTar" = $true ;
92
+ " PackMsix" = $false ;
86
93
" CopyDebian" = $true ;
87
94
};
88
95
" macos.x64" = [PsCustomObject ]@ {
89
96
" Root" = " Build.Build.macosx64" ;
90
97
" Target" = " x86_64-apple-darwin" ;
91
98
" PackZip" = $false ;
92
99
" PackTar" = $true ;
100
+ " PackMsix" = $false ;
93
101
" CopyDebian" = $false ;
94
102
};
95
103
}
@@ -130,7 +138,25 @@ function PackPerFlavorReleases() {
130
138
dotnet pack $nugetProjectRoot \rnp_nupkg.csproj - o .\Releases\NugetPackages
131
139
132
140
# Copy debian packages
133
- Copy-Item - Path .\$root \debian\* " .\Releases\DebianPackages" - Verbose - Force
141
+ if ($settings.CopyDebian ) {
142
+ Copy-Item - Path .\$root \debian\* " .\Releases\DebianPackages" - Verbose - Force
143
+ }
144
+
145
+ # Generate MSIX package
146
+ if ($settings.PackMsix ) {
147
+ $msixProjectRoot = " .\Staging\MsixPackages\$flavor "
148
+ Write-Host " Creating msix package under $msixProjectRoot "
149
+ New-Item - ItemType Directory - Path " $msixProjectRoot " | Out-Null
150
+
151
+ Copy-Item - Path .\$root \bin\* $msixProjectRoot - Verbose - Force
152
+ EvaluateTemplateFile " .\Build.Build.windowsx64\templates\msix\appxmanifest.xml" " $msixProjectRoot \appxmanifest.xml" $flavor $target
153
+ EvaluateTemplateFile " .\Build.Build.windowsx64\templates\msix\appxmappings.txt" " $msixProjectRoot \appxmappings.txt" $flavor $target
154
+
155
+ New-Item - ItemType Directory - Path " $msixProjectRoot \images" | Out-Null
156
+ Copy-Item - Path .\$root \assets\* .png " $msixProjectRoot \images" - Verbose - Force
157
+
158
+ & " C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\makeappx.exe" pack / m " $msixProjectRoot \appxmanifest.xml" / f " $msixProjectRoot \appxmappings.txt" / p " .\Releases\GithubReleases\rnp.$BuildTag .$flavor .msix"
159
+ }
134
160
}
135
161
}
136
162
@@ -194,7 +220,8 @@ function EvaluateTemplateFile($templateFile, $targetFile, $targetShortName, $tar
194
220
}
195
221
196
222
function EvaluateTemplate ($template , $targetShortName , $targetFullName ) {
197
- return $template.Replace (" {build_branch_name}" , $BuildBranchName ).Replace(" {build_tag}" , $BuildTag ).Replace(" {version}" , $BuildNumber ).Replace(" {target_short}" , $targetShortName ).Replace(" {target}" , $targetFullName )
223
+ $targetArch = ($targetShortName -split " \." )[1 ]
224
+ return $template.Replace (" {build_branch_name}" , $BuildBranchName ).Replace(" {build_tag}" , $BuildTag ).Replace(" {version}" , $BuildNumber ).Replace(" {target_short}" , $targetShortName ).Replace(" {target}" , $targetFullName ).Replace(" {build_arch}" , $targetArch )
198
225
}
199
226
200
227
PackAllReleasePackages
0 commit comments