Browse Source

Make Installer top-level solution and build it post-publish of ILSpy.sln (#2991)

* Remove Installer from main solution
* Split installer into separate solution that has to be run after ILSpy.sln has been built and published
* Modify build action to account for new sln and correct ordering
* Single-line run and release-only installer build
* All publishing in ps1, better naming for publish folders
pull/2993/head
Christoph Wille 2 years ago committed by GitHub
parent
commit
eb2f024b8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 26
      .github/workflows/build-ilspy.yml
  2. 31
      ILSpy.Installer.sln
  3. 20
      ILSpy.Installer.slnf
  4. 12
      ILSpy.Installer/ILSpy.Installer.csproj
  5. 8
      ILSpy.Installer/README.md
  6. 16
      ILSpy.Installer/setup.cs
  7. 16
      ILSpy.sln
  8. 15
      publish.ps1

26
.github/workflows/build-ilspy.yml

@ -78,23 +78,23 @@ jobs: @@ -78,23 +78,23 @@ jobs:
- name: Zip ILSpy (framework-dependent)
run: 7z a -tzip $env:StagingDirectory\ILSpy_binaries.zip .\ILSpy\bin\${{ matrix.configuration }}\net6.0-windows\*.dll .\ILSpy\bin\${{ matrix.configuration }}\net6.0-windows\*.exe .\ILSpy\bin\${{ matrix.configuration }}\net6.0-windows\*.config .\ILSpy\bin\${{ matrix.configuration }}\net6.0-windows\*.json .\ILSpy\bin\${{ matrix.configuration }}\net6.0-windows\*\ILSpy.resources.dll .\ILSpy\bin\${{ matrix.configuration }}\net6.0-windows\*\ILSpy.ReadyToRun.Plugin.resources.dll
- name: Zip ILSpy Release (arm64 framework-dependent)
if: matrix.configuration == 'release'
- name: Publish x64/arm64 framework-dependent/self-contained
shell: pwsh
run: |
dotnet publish ./ILSpy/ILSpy.csproj -c Release --no-restore --no-self-contained -r win-arm64 -o ./ILSpy/bin/Release/net6.0-windows/win-arm64/publish/nsc
dotnet publish ./ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj -c Release --no-restore --no-self-contained -r win-arm64 -o ./ILSpy/bin/Release/net6.0-windows/win-arm64/publish/nsc
dotnet publish ./ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj -c Release --no-restore --no-self-contained -r win-arm64 -o ./ILSpy/bin/Release/net6.0-windows/win-arm64/publish/nsc
7z a -tzip $env:StagingDirectory\ILSpy_binaries_arm64.zip .\ILSpy\bin\Release\net6.0-windows\win-arm64\publish\nsc\*
run: .\publish.ps1
- name: Zip ILSpy Release (win-x64 self-contained)
- name: Zip ILSpy Release (x64 self-contained)
if: matrix.configuration == 'release'
shell: pwsh
run: 7z a -tzip $env:StagingDirectory\ILSpy_selfcontained_x64.zip .\ILSpy\bin\Release\net6.0-windows\win-x64\publish\selfcontained\*
- name: Zip ILSpy Release (arm64 framework-dependent)
if: matrix.configuration == 'release'
run: 7z a -tzip $env:StagingDirectory\ILSpy_binaries_arm64.zip .\ILSpy\bin\Release\net6.0-windows\win-arm64\publish\fwdependent\*
- name: Build Installer (x64 framework-dependent)
if: matrix.configuration == 'release'
run: |
dotnet publish ./ILSpy/ILSpy.csproj -c Release --no-restore --self-contained -r win-x64
dotnet publish ./ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj -c Release --no-restore --self-contained -r win-x64
dotnet publish ./ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj -c Release --no-restore --self-contained -r win-x64
7z a -tzip $env:StagingDirectory\ILSpy_selfcontained_x64.zip .\ILSpy\bin\Release\net6.0-windows\win-x64\publish\*
msbuild ILSpy.Installer.sln /t:Restore /p:Configuration="Release" /p:Platform="Any CPU"
msbuild ILSpy.Installer.sln /p:Configuration="Release" /p:Platform="Any CPU"
# https://github.com/actions/upload-artifact
- name: Upload VSIX (VS 2019) release build artifacts

31
ILSpy.Installer.sln

@ -0,0 +1,31 @@ @@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.6.33723.286
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.Installer", "ILSpy.Installer\ILSpy.Installer.csproj", "{D27793B2-C3F9-4410-AAD0-E117BEDCCEB0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.Decompiler", "ICSharpCode.Decompiler\ICSharpCode.Decompiler.csproj", "{3FE7AE02-D69D-4C76-9BC0-CF700DFD09FE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D27793B2-C3F9-4410-AAD0-E117BEDCCEB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D27793B2-C3F9-4410-AAD0-E117BEDCCEB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D27793B2-C3F9-4410-AAD0-E117BEDCCEB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D27793B2-C3F9-4410-AAD0-E117BEDCCEB0}.Release|Any CPU.Build.0 = Release|Any CPU
{3FE7AE02-D69D-4C76-9BC0-CF700DFD09FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3FE7AE02-D69D-4C76-9BC0-CF700DFD09FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3FE7AE02-D69D-4C76-9BC0-CF700DFD09FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3FE7AE02-D69D-4C76-9BC0-CF700DFD09FE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A343F649-2CFB-4022-9133-1BA55FBCE3D1}
EndGlobalSection
EndGlobal

20
ILSpy.Installer.slnf

@ -1,20 +0,0 @@ @@ -1,20 +0,0 @@
{
"solution": {
"path": "ILSpy.sln",
"projects": [
"ICSharpCode.Decompiler.PdbProvider.Cecil\\ICSharpCode.Decompiler.PdbProvider.Cecil.csproj",
"ICSharpCode.Decompiler.TestRunner\\ICSharpCode.Decompiler.TestRunner.csproj",
"ICSharpCode.Decompiler.Tests\\ICSharpCode.Decompiler.Tests.csproj",
"ICSharpCode.Decompiler\\ICSharpCode.Decompiler.csproj",
"ICSharpCode.ILSpyX\\ICSharpCode.ILSpyX.csproj",
"ILSpy.BamlDecompiler.Tests\\ILSpy.BamlDecompiler.Tests.csproj",
"ILSpy.BamlDecompiler\\ILSpy.BamlDecompiler.csproj",
"ILSpy.ReadyToRun\\ILSpy.ReadyToRun.csproj",
"ILSpy.Tests\\ILSpy.Tests.csproj",
"ILSpy\\ILSpy.csproj",
"ILSpy.Installer\\ILSpy.Installer.csproj",
"SharpTreeView\\ICSharpCode.TreeView.csproj",
"TestPlugin\\TestPlugin.csproj"
]
}
}

12
ILSpy.Installer/ILSpy.Installer.csproj

@ -13,18 +13,6 @@ @@ -13,18 +13,6 @@
<ItemGroup>
<ProjectReference Include="..\ICSharpCode.Decompiler\ICSharpCode.Decompiler.csproj" />
<ProjectReference Include="..\ILSpy\ILSpy.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
</ProjectReference>
<ProjectReference Include="..\ILSpy.ReadyToRun\ILSpy.ReadyToRun.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
</ProjectReference>
<ProjectReference Include="..\ILSpy.BamlDecompiler\ILSpy.BamlDecompiler.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
</ProjectReference>
</ItemGroup>
</Project>

8
ILSpy.Installer/README.md

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
# Building the Installer
It is mandatory to first publish(.ps1) the respective target platforms, then setup can be built, eg
```
msbuild ILSpy.Installer.sln /p:Configuration="Release" /p:Platform="Any CPU"
msbuild ILSpy.Installer.sln /p:Configuration="Release" /p:Platform="Any CPU" /p:DefineConstants="ARM64"
```

16
ILSpy.Installer/setup.cs

@ -19,7 +19,13 @@ namespace ILSpy.Installer @@ -19,7 +19,13 @@ namespace ILSpy.Installer
#else
var buildConfiguration = "Release";
#endif
var buildOutputDir = $@"ILSpy\bin\{buildConfiguration}\net6.0-windows";
#if ARM64
var buildPlatform = "arm64";
#else
var buildPlatform = "x64";
#endif
var buildOutputDir = $@"ILSpy\bin\{buildConfiguration}\net6.0-windows\win-{buildPlatform}\publish\fwdependent";
var project = new Project("ILSpy",
new InstallDir(@"%LocalAppData%\Programs\ILSpy",
@ -30,6 +36,12 @@ namespace ILSpy.Installer @@ -30,6 +36,12 @@ namespace ILSpy.Installer
new Files(Path.Combine(buildOutputDir, "ILSpy.resources.dll")),
new Files(Path.Combine(buildOutputDir, "ILSpy.ReadyToRun.Plugin.resources.dll"))));
#if ARM64
project.Platform = Platform.arm64;
#else
project.Platform = Platform.x64;
#endif
project.GUID = new Guid("a12fdab1-731b-4a98-9749-d481ce8692ab");
project.Version = AppPackage.Version;
project.SourceBaseDir = Path.GetDirectoryName(Environment.CurrentDirectory);
@ -59,7 +71,7 @@ namespace ILSpy.Installer @@ -59,7 +71,7 @@ namespace ILSpy.Installer
new FileShortcut("ILSpy", @"%ProgramMenu%")
};
Compiler.BuildMsi(project, Path.Combine(Environment.CurrentDirectory, "wix", $"ILSpy-{AppPackage.Version}.msi"));
Compiler.BuildMsi(project, Path.Combine(Environment.CurrentDirectory, "wix", $"ILSpy-{AppPackage.Version}-{buildPlatform}.msi"));
}
}
}

