First installer, not working yet

This commit is contained in:
Jonathan Jenne 2022-06-15 10:10:27 +02:00
parent 46942fdc28
commit fa0e501d63
3 changed files with 242 additions and 79 deletions

21
Zooflow.Setup/Config.wxi Normal file
View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Include>
<!-- Der Name der Haupt-EXE -->
<?define ProgramName="DigitalData.GUIs.Zooflow"?>
<!-- Der Volle Name des Programms -->
<?define ProductName="ZooFlow"?>
<!-- Der Hersteller des Programms -->
<?define Manufacturer="Digital Data"?>
<!-- Kurze Beschreibung des Programms (optional) -->
<?define Description="Beschreibung des Programms"?>
<!-- Kurzer Kommentar zum Programm (optional) -->
<?define Comments="Kommentar wie Copyright-Hinweis"?>
<!--
UPGRADE CODE
Sorgt dafür, dass Programm-Updates mit dem Installer
die alte Version ersetzen. Darf sich nicht mehr ändern,
wenn einmal festgelegt.
-->
<?define UpgradeCode="e0af1f38-ad06-4cc2-9f99-c470d1dbc440"?>
</Include>

View File

@ -1,30 +1,161 @@
<?xml version="1.0" encoding="UTF-8"?> <?include Config.wxi?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Zooflow.Setup" Language="1033" Version="1.0.0.0" Manufacturer="" UpgradeCode="6dcb401a-7728-4f42-a29b-3b302bbbf18e">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<MediaTemplate /> <Product Id="*" Name="$(var.ProductName)" Language="1031" Codepage="1252" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package
Id="*"
Keywords="Installer"
Description="$(var.Description)"
Comments="$(var.Comments)"
Manufacturer="$(var.Manufacturer)"
InstallerVersion="100"
Languages="1031"
Compressed="yes"
SummaryCodepage="1252"
InstallScope="perMachine"
/>
<Feature Id="ProductFeature" Title="Zooflow.Setup" Level="1"> <Media Id='1' Cabinet='$(var.ProgramName).cab' EmbedCab='yes' DiskPrompt='$(var.ProgramName)' />
<ComponentGroupRef Id="ProductComponents" /> <Property Id='DiskPrompt' Value="$(var.ProgramName) Install" />
</Feature>
</Product>
<Fragment> <MajorUpgrade
AllowDowngrades="no"
AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="Eine neuere Version von [ProductName] ist bereits installiert. Das Setup wird beendet."
/>
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
<Upgrade Id="$(var.UpgradeCode)">
<UpgradeVersion
Minimum="1.0.0.0" Maximum="99.0.0.0"
Property="PREVIOUSVERSIONSINSTALLED"
IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>
<!-- Legt das Icon fest -->
<Icon Id="AppIcon.exe" SourceFile="$(var.ProgramName).exe" />
<!-- Zeige Icon in Systemsteuerung > Programme entfernen -->
<Property Id="ARPPRODUCTICON" Value="AppIcon" />
<!-- Legt die Verzeichnisstruktur fest -->
<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder"> <Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="Zooflow.Setup" /> <Directory Id="DDDIR" Name="$(var.Manufacturer)">
<Directory Id="INSTALLDIR" Name="$(var.ProductName)"/>
</Directory>
</Directory> </Directory>
</Directory>
</Fragment>
<Fragment> <Directory Id="ProgramMenuFolder">
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> <Directory Id="ApplicationProgramsFolder" Name="$(var.ProductName)"/>
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. --> </Directory>
<!-- <Component Id="ProductComponent"> -->
<!-- TODO: Insert files, registry keys, and other resources here. --> <Directory Id="DesktopFolder" />
<!-- </Component> --> </Directory>
</ComponentGroup>
</Fragment> <!-- Verknüpfung für Startmenü -->
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut_StartMenu" Guid="336014aa-996a-455b-be29-19c1986130ff">
<Shortcut Id="ApplicationStartMenuShortcut_StartMenu"
Name="$(var.ProductName)"
Target="[INSTALLDIR]$(var.ProgramName).exe"
WorkingDirectory="INSTALLDIR"/>
<RemoveFolder Id="ApplicationProgramsFolder_StartMenu" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<!-- Verknüpfung für Desktop -->
<DirectoryRef Id="DesktopFolder">
<Component Id="ApplicationShortcut_Desktop" Guid="773e188e-70a9-47bb-a734-71349814ab96">
<Shortcut Id="ApplicationStartMenuShortcut_Desktop"
Name="$(var.ProductName)"
Target="[INSTALLDIR]$(var.ProgramName).exe"
WorkingDirectory="INSTALLDIR"/>
<RemoveFolder Id="ApplicationProgramsFolder_Desktop" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="INSTALLDIR">
<Component Id="MainApplicationExe" Guid="ac6b7460-9c48-47b3-a590-da0905dd433a">
<File Id="MainApplicationExe" Name="$(var.ProgramName).exe" KeyPath="yes" Checksum="yes">
<Shortcut Id="DesktopShortcut" Directory="DesktopFolder" Name="$(var.ProductName)" WorkingDirectory="INSTALLDIR" Icon="AppIcon.exe" IconIndex="0" Advertise="yes" />
<Shortcut Id="StartMenuShortcut" Directory="ProgramMenuFolder" Name="$(var.ProductName)" WorkingDirectory="INSTALLDIR" Icon="AppIcon.exe" IconIndex="0" Advertise="yes" />
</File>
</Component>
<Component Id="RegistryKeys" Guid="70d8acd5-b94c-49d7-9ae2-5ccc97a96fd1">
<RegistryKey Root="HKLM" Key="Software">
<RegistryKey Key="[Manufacturer]">
<RegistryKey Key="[ProductName]" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes" Id="REGKEYINSTALLDIR">
<RegistryValue Type="string" Value="[INSTALLDIR]" Name="Path" />
</RegistryKey>
</RegistryKey>
</RegistryKey>
<util:RemoveFolderEx Id="RemoveApplicationFolder" On="uninstall" Property="APPLICATIONFOLDER" />
</Component>
<!-- Für weitere Dateien hier Component Elemente anlegen!! -->
<!--
<Component Id="FirmaXYLib" Guid="PUT-GUID-HERE">
<File Id="FirmaXYLib" Name="FirmaXYLib.dll" KeyPath="yes" Checksum="yes"/>
</Component>
-->
</DirectoryRef>
<Feature Id="MainApplication" Title="Main Application" Level="1">
<ComponentRef Id="MainApplicationExe" />
<ComponentRef Id="RegistryKeys" />
<!-- Weitere Komponenten hier hinzufügen! -->
</Feature>
<!--
Diese Features können mit einem Parameter beim Aufruf des Installers deaktiviert werden
-->
<Feature Id="DesktopShortcut" Title="Desktop Shortcut">
<Condition Level="0">DISABLE_DESKTOP_ICON</Condition>
<ComponentRef Id="ApplicationShortcut_Desktop"/>
</Feature>
<Feature Id="StartmenuShortcut" Title="Startmenu Shortcut">
<Condition Level="0">DISABLE_STARTMENU_ICON</Condition>
<ComponentRef Id="ApplicationShortcut_StartMenu" />
</Feature>
<!-- Legt das Standard-Installationsverzeichnis fest-->
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<Property Id="_BrowseProperty" Value="INSTALLDIR" />
<!-- Konfiguriert die Reihenfolge der Installer-Dialoge -->
<UI>
<UIRef Id="WixUI_FeatureTree"/>
<UIRef Id="WixUI_ErrorProgressText" />
<Publish Dialog="WelcomeDlg"
Control="Next"
Event="NewDialog"
Value="InstallDirDlg"
Order="2">1</Publish>
<Publish Dialog="InstallDirDlg"
Control="Back"
Event="NewDialog"
Value="WelcomeDlg"
Order="2">1</Publish>
<Publish Dialog="InstallDirDlg"
Control="Next"
Event="NewDialog"
Value="FeaturesDlg"
Order="2">1</Publish>
<Publish Dialog="InstallDirDlg"
Control="ChangeFolder"
Event="NewDialog"
Value="BrowseDlg"
Order="2">1</Publish>
<Publish Dialog="FeaturesDlg"
Control="Back"
Event="NewDialog"
Value="InstallDirDlg"
Order="2">1</Publish>
</UI>
</Product>
</Wix> </Wix>

