diff options
author | Matt A. Tobin <email@mattatobin.com> | 2022-03-03 08:50:16 -0600 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2022-03-03 08:50:16 -0600 |
commit | 0fb6b80493cf687ca8de3cac70a7f075e65be916 (patch) | |
tree | 70021f114a18a404df14385ec2c9453cc05e9cdb /system/packager/packager.mk | |
parent | 5fe31b024217a7057db60c52d8fb535cc2bc05a3 (diff) | |
download | GRE-0fb6b80493cf687ca8de3cac70a7f075e65be916.tar.gz |
[Packager] Add an install target for unix and execute the installer (if built) on Windows
Diffstat (limited to 'system/packager/packager.mk')
-rw-r--r-- | system/packager/packager.mk | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/system/packager/packager.mk b/system/packager/packager.mk index bf968e3dc..22097fff3 100644 --- a/system/packager/packager.mk +++ b/system/packager/packager.mk @@ -6,9 +6,6 @@ libs:: stage-package -install:: - $(error "make install" is no longer supported on any target operating system. Use "make package" instead) - ifeq ($(OS_ARCH),WINNT) ifndef MAKENSISU installer:: @@ -19,8 +16,6 @@ installer:: $(error "make installer" only supports Windows at this time) endif -# --------------------------------------------------------------------------------------------------------------------- - # Handle the package manifest(s) if it is used ifdef MOZ_PKG_MANIFEST_P MOZ_PKG_MANIFEST = package-manifest @@ -62,6 +57,31 @@ stage-package: $(MOZ_PKG_MANIFEST) json-metadata # --------------------------------------------------------------------------------------------------------------------- +# Install the application to the local system +install:: +ifeq ($(OS_ARCH),WINNT) +ifeq (,$(wildcard $(DIST)/$(PKG_INSTALLER_FILENAME))) + $(error You need to run "make installer" first) +endif + @echo 'Starting the application installer...' + start $(DIST)/$(PKG_INSTALLER_FILENAME) + @echo 'Please complete installation wizard.' +else + # XXXTobin: We should not be using MOZ_APP_NAME and MOZ_APP_VERSION with this but the package forms. + # However, that could cause issues and requires further testing. For now just do it more or less the same + # as mozinstaller. + $(MAKE) stage-package + @echo 'Installing application files to $(DESTDIR)$(installdir)...' + $(NSINSTALL) -D $(DESTDIR)$(installdir) + @$(TOOLCHAIN_PREFIX)cp -rv $(DIST)/$(PKG_STAGE_DIR)/* $(DESTDIR)$(installdir) + $(NSINSTALL) -D $(DESTDIR)$(bindir) + @$(RM) -f $(DESTDIR)$(bindir)/$(MOZ_APP_NAME) + $(TOOLCHAIN_PREFIX)ln -sv $(installdir)/$(MOZ_APP_NAME) $(DESTDIR)$(bindir) + @echo 'To run the installed application, execute: ./$(DESTDIR)$(bindir)/$(MOZ_APP_NAME) .' +endif + +# --------------------------------------------------------------------------------------------------------------------- + # Package the application as an archive archive: stage-package @echo 'Compressing application archive...' |