16
ILSpy.sln

@ -38,18 +38,11 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ILSpy.AddIn.Shared", "ILSpy @@ -38,18 +38,11 @@ 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("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ILSpy.Installer", "ILSpy.Installer\ILSpy.Installer.csproj", "{A4BA0771-DA4A-4A94-A5EC-5BA10B52816F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.Decompiler.TestRunner", "ICSharpCode.Decompiler.TestRunner\ICSharpCode.Decompiler.TestRunner.csproj", "{4FBB470F-69EB-4C8B-8961-8B4DF4EBB999}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.ILSpyX", "ICSharpCode.ILSpyX\ICSharpCode.ILSpyX.csproj", "{F8EFCF9D-B9A3-4BA0-A1B2-B026A71DAC22}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
ILSpy.AddIn.Shared\ILSpy.AddIn.Shared.projitems*{09a03980-d14a-4705-a38c-741ad7166dee}*SharedItemsImports = 5
ILSpy.AddIn.Shared\ILSpy.AddIn.Shared.projitems*{9d7be6c0-b7b3-4a50-a54e-18a2d84a3384}*SharedItemsImports = 5
ILSpy.AddIn.Shared\ILSpy.AddIn.Shared.projitems*{acab1e5d-b3df-4092-aa72-692f8341e520}*SharedItemsImports = 13
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
@ -107,10 +100,6 @@ Global @@ -107,10 +100,6 @@ 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
{4FBB470F-69EB-4C8B-8961-8B4DF4EBB999}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FBB470F-69EB-4C8B-8961-8B4DF4EBB999}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FBB470F-69EB-4C8B-8961-8B4DF4EBB999}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -126,4 +115,9 @@ Global @@ -126,4 +115,9 @@ Global
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C764218F-7633-4412-923D-558CE7EE0560}
EndGlobalSection
GlobalSection(SharedMSBuildProjectFiles) = preSolution
ILSpy.AddIn.Shared\ILSpy.AddIn.Shared.projitems*{09a03980-d14a-4705-a38c-741ad7166dee}*SharedItemsImports = 5
ILSpy.AddIn.Shared\ILSpy.AddIn.Shared.projitems*{9d7be6c0-b7b3-4a50-a54e-18a2d84a3384}*SharedItemsImports = 5
ILSpy.AddIn.Shared\ILSpy.AddIn.Shared.projitems*{acab1e5d-b3df-4092-aa72-692f8341e520}*SharedItemsImports = 13
EndGlobalSection
EndGlobal

