Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
brechtsanders committed Mar 28, 2024
1 parent 1662674 commit b968a31
Show file tree
Hide file tree
Showing 19 changed files with 646 additions and 42 deletions.
53 changes: 31 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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/
43 changes: 43 additions & 0 deletions build/_cmake_build_.sh
Original file line number Diff line number Diff line change
@@ -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
108 changes: 108 additions & 0 deletions build/_test2_.cbp
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="example_xlsxio_read_advanced" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/example_xlsxio_read_advanced" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
<Linker>
<Add directory="bin/Debug" />
</Linker>
</Target>
<Target title="Release">
<Option output="bin/Release/example_xlsxio_read_advanced" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O3" />
</Compiler>
<Linker>
<Add option="-s" />
<Add directory="bin/Release" />
</Linker>
</Target>
<Target title="Debug64">
<Option output="bin/Debug64/example_xlsxio_read_advanced" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug64/" />
<Option type="1" />
<Option compiler="MINGW64" />
<Compiler>
<Add option="-g" />
</Compiler>
<Linker>
<Add directory="bin/Debug64" />
</Linker>
</Target>
<Target title="Release64">
<Option output="bin/Release64/example_xlsxio_read_advanced" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release64/" />
<Option type="1" />
<Option compiler="MINGW64" />
<Compiler>
<Add option="-O3" />
</Compiler>
<Linker>
<Add option="-s" />
<Add directory="bin/Release64" />
</Linker>
</Target>
<Target title="Debug32">
<Option output="bin/Debug32/example_xlsxio_read_advanced" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug32/" />
<Option type="1" />
<Option compiler="MINGW32" />
<Compiler>
<Add option="-g" />
</Compiler>
<Linker>
<Add directory="bin/Debug32" />
</Linker>
</Target>
<Target title="Release32">
<Option output="bin/Release32/example_xlsxio_read_advanced" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release32/" />
<Option type="1" />
<Option compiler="MINGW32" />
<Compiler>
<Add option="-O3" />
</Compiler>
<Linker>
<Add option="-s" />
<Add directory="bin/Release32" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add option="-DBUILD_XLSXIO_STATIC" />
<Add directory="../include" />
</Compiler>
<Linker>
<Add option="`pkg-config --static --libs libzip`" />
<Add option="--static" />
<Add library="expat" />
</Linker>
<Unit filename="../examples/example_xlsxio_read_advanced.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="../include/xlsxio_read.h" />
<Unit filename="../lib/xlsxio_read.c">
<Option compilerVar="CC" />
</Unit>
<Extensions>
<code_completion />
<envvars />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>
108 changes: 108 additions & 0 deletions build/_test_.cbp
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="example_xlsxio_read" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/example_xlsxio_read" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
<Linker>
<Add directory="bin/Debug" />
</Linker>
</Target>
<Target title="Release">
<Option output="bin/Release/example_xlsxio_read" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O3" />
</Compiler>
<Linker>
<Add option="-s" />
<Add directory="bin/Release" />
</Linker>
</Target>
<Target title="Debug64">
<Option output="bin/Debug64/example_xlsxio_read" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug64/" />
<Option type="1" />
<Option compiler="MINGW64" />
<Compiler>
<Add option="-g" />
</Compiler>
<Linker>
<Add directory="bin/Debug64" />
</Linker>
</Target>
<Target title="Release64">
<Option output="bin/Release64/example_xlsxio_read" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release64/" />
<Option type="1" />
<Option compiler="MINGW64" />
<Compiler>
<Add option="-O3" />
</Compiler>
<Linker>
<Add option="-s" />
<Add directory="bin/Release64" />
</Linker>
</Target>
<Target title="Debug32">
<Option output="bin/Debug32/example_xlsxio_read" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug32/" />
<Option type="1" />
<Option compiler="MINGW32" />
<Compiler>
<Add option="-g" />
</Compiler>
<Linker>
<Add directory="bin/Debug32" />
</Linker>
</Target>
<Target title="Release32">
<Option output="bin/Release32/example_xlsxio_read" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release32/" />
<Option type="1" />
<Option compiler="MINGW32" />
<Compiler>
<Add option="-O3" />
</Compiler>
<Linker>
<Add option="-s" />
<Add directory="bin/Release32" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add option="-DBUILD_XLSXIO_STATIC" />
<Add directory="../include" />
</Compiler>
<Linker>
<Add option="`pkg-config --static --libs libzip`" />
<Add option="--static" />
<Add library="expat" />
</Linker>
<Unit filename="../examples/example_xlsxio_read.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="../include/xlsxio_read.h" />
<Unit filename="../lib/xlsxio_read.c">
<Option compilerVar="CC" />
</Unit>
<Extensions>
<code_completion />
<envvars />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>
2 changes: 1 addition & 1 deletion build/example_xlsxio_read_wchar.depend
Original file line number Diff line number Diff line change
@@ -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
<stdlib.h>
<stdio.h>
<string.h>
Expand Down
5 changes: 3 additions & 2 deletions build/libxlsxio_read_minizip_shared.depend
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<stdlib.h>
<string.h>

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"
Expand All @@ -46,6 +46,7 @@
<inttypes.h>
<string.h>
<expat.h>
<mz_compat.h>
<minizip/unzip.h>
<io.h>
<unistd.h>
Expand All @@ -64,7 +65,7 @@
<time.h>
<wchar.h>

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"
Expand Down
5 changes: 3 additions & 2 deletions build/libxlsxio_read_shared.depend
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<stdint.h>
<expat.h>

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"
Expand All @@ -59,6 +59,7 @@
<inttypes.h>
<string.h>
<expat.h>
<mz_compat.h>
<minizip/unzip.h>
<io.h>
<unistd.h>
Expand All @@ -70,5 +71,5 @@
<time.h>
<wchar.h>

1594537032 z:\xlsxio\include\xlsxio_version.h
1685458080 z:\xlsxio\include\xlsxio_version.h

5 changes: 3 additions & 2 deletions build/libxlsxio_read_wchar.depend
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<stdlib.h>
<string.h>

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"
Expand All @@ -46,6 +46,7 @@
<inttypes.h>
<string.h>
<expat.h>
<mz_compat.h>
<minizip/unzip.h>
<io.h>
<unistd.h>
Expand All @@ -64,7 +65,7 @@
<time.h>
<wchar.h>

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"
Expand Down
Loading

0 comments on commit b968a31

Please sign in to comment.