2010-03-28 12:14 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

- bin/postinst.bat
  * bin/postinst.prg
  * INSTALL
    * Moved remaining .bat to .prg. This means that HB_BUILD_PKG now
      should work with all shells and (cross) build situations. I didn't 
      test these (pls do so), but it's now easy to make necessary
      tweaks for these platforms in case it's necessary.
    ; Harbour doesn't use a single line of .bat anymore in the build process.
This commit is contained in:
Viktor Szakats
2010-03-28 10:15:39 +00:00
parent 037260a10b
commit 88750713d3
4 changed files with 62 additions and 65 deletions

View File

@@ -17,6 +17,16 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-03-28 12:14 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
- bin/postinst.bat
* bin/postinst.prg
* INSTALL
* Moved remaining .bat to .prg. This means that HB_BUILD_PKG now
should work with all shells and (cross) build situations. I didn't
test these (pls do so), but it's now easy to make necessary
tweaks for these platforms in case it's necessary.
; Harbour doesn't use a single line of .bat anymore in the build process.
2010-03-28 11:38 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* config/wce/mingwarm.mk
* config/win/mingw.mk

View File

@@ -1261,13 +1261,13 @@ HARBOUR
Supported shells per host platforms:
win / NT shell (cmd.exe)
win / POSIX shell (MSYS or Cygwin sh.exe) (* not supported: HB_BUILD_PKG)
win / MS-DOS shell (command.com) (* not supported: HB_BUILD_PKG)
dos / MS-DOS shell (command.com) (* not supported: HB_BUILD_PKG)
dos / POSIX shell (bash.exe) (* not supported: HB_BUILD_PKG)
os/2 / OS/2 shell (cmd.exe) (* not supported: HB_BUILD_PKG)
os/2 / POSIX shell (bash.exe) (* not supported: HB_BUILD_PKG)
*nix / POSIX shell (* not supported: HB_BUILD_PKG - implemented as standalone scripts)
win / POSIX shell (MSYS or Cygwin sh.exe)
win / MS-DOS shell (command.com)
dos / MS-DOS shell (command.com)
dos / POSIX shell (bash.exe)
os/2 / OS/2 shell (cmd.exe)
os/2 / POSIX shell (bash.exe)
*nix / POSIX shell (* not supported: HB_BUILD_PKG - implemented as standalone scripts)
13. LINKS TO EXTERNAL COMPONENTS

View File

@@ -1,58 +0,0 @@
@rem
@rem $Id$
@rem
@echo off
rem ---------------------------------------------------------------
rem Copyright 2009 Viktor Szakats (harbour.01 syenar.hu)
rem See COPYING for licensing terms.
rem
rem Script run after Harbour make install to finish install process
rem (for Windows/DOS)
rem ---------------------------------------------------------------
if "%HB_BIN_INSTALL%" == "" echo ! HB_BIN_INSTALL needs to be set.
if "%HB_BIN_INSTALL%" == "" goto END
if "%HB_SHELL%" == "nt" goto _SH_NT
:_NO_COPYD
if "%HB_PLATFORM%" == "linux" goto _NO_PKG
if not "%HB_BUILD_PKG%" == "yes" goto _NO_PKG
if "%HB_TOP%" == "" goto _NO_PKG
echo ! Making Harbour .zip install package: '%HB_TOP%\%HB_PKGNAME%.zip'
if exist "%HB_TOP%\%HB_PKGNAME%.zip" del %HB_TOP%\%HB_PKGNAME%.zip
cd %HB_INSTALL_PREFIX%
cd ..
%HB_DIR_ZIP%zip.exe -q -9 -X -r -o %HB_TOP%\%HB_PKGNAME%.zip . -i %HB_PKGNAME%\* -x *.tds -x *.exp
goto END
:_SH_NT
if "%HB_PLATFORM%" == "linux" goto _NO_PKG
if not "%HB_BUILD_PKG%" == "yes" goto _NO_PKG
if "%HB_TOP%" == "" goto _NO_PKG
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 we need absolute path in HB_TOP. There is also
rem no zip 2.x compatible way to force creation of a new .zip, so we have to delete it
rem first to avoid mixing in an existing .zip file. [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_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
echo ! Making Harbour .exe install package: '%HB_TOP%\%HB_PKGNAME%.exe'
"%HB_DIR_NSIS%makensis.exe" /V2 "%~dp0..\package\mpkg_win.nsi"
:_NO_PKG
:END

View File

@@ -20,6 +20,7 @@ PROCEDURE Main()
LOCAL aArray
LOCAL tmp
LOCAL cOptions
LOCAL cOldDir
IF Empty( GetEnv( "HB_PLATFORM" ) ) .OR. ;
Empty( GetEnv( "HB_COMPILER" ) ) .OR. ;
@@ -155,6 +156,50 @@ PROCEDURE Main()
ENDIF
/* Creating install packages */
IF GetEnv( "HB_PLATFORM" ) $ "win|wce|os2|dos" .AND. ;
GetEnv( "HB_BUILD_PKG" ) == "yes" .AND. ;
! Empty( GetEnv( "HB_TOP" ) )
tmp := GetEnv( "HB_TOP" ) + _PS_ + GetEnv( "HB_PKGNAME" ) + ".zip"
OutStd( "! Making Harbour .zip install package: '" + tmp + "'" + hb_osNewLine() )
FErase( tmp )
/* NOTE: Believe it or not this is the official method to zip a different dir with subdirs
without including the whole root path in filenames; you have to 'cd' into it.
Even with zip 3.0. For this reason we need absolute path in HB_TOP. There is also
no zip 2.x compatible way to force creation of a new .zip, so we have to delete it
first to avoid mixing in an existing .zip file. [vszakats] */
cOldDir := _PS_ + CurDir()
DirChange( GetEnv( "HB_INSTALL_PREFIX" ) + _PS_ + ".." )
hb_processRun( GetEnv( "HB_DIR_ZIP" ) + "zip" +;
" -q -9 -X -r -o" +;
" " + FN_Escape( tmp ) +;
" . -i " + FN_Escape( GetEnv( "HB_PKGNAME" ) + _PS_ + "*" ) +;
" -x *.tds -x *.exp" )
DirChange( cOldDir )
IF GetEnv( "HB_PLATFORM" ) $ "win|wce"
tmp := GetEnv( "HB_TOP" ) + _PS_ + GetEnv( "HB_PKGNAME" ) + ".exe"
OutStd( "! Making Harbour .exe install package: '" + tmp + "'" + hb_osNewLine() )
hb_processRun( GetEnv( "HB_DIR_NSIS" ) + "makensis.exe" +;
" /V2" +;
" " + FN_Escape( "package\mpkg_win.nsi" ) )
ENDIF
ENDIF
ErrorLevel( nErrorLevel )
RETURN
STATIC FUNCTION FN_Escape( cFN )
RETURN Chr( 34 ) + cFN + Chr( 34 )