# HG changeset patch # User John W. Eaton # Date 1523549362 14400 # Node ID 213da5688be02fc3b6016335dd8ec22c497deaab # Parent 871355b33950de8b9a3fef48a3ef9de034ac4a50 update binary dist rules * binary-dist-rules.mk: Use -w64, -w32, or -w64-64 suffix for Windows binary distributions. New target for creating .7z files. * tools/makeinst-script.sh.in: New arg for name of installer file. diff -r 871355b33950 -r 213da5688be0 binary-dist-rules.mk --- a/binary-dist-rules.mk Thu Apr 12 12:08:06 2018 -0400 +++ b/binary-dist-rules.mk Thu Apr 12 12:09:22 2018 -0400 @@ -1,8 +1,20 @@ + +ifeq ($(MXE_WINDOWS_BUILD),yes) + ifeq ($(ENABLE_WINDOWS_64),yes) + ifeq ($(ENABLE_64),yes) + OCTAVE_PLATFORM_SUFFIX := -w64-64 + else + OCTAVE_PLATFORM_SUFFIX := -w64 + endif + else + OCTAVE_PLATFORM_SUFFIX := -w32 + endif +endif ifeq ($(OCTAVE_TARGET),stable-octave) - OCTAVE_DIST_NAME := octave-$($(OCTAVE_TARGET)_VERSION) + OCTAVE_DIST_NAME := octave-$($(OCTAVE_TARGET)_VERSION)$(OCTAVE_PLATFORM_SUFFIX) else - OCTAVE_DIST_NAME := octave-$(DATE) + OCTAVE_DIST_NAME := octave-$(DATE)$(OCTAVE_PLATFORM_SUFFIX) endif OCTAVE_DIST_DIR := $(TOP_BUILD_DIR)/dist/$(OCTAVE_DIST_NAME) @@ -182,7 +194,7 @@ rm -f $(OCTAVE_NSI_FILE); \ fi echo "generating installer script..." - $(TOP_BUILD_DIR)/tools/makeinst-script.sh $(OCTAVE_DIST_DIR) $(OCTAVE_NSI_FILE) + $(TOP_BUILD_DIR)/tools/makeinst-script.sh $(OCTAVE_DIST_DIR) $(OCTAVE_DIST_NAME)-installer.exe $(OCTAVE_NSI_FILE) echo "generating installer..." $(TARGET)-makensis $(OCTAVE_NSI_FILE) > $(TOP_BUILD_DIR)/dist/nsis.log endef @@ -193,6 +205,15 @@ .PHONY: nsis-installer nsis-installer: $(OCTAVE_DIST_NAME)-installer.exe +define make-7z-dist + echo "generating 7z file..." + cd $(TOP_BUILD_DIR)/dist && p7zip -k $(OCTAVE_DIST_NAME) +endef + +.PHONY: 7z-dist +7z-dist: binary-dist-files + @$(make-7z-dist) + define make-zip-dist echo "generating zip file..." cd $(TOP_BUILD_DIR)/dist \ diff -r 871355b33950 -r 213da5688be0 tools/makeinst-script.sh.in --- a/tools/makeinst-script.sh.in Thu Apr 12 12:08:06 2018 -0400 +++ b/tools/makeinst-script.sh.in Thu Apr 12 12:09:22 2018 -0400 @@ -1,17 +1,16 @@ #! /bin/bash set -e -if [ $# != 2 ]; then - echo "usage: makeinst-script.sh dist-dir output-script-name" 1>&2 +if [ $# != 3 ]; then + echo "usage: makeinst-script.sh dist-dir installer-name output-script-name" 1>&2 exit 1 fi -OUTFILE="$2" +INSTALLER_NAME="$2" +OUTFILE="$3" TOPDIR=@abs_top_srcdir@ TOP_BUILD_DIR=@abs_top_builddir@ -ENABLE64="@ENABLE_WINDOWS_64@" - OCTAVE_SOURCE=`basename $1` cd `dirname $1` @@ -47,7 +46,7 @@ !define COPYRIGHT "Copyright © 2013-2018 John W. Eaton and others." !define DESCRIPTION "GNU Octave is a high-level programming language, primarily intended for numerical computations." !define INSTALLER_FILES "$TOPDIR/installer-files" -!define INSTALLER_NAME "octave-$OCTAVE_VERSION-installer.exe" +!define INSTALLER_NAME "$INSTALLER_NAME" !define MAIN_APP_EXE "octave-firsttime.vbs" !define INSTALL_TYPE "SetShellVarContext current" !define PRODUCT_ROOT_KEY "HKLM"