From 9b4831cf637fd40163741cf0ddb7813693d20e5d Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 21 Apr 2010 22:26:46 +0000 Subject: [PATCH] 2010-04-22 00:24 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL * Minor updates to tool links and information. * INSTALL * external/Makefile + external/minizip + external/minizip/Makefile + external/minizip/readme.txt + external/minizip/minizip.dif + external/minizip/ioapi.c + external/minizip/zip.c + external/minizip/unzip.c + external/minizip/ioapi.h + external/minizip/crypt.h + external/minizip/zip.h + external/minizip/unzip.h * contrib/hbmzip/Makefile * contrib/hbmzip/hbmzip.hbc * contrib/hbmzip/readme.txt - contrib/hbmzip/minizip.dif - contrib/hbmzip/ioapi.c - contrib/hbmzip/zip.c - contrib/hbmzip/unzip.c - contrib/hbmzip/crypt.h - contrib/hbmzip/ioapi.h - contrib/hbmzip/zip.h - contrib/hbmzip/unzip.h * Moved embedded external code from hbmzip library to separate, locally hosted library inside the 'external' directory. This way we keep all external code under this directory. This change also makes it possible to use custom version of this external library, via the HB_WITH_MINIZIP envvar. NOTE: Everyone using hbmzip, must now add 'minizip' to their lib list. (INCOMPATIBLE) --- harbour/ChangeLog | 49 ++++++++++++++++--- harbour/INSTALL | 19 +++---- harbour/contrib/hbmzip/Makefile | 29 ++++++++--- harbour/contrib/hbmzip/hbmzip.hbc | 1 + harbour/contrib/hbmzip/readme.txt | 30 ------------ harbour/external/Makefile | 1 + harbour/external/minizip/Makefile | 26 ++++++++++ .../hbmzip => external/minizip}/crypt.h | 0 .../hbmzip => external/minizip}/ioapi.c | 0 .../hbmzip => external/minizip}/ioapi.h | 0 .../hbmzip => external/minizip}/minizip.dif | 0 harbour/external/minizip/readme.txt | 37 ++++++++++++++ .../hbmzip => external/minizip}/unzip.c | 0 .../hbmzip => external/minizip}/unzip.h | 0 .../hbmzip => external/minizip}/zip.c | 0 .../hbmzip => external/minizip}/zip.h | 0 16 files changed, 139 insertions(+), 53 deletions(-) create mode 100644 harbour/external/minizip/Makefile rename harbour/{contrib/hbmzip => external/minizip}/crypt.h (100%) rename harbour/{contrib/hbmzip => external/minizip}/ioapi.c (100%) rename harbour/{contrib/hbmzip => external/minizip}/ioapi.h (100%) rename harbour/{contrib/hbmzip => external/minizip}/minizip.dif (100%) create mode 100644 harbour/external/minizip/readme.txt rename harbour/{contrib/hbmzip => external/minizip}/unzip.c (100%) rename harbour/{contrib/hbmzip => external/minizip}/unzip.h (100%) rename harbour/{contrib/hbmzip => external/minizip}/zip.c (100%) rename harbour/{contrib/hbmzip => external/minizip}/zip.h (100%) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5050758fd2..b09c2f902e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,14 +17,51 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-04-22 00:24 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * INSTALL + * Minor updates to tool links and information. + + * INSTALL + * external/Makefile + + external/minizip + + external/minizip/Makefile + + external/minizip/readme.txt + + external/minizip/minizip.dif + + external/minizip/ioapi.c + + external/minizip/zip.c + + external/minizip/unzip.c + + external/minizip/ioapi.h + + external/minizip/crypt.h + + external/minizip/zip.h + + external/minizip/unzip.h + * contrib/hbmzip/Makefile + * contrib/hbmzip/hbmzip.hbc + * contrib/hbmzip/readme.txt + - contrib/hbmzip/minizip.dif + - contrib/hbmzip/ioapi.c + - contrib/hbmzip/zip.c + - contrib/hbmzip/unzip.c + - contrib/hbmzip/crypt.h + - contrib/hbmzip/ioapi.h + - contrib/hbmzip/zip.h + - contrib/hbmzip/unzip.h + * Moved embedded external code from hbmzip library to + separate, locally hosted library inside the 'external' + directory. This way we keep all external code under this + directory. This change also makes it possible to use + custom version of this external library, via the + HB_WITH_MINIZIP envvar. + NOTE: Everyone using hbmzip, must now add 'minizip' + to their lib list. (INCOMPATIBLE) + 2010-04-21 13:33 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/idesaveload.prg ! Fixed a type in previous commit. 2010-04-21 12:56 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/idesaveload.prg - + Implemented: hbIDE data files to be saved/retrieved in - system folders if hbide.ini with path is not supplied + + Implemented: hbIDE data files to be saved/retrieved in + system folders if hbide.ini with path is not supplied on the command-line. The following algorythm is used: FUNCTION hbide_getIniPath( cHbideIni ) @@ -47,13 +84,13 @@ ENDIF RETURN cIni - + This change makes hbIDE to be able to run on any system - installed via an installer where a writable folder is expected + installed via an installer where a writable folder is expected to write to application data. Thanks Viktor for the actual code and guidance. - + 2010-04-20 22:27 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/hbide.prg + Implemented: last "View" to be presented at startup. @@ -71,7 +108,7 @@ * contrib/hbxbp/xbpfiledialog.prg * contrib/hbxbp/xbpfontdialog.prg % An important fix for ancilliary dialogs, i.e., file and font, - to not be added as childrent to parent on :create(). + to not be added as childrent to parent on :create(). This facilitate to destroy these dialogs after done with. * contrib/hbxbp/tests/demoxbp.prg diff --git a/harbour/INSTALL b/harbour/INSTALL index db42761ab2..804d9ba7dd 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -308,6 +308,7 @@ HARBOUR HB_WITH_GPM= (on Linux only) HB_WITH_JPEG=C:\jpeglib (defaults to locally hosted version if not found) HB_WITH_LIBHARU=C:\libharu\include (defaults to locally hosted version) + HB_WITH_MINIZIP=C:\zlib\contrib\minizip (defaults to locally hosted version if not found) HB_WITH_MYSQL=C:\mysql\include HB_WITH_OCILIB=C:\ocilib\include HB_WITH_ODBC= (may only be needed on non-Windows systems) @@ -1294,13 +1295,11 @@ HARBOUR C/C++ Compilers/Shells: MinGW [win, *nix, free, open-soource] - http://www.tdragon.net/recentgcc/ (unofficial, recommended) - http://www.mingw.org/ (official, rarely updated, MSYS home) + http://www.tdragon.net/recentgcc/, http://sourceforge.net/projects/tdm-gcc/ (unofficial, recommended) + http://www.mingw.org/, http://sourceforge.net/projects/mingw/ (official, rarely updated, MSYS home) http://www.equation.com/servlet/equation.cmd?fa=fortran (unofficial) MinGW x64 [win, *nix, free, open-source] - http://mingw-w64.org/ - http://mingw-w64.sourceforge.net/ - http://sourceforge.net/projects/mingw-w64/ + http://mingw-w64.sourceforge.net/, http://sourceforge.net/projects/mingw-w64/ http://www.cadforte.com/ MinGW CEGCC [win, *nix, free, open-source] http://cegcc.sourceforge.net/ @@ -1320,13 +1319,13 @@ HARBOUR http://developer.apple.com/TOOLS/Xcode/ MS Windows SDK [win, free, closed-source] http://msdn.microsoft.com/en-us/windowsserver/bb980924.aspx - (7.0 contains compilers for x86, x86_64 and IA-64) + (7.0 and above contains compilers for x86, x86_64 and IA-64) + MS Windows Mobile SDK [wce, free] + http://www.microsoft.com/downloads/details.aspx?familyid=83A52AF2-F524-4EC5-9155-717CBE5D25ED MS Visual Studio Express [win, free, closed-source] http://www.microsoft.com/express/ MS Visual Studio [win, commercial, closed-source] http://www.microsoft.com/visualstudio/ - MS Windows Mobile SDK [wce, free] - http://www.microsoft.com/downloads/details.aspx?familyid=83A52AF2-F524-4EC5-9155-717CBE5D25ED Pelles C [win, wce, free, closed-source] http://www.smorgasbordet.com/pellesc/ Borland/CodeGear/Embarcadero Compiler [win, free, closed-source] @@ -1362,6 +1361,8 @@ HARBOUR http://www.ijg.org/ HB_WITH_LIBHARU - libharu (PDF creation) [multiplatform, free, open-source] http://libharu.org/ + HB_WITH_MINIZIP - minizip library [multiplatform, free, open-source] + http://www.winimage.com/zLibDll/minizip.html HB_WITH_MYSQL - MySQL [multiplatform, free, open-source] http://dev.mysql.com/downloads/ HB_WITH_OCILIB - OCILIB (C Driver for Oracle) [multiplatform, free, open-source] @@ -1461,7 +1462,7 @@ HARBOUR Netiquette Guidelines http://tools.ietf.org/html/rfc1855 - Subversion book (free) + Subversion book [free] http://svnbook.red-bean.com/ diff --git a/harbour/contrib/hbmzip/Makefile b/harbour/contrib/hbmzip/Makefile index 8b181f61bb..ea07eafe60 100644 --- a/harbour/contrib/hbmzip/Makefile +++ b/harbour/contrib/hbmzip/Makefile @@ -8,23 +8,36 @@ include $(TOP)$(ROOT)config/global.mk LIBNAME := hbmzip -# 3rd party code requires this -HB_BUILD_MODE := c - C_SOURCES := \ - ioapi.c \ - zip.c \ - unzip.c \ hbmzip.c PRG_HEADERS := \ hbmzip.ch ifneq ($(HB_HAS_ZLIB),) + HB_CFLAGS += -DHB_HAS_ZLIB $(foreach d,$(HB_HAS_ZLIB),-I$(d)) - include $(TOP)$(ROOT)config/header.mk - include $(TOP)$(ROOT)config/lib.mk + _DET_DSP_NAME := minizip + _DET_VAR_INC_ := HB_INC_MINIZIP + _DET_VAR_HAS_ := HB_HAS_MINIZIP + _DET_FLT_PLAT := + _DET_FLT_COMP := + _DET_INC_DEFP := /usr/include /usr/local/include + _DET_INC_LOCL := $(realpath $(TOP)$(ROOT)external/minizip) + _DET_INC_HEAD := /zip.h + include $(TOP)$(ROOT)config/detfun.mk + + ifneq ($(HB_HAS_MINIZIP),) + + HB_CFLAGS += -DHB_HAS_MINIZIP $(foreach d,$(HB_HAS_MINIZIP),-I$(d)) + + include $(TOP)$(ROOT)config/header.mk + include $(TOP)$(ROOT)config/lib.mk + else + HB_SKIP_REASON := $(_DET_RES_TEXT) + include $(TOP)$(ROOT)config/none.mk + endif else HB_SKIP_REASON := component not found include $(TOP)$(ROOT)config/none.mk diff --git a/harbour/contrib/hbmzip/hbmzip.hbc b/harbour/contrib/hbmzip/hbmzip.hbc index b84faa4084..6e51521df9 100644 --- a/harbour/contrib/hbmzip/hbmzip.hbc +++ b/harbour/contrib/hbmzip/hbmzip.hbc @@ -5,3 +5,4 @@ incpaths=. libs=hbmzip +libs=minizip diff --git a/harbour/contrib/hbmzip/readme.txt b/harbour/contrib/hbmzip/readme.txt index b3b2e09f66..e8922ad664 100644 --- a/harbour/contrib/hbmzip/readme.txt +++ b/harbour/contrib/hbmzip/readme.txt @@ -6,39 +6,9 @@ This folder contains compression related files including: * zip file support based on minizip library (http://www.winimage.com/zLibDll/minizip.html) including: - * minizip version 1.01e source files * wrapper functions for minizip * some additionl functions to provide a higher level API for zip files -Some small changes (to fix compile time warning and errors) are applied to original -source of minizip 1.01e: - - * harbour/contrib/hbzlib/zip.c - * added forward definitions of allocate_new_datablock(), - free_datablock(), init_linkedlist(), add_data_in_datablock(), - ziplocal_TmzDateToDosDate() - * pacified warnings of unused args dosDate and crcForCrypting - * fixed 2 warnings: assigned value is not used. See, TOFIX - comment for one of the fixes - * fixed BCC warning "function call with no prototype" by changing - local int zipFlushWriteBuffer(zi) - zip_internal* zi; - { - to - local int zipFlushWriteBuffer(zip_internal* zi) - { - I expected this code be equivavlent! ??? :/ - - * harbour/contrib/hbzlib/unzip.c - * added forward definitions of strcmpcasenosensitive_internal(), - unzlocal_DosDateToTmuDate(), unzlocal_CheckCurrentFileCoherencyHeader() - * fixed 8 warnings: assigned value is not used. See, TOFIX - comment for one of the fixes - - * harbour/contrib/hbzlib/ioapi.c - * pacified 7 warnings: unused args opaque - * fixed warning: assigned value is not used - Harbour functions to mange ZIP files: ===================================== diff --git a/harbour/external/Makefile b/harbour/external/Makefile index 61000931d8..bb25eed8e3 100644 --- a/harbour/external/Makefile +++ b/harbour/external/Makefile @@ -13,6 +13,7 @@ DIRS := \ jpeg \ pcre \ zlib \ + minizip \ ifeq ($(firstword $(HB_EXTERNALLIBS)),no) DIRS := $(filter-out $(HB_EXTERNALLIBS),$(DIRS)) diff --git a/harbour/external/minizip/Makefile b/harbour/external/minizip/Makefile new file mode 100644 index 0000000000..9ff4c5f045 --- /dev/null +++ b/harbour/external/minizip/Makefile @@ -0,0 +1,26 @@ +# +# $Id$ +# + +ROOT := ../../ + +include $(TOP)$(ROOT)config/global.mk + +LIBNAME := minizip + +HB_BUILD_WARN := no +HB_BUILD_MODE := c + +C_SOURCES := \ + ioapi.c \ + zip.c \ + unzip.c \ + +ifneq ($(HB_HAS_ZLIB),) + HB_CFLAGS += -DHB_HAS_ZLIB $(foreach d,$(HB_HAS_ZLIB),-I$(d)) + + include $(TOP)$(ROOT)config/lib.mk +else + HB_SKIP_REASON := component not found + include $(TOP)$(ROOT)config/none.mk +endif diff --git a/harbour/contrib/hbmzip/crypt.h b/harbour/external/minizip/crypt.h similarity index 100% rename from harbour/contrib/hbmzip/crypt.h rename to harbour/external/minizip/crypt.h diff --git a/harbour/contrib/hbmzip/ioapi.c b/harbour/external/minizip/ioapi.c similarity index 100% rename from harbour/contrib/hbmzip/ioapi.c rename to harbour/external/minizip/ioapi.c diff --git a/harbour/contrib/hbmzip/ioapi.h b/harbour/external/minizip/ioapi.h similarity index 100% rename from harbour/contrib/hbmzip/ioapi.h rename to harbour/external/minizip/ioapi.h diff --git a/harbour/contrib/hbmzip/minizip.dif b/harbour/external/minizip/minizip.dif similarity index 100% rename from harbour/contrib/hbmzip/minizip.dif rename to harbour/external/minizip/minizip.dif diff --git a/harbour/external/minizip/readme.txt b/harbour/external/minizip/readme.txt new file mode 100644 index 0000000000..0da5cee505 --- /dev/null +++ b/harbour/external/minizip/readme.txt @@ -0,0 +1,37 @@ +/* + * $Id$ + */ + +This folder contains compression related files including: + * zip file support based on minizip library (http://www.winimage.com/zLibDll/minizip.html) + including: + * minizip version 1.1 source files + +Some small changes (to fix compile time warning and errors) are applied to original +source of minizip 1.1: + + * harbour/contrib/hbzlib/zip.c + * added forward definitions of allocate_new_datablock(), + free_datablock(), init_linkedlist(), add_data_in_datablock(), + ziplocal_TmzDateToDosDate() + * pacified warnings of unused args dosDate and crcForCrypting + * fixed 2 warnings: assigned value is not used. See, TOFIX + comment for one of the fixes + * fixed BCC warning "function call with no prototype" by changing + local int zipFlushWriteBuffer(zi) + zip_internal* zi; + { + to + local int zipFlushWriteBuffer(zip_internal* zi) + { + I expected this code be equivavlent! ??? :/ + + * harbour/contrib/hbzlib/unzip.c + * added forward definitions of strcmpcasenosensitive_internal(), + unzlocal_DosDateToTmuDate(), unzlocal_CheckCurrentFileCoherencyHeader() + * fixed 8 warnings: assigned value is not used. See, TOFIX + comment for one of the fixes + + * harbour/contrib/hbzlib/ioapi.c + * pacified 7 warnings: unused args opaque + * fixed warning: assigned value is not used diff --git a/harbour/contrib/hbmzip/unzip.c b/harbour/external/minizip/unzip.c similarity index 100% rename from harbour/contrib/hbmzip/unzip.c rename to harbour/external/minizip/unzip.c diff --git a/harbour/contrib/hbmzip/unzip.h b/harbour/external/minizip/unzip.h similarity index 100% rename from harbour/contrib/hbmzip/unzip.h rename to harbour/external/minizip/unzip.h diff --git a/harbour/contrib/hbmzip/zip.c b/harbour/external/minizip/zip.c similarity index 100% rename from harbour/contrib/hbmzip/zip.c rename to harbour/external/minizip/zip.c diff --git a/harbour/contrib/hbmzip/zip.h b/harbour/external/minizip/zip.h similarity index 100% rename from harbour/contrib/hbmzip/zip.h rename to harbour/external/minizip/zip.h