diff --git a/ci/copy-windows-release-artifacts.sh b/ci/copy-windows-release-artifacts.sh index efec2befac0..4b7706a5e00 100755 --- a/ci/copy-windows-release-artifacts.sh +++ b/ci/copy-windows-release-artifacts.sh @@ -11,33 +11,6 @@ mkdir -p $OUTPUT_DIR/github mkdir -p $OUTPUT_DIR/artifactory mkdir -p $OUTPUT_DIR/split-release -if ! [ "$SPLIT_RELEASE" = "true" ]; then - INSTALLER="$OUTPUT_DIR/github/daml-sdk-$RELEASE_TAG-windows.exe" - EE_INSTALLER="$OUTPUT_DIR/artifactory/daml-sdk-$RELEASE_TAG-windows-ee.exe" - mv "bazel-bin/release/windows-installer/daml-sdk-installer-ce.exe" "$INSTALLER" - mv "bazel-bin/release/windows-installer/daml-sdk-installer-ee.exe" "$EE_INSTALLER" - chmod +wx "$INSTALLER" - chmod +wx "$EE_INSTALLER" - - if ! [ -f /C/Users/u/.dotnet/tools/azuresigntool.exe ]; then - "/C/Program Files/dotnet/dotnet.exe" tool install --global AzureSignTool --version 3.0.0 - fi - - /C/Users/u/.dotnet/tools/azuresigntool.exe sign \ - --azure-key-vault-url "$AZURE_KEY_VAULT_URL" \ - --azure-key-vault-client-id "$AZURE_CLIENT_ID" \ - --azure-key-vault-tenant-id "$AZURE_TENANT_ID" \ - --azure-key-vault-client-secret "$AZURE_CLIENT_SECRET" \ - --azure-key-vault-certificate "$AZURE_KEY_VAULT_CERTIFICATE" \ - --description "Daml SDK installer" \ - --description-url "https://daml.com" \ - --timestamp-rfc3161 "http://timestamp.digicert.com" \ - --file-digest sha384 \ - --verbose \ - "$INSTALLER" \ - "$EE_INSTALLER" -fi - TARBALL=daml-sdk-$RELEASE_TAG-windows.tar.gz EE_TARBALL=daml-sdk-$RELEASE_TAG-windows-ee.tar.gz cp bazel-bin/release/sdk-release-tarball-ce.tar.gz "$OUTPUT_DIR/github/$TARBALL" diff --git a/release/windows-installer/BUILD.bazel b/release/windows-installer/BUILD.bazel deleted file mode 100644 index fb4cc555c39..00000000000 --- a/release/windows-installer/BUILD.bazel +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2022 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 diff --git a/release/windows-installer/daml-logo.ico b/release/windows-installer/daml-logo.ico deleted file mode 100644 index 4580e97ce51..00000000000 Binary files a/release/windows-installer/daml-logo.ico and /dev/null differ diff --git a/release/windows-installer/src/WindowsInstaller.hs b/release/windows-installer/src/WindowsInstaller.hs deleted file mode 100644 index cf468dc572a..00000000000 --- a/release/windows-installer/src/WindowsInstaller.hs +++ /dev/null @@ -1,50 +0,0 @@ --- Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. --- SPDX-License-Identifier: Apache-2.0 - -module Main (main) where - -import Data.String -import Development.NSIS -import System.Environment -import System.FilePath - -import SdkVersion - -main :: IO () -main = do - [installerFile, sdkDir, logo] <- getArgs - writeFile installerFile $ nsis $ installer sdkDir logo - -installer :: FilePath -> FilePath -> Action SectionId -installer sdkDir logo = do - name "Daml SDK" - outFile "daml-sdk-installer.exe" - installIcon (fromString logo) - requestExecutionLevel User - unsafeInjectGlobal "!insertmacro MUI_PAGE_WELCOME" - page InstFiles - page $ Finish finishOptions - { finLinkText = "Open the Daml Quickstart guide" - , finLink = "https://docs.daml.com/getting-started/quickstart.html" - } - section "" [] $ do - -- We use PLUGINSDIR as an easy way to get a temporary directory - -- that nsis will cleanup automatically. - unsafeInject "InitPluginsDir" - iff_ (fileExists "$APPDATA/daml") $ do - answer <- messageBox [MB_YESNO] "Daml SDK is already installed. Do you want to remove the installed SDKs before installing this one?" - iff (answer %== "YES") - (rmdir [Recursive] "$APPDATA/daml") - (abort "Existing installation detected.") - let dir = "$PLUGINSDIR" "daml-sdk-" <> sdkVersion - setOutPath (fromString dir) - file [Recursive] (fromString (sdkDir <> "\\*.*")) - -- install --install-assistant=yes will copy the SDK to the final location. - plugin "nsExec" "ExecToLog" - [ fromString $ unwords - [ "\"" <> dir "daml" "daml.exe\"" - , "install" - , "\"" <> dir <> "\"" - , "--install-assistant=yes" - ] :: Exp String - ]