Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit71ef69b

Browse files
authored
fix: add self contained app sdk (#156)
1 parentbf700a2 commit71ef69b

File tree

5 files changed

+3
-81
lines changed

5 files changed

+3
-81
lines changed

‎.github/workflows/ci.yaml‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,6 @@ jobs:
3636
dotnet-version:8.0.x
3737
cache:true
3838
cache-dependency-path:'**/packages.lock.json'
39-
-name:Install Windows App SDK Runtime
40-
shell:pwsh
41-
run:|
42-
$ErrorActionPreference = "Stop"
43-
44-
$filename = ".\WindowsAppRuntimeInstall-x64.exe"
45-
$url = "https://aka.ms/windowsappsdk/1.8/1.8.250907003/windowsappruntimeinstall-x64.exe" # 1.8.0 (1.8.250907003)
46-
& curl.exe --progress-bar --show-error --fail --location --output $filename $url
47-
if ($LASTEXITCODE -ne 0) { throw "Failed to download Windows App SDK" }
48-
49-
$process = Start-Process -FilePath $filename -ArgumentList "--quiet --force" -NoNewWindow -Wait -PassThru
50-
if ($process.ExitCode -ne 0) { throw "Failed to install Windows App SDK: exit code is $($process.ExitCode)" }
5139
-name:dotnet restore
5240
run:dotnet restore --locked-mode
5341
-name:dotnet test

‎App/App.csproj‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ProjectSdk="Microsoft.NET.Sdk">
1+
<ProjectSdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
44
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
@@ -27,6 +27,7 @@
2727
<Copyright>© Coder Technologies Inc.</Copyright>
2828
<ApplicationIcon>coder.ico</ApplicationIcon>
2929
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
30+
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
3031
</PropertyGroup>
3132

3233
<PropertyGroupCondition="$(Configuration) == 'Release'">

‎Installer/Program.cs‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,6 @@ public class BootstrapperOptions : SharedOptions
116116
[Option('m',"msi-path",Required=true,HelpText="Path to the MSI package to embed")]
117117
publicstringMsiPath{get;set;}
118118

119-
[Option('w',"windows-app-sdk-path",Required=true,HelpText="Path to the Windows App Sdk package to embed")]
120-
publicstringWindowsAppSdkPath{get;set;}
121-
122119
[Option('t',"theme-xml-path",Required=false,HelpText="Path to the theme .xml file to use for the installer")]
123120
publicstringThemeXmlPath{get;set;}
124121

@@ -130,9 +127,6 @@ public class BootstrapperOptions : SharedOptions
130127
thrownewArgumentException($"Logo PNG file not found at '{LogoPng}'",nameof(LogoPng));
131128
if(!SystemFile.Exists(MsiPath))
132129
thrownewArgumentException($"MSI package not found at '{MsiPath}'",nameof(MsiPath));
133-
if(!SystemFile.Exists(WindowsAppSdkPath))
134-
thrownewArgumentException($"Windows App Sdk package not found at '{WindowsAppSdkPath}'",
135-
nameof(WindowsAppSdkPath));
136130
if(ThemeXmlPath!=null&&!SystemFile.Exists(ThemeXmlPath))
137131
thrownewArgumentException($"Theme XML file not found at '{ThemeXmlPath}'",nameof(ThemeXmlPath));
138132
}
@@ -374,27 +368,6 @@ private static int BuildBundle(BootstrapperOptions opts)
374368
Vital=false,
375369
Payloads=[dotNetRuntimePayload],
376370
},
377-
// TODO: right now we are including the Windows App Sdk in the bundle
378-
// and always install it
379-
// Microsoft makes it difficult to check if it exists from a regular installer:
380-
// https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/check-windows-app-sdk-versions
381-
// https://github.com/microsoft/WindowsAppSDK/discussions/2437
382-
newExePackage// Windows App Sdk
383-
{
384-
PerMachine=true,
385-
Permanent=true,
386-
Cache=PackageCacheAction.remove,
387-
// There is no license agreement for this SDK.
388-
InstallArguments="--quiet",
389-
Vital=false,
390-
Payloads=
391-
[
392-
newExePackagePayload
393-
{
394-
SourceFile=opts.WindowsAppSdkPath,
395-
},
396-
],
397-
},
398371
newMsiPackage(opts.MsiPath)
399372
{
400373
ForcePerMachine=true,

‎scripts/Get-WindowsAppSdk.ps1‎

Lines changed: 0 additions & 35 deletions
This file was deleted.

‎scripts/Publish.ps1‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ $servicePublishDir = Join-Path $buildPath "service"
119119
&dotnet.exe publish .\Vpn.Service\Vpn.Service.csproj-c Release-a$arch-o$servicePublishDir/p:Version=$version
120120
if ($LASTEXITCODE-ne0) {throw"Failed to build Vpn.Service" }
121121
# App needs to be built with msbuild
122-
$appPublishDir=Join-Path$buildPath"app"
122+
$appPublishDir=Join-Path$buildPath"app\"
123123
$msbuildBinary=&"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"-latest-requires Microsoft.Component.MSBuild-find MSBuild\**\Bin\MSBuild.exe
124124
if ($LASTEXITCODE-ne0) {throw"Failed to find MSBuild" }
125125
if (-not (Test-Path$msbuildBinary)) {throw"Failed to find MSBuild at$msbuildBinary" }
@@ -175,10 +175,6 @@ Copy-Item $mutagenAgentsSrcPath $mutagenAgentsDestPath
175175
if ($LASTEXITCODE-ne0) {throw"Failed to build MSI" }
176176
Add-CoderSignature$msiOutputPath
177177

178-
$getWindowsAppSdk=Join-Path$scriptRoot"Get-WindowsAppSdk.ps1"
179-
&$getWindowsAppSdk-arch$arch
180-
$windowsAppSdkPath=Join-Path$scriptRoot"files\windows-app-sdk-$($arch).exe"
181-
182178
# Build the bootstrapper
183179
&dotnet.exe run--project .\Installer\Installer.csproj-c Release--`
184180
build-bootstrapper`
@@ -188,7 +184,6 @@ $windowsAppSdkPath = Join-Path $scriptRoot "files\windows-app-sdk-$($arch).exe"
188184
--output-path$outputPath`
189185
--icon-file"App\coder.ico"`
190186
--msi-path$msiOutputPath`
191-
--windows-app-sdk-path$windowsAppSdkPath`
192187
--theme-xml-path"scripts\files\RtfThemeLarge.xml"`
193188
--logo-png"scripts\files\logo.png"
194189
if ($LASTEXITCODE-ne0) {throw"Failed to build bootstrapper" }

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp