From b968a31b5ed70e6a24504b249e4c58f2fef0d1b0 Mon Sep 17 00:00:00 2001 From: Brecht Sanders Date: Thu, 28 Mar 2024 20:01:06 +0100 Subject: [PATCH] - --- .gitignore | 53 ++++++---- build/_cmake_build_.sh | 43 ++++++++ build/_test2_.cbp | 108 +++++++++++++++++++ build/_test_.cbp | 108 +++++++++++++++++++ build/example_xlsxio_read_wchar.depend | 2 +- build/libxlsxio_read_minizip_shared.depend | 5 +- build/libxlsxio_read_shared.depend | 5 +- build/libxlsxio_read_wchar.depend | 5 +- build/libxlsxio_read_wchar_shared.depend | 5 +- build/libxlsxio_write_minizip_shared.depend | 5 +- build/libxlsxio_write_shared.depend | 5 +- build/libxlsxio_write_wchar.depend | 5 +- build/libxlsxio_write_wchar_shared.depend | 5 +- build/test1.cbp | 110 ++++++++++++++++++++ build/test2.cbp | 100 ++++++++++++++++++ build/test2.workspace | 9 ++ build/test3.cbp | 100 ++++++++++++++++++ build/test3.workspace | 9 ++ build/xlsxio_xlsx2csv.depend | 6 +- 19 files changed, 646 insertions(+), 42 deletions(-) create mode 100644 build/_cmake_build_.sh create mode 100644 build/_test2_.cbp create mode 100644 build/_test_.cbp create mode 100644 build/test1.cbp create mode 100644 build/test2.cbp create mode 100644 build/test2.workspace create mode 100644 build/test3.cbp create mode 100644 build/test3.workspace diff --git a/.gitignore b/.gitignore index 06cc55f..c8e6f4c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,31 @@ -.DS_Store -.idea -.svn/ -*.xlsx -*.7z -*.layout -*.depend -*.URL -*.a -*.so -obj/ -bin/ -doc/ -CMakeFiles/ -cmake-build-debug -/Makefile -example_xlsxio_read -example_xlsxio_read_advanced -example_xlsxio_write -example_xlsxio_write_getversion -xlsxio_csv2xlsx -xlsxio_xlsx2csv +.DS_Store +.idea +.svn/ +*.xlsx +*.zip +*.7z +*.xz +*.layout +*.depend +*.URL +*.a +*.so +*.bak +version +obj/ +bin/ +doc/ +CMakeFiles/ +cmake-build-debug +/Makefile +example_xlsxio_read +example_xlsxio_read_advanced +example_xlsxio_write +example_xlsxio_write_getversion +xlsxio_csv2xlsx +xlsxio_xlsx2csv +example.xlsx* +build_win/ +DELETEME/ +xlsxio_f/ +ODS/ diff --git a/build/_cmake_build_.sh b/build/_cmake_build_.sh new file mode 100644 index 0000000..fb47261 --- /dev/null +++ b/build/_cmake_build_.sh @@ -0,0 +1,43 @@ +#/bin sh +if [ -z "$WINDIR" ]; then + OSARCH=$(uname -s)_$(uname -m) + EXEEXT= + CMAKEMAKEFILETYPE=Unix +else + OSARCH=win$( if [ "$(uname -m)" == "x86_64" ]; then echo 64; else echo 32; fi) + EXEEXT=.exe + CMAKEMAKEFILETYPE=MSYS +fi +BUILDDIR=$(realpath $(dirname $0)/_build_$OSARCH) +BASEDIR=$(realpath $(dirname $0)/..) +VERSION=$(sed -ne "s/^#define\s*XLSXIO_VERSION_[A-Z]*\s*\([0-9]*\)\s*$/\1./p" $(dirname $0)/../include/xlsxio_version.h | tr -d "\n" | sed -e "s/\.$//") +ZIPFILE=$(realpath $(dirname $0)/xlsxio-$VERSION-$OSARCH.zip) + +mkdir -p "$BUILDDIR" +mkdir -p "$BUILDDIR"/CMakeFiles/CMakeTmp/CMakeFiles +cd "$BUILDDIR" +#mkdir -p CMakeFiles/CMakeTmp/CMakeFiles +#touch CMakeFiles/CMakeTmp/CMakeFiles/cmake.check_cache +echo Configuring... && + cmake$EXEEXT -G"$CMAKEMAKEFILETYPE Makefiles" -DCMAKE_INSTALL_PREFIX:PATH="_package_" -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_STATIC:BOOL=ON -DBUILD_SHARED:BOOL=ON -DWITH_LIBZIP:BOOL=OFF -DWITH_WIDE:BOOL=ON -DBUILD_DOCUMENTATION:BOOL=OFF ../.. && + if [ "$CMAKEMAKEFILETYPE" = "MSYS" ]; then + # build statically linked DLL on Windows + sed -i -e "s/\.dll\.a/.a -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++/" CMakeFiles/xlsxio_write_SHARED.dir/linklibs.rsp && + sed -i -e "s/^C_DEFINES\s*=.*-DBUILD_XLSXIO_DLL/& -DSTATIC/" CMakeFiles/xlsxio_write_SHARED.dir/flags.make + sed -i -e "s/\.dll\.a/.a -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++/" CMakeFiles/xlsxio_read_SHARED.dir/linklibs.rsp && + sed -i -e "s/^C_DEFINES\s*=.*-DBUILD_XLSXIO_DLL/& -DSTATIC/" CMakeFiles/xlsxio_read_SHARED.dir/flags.make + sed -i -e "s/\.dll\.a/.a -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++/" CMakeFiles/xlsxio_readw_SHARED.dir/linklibs.rsp && + sed -i -e "s/^C_DEFINES\s*=.*-DBUILD_XLSXIO_DLL/& -DSTATIC/" CMakeFiles/xlsxio_readw_SHARED.dir/flags.make + fi && + echo Building... && + make install/strip VERBOSE=1 && + echo Making binary package: $ZIPFILE... && + #pushd $BUILDDIR/_package_ &> /dev/null && + cd _package_ && + cp -f $BASEDIR/LICENSE.txt $BASEDIR/Changelog.txt $BASEDIR/*.md . && + rm -f $ZIPFILE && + zip -r -9 $ZIPFILE * && + #popd &> /dev/null && + cd .. && + echo OK + diff --git a/build/_test2_.cbp b/build/_test2_.cbp new file mode 100644 index 0000000..709892d --- /dev/null +++ b/build/_test2_.cbp @@ -0,0 +1,108 @@ + + + + + + diff --git a/build/_test_.cbp b/build/_test_.cbp new file mode 100644 index 0000000..41256b5 --- /dev/null +++ b/build/_test_.cbp @@ -0,0 +1,108 @@ + + + + + + diff --git a/build/example_xlsxio_read_wchar.depend b/build/example_xlsxio_read_wchar.depend index f1dee93..dd56e2e 100644 --- a/build/example_xlsxio_read_wchar.depend +++ b/build/example_xlsxio_read_wchar.depend @@ -1,5 +1,5 @@ # depslib dependency file v1.0 -1521232544 source:z:\xlsxio\examples\example_xlsxio_read.c +1645051381 source:z:\xlsxio\examples\example_xlsxio_read.c diff --git a/build/libxlsxio_read_minizip_shared.depend b/build/libxlsxio_read_minizip_shared.depend index d7f21e4..f1e4843 100644 --- a/build/libxlsxio_read_minizip_shared.depend +++ b/build/libxlsxio_read_minizip_shared.depend @@ -36,7 +36,7 @@ -1609251759 source:z:\xlsxio\lib\xlsxio_read.c +1691051722 source:z:\xlsxio\lib\xlsxio_read.c "xlsxio_private.h" "xlsxio_read_sharedstrings.h" "xlsxio_read.h" @@ -46,6 +46,7 @@ + @@ -64,7 +65,7 @@ -1594537032 z:\xlsxio\include\xlsxio_version.h +1685458080 z:\xlsxio\include\xlsxio_version.h 1522317802 source:z:\xlsxio\lib\xlsxio_read_sharedstrings.c "xlsxio_private.h" diff --git a/build/libxlsxio_read_shared.depend b/build/libxlsxio_read_shared.depend index a2462a7..faa1b6c 100644 --- a/build/libxlsxio_read_shared.depend +++ b/build/libxlsxio_read_shared.depend @@ -49,7 +49,7 @@ -1609251759 source:z:\xlsxio\lib\xlsxio_read.c +1691051722 source:z:\xlsxio\lib\xlsxio_read.c "xlsxio_private.h" "xlsxio_read_sharedstrings.h" "xlsxio_read.h" @@ -59,6 +59,7 @@ + @@ -70,5 +71,5 @@ -1594537032 z:\xlsxio\include\xlsxio_version.h +1685458080 z:\xlsxio\include\xlsxio_version.h diff --git a/build/libxlsxio_read_wchar.depend b/build/libxlsxio_read_wchar.depend index d7f21e4..f1e4843 100644 --- a/build/libxlsxio_read_wchar.depend +++ b/build/libxlsxio_read_wchar.depend @@ -36,7 +36,7 @@ -1609251759 source:z:\xlsxio\lib\xlsxio_read.c +1691051722 source:z:\xlsxio\lib\xlsxio_read.c "xlsxio_private.h" "xlsxio_read_sharedstrings.h" "xlsxio_read.h" @@ -46,6 +46,7 @@ + @@ -64,7 +65,7 @@ -1594537032 z:\xlsxio\include\xlsxio_version.h +1685458080 z:\xlsxio\include\xlsxio_version.h 1522317802 source:z:\xlsxio\lib\xlsxio_read_sharedstrings.c "xlsxio_private.h" diff --git a/build/libxlsxio_read_wchar_shared.depend b/build/libxlsxio_read_wchar_shared.depend index d7f21e4..f1e4843 100644 --- a/build/libxlsxio_read_wchar_shared.depend +++ b/build/libxlsxio_read_wchar_shared.depend @@ -36,7 +36,7 @@ -1609251759 source:z:\xlsxio\lib\xlsxio_read.c +1691051722 source:z:\xlsxio\lib\xlsxio_read.c "xlsxio_private.h" "xlsxio_read_sharedstrings.h" "xlsxio_read.h" @@ -46,6 +46,7 @@ + @@ -64,7 +65,7 @@ -1594537032 z:\xlsxio\include\xlsxio_version.h +1685458080 z:\xlsxio\include\xlsxio_version.h 1522317802 source:z:\xlsxio\lib\xlsxio_read_sharedstrings.c "xlsxio_private.h" diff --git a/build/libxlsxio_write_minizip_shared.depend b/build/libxlsxio_write_minizip_shared.depend index 9c3a63a..346cb32 100644 --- a/build/libxlsxio_write_minizip_shared.depend +++ b/build/libxlsxio_write_minizip_shared.depend @@ -23,7 +23,7 @@ 1685461680 \\server\users\brecht\sources\cpp\xlsxio\include\xlsxio_version.h -1584724326 source:z:\xlsxio\lib\xlsxio_write.c +1691051673 source:z:\xlsxio\lib\xlsxio_write.c "xlsxio_write.h" "xlsxio_version.h" @@ -34,6 +34,7 @@ + @@ -44,5 +45,5 @@ -1594537032 z:\xlsxio\include\xlsxio_version.h +1685458080 z:\xlsxio\include\xlsxio_version.h diff --git a/build/libxlsxio_write_shared.depend b/build/libxlsxio_write_shared.depend index 1be6d1b..346cb32 100644 --- a/build/libxlsxio_write_shared.depend +++ b/build/libxlsxio_write_shared.depend @@ -23,7 +23,7 @@ 1685461680 \\server\users\brecht\sources\cpp\xlsxio\include\xlsxio_version.h -1615567896 source:z:\xlsxio\lib\xlsxio_write.c +1691051673 source:z:\xlsxio\lib\xlsxio_write.c "xlsxio_write.h" "xlsxio_version.h" @@ -34,6 +34,7 @@ + @@ -44,5 +45,5 @@ -1594537032 z:\xlsxio\include\xlsxio_version.h +1685458080 z:\xlsxio\include\xlsxio_version.h diff --git a/build/libxlsxio_write_wchar.depend b/build/libxlsxio_write_wchar.depend index 9c3a63a..346cb32 100644 --- a/build/libxlsxio_write_wchar.depend +++ b/build/libxlsxio_write_wchar.depend @@ -23,7 +23,7 @@ 1685461680 \\server\users\brecht\sources\cpp\xlsxio\include\xlsxio_version.h -1584724326 source:z:\xlsxio\lib\xlsxio_write.c +1691051673 source:z:\xlsxio\lib\xlsxio_write.c "xlsxio_write.h" "xlsxio_version.h" @@ -34,6 +34,7 @@ + @@ -44,5 +45,5 @@ -1594537032 z:\xlsxio\include\xlsxio_version.h +1685458080 z:\xlsxio\include\xlsxio_version.h diff --git a/build/libxlsxio_write_wchar_shared.depend b/build/libxlsxio_write_wchar_shared.depend index 9c3a63a..346cb32 100644 --- a/build/libxlsxio_write_wchar_shared.depend +++ b/build/libxlsxio_write_wchar_shared.depend @@ -23,7 +23,7 @@ 1685461680 \\server\users\brecht\sources\cpp\xlsxio\include\xlsxio_version.h -1584724326 source:z:\xlsxio\lib\xlsxio_write.c +1691051673 source:z:\xlsxio\lib\xlsxio_write.c "xlsxio_write.h" "xlsxio_version.h" @@ -34,6 +34,7 @@ + @@ -44,5 +45,5 @@ -1594537032 z:\xlsxio\include\xlsxio_version.h +1685458080 z:\xlsxio\include\xlsxio_version.h diff --git a/build/test1.cbp b/build/test1.cbp new file mode 100644 index 0000000..d00fa94 --- /dev/null +++ b/build/test1.cbp @@ -0,0 +1,110 @@ + + + + + + diff --git a/build/test2.cbp b/build/test2.cbp new file mode 100644 index 0000000..9f46ed7 --- /dev/null +++ b/build/test2.cbp @@ -0,0 +1,100 @@ + + + + + + diff --git a/build/test2.workspace b/build/test2.workspace new file mode 100644 index 0000000..ad33a70 --- /dev/null +++ b/build/test2.workspace @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/build/test3.cbp b/build/test3.cbp new file mode 100644 index 0000000..5514e0e --- /dev/null +++ b/build/test3.cbp @@ -0,0 +1,100 @@ + + + + + + diff --git a/build/test3.workspace b/build/test3.workspace new file mode 100644 index 0000000..b151ce2 --- /dev/null +++ b/build/test3.workspace @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/build/xlsxio_xlsx2csv.depend b/build/xlsxio_xlsx2csv.depend index f851fa2..770057e 100644 --- a/build/xlsxio_xlsx2csv.depend +++ b/build/xlsxio_xlsx2csv.depend @@ -15,7 +15,7 @@ 1544956328 \\server\users\brecht\sources\cpp\xlsxio\include\xlsxio_version.h -1548002755 source:z:\xlsxio\src\xlsxio_xlsx2csv.c +1551122165 source:z:\xlsxio\src\xlsxio_xlsx2csv.c @@ -23,11 +23,11 @@ "xlsxio_read.h" "xlsxio_version.h" -1521131524 z:\xlsxio\include\xlsxio_read.h +1609251189 z:\xlsxio\include\xlsxio_read.h -1544956328 z:\xlsxio\include\xlsxio_version.h +1685458080 z:\xlsxio\include\xlsxio_version.h