Skip to content

Commit

Permalink
publish as self-contained
Browse files Browse the repository at this point in the history
  • Loading branch information
rfuzzo committed Jan 16, 2023
1 parent b3551ad commit b064fb6
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 3 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,13 @@ winget install WolvenKit.Installer
## Screenshots

![wolvenkit installer_01](https://user-images.githubusercontent.com/37657287/212540284-50a43778-8adf-4e26-92bd-397ca8380e6c.png)


## Building

### Self-contained
To publish as self-contained use:
`dotnet publish .\Wolvenkit.Installer\Wolvenkit.Installer.csproj -o publish -c Release --self-contained true -r win10-x64 -p:Platform=x64` (https://github.com/microsoft/WindowsAppSDK/discussions/3026)

and add
`<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>` in the projects (https://github.com/dotnet/maui/issues/5886)
2 changes: 1 addition & 1 deletion Wolvenkit.Installer.Package/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Identity
Name="26499Wolvenkit.WolvenKit.Installer"
Publisher="[email protected], &quot;Open Source Developer, Moritz Baron&quot;, O=Open Source Developer, L=Gmunden, S=Oberösterreich, C=AT"
Version="0.2.0.0" />
Version="0.2.1.0" />

<Properties>
<DisplayName>WolvenKit.Installer</DisplayName>
Expand Down
18 changes: 18 additions & 0 deletions Wolvenkit.Installer.Package/Wolvenkit.Installer.Package.wapproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '15.0'">
<VisualStudioVersion>15.0</VisualStudioVersion>
</PropertyGroup>

<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
Expand All @@ -13,11 +15,20 @@
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>

<PropertyGroup>
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
<PathToXAMLWinRTImplementations>Wolvenkit.Installer\</PathToXAMLWinRTImplementations>
</PropertyGroup>

<!-- Self-contained -->
<PropertyGroup>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
</PropertyGroup>

<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />

<PropertyGroup>
<ProjectGuid>be6c095c-daae-42a7-a8d9-23022a7ca784</ProjectGuid>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
Expand All @@ -35,17 +46,20 @@
<PackageCertificateThumbprint>F3B6F39B7D06A96E2752172122D4B0DD245F5504</PackageCertificateThumbprint>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<AppxBundle>Always</AppxBundle>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<AppxBundle>Always</AppxBundle>
</PropertyGroup>

<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>

<ItemGroup>
<Content Include="Images\LargeTile.scale-100.png" />
<Content Include="Images\LargeTile.scale-125.png" />
Expand Down Expand Up @@ -99,12 +113,14 @@
<Content Include="Images\Wide310x150Logo.scale-200.png" />
<Content Include="Images\Wide310x150Logo.scale-400.png" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Wolvenkit.Installer\Wolvenkit.Installer.csproj">
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
<PublishProfile>Properties\PublishProfiles\win10-$(Platform).pubxml</PublishProfile>
</ProjectReference>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.2.221116.1">
<IncludeAssets>build</IncludeAssets>
Expand All @@ -113,5 +129,7 @@
<IncludeAssets>build</IncludeAssets>
</PackageReference>
</ItemGroup>

<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />

</Project>
12 changes: 10 additions & 2 deletions Wolvenkit.Installer/Wolvenkit.Installer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@
<Platforms>x64</Platforms>
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</PropertyGroup>

<!-- Self-contained -->
<PropertyGroup>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
</PropertyGroup>

<ItemGroup>
<None Remove="ItemTemplates.xaml" />
<None Remove="Pages\AvailablePage.xaml" />
Expand All @@ -30,9 +38,9 @@
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.2.221116.1" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.2.221209.1" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.755" />
<PackageReference Include="Octokit" Version="4.0.3" />
<PackageReference Include="Octokit" Version="4.0.4" />
<PackageReference Include="Semver" Version="2.2.0" />
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions publish_selfcontained.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off

rem publish as self-contained
dotnet publish .\Wolvenkit.Installer\Wolvenkit.Installer.csproj -o publish -c Release --self-contained true -r win10-x64 -p:Platform=x64

pause

0 comments on commit b064fb6

Please sign in to comment.