jj: add setup, fix assignment bugs
This commit is contained in:
21
DDUserManager/SetupWix/Config.wxi
Normal file
21
DDUserManager/SetupWix/Config.wxi
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Include>
|
||||
<!-- Der Name der Haupt-EXE -->
|
||||
<?define ProgramName="DDUserManager"?>
|
||||
<!-- Der Volle Name des Programms -->
|
||||
<?define ProductName="User Manager"?>
|
||||
<!-- 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="0fae5d55-da4e-47e8-b584-48f454b6a6f3"?>
|
||||
</Include>
|
||||
44
DDUserManager/SetupWix/DatabaseDlg.wxs
Normal file
44
DDUserManager/SetupWix/DatabaseDlg.wxs
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Fragment>
|
||||
<UI Id="CustomUI_Database">
|
||||
<Dialog Id="DatabaseDlg" Title="!(loc.InstallDirDlg_Title)" Width="370" Height="270" NoMinimize="no">
|
||||
|
||||
<Control Id="IPLabel" Type="Text" X="75" Y="50" Width="100" Height="15" TabSkip="no" Text="&Database Server IP:" />
|
||||
<Control Id="IPEdit" Type="Edit" X="75" Y="70" Width="220" Height="18" Property="DBADDRESS" Text="" />
|
||||
<Control Id="DBLabel" Type="Text" X="75" Y="90" Width="100" Height="15" TabSkip="no" Text="&Database Name:" />
|
||||
<Control Id="DBEdit" Type="Edit" X="75" Y="110" Width="220" Height="18" Property="DBNAME" Text="DD_ECM" />
|
||||
<Control Id="UserLabel" Type="Text" X="75" Y="130" Width="100" Height="15" TabSkip="no" Text="&Database Username:" />
|
||||
<Control Id="UserEdit" Type="Edit" X="75" Y="150" Width="220" Height="18" Property="DBUSER" Password="yes" />
|
||||
<Control Id="PasswordLabel" Type="Text" X="75" Y="170" Width="100" Height="15" TabSkip="no" Text="&Database Password:" />
|
||||
<Control Id="PasswordEdit" Type="Edit" X="75" Y="190" Width="220" Height="18" Property="DBPASSWORD" Password="yes" />
|
||||
|
||||
<Control Id="InstallButton" Type="PushButton" Text="Connect" Height="17" Width="56" X="130" Y="210">
|
||||
<Publish Event="NewDialog" Value="ProgressDlg"></Publish>
|
||||
</Control>
|
||||
|
||||
<Control Id="CancelButton" Type="PushButton" X="190" Y="210" Width="56" Height="17" Cancel="yes" Text="Cancel">
|
||||
<Publish Event="SpawnDialog" Value="CancelDlg" >1</Publish>
|
||||
</Control>
|
||||
|
||||
<Control Id="Description" Type="Text" X="25" Y="6" Width="280" Height="15" Transparent="yes" NoPrefix="yes">
|
||||
<Text>Click Connect to finalise product installation</Text>
|
||||
</Control>
|
||||
|
||||
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes">
|
||||
<Text>{\WixUI_Font_Title}Provide Database Credentials for Digital Data Modules</Text>
|
||||
</Control>
|
||||
|
||||
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.InstallDirDlgBannerBitmap)" />
|
||||
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
|
||||
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
|
||||
</Dialog>
|
||||
|
||||
</UI>
|
||||
|
||||
<InstallUISequence>
|
||||
<Show After="ProgressDlg" Dialog="DatabaseDlg">NOT Installed</Show>
|
||||
</InstallUISequence>
|
||||
|
||||
</Fragment>
|
||||
</Wix>
|
||||
159
DDUserManager/SetupWix/Product.wxs
Normal file
159
DDUserManager/SetupWix/Product.wxs
Normal file
@@ -0,0 +1,159 @@
|
||||
<?include Config.wxi?>
|
||||
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
|
||||
<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"
|
||||
/>
|
||||
|
||||
<Media Id='1' Cabinet='$(var.ProgramName).cab' EmbedCab='yes' DiskPrompt='$(var.ProgramName)' />
|
||||
<Property Id='DiskPrompt' Value="$(var.ProgramName) Install" />
|
||||
|
||||
<MajorUpgrade
|
||||
AllowDowngrades="no"
|
||||
AllowSameVersionUpgrades="no"
|
||||
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="ProgramFilesFolder">
|
||||
<Directory Id="DDDIR" Name="$(var.Manufacturer)">
|
||||
<Directory Id="INSTALLDIR" Name="$(var.ProductName)"/>
|
||||
</Directory>
|
||||
</Directory>
|
||||
|
||||
<Directory Id="ProgramMenuFolder">
|
||||
<Directory Id="ApplicationProgramsFolder" Name="$(var.ProductName)"/>
|
||||
</Directory>
|
||||
|
||||
<Directory Id="DesktopFolder" />
|
||||
</Directory>
|
||||
|
||||
<!-- Verknüpfung für Startmenü -->
|
||||
<DirectoryRef Id="ApplicationProgramsFolder">
|
||||
<Component Id="ApplicationShortcut_StartMenu" Guid="b446a59e-740d-4dab-8e16-80de6fb48167">
|
||||
<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="d4850175-ad31-4c0f-95ab-a4248b47fda7">
|
||||
<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="6a98ced0-c55c-4584-9de1-1f1ef87f6de9">
|
||||
<File Id="MainApplicationExe" Name="$(var.ProgramName).exe" KeyPath="yes" Checksum="yes" />
|
||||
</Component>
|
||||
|
||||
<Component Id="RegistryKeys" Guid="9630254f-88a9-4e51-9844-e11749882635">
|
||||
<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" />
|
||||
|
||||
<!-- Konfiguriert die Reihenfolge der Installer-Dialoge -->
|
||||
<UI>
|
||||
<UIRef Id="WixUI_FeatureTree"/>
|
||||
<UIRef Id="WixUI_ErrorProgressText" />
|
||||
<!--<UIRef Id="CustomUI_Database"/>-->
|
||||
|
||||
<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>
|
||||
69
DDUserManager/SetupWix/SetupWix.wixproj
Normal file
69
DDUserManager/SetupWix/SetupWix.wixproj
Normal file
@@ -0,0 +1,69 @@
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>3.10</ProductVersion>
|
||||
<ProjectGuid>bce990d1-e422-4096-a4be-6e940fb25127</ProjectGuid>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<OutputName>SetupWix</OutputName>
|
||||
<OutputType>Package</OutputType>
|
||||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
|
||||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<OutputPath>bin\$(Configuration)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
|
||||
<DefineConstants>Debug</DefineConstants>
|
||||
<Cultures>de-DE;en-US</Cultures>
|
||||
<LinkerAdditionalOptions>
|
||||
-b "$(SolutionDir)DDUserManager\bin\$(Configuration)"
|
||||
</LinkerAdditionalOptions>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>bin\$(Configuration)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DatabaseDlg.wxs" />
|
||||
<Compile Include="Product.wxs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WixExtension Include="WixUtilExtension">
|
||||
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
|
||||
<Name>WixUtilExtension</Name>
|
||||
</WixExtension>
|
||||
<WixExtension Include="WixUIExtension">
|
||||
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
|
||||
<Name>WixUIExtension</Name>
|
||||
</WixExtension>
|
||||
<WixExtension Include="WixUIExtension">
|
||||
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
|
||||
<Name>WixUIExtension</Name>
|
||||
</WixExtension>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Config.wxi" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(WixTargetsPath)" Condition=" Exists('$(WixTargetsPath)') " />
|
||||
<Target Name="EnsureWixToolsetInstalled" Condition=" !Exists('$(WixTargetsPath)') ">
|
||||
<Error Text="The WiX Toolset v3 build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
|
||||
</Target>
|
||||
<Target Name="BeforeBuild">
|
||||
<!-- Get the programs assembly version from the .exe file -->
|
||||
<GetAssemblyIdentity AssemblyFiles="..\DDUserManager\bin\$(Configuration)\DDUserManager.exe">
|
||||
<Output TaskParameter="Assemblies" ItemName="AsmInfo" />
|
||||
</GetAssemblyIdentity>
|
||||
<!-- Store the assembly version number in ProductVersion preprocessor variable -->
|
||||
<CreateProperty Value="$(DefineConstants);ProductVersion=%(AsmInfo.Version)">
|
||||
<Output TaskParameter="Value" PropertyName="DefineConstants" />
|
||||
</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" />
|
||||
</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" />
|
||||
</CreateProperty>
|
||||
</Target>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user