mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 17:28:46 +03:00
ecd3110f48
* Fix compat job changelog_begin changelog_end * Cleanup head_sdk changelog_begin changelog_end * turns out removing everything also removes files that shouldn’t be removed changelog_begin changelog_end * gnah changelog_begin changelog_end * maybe this was a bad idea changelog_begin changelog_end * trynottocry changelog_begin changelog_end
51 lines
1.7 KiB
Python
51 lines
1.7 KiB
Python
# Copyright (c) 2021 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"]),
|
|
hackage_deps = [
|
|
"base",
|
|
"filepath",
|
|
"nsis",
|
|
],
|
|
src_strip_prefix = "src",
|
|
visibility = ["//visibility:public"],
|
|
deps = ["//:sdk-version-hs-lib"],
|
|
)
|
|
|
|
[
|
|
genrule(
|
|
name = "windows-installer-{}".format(edition),
|
|
# 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".format(edition),
|
|
":daml-logo.ico",
|
|
],
|
|
outs = ["daml-sdk-installer-{}.exe".format(edition)],
|
|
cmd = """
|
|
set -eou pipefail
|
|
RELEASE_DIR=$$(mktemp -d)
|
|
trap "rm -rf $$RELEASE_DIR" EXIT
|
|
tar xf $(location //release:sdk-release-tarball-{edition}.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-{edition}.exe)
|
|
""".format(edition = edition),
|
|
tools = [
|
|
":windows-installer-gen",
|
|
"@makensis_dev_env//:makensis",
|
|
],
|
|
)
|
|
for edition in [
|
|
"ce",
|
|
"ee",
|
|
]
|
|
] if is_windows else None
|