Skip to content

Commit

Permalink
Rename installer project to ILSpy.Installer, use ILSpy app version as…
Browse files Browse the repository at this point in the history
… MSI package version
  • Loading branch information
Rpinski committed Nov 20, 2021
1 parent 9981477 commit 0587499
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Expand Up @@ -20,5 +20,6 @@ _ReSharper*/
/ICSharpCode.Decompiler.Tests/TestCases/Correctness/*.exe.config
/ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec
multitargeting.props
ILSpy.MsiBuilder/wix/*.g.wxs
ILSpy.MsiBuilder/output/
ILSpy.Installer/wix/*.g.wxs
ILSpy.Installer/output/
ILSpy.Installer/AppPackage.cs
3 changes: 2 additions & 1 deletion BuildTools/update-assemblyinfo.ps1
Expand Up @@ -76,7 +76,8 @@ $templateFiles = (
@{Input="ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec.template"; Output="ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec"},
@{Input="ILSpy/Properties/app.config.template"; Output = "ILSpy/app.config"},
@{Input="ILSpy.AddIn/source.extension.vsixmanifest.template"; Output = "ILSpy.AddIn/source.extension.vsixmanifest"},
@{Input="ILSpy.AddIn.VS2022/source.extension.vsixmanifest.template"; Output = "ILSpy.AddIn.VS2022/source.extension.vsixmanifest"}
@{Input="ILSpy.AddIn.VS2022/source.extension.vsixmanifest.template"; Output = "ILSpy.AddIn.VS2022/source.extension.vsixmanifest"},
@{Input="ILSpy.Installer/AppPackage.cs.template"; Output = "ILSpy.Installer/AppPackage.cs"}
);

$appxmanifestFiles = (
Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions ILSpy.Installer/AppPackage.cs.template
@@ -0,0 +1,9 @@
using System;

namespace ILSpy.Installer
{
internal static class AppPackage
{
public static Version Version = new Version("$INSERTVERSION$");
}
}
Expand Up @@ -6,8 +6,8 @@
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A4BA0771-DA4A-4A94-A5EC-5BA10B52816F}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ILSpy.MsiBuilder</RootNamespace>
<AssemblyName>ILSpy.MsiBuilder</AssemblyName>
<RootNamespace>ILSpy.Installer</RootNamespace>
<AssemblyName>ILSpy.Installer</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
Expand Down Expand Up @@ -35,6 +35,9 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject>ILSpy.Installer.Builder</StartupObject>
</PropertyGroup>
<ItemGroup>
<Reference Include="BootstrapperCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ce35f76fcda82bad, processorArchitecture=MSIL">
<HintPath>..\packages\WixSharp.bin.1.19.0\lib\BootstrapperCore.dll</HintPath>
Expand All @@ -61,6 +64,8 @@
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="AppPackage.cs.template" />
<Compile Include="AppPackage.cs" />
<Compile Include="setup.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<None Include="wix\$(ProjectName).g.wxs" />
Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 10 additions & 4 deletions ILSpy.MsiBuilder/setup.cs → ILSpy.Installer/setup.cs
Expand Up @@ -3,9 +3,9 @@

using WixSharp;

namespace ILSpy.MsiBuilder
namespace ILSpy.Installer
{
internal class MsiBuilder
internal class Builder
{
static public void Main()
{
Expand All @@ -20,12 +20,18 @@ static public void Main()
new Files(@"ILSpy\bin\Release\net472\ILSpy.ReadyToRun.Plugin.resources.dll")));

project.GUID = new Guid("a12fdab1-731b-4a98-9749-d481ce8692ab");
project.Version = new Version("1.0.0.0");
project.Version = AppPackage.Version;
project.SourceBaseDir = Path.GetDirectoryName(Environment.CurrentDirectory);
project.InstallScope = InstallScope.perUser;
project.InstallPrivileges = InstallPrivileges.limited;

project.UI = WUI.WixUI_Minimal;
project.MajorUpgrade = new MajorUpgrade {
Schedule = UpgradeSchedule.afterInstallInitialize,
AllowSameVersionUpgrades = true,
DowngradeErrorMessage = "A newer release of ILSpy is already installed on this system. Please uninstall it first to continue."
};

project.UI = WUI.WixUI_ProgressOnly;

Compiler.BuildMsi(project, Path.Combine(Environment.CurrentDirectory, "output", "ILSpy.msi"));
}
Expand Down
11 changes: 11 additions & 0 deletions ILSpy.sln
Expand Up @@ -47,6 +47,13 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ILSpy.AddIn.Shared", "ILSpy
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.AddIn.VS2022", "ILSpy.AddIn.VS2022\ILSpy.AddIn.VS2022.csproj", "{09A03980-D14A-4705-A38C-741AD7166DEE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILSpy.Installer", "ILSpy.Installer\ILSpy.Installer.csproj", "{A4BA0771-DA4A-4A94-A5EC-5BA10B52816F}"
ProjectSection(ProjectDependencies) = postProject
{0313F581-C63B-43BB-AA9B-07615DABD8A3} = {0313F581-C63B-43BB-AA9B-07615DABD8A3}
{A6BAD2BA-76BA-461C-8B6D-418607591247} = {A6BAD2BA-76BA-461C-8B6D-418607591247}
{1E85EFF9-E370-4683-83E4-8A3D063FF791} = {1E85EFF9-E370-4683-83E4-8A3D063FF791}
EndProjectSection
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
ILSpy.AddIn.Shared\ILSpy.AddIn.Shared.projitems*{09a03980-d14a-4705-a38c-741ad7166dee}*SharedItemsImports = 5
Expand Down Expand Up @@ -114,6 +121,10 @@ Global
{09A03980-D14A-4705-A38C-741AD7166DEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09A03980-D14A-4705-A38C-741AD7166DEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09A03980-D14A-4705-A38C-741AD7166DEE}.Release|Any CPU.Build.0 = Release|Any CPU
{A4BA0771-DA4A-4A94-A5EC-5BA10B52816F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A4BA0771-DA4A-4A94-A5EC-5BA10B52816F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A4BA0771-DA4A-4A94-A5EC-5BA10B52816F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A4BA0771-DA4A-4A94-A5EC-5BA10B52816F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 0587499

Please sign in to comment.