From 87b2850eb07e302a63f7bb9162eacc962eb11bd3 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 29 Sep 2009 10:44:14 +0000 Subject: [PATCH] 2009-09-29 12:40 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * bin/postinst.prg ! Fixed another error. + Utilizing ugly hack to avoid using Harbour header files. Although it works, this solution is way ugly. I'm brand new hbrun user so I don't know what is the proper solution for using headers from .prgs code run directly. Maybe this should be compiled into hbrun and the internal version used, or it needs full include header dir autodetection logic built in. --- harbour/ChangeLog | 11 +++++++++++ harbour/bin/postinst.prg | 8 ++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b9e93bcdd5..b39c20809c 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,17 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-09-29 12:40 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * bin/postinst.prg + ! Fixed another error. + + Utilizing ugly hack to avoid using Harbour header files. + Although it works, this solution is way ugly. I'm brand new hbrun + user so I don't know what is the proper solution for using + headers from .prgs code run directly. + Maybe this should be compiled into hbrun and the internal + version used, or it needs full include header dir + autodetection logic built in. + 2009-09-29 12:06 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * bin/postinst.prg ! Fixed bad typos reported by Elart. diff --git a/harbour/bin/postinst.prg b/harbour/bin/postinst.prg index c6c60c77ef..458aea668b 100644 --- a/harbour/bin/postinst.prg +++ b/harbour/bin/postinst.prg @@ -7,9 +7,13 @@ * See COPYING for licensing terms. */ +/* TOFIX: Ugly hack to avoid #include "directry.ch" */ +#define F_NAME 1 /* File name */ + PROCEDURE Main() LOCAL nErrorLevel := 0 LOCAL cFile + LOCAL aFile IF Empty( GetEnv( "HB_PLATFORM" ) ) .OR. ; Empty( GetEnv( "HB_COMPILER" ) ) .OR. ; @@ -46,8 +50,8 @@ PROCEDURE Main() IF GetEnv( "HB_PLATFORM" ) $ "win|wce|os2|dos" .AND. ; ! Empty( GetEnv( "HB_INSTALL_PREFIX" ) ) - FOR EACH cFile IN Directory( "Change*" ) - hb_FCopy( cFile, GetEnv( "HB_INSTALL_PREFIX" ) + hb_osPathSeparator() + iif( GetEnv( "HB_PLATFORM" ) == "dos", "CHANGES", cFile ) ) + FOR EACH aFile IN Directory( "Change*" ) + hb_FCopy( aFile[ F_NAME ], GetEnv( "HB_INSTALL_PREFIX" ) + hb_osPathSeparator() + iif( GetEnv( "HB_PLATFORM" ) == "dos", "CHANGES", aFile[ F_NAME ] ) ) NEXT hb_FCopy( "COPYING", GetEnv( "HB_INSTALL_PREFIX" ) + hb_osPathSeparator() + "COPYING" )