Moved building MSI to Installer and created Bootstrapper in Setup
This commit is contained in:
20
Elwig.sln
20
Elwig.sln
@ -6,7 +6,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elwig", "Elwig\Elwig.csproj
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{30D7700A-7B0A-4E5D-B839-B4C1D95E307E}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{30D7700A-7B0A-4E5D-B839-B4C1D95E307E}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "Setup", "Setup\Setup.wixproj", "{4A82C9C0-EB6D-409C-B0B2-09A5F727D16F}"
|
Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "Installer", "Installer\Installer.wixproj", "{4A82C9C0-EB6D-409C-B0B2-09A5F727D16F}"
|
||||||
|
EndProject
|
||||||
|
Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "Setup", "Setup\Setup.wixproj", "{952E309C-2090-4978-8996-65900D8E8FA4}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@ -68,6 +70,22 @@ Global
|
|||||||
{4A82C9C0-EB6D-409C-B0B2-09A5F727D16F}.Release|x64.Build.0 = Release|x64
|
{4A82C9C0-EB6D-409C-B0B2-09A5F727D16F}.Release|x64.Build.0 = Release|x64
|
||||||
{4A82C9C0-EB6D-409C-B0B2-09A5F727D16F}.Release|x86.ActiveCfg = Release|x86
|
{4A82C9C0-EB6D-409C-B0B2-09A5F727D16F}.Release|x86.ActiveCfg = Release|x86
|
||||||
{4A82C9C0-EB6D-409C-B0B2-09A5F727D16F}.Release|x86.Build.0 = Release|x86
|
{4A82C9C0-EB6D-409C-B0B2-09A5F727D16F}.Release|x86.Build.0 = Release|x86
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Debug|Any CPU.Build.0 = Debug|x64
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Release|Any CPU.ActiveCfg = Release|x64
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Release|Any CPU.Build.0 = Release|x64
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Release|x64.Build.0 = Release|x64
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{952E309C-2090-4978-8996-65900D8E8FA4}.Release|x86.Build.0 = Release|x86
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<File Source="$(TargetDir)\paged.polyfill.js" />
|
<File Source="$(TargetDir)\paged.polyfill.js" />
|
||||||
</Component>
|
</Component>
|
||||||
<Component>
|
<Component>
|
||||||
<File Source="$(var.Elwig.ProjectDir)\Documents\style.css" />
|
<File Source="$(var.ElwigProjectDir)\Documents\style.css" />
|
||||||
</Component>
|
</Component>
|
||||||
</ComponentGroup>
|
</ComponentGroup>
|
||||||
</Fragment>
|
</Fragment>
|
66
Installer/Installer.wixproj
Normal file
66
Installer/Installer.wixproj
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
<Project Sdk="WixToolset.Sdk/4.0.1">
|
||||||
|
<PropertyGroup>
|
||||||
|
<HarvestFileSuppressUniqueIds>false</HarvestFileSuppressUniqueIds>
|
||||||
|
<HarvestFileGenerateGuidsNow>true</HarvestFileGenerateGuidsNow>
|
||||||
|
<HarvestDirectorySuppressRegistry>false</HarvestDirectorySuppressRegistry>
|
||||||
|
<HarvestDirectoryVerboseOutput>true</HarvestDirectoryVerboseOutput>
|
||||||
|
<HarvestProjectsDirectoryIds>InstallFolder</HarvestProjectsDirectoryIds>
|
||||||
|
<CabinetCachePath>$(OutputPath)bin\cabcache\</CabinetCachePath>
|
||||||
|
<ReuseCabinetCache>True</ReuseCabinetCache>
|
||||||
|
<SuppressValidation>True</SuppressValidation>
|
||||||
|
<BuildProjectReferences>False</BuildProjectReferences>
|
||||||
|
<OutputName>Elwig</OutputName>
|
||||||
|
<Cultures>de-AT</Cultures>
|
||||||
|
</PropertyGroup>
|
||||||
|
<UsingTask TaskName="GetFileVersion" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
|
||||||
|
<ParameterGroup>
|
||||||
|
<AssemblyPath ParameterType="System.String" Required="true" />
|
||||||
|
<Version ParameterType="System.String" Output="true" />
|
||||||
|
</ParameterGroup>
|
||||||
|
<Task>
|
||||||
|
<Using Namespace="System.Diagnostics" />
|
||||||
|
<Code Type="Fragment" Language="cs"><![CDATA[
|
||||||
|
this.Version = FileVersionInfo.GetVersionInfo(this.AssemblyPath).ProductVersion;
|
||||||
|
]]></Code>
|
||||||
|
</Task>
|
||||||
|
</UsingTask>
|
||||||
|
<Target Name="CustomBeforeBuild" BeforeTargets="BeforeBuild">
|
||||||
|
<Exec Command="curl -s -L "https://unpkg.com/pagedjs/dist/paged.polyfill.js" -o "$(TargetDir)paged.polyfill.js"" />
|
||||||
|
<Exec Command="curl -s "http://www.columbia.edu/~em36/PDFtoPrinter.exe" -z "$(TargetDir)PDFtoPrinter.exe" -o "$(TargetDir)PDFtoPrinter.exe"" />
|
||||||
|
<Exec Command="dotnet publish "$(SolutionDir)Elwig\Elwig.csproj" "/p:PublishProfile=$(SolutionDir)\Elwig\Properties\PublishProfiles\FolderProfile.pubxml"" />
|
||||||
|
<GetFileVersion AssemblyPath="..\Elwig\bin\Publish\Elwig.exe">
|
||||||
|
<Output TaskParameter="Version" PropertyName="ElwigFileVersion" />
|
||||||
|
</GetFileVersion>
|
||||||
|
<PropertyGroup>
|
||||||
|
<DefineConstants>ProductVersion=$(ElwigFileVersion);BuildPath=..\Elwig\bin\Publish;DocumentTemplatesPath=..\Elwig\Documents;ElwigProjectDir=..\Elwig</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Target>
|
||||||
|
<ItemGroup>
|
||||||
|
<HarvestDirectory Include="../Elwig/bin/Publish">
|
||||||
|
<ComponentGroupName>BuildFiles</ComponentGroupName>
|
||||||
|
<DirectoryRefId>InstallFolder</DirectoryRefId>
|
||||||
|
<SuppressRootDirectory>true</SuppressRootDirectory>
|
||||||
|
<PreprocessorVariable>BuildPath</PreprocessorVariable>
|
||||||
|
<Transforms>BuildFilesTransform.xslt</Transforms>
|
||||||
|
</HarvestDirectory>
|
||||||
|
<BindPath BindName="BuildBindPath" Include="../Elwig/bin/Publish" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<HarvestDirectory Include="../Elwig/Documents">
|
||||||
|
<ComponentGroupName>DocumentTemplates</ComponentGroupName>
|
||||||
|
<DirectoryRefId>ConfigFolderResources</DirectoryRefId>
|
||||||
|
<SuppressRootDirectory>true</SuppressRootDirectory>
|
||||||
|
<PreprocessorVariable>DocumentTemplatesPath</PreprocessorVariable>
|
||||||
|
<Transforms>DocumentTemplatesTransform.xslt</Transforms>
|
||||||
|
</HarvestDirectory>
|
||||||
|
<BindPath BindName="DocumentTemplateBindPath" Include="../Elwig/Documents" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="DocumentTemplatesTransform.xslt" />
|
||||||
|
<None Include="BuildFilesTransform.xslt" />
|
||||||
|
<None Include="Files\config.ini" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="WixToolset.Heat" Version="4.0.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
@ -2,7 +2,7 @@
|
|||||||
<Fragment>
|
<Fragment>
|
||||||
<ComponentGroup Id="MainComponents">
|
<ComponentGroup Id="MainComponents">
|
||||||
<Component Directory="InstallFolder">
|
<Component Directory="InstallFolder">
|
||||||
<File Source="$(var.Elwig.ProjectDir)\bin\Publish\Elwig.exe" Id="Elwig.exe"/>
|
<File Source="$(var.ElwigProjectDir)\bin\Publish\Elwig.exe" Id="Elwig.exe"/>
|
||||||
</Component>
|
</Component>
|
||||||
<Component Directory="ConfigFolder" Permanent="true" NeverOverwrite="true">
|
<Component Directory="ConfigFolder" Permanent="true" NeverOverwrite="true">
|
||||||
<File Source="$(ProjectDir)\Files\config.ini" Id="config.ini"/>
|
<File Source="$(ProjectDir)\Files\config.ini" Id="config.ini"/>
|
@ -1,9 +1,9 @@
|
|||||||
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
|
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
|
||||||
<Package Name="Elwig" Manufacturer="Elwig" Version="!(bind.FileVersion.Elwig.exe)" Language="3079" UpgradeCode="a459416a-756a-4be6-b6f4-40872c8425a7" Compressed="true">
|
<Package Name="Elwig" Manufacturer="Elwig" Version="$(var.ProductVersion)" Language="3079" UpgradeCode="a459416a-756a-4be6-b6f4-40872c8425a7" Compressed="true">
|
||||||
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
|
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" AllowSameVersionUpgrades="no" />
|
||||||
<MediaTemplate EmbedCab="true"/>
|
<MediaTemplate EmbedCab="true" MaximumUncompressedMediaSize="10"/>
|
||||||
|
|
||||||
<Icon Id="icon.ico" SourceFile="$(var.Elwig.ProjectDir)\elwig.ico"/>
|
<Icon Id="icon.ico" SourceFile="$(var.ElwigProjectDir)\elwig.ico"/>
|
||||||
<Property Id="ARPPRODUCTICON" Value="icon.ico"/>
|
<Property Id="ARPPRODUCTICON" Value="icon.ico"/>
|
||||||
|
|
||||||
<Feature Id="Main">
|
<Feature Id="Main">
|
25
Setup/Bundle.wxs
Normal file
25
Setup/Bundle.wxs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
|
||||||
|
<Bundle Name="Elwig" Manufacturer="Elwig" Version="!(bind.packageVersion.ElwigMsi)" UpgradeCode="f3c8fcab-c37c-43aa-9ab8-e42f4bb518b7" IconSourceFile="$(var.ElwigProjectDir)\elwig.ico" >
|
||||||
|
<BootstrapperApplication>
|
||||||
|
<bal:WixStandardBootstrapperApplication LicenseUrl="" Theme="hyperlinkLicense" LogoFile="$(var.ElwigProjectDir)\elwig.png" SuppressOptionsUI="yes" ShowVersion="yes" />
|
||||||
|
</BootstrapperApplication>
|
||||||
|
|
||||||
|
<util:RegistrySearch Id="VCredistx86" Variable="VCredistx86" Result="exists" Root="HKLM" Key="SOFTWARE\Classes\Installer\Dependencies\VC,redist.x86,x86,14.36,bundle" />
|
||||||
|
<util:RegistrySearch Id="Webview2Machine" Variable="Webview2Machine" Result="exists" Root="HKLM" Key="SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" />
|
||||||
|
<util:RegistrySearch Id="Webview2User" Variable="Webview2User" Result="exists" Root="HKCU" Key="Software\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" />
|
||||||
|
|
||||||
|
<Chain>
|
||||||
|
<ExePackage Id="VCredistx86Installer" DisplayName="VC Redist x86 installer" Name="VC_redist.x86.exe" Cache="remove" Compressed="yes" PerMachine="yes"
|
||||||
|
Permanent="yes" Vital="yes" SourceFile="$(TargetDir)VC_redist.x86.exe" InstallArguments="/install /passive /norestart" DetectCondition="VCredistx86">
|
||||||
|
</ExePackage>
|
||||||
|
|
||||||
|
<ExePackage Id="MicrosoftEdgeWebview2" DisplayName="Microsoft Edge Webview2 Runtime" Name="MicrosoftEdgeWebview2Setup.exe" Cache="remove"
|
||||||
|
Compressed="yes" PerMachine="yes" Permanent ="yes" Vital ="no" SourceFile="$(TargetDir)MicrosoftEdgeWebview2Setup.exe" InstallArguments="/silent /install"
|
||||||
|
UninstallArguments="/silent /uninstall" DetectCondition="Webview2Machine OR Webview2User" >
|
||||||
|
</ExePackage>
|
||||||
|
|
||||||
|
<MsiPackage Id="ElwigMsi" SourceFile="$(var.Installer.TargetDir)\Elwig.msi" Permanent="no" Compressed="yes" Vital="yes"/>
|
||||||
|
</Chain>
|
||||||
|
|
||||||
|
</Bundle>
|
||||||
|
</Wix>
|
@ -1,47 +1,19 @@
|
|||||||
<Project Sdk="WixToolset.Sdk/4.0.1">
|
<Project Sdk="WixToolset.Sdk/4.0.1">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<HarvestFileSuppressUniqueIds>false</HarvestFileSuppressUniqueIds>
|
<OutputType>Bundle</OutputType>
|
||||||
<HarvestFileGenerateGuidsNow>true</HarvestFileGenerateGuidsNow>
|
|
||||||
<HarvestDirectorySuppressRegistry>false</HarvestDirectorySuppressRegistry>
|
|
||||||
<HarvestDirectoryVerboseOutput>true</HarvestDirectoryVerboseOutput>
|
|
||||||
<HarvestProjectsDirectoryIds>InstallFolder</HarvestProjectsDirectoryIds>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<DefineConstants>BuildPath=../Elwig/bin/Publish;DocumentTemplatesPath=../Elwig/Documents</DefineConstants>
|
|
||||||
<PreBuildEvent>curl -s -L "https://unpkg.com/pagedjs/dist/paged.polyfill.js" -o "$(TargetDir)paged.polyfill.js" & curl -s "http://www.columbia.edu/~em36/PDFtoPrinter.exe" -z "$(TargetDir)PDFtoPrinter.exe" -o "$(TargetDir)PDFtoPrinter.exe" & dotnet publish "$(SolutionDir)Elwig\Elwig.csproj" "/p:PublishProfile=$(SolutionDir)\Elwig\Properties\PublishProfiles\FolderProfile.pubxml"</PreBuildEvent>
|
|
||||||
<OutputName>Elwig</OutputName>
|
<OutputName>Elwig</OutputName>
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<Cultures>de-AT</Cultures>
|
<Cultures>de-AT</Cultures>
|
||||||
<OutputPath>bin\</OutputPath>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<Target Name="CustomBeforeBuild" BeforeTargets="BeforeBuild">
|
||||||
|
<Exec Command='curl -L -s "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -z "$(TargetDir)MicrosoftEdgeWebview2Setup.exe" -o "$(TargetDir)MicrosoftEdgeWebview2Setup.exe"' />
|
||||||
|
<Exec Command='curl -L -s "https://aka.ms/vs/17/release/vc_redist.x86.exe" -z "$(TargetDir)VC_redist.x86.exe" -o "$(TargetDir)VC_redist.x86.exe"' />
|
||||||
|
<PropertyGroup>
|
||||||
|
<DefineConstants>ElwigProjectDir=..\Elwig</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Target>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<HarvestDirectory Include="../Elwig/bin/Publish">
|
<ProjectReference Include="..\Installer\Installer.wixproj" />
|
||||||
<ComponentGroupName>BuildFiles</ComponentGroupName>
|
<PackageReference Include="WixToolset.Bal.wixext" Version="4.0.1" />
|
||||||
<DirectoryRefId>InstallFolder</DirectoryRefId>
|
<PackageReference Include="WixToolset.Util.wixext" Version="4.0.1" />
|
||||||
<SuppressRootDirectory>true</SuppressRootDirectory>
|
|
||||||
<PreprocessorVariable>BuildPath</PreprocessorVariable>
|
|
||||||
<Transforms>BuildFilesTransform.xslt</Transforms>
|
|
||||||
</HarvestDirectory>
|
|
||||||
<BindPath BindName="BuildBindPath" Include="../Elwig/bin/Publish" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<HarvestDirectory Include="../Elwig/Documents">
|
|
||||||
<ComponentGroupName>DocumentTemplates</ComponentGroupName>
|
|
||||||
<DirectoryRefId>ConfigFolderResources</DirectoryRefId>
|
|
||||||
<SuppressRootDirectory>true</SuppressRootDirectory>
|
|
||||||
<PreprocessorVariable>DocumentTemplatesPath</PreprocessorVariable>
|
|
||||||
<Transforms>DocumentTemplatesTransform.xslt</Transforms>
|
|
||||||
</HarvestDirectory>
|
|
||||||
<BindPath BindName="DocumentTemplateBindPath" Include="../Elwig/Documents" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="DocumentTemplatesTransform.xslt" />
|
|
||||||
<None Include="BuildFilesTransform.xslt" />
|
|
||||||
<None Include="Files\config.ini" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Elwig\Elwig.csproj" PublishProfile="..\Elwig\Properties\PublishProfiles\FolderProfile.pubxml" Publish="true" />
|
|
||||||
<PackageReference Include="WixToolset.Heat" Version="4.0.1" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
Reference in New Issue
Block a user