Files
harbour-core/harbour/bin/postinst.bat
Viktor Szakats 5f92c620b8 2009-09-09 18:12 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* bin/postinst.bat
    ! Fixed for dos shells. (cmdline lenght problems, end of .cfg
      extension was clipped on the longest line to .cf)

  + package/winuni
  + package/winuni/HARBOUR_README_MINGW
  + package/winuni/HARBOUR_README_MINGWARM
  + package/winuni/HARBOUR_README_ADDINS
  + package/winuni/HARBOUR_README_DJGPP
  + package/winuni/HARBOUR_README_POCC
  + package/winuni/HARBOUR_README_WATCOM
  + package/winuni/HARBOUR_README_MINGW64
  + package/winuni/mpkg_win_uni.bat
  + package/winuni/mpkg_win_uni_extra_copy.bat
  + package/winuni/RELNOTES
  + package/winuni/mpkg_win_uni.nsi
    + Added components needed to create unified Windows build.
      Of course the dir structure with content should be assembled
      manually. These files are rough ones, ease of use was no
      concern.

      Anyone please feel free to continue this work.
2009-09-09 16:16:57 +00:00

136 lines
5.6 KiB
Batchfile

@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
rem Contains: install package creator script, which requires:
rem
rem - Info-ZIP zip.exe in PATH
rem or HB_DIR_ZIP envvar set to its dir with an ending backslash.
rem https://sourceforge.net/project/showfiles.php?group_id=118012
rem - NullSoft Installer installed (NSIS)
rem https://sourceforge.net/project/showfiles.php?group_id=22049&package_id=15374
rem (only for Windows builds)
rem - makensis.exe (part of NSIS) in PATH
rem or HB_DIR_NSIS envvar set to its dir with an ending backslash.
rem (only for Windows builds)
rem ---------------------------------------------------------------
if "%HB_BIN_INSTALL%" == "" echo ! HB_BIN_INSTALL needs to be set.
if "%HB_BIN_INSTALL%" == "" goto END
echo ! Making %HB_BIN_INSTALL%\hbmk.cfg...
echo # hbmk2 configuration>%HB_BIN_INSTALL%\hbmk.cfg
echo # Generated by Harbour build process>>%HB_BIN_INSTALL%\hbmk.cfg
echo.>>%HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../contrib/%%{hb_name}>>%HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../contrib/rddsql/%%{hb_name}>>%HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../addons/%%{hb_name}>>%HB_BIN_INSTALL%\hbmk.cfg
echo libpaths=../examples/%%{hb_name}>>%HB_BIN_INSTALL%\hbmk.cfg
if not "%HB_HAS_WATT%" == "" echo.>>%HB_BIN_INSTALL%\hbmk.cfg
if not "%HB_HAS_WATT%" == "" echo {dos&djgpp}syslibs=watt>>%HB_BIN_INSTALL%\hbmk.cfg
if not "%HB_HAS_WATT%" == "" echo {dos&watcom}syslibs=wattcpwf>>%HB_BIN_INSTALL%\hbmk.cfg
if not "%HB_HAS_WATT%" == "" echo {dos}libpaths=${WATT_ROOT}/lib>>%HB_BIN_INSTALL%\hbmk.cfg
if "%HB_SHELL%" == "nt" goto _SH_NT
if "%HB_INSTALL_PREFIX%" == "" goto _NO_COPYD
copy CHANG* %HB_INSTALL_PREFIX%\CHANGES > nul
copy COPYING %HB_INSTALL_PREFIX% > nul
copy ERRATA %HB_INSTALL_PREFIX% > nul
copy INSTALL %HB_INSTALL_PREFIX% > nul
copy TODO %HB_INSTALL_PREFIX% > nul
if "%HB_PLATFORM%" == "win" copy bin\hb-mkimp.bat %HB_BIN_INSTALL% > nul
:_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_INSTALL_PREFIX%" == "" goto _NO_COPY
if "%HB_PLATFORM%" == "dos" copy ChangeLog* "%HB_INSTALL_PREFIX%\CHANGES" > nul
if not "%HB_PLATFORM%" == "dos" copy ChangeLog* "%HB_INSTALL_PREFIX%\" > nul
copy COPYING "%HB_INSTALL_PREFIX%\" > nul
copy ERRATA "%HB_INSTALL_PREFIX%\" > nul
copy INSTALL "%HB_INSTALL_PREFIX%\" > nul
copy TODO "%HB_INSTALL_PREFIX%\" > nul
if "%HB_PLATFORM%" == "win" copy bin\hb-mkimp.bat "%HB_BIN_INSTALL%\" > nul
if "%HB_PLATFORM%" == "wce" copy bin\hb-mkimp.bat "%HB_BIN_INSTALL%\" > nul
:_NO_COPY
if "%HB_PLATFORM%" == "dos" goto _NO_DLL_BIN
if "%HB_PLATFORM%" == "linux" goto _NO_DLL_BIN
if "%HB_BUILD_DLL%" == "no" goto _NO_DLL_BIN
echo ! Making shared version of Harbour binaries...
"%HB_HOST_BIN_DIR%\hbmk2" -quiet -q0 -lng=en-EN -shared "-o%HB_BIN_INSTALL%\hbrun-dll" "%~dp0..\utils\hbrun\hbrun.hbp"
"%HB_HOST_BIN_DIR%\hbmk2" -quiet -q0 -lng=en-EN -shared "-o%HB_BIN_INSTALL%\hbmk2-dll" "%~dp0..\utils\hbmk2\hbmk2.hbp"
"%HB_HOST_BIN_DIR%\hbmk2" -quiet -q0 -lng=en-EN -shared "-o%HB_BIN_INSTALL%\hbtest-dll" "%~dp0..\utils\hbtest\hbtest.hbp"
"%HB_HOST_BIN_DIR%\hbmk2" -quiet -q0 -lng=en-EN -shared "-o%HB_BIN_INSTALL%\hbi18n-dll" "%~dp0..\utils\hbi18n\hbi18n.hbp"
"%HB_HOST_BIN_DIR%\hbmk2" -quiet -q0 -lng=en-EN -shared "-o%HB_BIN_INSTALL%\hbformat-dll" "%~dp0..\utils\hbformat\hbformat.hbp"
:_NO_DLL_BIN
if "%HB_PLATFORM%" == "dos" goto _NO_ICON_BIN
if "%HB_PLATFORM%" == "linux" goto _NO_ICON_BIN
rem ; We build this here, because GNU Make wouldn't add the icon.
echo ! Making hbrun with application icon...
"%HB_HOST_BIN_DIR%\hbmk2" -quiet -q0 -lng=en-EN "-o%HB_BIN_INSTALL%\hbrun" "%~dp0..\utils\hbrun\hbrun.hbp"
:_NO_ICON_BIN
if "%HB_BUILD_IMPLIB%" == "yes" call "%~dp0hb-mkimp.bat"
:_NO_IMPLIB
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 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_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