mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
5520d76e21
* Improve Windows installer 1. We now show a welcome page before starting the installation. 2. The installer now has an icon. 3. We show a finish page after installation has completed. 4. We detect existing suggestions and abort while mentioning "daml install latest". * Ask if existing installation should be removed
45 lines
1.5 KiB
Python
45 lines
1.5 KiB
Python
# Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
load("//bazel_tools:haskell.bzl", "da_haskell_binary")
|
|
load("@os_info//:os_info.bzl", "is_linux", "is_windows")
|
|
|
|
da_haskell_binary(
|
|
name = "windows-installer-gen",
|
|
srcs = glob(["src/**/*.hs"]),
|
|
hazel_deps = [
|
|
"base",
|
|
"filepath",
|
|
"nsis",
|
|
],
|
|
src_strip_prefix = "src",
|
|
visibility = ["//visibility:public"],
|
|
deps = ["//:sdk-version-hs-lib"],
|
|
)
|
|
|
|
genrule(
|
|
name = "windows-installer",
|
|
# daml-logo.ico was created with the following command:
|
|
# convert \
|
|
# docs/theme/da_theme_skeleton/static/images/favicon/apple-touch-icon.png \
|
|
# -define icon:auto-resize=64,48,32,16 release/windows-installer/daml-logo.ico
|
|
srcs = [
|
|
"//release:sdk-release-tarball.tar.gz",
|
|
":daml-logo.ico",
|
|
],
|
|
outs = ["daml-sdk-installer.exe"],
|
|
cmd = """
|
|
set -eou pipefail
|
|
rm -rf release-dir
|
|
mkdir -p release-dir
|
|
tar xf $(location //release:sdk-release-tarball.tar.gz) --strip-components=1 -C release-dir
|
|
$(location :windows-installer-gen) ./installer.nsi release-dir $(location :daml-logo.ico)
|
|
$(location @makensis_dev_env//:makensis) ./installer.nsi
|
|
cp ./daml-sdk-installer.exe $(location daml-sdk-installer.exe)
|
|
""",
|
|
tools = [
|
|
":windows-installer-gen",
|
|
"@makensis_dev_env//:makensis",
|
|
],
|
|
) if is_windows else None
|