Skip to content

Instantly share code, notes, and snippets.

@meitinger
Last active December 20, 2018 11:19
Show Gist options
  • Save meitinger/ef003de6c3544db7a459f3c0db835430 to your computer and use it in GitHub Desktop.
Save meitinger/ef003de6c3544db7a459f3c0db835430 to your computer and use it in GitHub Desktop.
Custom IKVM.NET installer.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.6</ProductVersion>
<ProjectGuid>{d8410844-d2d6-4265-b82e-d3cfc4887a64}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>IKVM</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\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
<BaseInputPaths>src\</BaseInputPaths>
<DefineConstants>Debug</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
<BaseInputPaths>src\</BaseInputPaths>
<SuppressBuildInfo>true</SuppressBuildInfo>
<SignOutput>true</SignOutput>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
<BaseInputPaths>src\</BaseInputPaths>
<DefineConstants>Debug</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
<BaseInputPaths>src\</BaseInputPaths>
<SuppressBuildInfo>true</SuppressBuildInfo>
<SignOutput>true</SignOutput>
</PropertyGroup>
<ItemGroup>
<WixExtension Include="WixNetFxExtension">
<HintPath>$(WixExtDir)\WixNetFxExtension.dll</HintPath>
<Name>WixNetFxExtension</Name>
</WixExtension>
</ItemGroup>
<ItemGroup>
<Compile Include="IKVM.wxs" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<Target Name="SignMsi" Condition=" '$(Configuration)' == 'Release' ">
<Exec Command="signtool.exe sign /t http://timestamp.comodoca.com &quot;$(TargetPath)&quot;" />
</Target>
</Project>
<?xml version="1.0" encoding="Windows-1252"?>
<!--
Copyright (C) 2012-2018, Manuel Meitinger
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<Product Id="*" Name="IKVM.NET" Language="1033" Version="!(bind.fileVersion.IKVM.Runtime.dll)" Manufacturer="Jeroen Frijters" UpgradeCode="1181BF948301401EABC8C8D45C2A6309" Codepage="1252">
<Package Id="*" InstallerVersion="200" Compressed="yes" Platform="$(var.Platform)" InstallPrivileges="elevated" InstallScope="perMachine" />
<Media Id="1" Cabinet="IKVM.cab" EmbedCab="yes" CompressionLevel="high" />
<Property Id="ARPNOMODIFY" Value="1" />
<Property Id="ARPPRODUCTICON" Value="IKVM.ico" />
<PropertyRef Id="NETFRAMEWORK35" />
<PropertyRef Id="NETFRAMEWORK45" />
<Condition Message="IKVM.NET requires .NET Framework 3.5, .NET Framework 4.5 or newer. Please install the latest .NET Framework then run this installer again."><![CDATA[Installed OR NETFRAMEWORK35 OR NETFRAMEWORK45]]></Condition>
<?if $(var.Platform) != x64?>
<Condition Message="This installer is not supported on your computer. Please use the 64-bit installer to complete the [ProductName] installation."><![CDATA[NOT VersionNT64]]></Condition>
<?endif?>
<MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage="A newer version of [ProductName] is already installed." Schedule="afterInstallFinalize" />
<Icon Id="IKVM.ico" SourceFile="IKVM.ico" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="TempFolder" />
<Directory Id="WindowsFolder" />
<Directory Id="SystemFolder" />
<?if $(var.Platform) = x64?>
<Directory Id="System64Folder" />
<?endif?>
</Directory>
<Feature Id="IKVM" AllowAdvertise="no">
<?foreach Assembly in AWT.WinForms;OpenJDK.Beans;OpenJDK.Charsets;OpenJDK.Cldrdata;OpenJDK.Corba;OpenJDK.Core;OpenJDK.Jdbc;OpenJDK.Localedata;OpenJDK.Management;OpenJDK.Media;OpenJDK.Misc;OpenJDK.Naming;OpenJDK.Nashorn;OpenJDK.Remoting;OpenJDK.Security;OpenJDK.SwingAWT;OpenJDK.Text;OpenJDK.Tools;OpenJDK.Util;OpenJDK.XML.API;OpenJDK.XML.Bind;OpenJDK.XML.Crypto;OpenJDK.XML.Parse;OpenJDK.XML.Transform;OpenJDK.XML.WebServices;OpenJDK.XML.XPath;Reflection;Runtime;Runtime.JNI?>
<Component Directory="TempFolder">
<File KeyPath="yes" Assembly=".net" Source="bin\IKVM.$(var.Assembly).dll">
<netfx:NativeImage Id="$(var.Assembly)" Platform="all" Dependencies="no" Priority="0" />
</File>
</Component>
<?endforeach?>
<Component Directory="SystemFolder" Win64="no">
<File KeyPath="yes" Source="bin\ikvm-native-win32-x86.dll" />
</Component>
<Component Directory="SystemFolder" Win64="no">
<File Id="JVM.DLL" KeyPath="yes" Source="bin-x86\JVM.DLL" />
</Component>
<?if $(var.Platform) = x64?>
<Component Directory="System64Folder" Win64="yes">
<File KeyPath="yes" Source="bin\ikvm-native-win32-x64.dll" />
</Component>
<Component Directory="System64Folder" Win64="yes">
<File Id="JVM.DLL.x64" KeyPath="yes" Source="bin-x64\JVM.DLL" />
</Component>
<?endif?>
</Feature>
</Product>
</Wix>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment