2009-03-28 21:16 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* utils/hbmk2/hbmk2.prg
+ Added autofilling CCPREFIX on Windows platform when
-comp=mingw64 or -comp=mingwce is specified.
+ Added autofilling CCPATH on Windows platform when
-comp=mingw64 or -comp=mingwce is specified and
corresponding embedded MinGW installations are found in
Harbour directory.
; IOW this means that it's now possible to create a unified,
self-contained install kit, which is able to easily build
x64, WinCE and x86 executables with command below:
> hbmk2 test.prg => test.exe for x86
> hbmk2 -comp=mingw64 a.prg => test.exe for x64
> hbmk2 -comp=mingwce a.prg => test.exe for ARM/WinCE
Can it be any simpler than that?
My sample install .zip is 322MB and it contains Harbour libs
for msvc, mingw, mingw64, mingwce, bcc, owatcom and contains
all required MinGW files.
It will be even easier if we add CPU platform identifiers
to Harbour.
This commit is contained in:
@@ -8,6 +8,29 @@
|
||||
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
|
||||
*/
|
||||
|
||||
2009-03-28 21:16 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ Added autofilling CCPREFIX on Windows platform when
|
||||
-comp=mingw64 or -comp=mingwce is specified.
|
||||
+ Added autofilling CCPATH on Windows platform when
|
||||
-comp=mingw64 or -comp=mingwce is specified and
|
||||
corresponding embedded MinGW installations are found in
|
||||
Harbour directory.
|
||||
|
||||
; IOW this means that it's now possible to create a unified,
|
||||
self-contained install kit, which is able to easily build
|
||||
x64, WinCE and x86 executables with command below:
|
||||
> hbmk2 test.prg => test.exe for x86
|
||||
> hbmk2 -comp=mingw64 a.prg => test.exe for x64
|
||||
> hbmk2 -comp=mingwce a.prg => test.exe for ARM/WinCE
|
||||
Can it be any simpler than that?
|
||||
|
||||
My sample install .zip is 322MB and it contains Harbour libs
|
||||
for msvc, mingw, mingw64, mingwce, bcc, owatcom and contains
|
||||
all required MinGW files.
|
||||
It will be even easier if we add CPU platform identifiers
|
||||
to Harbour.
|
||||
|
||||
2009-03-28 18:09 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
|
||||
* config/dos/owatcom.cf
|
||||
* config/win/owatcom.cf
|
||||
|
||||
@@ -255,6 +255,7 @@ FUNCTION Main( ... )
|
||||
LOCAL s_lFMSTAT := NIL /* NIL = default, .T. = on, .F. = off */
|
||||
|
||||
LOCAL aCOMPDET
|
||||
LOCAL aCOMPDET_LOCAL
|
||||
LOCAL aCOMPSUP
|
||||
|
||||
LOCAL cLibPrefix
|
||||
@@ -289,7 +290,7 @@ FUNCTION Main( ... )
|
||||
LOCAL cBin_Lib
|
||||
LOCAL cBin_Dyn
|
||||
LOCAL nErrorLevel
|
||||
LOCAL tmp, array
|
||||
LOCAL tmp, tmp1, array
|
||||
LOCAL cScriptFile
|
||||
LOCAL fhnd
|
||||
LOCAL lNOHBP
|
||||
@@ -575,6 +576,13 @@ FUNCTION Main( ... )
|
||||
RETURN 3
|
||||
ENDIF
|
||||
|
||||
IF t_cARCH == "win"
|
||||
aCOMPDET_LOCAL := {;
|
||||
{ {| cPrefix | tmp1 := PathNormalize( s_cHB_INSTALL_PREFIX ) + "mingw" + hb_osPathSeparator() + "bin", iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "gcc.exe" ), tmp1, NIL ) }, "mingw" , "" } ,;
|
||||
{ {| cPrefix | tmp1 := PathNormalize( s_cHB_INSTALL_PREFIX ) + "mingw64" + hb_osPathSeparator() + "bin", iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "gcc.exe" ), tmp1, NIL ) }, "mingw64", "x86_64-pc-mingw32-" } ,;
|
||||
{ {| cPrefix | tmp1 := PathNormalize( s_cHB_INSTALL_PREFIX ) + "mingwce" + hb_osPathSeparator() + "bin", iif( hb_FileExists( tmp1 + hb_osPathSeparator() + cPrefix + "gcc.exe" ), tmp1, NIL ) }, "mingwce", "arm-wince-mingw32ce-" } }
|
||||
ENDIF
|
||||
|
||||
/* Autodetect compiler */
|
||||
|
||||
IF lStopAfterHarbour
|
||||
@@ -590,31 +598,17 @@ FUNCTION Main( ... )
|
||||
t_cCOMP := NIL
|
||||
ENDIF
|
||||
ELSE
|
||||
#if defined( __PLATFORM__WINDOWS )
|
||||
IF Empty( t_cCCPATH )
|
||||
tmp := PathNormalize( s_cHB_INSTALL_PREFIX ) + "mingw" + hb_osPathSeparator() + "bin"
|
||||
IF hb_FileExists( tmp + hb_osPathSeparator() + "gcc.exe" )
|
||||
t_cCOMP := "mingw"
|
||||
t_cCCPATH := tmp
|
||||
IF t_cARCH == "win"
|
||||
/* Autodetect embedded MinGW installation */
|
||||
FOR tmp := 1 TO Len( aCOMPDET_LOCAL )
|
||||
IF ! Empty( tmp1 := Eval( aCOMPDET_LOCAL[ tmp ][ 1 ], aCOMPDET_LOCAL[ tmp ][ 3 ] ) )
|
||||
t_cCOMP := aCOMPDET_LOCAL[ tmp ][ 2 ]
|
||||
t_cCCPREFIX := aCOMPDET_LOCAL[ tmp ][ 3 ]
|
||||
t_cCCPATH := tmp1
|
||||
EXIT
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF Empty( t_cCCPATH )
|
||||
tmp := PathNormalize( s_cHB_INSTALL_PREFIX ) + "mingw64" + hb_osPathSeparator() + "bin"
|
||||
IF hb_FileExists( tmp + hb_osPathSeparator() + "x86_64-pc-mingw32-gcc.exe" )
|
||||
t_cCOMP := "mingw64"
|
||||
t_cCCPATH := tmp
|
||||
t_cCCPREFIX := "x86_64-pc-mingw32-"
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF Empty( t_cCCPATH )
|
||||
tmp := PathNormalize( s_cHB_INSTALL_PREFIX ) + "mingwce" + hb_osPathSeparator() + "bin"
|
||||
IF hb_FileExists( tmp + hb_osPathSeparator() + "arm-wince-mingw32ce-gcc.exe" )
|
||||
t_cCOMP := "mingwce"
|
||||
t_cCCPATH := tmp
|
||||
t_cCCPREFIX := "arm-wince-mingw32ce-"
|
||||
ENDIF
|
||||
ENDIF
|
||||
#endif
|
||||
NEXT
|
||||
ENDIF
|
||||
IF Empty( t_cCOMP ) .AND. ! Empty( aCOMPDET )
|
||||
/* Look for this compiler first */
|
||||
FOR tmp := 1 TO Len( aCOMPDET )
|
||||
@@ -658,6 +652,18 @@ FUNCTION Main( ... )
|
||||
PauseForKey()
|
||||
RETURN 2
|
||||
ENDIF
|
||||
IF t_cARCH == "win"
|
||||
/* Detect cross platform CCPREFIX and CCPATH if embedded MinGW installation is detected */
|
||||
FOR tmp := 1 TO Len( aCOMPDET_LOCAL )
|
||||
IF aCOMPDET_LOCAL[ tmp ][ 2 ] == t_cCOMP
|
||||
IF ! Empty( tmp1 := Eval( aCOMPDET_LOCAL[ tmp ][ 1 ], aCOMPDET_LOCAL[ tmp ][ 3 ] ) )
|
||||
t_cCCPATH := tmp1
|
||||
ENDIF
|
||||
t_cCCPREFIX := aCOMPDET_LOCAL[ tmp ][ 3 ]
|
||||
EXIT
|
||||
ENDIF
|
||||
NEXT
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user