2009-08-16 09:39 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* config/global.cf
    ! Fixed to process HB_BUILD_NAME when forming package install dir
      inside /pkg dir.
    % Delete an unnecessary line.

  * package/mpkg_win.nsi
  * config/global.cf
  * bin/postinst.bat
    * Little bit changed the way dirs/names are communicated from
      GNU Make to postinst package creation code.
      The goal was to have an internal PKG_DIR var which is similar
      to other *_DIR vars. It was also possible to delete some
      exported vars this way.
    - Disabled package creation for non-NT shells (= pure MS-DOS).
      I found no way to make this work cleanly on pure MS-DOS.
    + Documented weird requirements of zip building. Also to better
      clarify why abspath is needed in GNU Make.

  * config/instsh.cf
    * Updated OS/2 comment to clarify some issues according to
      information from Maurilio.
This commit is contained in:
Viktor Szakats
2009-08-16 07:41:52 +00:00
parent 70ee5f4d60
commit 6c75001583
5 changed files with 43 additions and 12 deletions

View File

@@ -17,6 +17,29 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-08-16 09:39 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/global.cf
! Fixed to process HB_BUILD_NAME when forming package install dir
inside /pkg dir.
% Delete an unnecessary line.
* package/mpkg_win.nsi
* config/global.cf
* bin/postinst.bat
* Little bit changed the way dirs/names are communicated from
GNU Make to postinst package creation code.
The goal was to have an internal PKG_DIR var which is similar
to other *_DIR vars. It was also possible to delete some
exported vars this way.
- Disabled package creation for non-NT shells (= pure MS-DOS).
I found no way to make this work cleanly on pure MS-DOS.
+ Documented weird requirements of zip building. Also to better
clarify why abspath is needed in GNU Make.
* config/instsh.cf
* Updated OS/2 comment to clarify some issues according to
information from Maurilio.
2009-08-16 03:09 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* ChangeLog
* source/rtl/Makefile

View File

@@ -100,16 +100,26 @@ goto INST_%HB_ARCHITECTURE%
:MK_PKG
echo ! Making Harbour .zip install package: '%HB_PKGPATH%.zip'
if exist "%HB_PKGPATH%.zip" del "%HB_PKGPATH%.zip"
if not "%OS%" == "Windows_NT" echo ! postinst.bat Harbour install package creation requires Windows NT or upper.
if not "%OS%" == "Windows_NT" goto :EOF
rem NOTE: Believe it or not this is the official method to zip a different dir with subdirs
rem without including the whole root path in filenames; you have to 'cd' into it.
rem Even with zip 3.0. For this reason this can't work with plain MS-DOS and we need
rem absolute path in HB_TOP. There is also no zip 2.x compatible way to force creation
rem of a new .zip, so we have to delete it first to avoid mixing in an existing .zip
rem files. [vszakats]
echo ! Making Harbour .zip install package: '%HB_TOP%\%HB_PKGNAME%.zip'
if exist "%HB_TOP%\%HB_PKGNAME%.zip" del "%HB_TOP%\%HB_PKGNAME%.zip"
pushd
cd "%HB_PKGBASE%"
"%HB_DIR_ZIP%zip.exe" -q -9 -X -r -o "%HB_PKGPATH%.zip" . -i "%HB_PKGNAME%\*" -x *.tds -x *.exp
cd "%HB_INSTALL_PREFIX%\.."
"%HB_DIR_ZIP%zip.exe" -q -9 -X -r -o "%HB_TOP%\%HB_PKGNAME%.zip" . -i "%HB_PKGNAME%\*" -x *.tds -x *.exp
popd
if "%HB_ARCHITECTURE%" == "dos" goto :EOF
echo ! Making Harbour .exe install package: '%HB_PKGPATH%.exe'
echo ! Making Harbour .exe install package: '%HB_TOP%\%HB_PKGNAME%.exe'
"%HB_DIR_NSIS%makensis.exe" /V2 "%~dp0..\package\mpkg_win.nsi"
goto :EOF

View File

@@ -606,6 +606,7 @@ ARCH_COMP := $(HB_ARCHITECTURE)/$(HB_COMPILER)$(subst \,/,$(HB_BUILD_NAME))
OBJ_DIR := obj/$(ARCH_COMP)
BIN_DIR := $(TOP)$(ROOT)bin/$(ARCH_COMP)
LIB_DIR := $(TOP)$(ROOT)lib/$(ARCH_COMP)
PKG_DIR := $(TOP)$(ROOT)pkg/$(ARCH_COMP)
# Assemble relative path from OBJ_DIR to source.
GRANDP := $(subst $(subst x,x, ),,$(foreach item, $(subst /, ,$(OBJ_DIR)), ../))
@@ -830,11 +831,8 @@ export HB_PKGNAMI
HB_INSTALL_PREFIX_ORI := $(HB_INSTALL_PREFIX)
ifeq ($(HB_BUILD_PKG),yes)
ifeq ($(HB_INIT_DONE),)
PKG_DIR := $(TOP)$(ROOT)pkg
export HB_PKGBASE := $(subst /,$(DIRSEP),$(PKG_DIR)/$(HB_ARCHITECTURE)/$(HB_COMPILER))
export HB_PKGPATH := $(subst /,$(DIRSEP),$(abspath $(PKG_DIR)/$(HB_PKGNAME)))
HB_INSTALL_PREFIX := $(subst /,$(DIRSEP),$(abspath $(HB_PKGBASE)/$(HB_PKGNAME)))
PKG_DIR := $(subst /,$(DIRSEP),$(PKG_DIR))
export HB_TOP := $(subst /,$(DIRSEP),$(abspath $(TOP)$(ROOT)))
HB_INSTALL_PREFIX := $(subst /,$(DIRSEP),$(abspath $(PKG_DIR)/$(HB_PKGNAME)))
HB_BIN_INSTALL :=
HB_INC_INSTALL :=

View File

@@ -57,7 +57,7 @@ ifeq ($(HB_SHELL),os2)
# I don't like doing the "if not exist..." test for every file copied
# but I could not find any other way to make this work around the shell
# command line length limit.
# 'dos' method doesn't seem to work for some reason [vszakats]
# 'dos' method causes freeze on OS/2 (with or without COMPSPEC). [vszakats]
# $(COMSPEC) /C is needed to overcome freezes. [vszakats]
# NOTE: The empty line directly before 'endef' HAVE TO exist!

View File

@@ -30,7 +30,7 @@ CRCCheck on
Name "Harbour Project"
; The file to write
OutFile "$%HB_PKGPATH%.exe"
OutFile "$%HB_TOP%\$%HB_PKGNAME%.exe"
InstallDir C:\$%HB_PKGNAMI%