mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-26 21:42:48 +01:00
Windows packaging
This commit is contained in:
parent
d3f827a127
commit
1d52e4027b
4 changed files with 66 additions and 5 deletions
36
.github/workflows/release.yml
vendored
36
.github/workflows/release.yml
vendored
|
@ -1,7 +1,7 @@
|
|||
name: Release
|
||||
on:
|
||||
push:
|
||||
branches: [master, main, adaptor-dlc]
|
||||
branches: [master, main, windows-packaging]
|
||||
tags: ["*"]
|
||||
|
||||
env:
|
||||
|
@ -58,15 +58,15 @@ jobs:
|
|||
pkg-version: ${{steps.previoustag.outputs.tag}}
|
||||
MACOS_CERTIFICATE_PWD: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
|
||||
MAC_NOTARIZATION_PW: ${{secrets.MAC_NOTARIZATION_PW}}
|
||||
# Steps to build a fully signed and notarized krystal bull dmg
|
||||
# Steps to build a fully signed and notarized bitcoin-s dmg
|
||||
# 1. Unlock the OS x keychain so we don't have to input passwords via GUI prompts
|
||||
# 2. Build krystalbull.app that is recursively signed with jpackage --mac-sign
|
||||
# 3. Build an unsigned dmg that contains krystalbull.app inside of it (no idea why --mac-sign doesn't work with --type dmg)
|
||||
# 2. Build bitcoin-s.app that is recursively signed with jpackage --mac-sign
|
||||
# 3. Build an unsigned dmg that contains bitcoin-s.app inside of it (no idea why --mac-sign doesn't work with --type dmg)
|
||||
# 4. Sign the dmg with codesign (jpackage dmg signing is broken for some reason)
|
||||
# 5. Submit the dmg to apple's notarization service so can get it whitelisted for installation (see: https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution)
|
||||
# 6. Sleep until apple notorization is done
|
||||
# 7. Retrieve the signature and staple it to the dmg to so network requests do not need to be made to open the dmg
|
||||
# 8. Check all signatures on krystalbull.app (see: https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087735)
|
||||
# 8. Check all signatures on bitcoin-s.app (see: https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087735)
|
||||
# 9. Check all dmg signatures
|
||||
# 10. Display information about signed dmg
|
||||
run: |
|
||||
|
@ -139,4 +139,30 @@ jobs:
|
|||
with:
|
||||
name: "bitcoin-s-deb-${{steps.previoustag.outputs.tag}}-${{github.sha}}"
|
||||
path: "${{ env.pkg-name }}_${{ steps.previoustag.outputs.tag }}-1_amd64.deb"
|
||||
windows:
|
||||
runs-on: [windows-latest]
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Scala
|
||||
uses: olafurpg/setup-scala@v10
|
||||
with:
|
||||
java-version: adopt@1.11.0-1
|
||||
|
||||
- name: 'Get Previous tag'
|
||||
id: previoustag
|
||||
uses: "WyriHaximus/github-action-get-previous-tag@v1"
|
||||
with:
|
||||
fallback: 1.0.0 # Optional fallback tag to use when no tag can be found
|
||||
- name: Build msi
|
||||
shell: bash
|
||||
run: sbt bundle/windows:packageBin
|
||||
- name: View artifacts
|
||||
run: ls -R .
|
||||
- name: Upload installer
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: bitcoin-s-msi-${{steps.previoustag.outputs.tag}}-${{github.sha}}
|
||||
path: "D:\\a\\bitcoin-s\\bitcoin-s\\target\\windows\\bitcoin-s.msi"
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
import com.typesafe.sbt.packager.windows._
|
||||
|
||||
name := "bitcoin-s-bundle"
|
||||
|
||||
enablePlugins(WindowsPlugin)
|
||||
|
||||
mainClass := Some("org.bitcoins.bundle.gui.BundleGUI")
|
||||
|
||||
publish / skip := true
|
||||
|
@ -16,3 +20,25 @@ assembly / assemblyMergeStrategy := {
|
|||
case PathList("reference.conf", _ @_*) => MergeStrategy.concat
|
||||
case _ => MergeStrategy.first
|
||||
}
|
||||
|
||||
Compile / doc := (target.value / "none")
|
||||
// general package information (can be scoped to Windows)
|
||||
maintainer := "Chris Stewart <stewart.chris1234@gmail.com>"
|
||||
// Will say "Welcome to the <packageSummary> Setup Wizard"
|
||||
packageSummary := "Bitcoin-S"
|
||||
// Will be used for drop down menu in setup wizard
|
||||
packageDescription := "Bitcoin-S"
|
||||
|
||||
// wix build information
|
||||
wixProductId := java.util.UUID.randomUUID().toString
|
||||
wixProductUpgradeId := java.util.UUID.randomUUID().toString
|
||||
|
||||
// Adding the wanted wixFeature:
|
||||
wixFeatures += WindowsFeature(
|
||||
id = "shortcuts",
|
||||
title = "Shortcuts in start menu",
|
||||
desc = "Add shortcuts for execution and uninstall in start menu",
|
||||
components = Seq(
|
||||
AddShortCuts(Seq("bin/bitcoin-s-bundle.bat"))
|
||||
)
|
||||
)
|
||||
|
|
|
@ -15,6 +15,7 @@ import scalafx.scene.control._
|
|||
import scalafx.scene.layout.VBox
|
||||
|
||||
import java.nio.file.{Path, Paths}
|
||||
import scala.util.Properties
|
||||
|
||||
object BundleGUI extends WalletGUI with JFXApp {
|
||||
|
||||
|
@ -43,6 +44,10 @@ object BundleGUI extends WalletGUI with JFXApp {
|
|||
val usedDir = DatadirUtil.getFinalDatadir(datadir, baseConfig, None)
|
||||
|
||||
System.setProperty("bitcoins.log.location", usedDir.toAbsolutePath.toString)
|
||||
|
||||
if (Properties.isWin) {
|
||||
System.setProperty("HOME", datadir.getParent.toAbsolutePath.toString)
|
||||
}
|
||||
}
|
||||
|
||||
implicit lazy val system: ActorSystem = ActorSystem(
|
||||
|
|
|
@ -95,6 +95,10 @@ trait BitcoinSRunner extends StartStopAsync[Unit] with Logging {
|
|||
val usedDir: Path =
|
||||
DatadirUtil.getFinalDatadir(datadir, baseConfig, customFinalDirOpt)
|
||||
|
||||
if (Properties.isWin) {
|
||||
System.setProperty("HOME", datadir.getParent.toAbsolutePath.toString)
|
||||
}
|
||||
|
||||
//We need to set the system property before any logger instances
|
||||
//are in instantiated. If we don't do this, we will not log to
|
||||
//the correct location
|
||||
|
|
Loading…
Add table
Reference in a new issue