View File

@ -1,64 +1,75 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.10</ProductVersion> <ProductVersion>3.10</ProductVersion>
<ProjectGuid>6b91537c-7a93-41ac-930a-0aefdc19294f</ProjectGuid> <ProjectGuid>6b91537c-7a93-41ac-930a-0aefdc19294f</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<OutputName>Zooflow.Setup</OutputName> <OutputName>Zooflow.Setup</OutputName>
<OutputType>Package</OutputType> <OutputType>Package</OutputType>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath> <OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants> <DefineConstants>Debug</DefineConstants>
<LinkerAdditionalOptions> <LinkerAdditionalOptions>
-b "$(SolutionDir)Zooflow\bin\$(Configuration)" -b "$(SolutionDir)Zooflow\bin\$(Configuration)"
</LinkerAdditionalOptions> </LinkerAdditionalOptions>
<Cultures>de-DE;en-US;en-GB</Cultures> <Cultures>de-DE;en-US;en-GB</Cultures>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath> <OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Product.wxs" /> <Compile Include="Product.wxs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<WixExtension Include="WixUtilExtension"> <WixExtension Include="WixVSExtension">
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath> <HintPath>$(WixExtDir)\WixVSExtension.dll</HintPath>
<Name>WixUtilExtension</Name> <Name>WixVSExtension</Name>
</WixExtension> </WixExtension>
<WixExtension Include="WixUIExtension"> <WixExtension Include="WixUtilExtension">
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath> <HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
<Name>WixUIExtension</Name> <Name>WixUtilExtension</Name>
</WixExtension> </WixExtension>
</ItemGroup> <WixExtension Include="WixUIExtension">
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " /> <HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " /> <Name>WixUIExtension</Name>
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' "> </WixExtension>
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" /> </ItemGroup>
</Target> <ItemGroup>
<Target Name="BeforeBuild"> <Content Include="Config.wxi" />
<!-- Get the programs assembly version from the .exe file --> </ItemGroup>
<GetAssemblyIdentity AssemblyFiles="..\Zooflow\bin\$(Configuration)\DigitalData.GUIs.ZooFlow.exe"> <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
<Output TaskParameter="Assemblies" ItemName="AsmInfo" ></Output> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
</GetAssemblyIdentity> <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
<!-- Store the assembly version number in ProductVersion preprocessor variable --> <Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
<CreateProperty Value="$(DefineConstants);ProductVersion=%(AsmInfo.Version)"> </Target>
<Output TaskParameter="Value" PropertyName="DefineConstants" ></Output> <Target Name="BeforeBuild">
</CreateProperty> <!-- Get the programs assembly version from the .exe file -->
<!-- Name the .msi file after the solution platform and assembly version e.g TestService-x86-1.4.0.0.msi --> <GetAssemblyIdentity AssemblyFiles="..\Zooflow\bin\$(Configuration)\DigitalData.GUIs.ZooFlow.exe">
<CreateProperty Value="$(SolutionName)-$(Platform)-%(AsmInfo.Version)"> <Output TaskParameter="Assemblies" ItemName="AsmInfo">
<Output TaskParameter="Value" PropertyName="TargetName" ></Output> </Output>
</CreateProperty> </GetAssemblyIdentity>
<!-- Name the .wixpdb file after the solution platform and assembly version e.g TestService-x86-1.4.0.0.msi --> <!-- Store the assembly version number in ProductVersion preprocessor variable -->
<CreateProperty Value="$(TargetName)$(TargetPdbExt)"> <CreateProperty Value="$(DefineConstants);ProductVersion=%(AsmInfo.Version)">
<Output TaskParameter="Value" PropertyName="TargetPdbName" ></Output> <Output TaskParameter="Value" PropertyName="DefineConstants">
</CreateProperty> </Output>
</Target> </CreateProperty>
<!-- <!-- Name the .msi file after the solution platform and assembly version e.g TestService-x86-1.4.0.0.msi -->
<CreateProperty Value="$(SolutionName)-$(Platform)-%(AsmInfo.Version)">
<Output TaskParameter="Value" PropertyName="TargetName">
</Output>
</CreateProperty>
<!-- Name the .wixpdb file after the solution platform and assembly version e.g TestService-x86-1.4.0.0.msi -->
<CreateProperty Value="$(TargetName)$(TargetPdbExt)">
<Output TaskParameter="Value" PropertyName="TargetPdbName">
</Output>
</CreateProperty>
</Target>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it. To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets. Other similar extension points exist, see Wix.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">