-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from atomex-me/feat/windows-installer
Feat/windows installer
- Loading branch information
Showing
19 changed files
with
572 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,36 @@ | ||
name: Build and Sign macOS | ||
name: Build and release Windows & MacOS | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
- '*.*.*' | ||
|
||
jobs: | ||
macos: | ||
build_win: | ||
runs-on: windows-latest | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
submodules: true | ||
- name: Setup MSBuild | ||
uses: microsoft/[email protected] | ||
- name: Setup NuGet | ||
uses: NuGet/[email protected] | ||
- name: Restore NuGet Packages | ||
run: nuget restore Atomex.Client.Desktop.sln | ||
- name: Build | ||
run: MSBuild Atomex.Client.Desktop.Installer/Atomex.Client.Desktop.Installer.wixproj /p:Configuration=Release /p:RuntimeIdentifiers=win-x64 /clp:ErrorsOnly | ||
- name: Upload windows release artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: atomex-win | ||
path: Atomex.Client.Desktop.Installer/Installs | ||
|
||
build_macos: | ||
runs-on: macos-latest | ||
needs: [build_win] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
|
@@ -31,21 +55,34 @@ jobs: | |
security unlock-keychain -p $MACOS_CERTIFICATE_PWD atomex.build.keychain | ||
security import certificate.p12 -k atomex.build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign | ||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_CERTIFICATE_PWD atomex.build.keychain | ||
echo 'VER='$(xmllint --xpath "//Project/PropertyGroup/Version/text()" Atomex.Client.Desktop.csproj) >> $GITHUB_ENV | ||
echo 'VER='$(xmllint --xpath "/*[local-name() = 'Project']/*[local-name() = 'PropertyGroup']/*[local-name() = 'Version']/text()" Atomex.Client.Desktop.csproj) >> $GITHUB_ENV | ||
- name: Run Macos build bash script | ||
env: | ||
MACOS_NOTARIZE_PWD: ${{ secrets.MACOS_NOTARIZE_PWD }} | ||
SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY }} | ||
SPARKLE_PUBLIC_KEY: ${{ secrets.SPARKLE_PUBLIC_KEY }} | ||
VER: ${{ env.VER }} | ||
run: | | ||
npm install --global create-dmg | ||
./build_osx.sh $MACOS_NOTARIZE_PWD | ||
- name: Download Windows articact files | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: atomex-win | ||
path: dist/ | ||
|
||
- name: Create appcast file for Windows .msi installer | ||
env: | ||
SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY }} | ||
SPARKLE_PUBLIC_KEY: ${{ secrets.SPARKLE_PUBLIC_KEY }} | ||
VER: ${{ env.VER }} | ||
run: ./create_msi_appcast.sh | ||
|
||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
title: "${{ env.VER }}" | ||
automatic_release_tag: "${{ env.VER }}" | ||
prerelease: false | ||
files: dist_osx/* | ||
files: dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,11 @@ | |
.vs/ | ||
|
||
bin/ | ||
Installs/ | ||
obj/ | ||
|
||
*.user | ||
dist_osx/ | ||
dist/ | ||
release/ | ||
|
||
.DS_Store |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
97 changes: 97 additions & 0 deletions
97
Atomex.Client.Desktop.Installer/Atomex.Client.Desktop.Installer.wixproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">x64</Platform> | ||
<ProductVersion>3.10</ProductVersion> | ||
<ProjectGuid>{d4058b88-9cbc-47e1-bff7-c6a53703eb6e}</ProjectGuid> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<OutputName>Atomex.Client</OutputName> | ||
<OutputType>Package</OutputType> | ||
<DefineSolutionProperties>false</DefineSolutionProperties> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | ||
<OutputPath>bin\$(Configuration)\</OutputPath> | ||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> | ||
<DefineConstants>Debug;$(DefineConstants)</DefineConstants> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> | ||
<OutputPath>bin\$(Configuration)\</OutputPath> | ||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> | ||
<OutputPath>bin\$(Configuration)\</OutputPath> | ||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> | ||
<DefineConstants>Debug;$(DefineConstants)</DefineConstants> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> | ||
<OutputPath>bin\$(Configuration)\</OutputPath> | ||
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="Product.wxs" /> | ||
<HarvestDirectory Include="..\bin\$(Configuration)\net5.0\win-$(Platform)\publish"> | ||
<GenerateGuidsNow>true</GenerateGuidsNow> | ||
<DirectoryRefId>INSTALLDIR</DirectoryRefId> | ||
<ComponentGroupName>App</ComponentGroupName> | ||
<PreprocessorVariable>var.BasePath</PreprocessorVariable> | ||
<SuppressCom>true</SuppressCom> | ||
<SuppressRegistry>true</SuppressRegistry> | ||
<SuppressRootDirectory>true</SuppressRootDirectory> | ||
<Link>$(Configuration)</Link> | ||
</HarvestDirectory> | ||
<WixExtension Include="WixUIExtension"> | ||
<HintPath>WixUIExtension</HintPath> | ||
<Name>WixUIExtension</Name> | ||
</WixExtension> | ||
<WixExtension Include="WixNetFxExtension"> | ||
<HintPath>WixNetFxExtension</HintPath> | ||
<Name>WixNetFxExtension</Name> | ||
</WixExtension> | ||
<WixExtension Include="WixUtilExtension"> | ||
<HintPath>WixUtilExtension</HintPath> | ||
<Name>WixUtilExtension</Name> | ||
</WixExtension> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Atomex.Client.Desktop.csproj"> | ||
<Name>Atomex.Client.Desktop</Name> | ||
<Project>{c1323e2c-7de2-4d2b-a5ff-72590f809842}</Project> | ||
<Private>True</Private> | ||
<DoNotHarvest>True</DoNotHarvest> | ||
<RefProjectOutputGroups> | ||
</RefProjectOutputGroups> | ||
<RefTargetDir>INSTALLDIR</RefTargetDir> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " /> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " /> | ||
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' "> | ||
<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/" /> | ||
</Target> | ||
<Target Name="BeforeBuild"> | ||
<Exec Command="rd /s /q ..\bin\$(Configuration)\net5.0\win-$(Platform)" /> | ||
<Exec Command="dotnet publish ..\Atomex.Client.Desktop.csproj -c $(Configuration) -r win-$(Platform)" /> | ||
<GetAssemblyIdentity AssemblyFiles="..\bin\$(Configuration)\net5.0\win-$(Platform)\Atomex.Client.Desktop.dll"> | ||
<Output TaskParameter="Assemblies" ItemName="AssemblyVersion" /> | ||
</GetAssemblyIdentity> | ||
<PropertyGroup> | ||
<DefineConstants>BuildVersion=%(AssemblyVersion.Version);BasePath=..\bin\$(Configuration)\net5.0\win-$(Platform)\publish</DefineConstants> | ||
</PropertyGroup> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
<GetAssemblyIdentity AssemblyFiles="..\bin\$(Configuration)\net5.0\win-$(Platform)\Atomex.Client.Desktop.dll"> | ||
<Output TaskParameter="Assemblies" ItemName="AssemblyVersion" /> | ||
</GetAssemblyIdentity> | ||
|
||
<!-- Rename and move final MSI --> | ||
<Exec Command="if not exist Installs mkdir Installs" /> | ||
<Exec Command="move bin\$(Configuration)\$(OutputName).msi Installs\Atomex.Client-%(AssemblyVersion.Version)-$(Platform).msi" /> | ||
</Target> | ||
<!-- <PropertyGroup>--> | ||
<!-- <PreBuildEvent>if $(ConfigurationName) == Release start /wait "Atomex binaries signing" exsigner.exe sign -k $(SolutionDir)certificate_key.pfx -s "Atomex Client" $(SolutionDir)Atomex.Client.Desktop\bin\Release\Atomex.Client.Desktop.exe $(SolutionDir)Atomex.Client.Desktop\bin\Release\Atomex.Client.Core.dll</PreBuildEvent>--> | ||
<!-- </PropertyGroup>--> | ||
<!-- <PropertyGroup>--> | ||
<!-- <PostBuildEvent>if $(ConfigurationName) == Release start /wait "Atomex msi signing" exsigner.exe sign -k $(SolutionDir)certificate_key.pfx -s "Atomex Client" !(TargetPath)</PostBuildEvent>--> | ||
<!-- </PropertyGroup>--> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?define Name = "Atomex Client" ?> | ||
<?define Manufacturer = "Atomex.me" ?> | ||
<?define Description = "Multicurrency HD wallet with built-in hybrid exchange based on atomic swap." ?> | ||
<?define UpgradeCode = "2938733e-4104-443a-850b-3916f1f68430" ?> | ||
<?define ExeName = "Atomex.Client.Desktop.exe" ?> | ||
|
||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" | ||
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"> | ||
<Product Id="*" | ||
Language="1033" | ||
Name="$(var.Name)" | ||
Version="$(var.BuildVersion)" | ||
Manufacturer="$(var.Manufacturer)" | ||
UpgradeCode="$(var.UpgradeCode)" | ||
Codepage="1252" | ||
> | ||
|
||
<Package InstallerVersion="400" Compressed="yes" Manufacturer="$(var.Manufacturer)" | ||
Description="$(var.Description)" Comments="Copyright © 2021 Atomex OÜ" | ||
InstallPrivileges="limited" InstallScope="perUser" /> | ||
|
||
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> | ||
<MediaTemplate EmbedCab="yes" /> | ||
|
||
<Icon Id="AppIcon.exe" SourceFile="$(var.Atomex.Client.Desktop.ProjectDir)\Resources\Images\logo_dark_256x256.ico" /> | ||
|
||
<Property Id="ARPPRODUCTICON" Value="AppIcon.exe" /> | ||
<Property Id="ARPHELPLINK" Value="https://atomex.me/" /> | ||
<Property Id="ALLUSERS" Secure="yes" Value="2" /> | ||
<Property Id="MSIINSTALLPERUSER" Secure="yes" Value="1" /> | ||
|
||
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLDIR]" After="CostFinalize" /> | ||
|
||
<PropertyRef Id="NETFRAMEWORK45"/> | ||
<Condition Message="Please install .NET Framework 4.5"> | ||
<![CDATA[Installed OR NETFRAMEWORK45]]> | ||
</Condition> | ||
|
||
<Condition Message="Windows 7 or higer is required"> | ||
<![CDATA[Installed OR VersionNT >= 601]]> | ||
</Condition> | ||
|
||
<Directory Id="TARGETDIR" Name="SourceDir"> | ||
<Directory Id="ProgramFiles64Folder"> | ||
<Directory Id="AppRootDirectory" Name="$(var.Manufacturer)"> | ||
<Directory Id="INSTALLDIR" Name="$(var.Name)" /> | ||
</Directory> | ||
</Directory> | ||
<Directory Id="ProgramMenuFolder"> | ||
<Directory Id="ApplicationProgramsFolder" Name="$(var.Manufacturer)" /> | ||
</Directory> | ||
<Directory Id="DesktopFolder" Name="Desktop" /> | ||
</Directory> | ||
|
||
<!-- Start menu shortcut --> | ||
<DirectoryRef Id="ApplicationProgramsFolder"> | ||
<Component Id="ApplicationShortcut" Guid="*"> | ||
<Shortcut | ||
Id="ApplicationStartMenuShortcut" | ||
Name="$(var.Name)" | ||
Description="$(var.Description)" | ||
Target="[INSTALLDIR]Atomex.Client.Desktop.exe" | ||
WorkingDirectory="INSTALLDIR" /> | ||
<RemoveFolder | ||
Id="ApplicationProgramsFolder" | ||
On="uninstall" /> | ||
<RegistryValue | ||
Root="HKCU" | ||
Key="Software\$(var.Manufacturer)\$(var.Name)" | ||
Name="installed1" | ||
Type="integer" | ||
Value="1" | ||
KeyPath="yes" /> | ||
</Component> | ||
</DirectoryRef> | ||
|
||
<!-- Desktop shortcut --> | ||
<DirectoryRef Id="DesktopFolder"> | ||
<Component Id="ApplicationShortcutDesktop" Guid="*"> | ||
<Shortcut | ||
Id="ApplicationDesktopShortcut" | ||
Name="$(var.Name)" | ||
Description="$(var.Description)" | ||
Target="[INSTALLDIR]Atomex.Client.Desktop.exe" | ||
WorkingDirectory="INSTALLDIR" /> | ||
<RemoveFolder | ||
Id="DesktopFolder" | ||
On="uninstall" /> | ||
<RegistryValue | ||
Root="HKCU" | ||
Key="Software\$(var.Manufacturer)\$(var.Name)" | ||
Name="installed2" | ||
Type="integer" | ||
Value="1" | ||
KeyPath="yes" /> | ||
</Component> | ||
</DirectoryRef> | ||
|
||
<Feature Id="App" Title="$(var.Name)" Level="1"> | ||
<ComponentGroupRef Id="App" /> | ||
<ComponentRef Id="ApplicationShortcut" /> | ||
<ComponentRef Id="ApplicationShortcutDesktop" /> | ||
</Feature> | ||
|
||
<UI> | ||
<UIRef Id="WixUI_Minimal" /> | ||
<Publish Dialog="ExitDialog" | ||
Control="Finish" | ||
Event="DoAction" | ||
Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish> | ||
</UI> | ||
|
||
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch Atomex Client" /> | ||
|
||
<Property Id="WixShellExecTarget" Value="[INSTALLDIR]Atomex.Client.Desktop.exe" /> | ||
<CustomAction Id="LaunchApplication" | ||
BinaryKey="WixCA" | ||
DllEntry="WixShellExec" | ||
Impersonate="yes" /> | ||
|
||
<WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)\Assets\terms.rtf" /> | ||
</Product> | ||
</Wix> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.