From 8e0bd198de104a68d1b4e8d921646670d5fdbdcb Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Mon, 25 Jul 2022 14:39:40 +0200 Subject: [PATCH] Respect :build_installer when bundling on windows --- app_bundler/lib/app_bundler/windows.ex | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app_bundler/lib/app_bundler/windows.ex b/app_bundler/lib/app_bundler/windows.ex index c0dbdbf20..fc6edcb86 100644 --- a/app_bundler/lib/app_bundler/windows.ex +++ b/app_bundler/lib/app_bundler/windows.ex @@ -68,12 +68,14 @@ defmodule AppBundler.Windows do end end - installer_eex_path = Path.expand("#{@templates_path}/windows/Installer.nsi.eex") - installer_nsi_path = "#{app_path}/Installer.nsi" - copy_template(installer_eex_path, installer_nsi_path, release: release, app_options: options) - makensis_path = ensure_makensis() - log(:green, "creating", Path.relative_to_cwd("#{app_path}/#{app_name}Install.exe")) - cmd!(makensis_path, [installer_nsi_path]) + if Keyword.fetch!(options, :build_installer) do + installer_eex_path = Path.expand("#{@templates_path}/windows/Installer.nsi.eex") + installer_nsi_path = "#{app_path}/Installer.nsi" + copy_template(installer_eex_path, installer_nsi_path, release: release, app_options: options) + makensis_path = ensure_makensis() + log(:green, "creating", Path.relative_to_cwd("#{app_path}/#{app_name}Install.exe")) + cmd!(makensis_path, [installer_nsi_path]) + end release end