15
publish.ps1

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
$output_arm64 = "./ILSpy/bin/Release/net6.0-windows/win-arm64/publish/fwdependent"
$output_x64 = "./ILSpy/bin/Release/net6.0-windows/win-x64/publish/fwdependent"
$output_x64_selfcontained = "./ILSpy/bin/Release/net6.0-windows/win-x64/publish/selfcontained"
dotnet publish ./ILSpy/ILSpy.csproj -c Release --no-restore --no-self-contained -r win-arm64 -o $output_arm64
dotnet publish ./ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj -c Release --no-restore --no-self-contained -r win-arm64 -o $output_arm64
dotnet publish ./ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj -c Release --no-restore --no-self-contained -r win-arm64 -o $output_arm64
dotnet publish ./ILSpy/ILSpy.csproj -c Release --no-restore --no-self-contained -r win-x64 -o $output_x64
dotnet publish ./ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj -c Release --no-restore --no-self-contained -r win-x64 -o $output_x64
dotnet publish ./ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj -c Release --no-restore --no-self-contained -r win-x64 -o $output_x64
dotnet publish ./ILSpy/ILSpy.csproj -c Release --no-restore --self-contained -r win-x64 -o $output_x64_selfcontained
dotnet publish ./ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj -c Release --no-restore --self-contained -r win-x64 -o $output_x64_selfcontained
dotnet publish ./ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj -c Release --no-restore --self-contained -r win-x64 -o $output_x64_selfcontained
Loading…
Cancel
Save