Files
harbour-core/harbour/mpkg_win.bat
Viktor Szakats c2bfed14d8 2009-04-02 13:42 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* bin/hb-mkdyn.bat
  * bin/postinst.bat
    + Added support for GCC family .dll creation. (Cygwin not tested)
      This will also create .def files. Also implib .a files are possible,
      code is there commented.
    + Added 'wce' ARCH support.
    ! Fixed to not include gtwin in WinCE .dlls.
    + Added support for HB_DLLIBS envvar.
    ; NOTE: The benefits of using cmd shell instead of msys to create
            mingw builds is that hbrun-dll and hbtest-dll are also
            created and you don't have use forward slashes in HB_INC_*
            envvars. It also allows to more easily add implib creation
            in the future. Overall the Windows build environment is
            more uniform this way. msys build output though is much
            sleeker and also seems faster.
            If this method turns out to be okay, it may become the
            default/support/standard way to build Harbour with MinGW
            on Windows. (if not we can return to the msys method)

    ; TOFIX: Shared MinGW executables cannot be built if Harbour was built
             with -DHB_DYNLIB. IMO this macro should be ignored in MinGW
             builds as there is no separate DLL build and non-DLL.
             [ I cannot fix this. ]
             Until then I had to a hack to starter batch files.

  * mpkg_win.bat
    * Switched to use make_gnu.bat instead of make_gnu.sh to build
      GCC family targets.

  * make_gnu.bat
    + Added special codepath for GCC familty as it needs one pass only
      to create .dlls.

  * INSTALL
    * Updated to reflect now possible non-msys MinGW build.
    * Updated example to use non-msys flavours.
    + Readded MinGW + msys example.
    % Minor simplification in mingw64/mingwce targets.
      (HB_CCPATH no longer needed on Windows)
2009-04-02 11:46:27 +00:00

88 lines
2.5 KiB
Batchfile

@rem
@rem $Id$
@rem
@echo off
rem ---------------------------------------------------------------
rem Installer creator for Harbour Project
rem
rem Copyright 2009 Viktor Szakats (harbour.01 syenar.hu)
rem See COPYING for licensing terms.
rem
rem This script requires:
rem - Windows NT or upper
rem - NullSoft Installer installed (NSIS)
rem https://sourceforge.net/project/showfiles.php?group_id=22049&package_id=15374
rem - makensis.exe (part of NSIS) in PATH
rem - Info-ZIP zip.exe in PATH
rem https://sourceforge.net/project/showfiles.php?group_id=118012
rem - HB_COMPILER envvar configured (see INSTALL doc)
rem - C compiler and GNU Make configured (see INSTALL doc)
rem ---------------------------------------------------------------
if not "%OS%" == "Windows_NT" goto END
setlocal
rem ; Basic setup
set HB_VERSION=1.1.0dev
if "%HB_ARCHITECTURE%" == "" set HB_ARCHITECTURE=win
set HB_PKGNAME=harbour-%HB_VERSION%-%HB_ARCHITECTURE%-%HB_COMPILER%
set HB_DIRNAME=harbour-%HB_ARCHITECTURE%-%HB_COMPILER%
rem ; Dir setup
set HB_INSTALL_BASE=%~dp0_hb_install_temp
set HB_INSTALL_PREFIX=%HB_INSTALL_BASE%\%HB_DIRNAME%
set HB_BIN_INSTALL=%HB_INSTALL_PREFIX%\bin
set HB_LIB_INSTALL=%HB_INSTALL_PREFIX%\lib
set HB_INC_INSTALL=%HB_INSTALL_PREFIX%\include
set HB_DOC_INSTALL=%HB_INSTALL_PREFIX%\doc
rem ; Pre-build cleanup
if exist %HB_INSTALL_PREFIX% rmdir /q /s %HB_INSTALL_PREFIX%
rem ; Option setup
set HB_BUILD_DLL=yes
set HB_BUILD_OPTIM=yes
set HB_BUILD_DEBUG=no
set HB_BUILD_IMPLIB=no
set HB_USER_CFLAGS=%HB_USER_CFLAGS% -DHB_FM_STATISTICS_OFF
rem ; Build Harbour
call make_gnu.bat
rem if errorlevel 1 goto MK_ERROR
rem ; Post-build cleanup
if exist "%HB_BIN_INSTALL%\*.tds" del "%HB_BIN_INSTALL%\*.tds"
if exist "%HB_BIN_INSTALL%\*.lib" del "%HB_BIN_INSTALL%\*.lib"
if exist "%HB_BIN_INSTALL%\*.exp" del "%HB_BIN_INSTALL%\*.exp"
rem ; Post-build installation
xcopy /D /Y ChangeLog "%HB_INSTALL_PREFIX%\"
xcopy /D /Y COPYING "%HB_INSTALL_PREFIX%\"
xcopy /D /Y ERRATA "%HB_INSTALL_PREFIX%\"
xcopy /D /Y INSTALL "%HB_INSTALL_PREFIX%\"
xcopy /D /Y TODO "%HB_INSTALL_PREFIX%\"
rem ; Build .zip package
if exist %HB_PKGNAME%.zip del %HB_PKGNAME%.zip
pushd
cd %HB_INSTALL_BASE%
zip -9 -X -r -o %~dp0%HB_PKGNAME%.zip . -i %HB_DIRNAME%\*
popd
rem ; Build installer package
makensis.exe %~dp0mpkg_win.nsi
:MK_ERROR
rem ; Cleanup
if "%1" == "--deltemp" rmdir /q /s %HB_INSTALL_PREFIX%
if "%1" == "--deltemp" rmdir /q %HB_INSTALL_BASE%
endlocal
:END