From 7fce08d290c9dbe78f427913f66ac954bcd96733 Mon Sep 17 00:00:00 2001 From: Louie S Date: Thu, 2 May 2024 13:29:54 -0400 Subject: Add license information to nsis installer --- Makefile.in | 1 + configure | 6 ++- configure.ac | 2 + data/Makefile.am | 1 - data/Makefile.in | 1 + docs/Makefile.in | 1 + docs/windows_compile_instructions.md | 6 +-- nsis/Makefile.am | 2 + nsis/Makefile.in | 8 +++- nsis/installer.nsi | 78 ------------------------------------ nsis/installer.nsi.in | 78 ++++++++++++++++++++++++++++++++++++ spec/Makefile.in | 1 + src/Makefile.in | 1 + 13 files changed, 101 insertions(+), 85 deletions(-) delete mode 100644 nsis/installer.nsi create mode 100644 nsis/installer.nsi.in diff --git a/Makefile.in b/Makefile.in index ab58c0e..2827235 100644 --- a/Makefile.in +++ b/Makefile.in @@ -270,6 +270,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_TITLE = @PACKAGE_TITLE@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ diff --git a/configure b/configure index 5561da7..7db65f1 100755 --- a/configure +++ b/configure @@ -717,6 +717,7 @@ am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM +PACKAGE_TITLE target_alias host_alias build_alias @@ -2537,6 +2538,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu +PACKAGE_TITLE="Terminal Media Launcher" + #AC_CONFIG_HEADERS([config.h]) @@ -6133,7 +6136,7 @@ else fi -ac_config_files="$ac_config_files Makefile src/Makefile docs/Makefile data/Makefile nsis/Makefile spec/Makefile spec/terminal-media-launcher.spec" +ac_config_files="$ac_config_files Makefile src/Makefile docs/Makefile data/Makefile nsis/Makefile nsis/installer.nsi spec/Makefile spec/terminal-media-launcher.spec" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -6893,6 +6896,7 @@ do "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "nsis/Makefile") CONFIG_FILES="$CONFIG_FILES nsis/Makefile" ;; + "nsis/installer.nsi") CONFIG_FILES="$CONFIG_FILES nsis/installer.nsi" ;; "spec/Makefile") CONFIG_FILES="$CONFIG_FILES spec/Makefile" ;; "spec/terminal-media-launcher.spec") CONFIG_FILES="$CONFIG_FILES spec/terminal-media-launcher.spec" ;; diff --git a/configure.ac b/configure.ac index 7161235..39a7bb6 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,5 @@ AC_INIT([terminal-media-launcher],[0.1]) +AC_SUBST([PACKAGE_TITLE], ["Terminal Media Launcher"]) AC_CONFIG_SRCDIR([src/draw.c]) #AC_CONFIG_HEADERS([config.h]) @@ -75,6 +76,7 @@ AC_CONFIG_FILES([Makefile docs/Makefile data/Makefile nsis/Makefile + nsis/installer.nsi spec/Makefile spec/terminal-media-launcher.spec]) AC_OUTPUT diff --git a/data/Makefile.am b/data/Makefile.am index cb074ac..c8c7245 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -27,4 +27,3 @@ desktop_DATA = $(PACKAGE_NAME).desktop icon_DATA = $(PACKAGE_NAME).svg endif - diff --git a/data/Makefile.in b/data/Makefile.in index 871ecc4..6a5b3b2 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -188,6 +188,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_TITLE = @PACKAGE_TITLE@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ diff --git a/docs/Makefile.in b/docs/Makefile.in index fbec6a5..9aaf9c3 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -189,6 +189,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_TITLE = @PACKAGE_TITLE@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ diff --git a/docs/windows_compile_instructions.md b/docs/windows_compile_instructions.md index 3b61774..9c4dbf5 100644 --- a/docs/windows_compile_instructions.md +++ b/docs/windows_compile_instructions.md @@ -58,6 +58,6 @@ These instructions were written with 64-bit architecture in mind. Although I hav Support for building an NSIS installer is in development (it currently will not work, as it is missing the installation of certain dependencies). -1. Run `cd nsis` -2. Run `makensis installer.nsi` -3. Run the generated `terminal-media-launcher-Setup.exe` file +1. First, follow the above instructions to compile the project +2. Run `makensis nsis/installer.nsi` +3. Run the generated `nsis/terminal-media-launcher-Setup.exe` file diff --git a/nsis/Makefile.am b/nsis/Makefile.am index 8b2e209..b05f308 100644 --- a/nsis/Makefile.am +++ b/nsis/Makefile.am @@ -1 +1,3 @@ +EXTRA_DIST = installer.nsi.in + CLEANFILES = $(PACKAGE_NAME)-Setup.exe diff --git a/nsis/Makefile.in b/nsis/Makefile.in index 7408ccf..cfd6dd8 100644 --- a/nsis/Makefile.in +++ b/nsis/Makefile.in @@ -94,7 +94,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = installer.nsi CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -116,7 +116,7 @@ am__can_run_installinfo = \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/installer.nsi.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -158,6 +158,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_TITLE = @PACKAGE_TITLE@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ @@ -220,6 +221,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +EXTRA_DIST = installer.nsi.in CLEANFILES = $(PACKAGE_NAME)-Setup.exe all: all-am @@ -253,6 +255,8 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): +installer.nsi: $(top_builddir)/config.status $(srcdir)/installer.nsi.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ tags TAGS: ctags CTAGS: diff --git a/nsis/installer.nsi b/nsis/installer.nsi deleted file mode 100644 index 3030a40..0000000 --- a/nsis/installer.nsi +++ /dev/null @@ -1,78 +0,0 @@ -;------------------------------------------------------------------------------- -; Includes -!include "MUI2.nsh" -!include "LogicLib.nsh" -!include "WinVer.nsh" -!include "x64.nsh" - -;------------------------------------------------------------------------------- -; Constants -!define PRODUCT_NAME "Terminal Media Launcher" -!define PRODUCT_DESCRIPTION "TODO" -!define COPYRIGHT "GNU GPLv3" -!define PRODUCT_VERSION "0.1.0.0" -!define SETUP_VERSION 1.0.0.0 - -;------------------------------------------------------------------------------- -; Attributes -Name "terminal-media-launcher" -OutFile "terminal-media-launcher-Setup.exe" -InstallDir "$PROGRAMFILES\Terminal Media Launcher" -InstallDirRegKey HKCU "Software\Louie S\Terminal Media Launcher" "" -RequestExecutionLevel user ; user|highest|admin - -;------------------------------------------------------------------------------- -; Version Info -VIProductVersion "${PRODUCT_VERSION}" -VIAddVersionKey "ProductName" "${PRODUCT_NAME}" -VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}" -VIAddVersionKey "FileDescription" "${PRODUCT_DESCRIPTION}" -VIAddVersionKey "LegalCopyright" "${COPYRIGHT}" -VIAddVersionKey "FileVersion" "${SETUP_VERSION}" - -;------------------------------------------------------------------------------- -; Modern UI Appearance -;!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico" -!define MUI_HEADERIMAGE -;!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\orange.bmp" -;!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp" -!define MUI_FINISHPAGE_NOAUTOCLOSE - -;------------------------------------------------------------------------------- -; Installer Pages -!insertmacro MUI_PAGE_WELCOME -;!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt" -!insertmacro MUI_PAGE_COMPONENTS -!insertmacro MUI_PAGE_DIRECTORY -!insertmacro MUI_PAGE_INSTFILES -!insertmacro MUI_PAGE_FINISH - -;------------------------------------------------------------------------------- -; Uninstaller Pages -!insertmacro MUI_UNPAGE_WELCOME -!insertmacro MUI_UNPAGE_CONFIRM -!insertmacro MUI_UNPAGE_INSTFILES -!insertmacro MUI_UNPAGE_FINISH - -;------------------------------------------------------------------------------- -; Languages -!insertmacro MUI_LANGUAGE "English" - -;------------------------------------------------------------------------------- -; Installer Sections -Section "My Application" MyApp - SetOutPath $INSTDIR - File "..\src\terminal-media-launcher.exe" - ;File "Readme.txt" - WriteUninstaller "$INSTDIR\Uninstall.exe" -SectionEnd - -;------------------------------------------------------------------------------- -; Uninstaller Sections -Section "Uninstall" - Delete "$INSTDIR\terminal-media-launcher.exe" - Delete "$INSTDIR\Uninstall.exe" - ; FIXME directory is not being uninstalled - RMDir "$INSTDIR" - ;DeleteRegKey /ifempty HKCU "Software\Modern UI Test" -SectionEnd diff --git a/nsis/installer.nsi.in b/nsis/installer.nsi.in new file mode 100644 index 0000000..a757628 --- /dev/null +++ b/nsis/installer.nsi.in @@ -0,0 +1,78 @@ +;------------------------------------------------------------------------------- +; Includes +!include "MUI2.nsh" +!include "LogicLib.nsh" +!include "WinVer.nsh" +!include "x64.nsh" + +;------------------------------------------------------------------------------- +; Constants +!define PRODUCT_NAME "@PACKAGE_TITLE@" +!define PRODUCT_DESCRIPTION "TODO" +!define COPYRIGHT "GNU GPLv3" +!define PRODUCT_VERSION "@PACKAGE_VERSION@.0.0" +!define SETUP_VERSION 1.0.0.0 + +;------------------------------------------------------------------------------- +; Attributes +Name "@PACKAGE_NAME@" +OutFile "@PACKAGE_NAME@-Setup.exe" +InstallDir "$PROGRAMFILES\@PACKAGE_TITLE@" +InstallDirRegKey HKCU "Software\Louie S\@PACKAGE_TITLE@" "" +RequestExecutionLevel user ; user|highest|admin + +;------------------------------------------------------------------------------- +; Version Info +VIProductVersion "${PRODUCT_VERSION}" +VIAddVersionKey "ProductName" "${PRODUCT_NAME}" +VIAddVersionKey "ProductVersion" "${PRODUCT_VERSION}" +VIAddVersionKey "FileDescription" "${PRODUCT_DESCRIPTION}" +VIAddVersionKey "LegalCopyright" "${COPYRIGHT}" +VIAddVersionKey "FileVersion" "${SETUP_VERSION}" + +;------------------------------------------------------------------------------- +; Modern UI Appearance +;!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico" +!define MUI_HEADERIMAGE +;!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\orange.bmp" +;!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp" +!define MUI_FINISHPAGE_NOAUTOCLOSE + +;------------------------------------------------------------------------------- +; Installer Pages +!insertmacro MUI_PAGE_WELCOME +!insertmacro MUI_PAGE_LICENSE "..\COPYING" +!insertmacro MUI_PAGE_COMPONENTS +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH + +;------------------------------------------------------------------------------- +; Uninstaller Pages +!insertmacro MUI_UNPAGE_WELCOME +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES +!insertmacro MUI_UNPAGE_FINISH + +;------------------------------------------------------------------------------- +; Languages +!insertmacro MUI_LANGUAGE "English" + +;------------------------------------------------------------------------------- +; Installer Sections +Section "My Application" MyApp + SetOutPath $INSTDIR + File "..\src\@PACKAGE_NAME@.exe" + ;File "Readme.txt" + WriteUninstaller "$INSTDIR\Uninstall.exe" +SectionEnd + +;------------------------------------------------------------------------------- +; Uninstaller Sections +Section "Uninstall" + Delete "$INSTDIR\@PACKAGE_NAME@.exe" + Delete "$INSTDIR\Uninstall.exe" + ; FIXME directory is not being uninstalled + RMDir "$INSTDIR" + ;DeleteRegKey /ifempty HKCU "Software\Modern UI Test" +SectionEnd diff --git a/spec/Makefile.in b/spec/Makefile.in index a26fcc5..81eeff1 100644 --- a/spec/Makefile.in +++ b/spec/Makefile.in @@ -159,6 +159,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_TITLE = @PACKAGE_TITLE@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ diff --git a/src/Makefile.in b/src/Makefile.in index 3fa3f20..231c8c0 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -230,6 +230,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_TITLE = @PACKAGE_TITLE@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ -- cgit