Skip to content

Commit abec48b

Browse files
authored
Merge pull request #3 from AlchemyViewer/rye/windebug
Introduce windows debug library build support
2 parents 65c379e + 1c2202b commit abec48b

File tree

2 files changed

+60
-33
lines changed

2 files changed

+60
-33
lines changed

autobuild.xml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
<key>archive</key>
1717
<map>
1818
<key>hash</key>
19-
<string>0df159b4a9c28baaee19bd0d3d81969ea2be772d690b4517e4bafc04bc85a67eb5ca181d03c01650d95dd61b404e86b341d7891596de203f25427875eaea3c32</string>
19+
<string>db512fb9036db60e702990bc652487197a0e6c1542de6d35163368f07e8f5d0c21f74071c2c2d3b70ee10f28b2e4717dd340196d7656e1fd515f7a4a07bfc6d9</string>
2020
<key>hash_algorithm</key>
2121
<string>blake2b</string>
2222
<key>url</key>
23-
<string>https://github.com/AlchemyViewer/3p-zlib-ng/releases/download/v2.2.4-r1/zlib_ng-2.2.4.13473771311-darwin64-13473771311.tar.zst</string>
23+
<string>https://github.com/AlchemyViewer/3p-zlib-ng/releases/download/v2.2.4-r2/zlib_ng-2.2.4.13482737442-darwin64-13482737442.tar.zst</string>
2424
</map>
2525
<key>name</key>
2626
<string>darwin64</string>
@@ -30,11 +30,11 @@
3030
<key>archive</key>
3131
<map>
3232
<key>hash</key>
33-
<string>7f6dc45f875d247ef69c2dc1313b85e00c829a61bb29ee058defda433ebdb943d641af0b2a97aeab05b9de28d5593382d95cb2b08ecefc8d61cd134ecc59638e</string>
33+
<string>7062d4f650e7cca63061d3d5675cc17615adfe5e0b6dd7acdf203e48650bda62af8a741e51bac7bb0725476652f68cf28fa958a87f18e75a78ad3eb7a3df8c27</string>
3434
<key>hash_algorithm</key>
3535
<string>blake2b</string>
3636
<key>url</key>
37-
<string>https://github.com/AlchemyViewer/3p-zlib-ng/releases/download/v2.2.4-r1/zlib_ng-2.2.4.13473771311-linux64-13473771311.tar.zst</string>
37+
<string>https://github.com/AlchemyViewer/3p-zlib-ng/releases/download/v2.2.4-r2/zlib_ng-2.2.4.13482737442-linux64-13482737442.tar.zst</string>
3838
</map>
3939
<key>name</key>
4040
<string>linux64</string>
@@ -44,11 +44,11 @@
4444
<key>archive</key>
4545
<map>
4646
<key>hash</key>
47-
<string>e5a937189f6d28b54b37884f1a33d7a899aa9e1d6108f2b2ad306b23a9e90014029baa805d72b79dd04f28c9972da6f5f0e368bf38b66fa325108dc11c0ee955</string>
47+
<string>4984b3df1bc9bbce36a5be9ef7410d2387c81653e99beec57785a0961acfca2ebbbbfef9acbbcaae7f2f7a6c1ae708d99cd8d7b2d6aa71d79900694d809b4aba</string>
4848
<key>hash_algorithm</key>
4949
<string>blake2b</string>
5050
<key>url</key>
51-
<string>https://github.com/AlchemyViewer/3p-zlib-ng/releases/download/v2.2.4-r1/zlib_ng-2.2.4.13473771311-windows64-13473771311.tar.zst</string>
51+
<string>https://github.com/AlchemyViewer/3p-zlib-ng/releases/download/v2.2.4-r2/zlib_ng-2.2.4.13482737442-windows64-13482737442.tar.zst</string>
5252
</map>
5353
<key>name</key>
5454
<string>windows64</string>
@@ -59,13 +59,13 @@
5959
<key>license_file</key>
6060
<string>LICENSES/zlib-ng.txt</string>
6161
<key>copyright</key>
62-
<string>Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler</string>
62+
<string>Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler</string>
6363
<key>version</key>
64-
<string>2.2.4.13473771311</string>
64+
<string>2.2.4.13482737442</string>
6565
<key>name</key>
6666
<string>zlib-ng</string>
6767
<key>canonical_repo</key>
68-
<string>https://bitbucket.org/lindenlab/3p-zlib-ng</string>
68+
<string>https://github.com/AlchemyViewer/3p-zlib-ng</string>
6969
<key>description</key>
7070
<string>zlib data compression library for the next generation systems</string>
7171
</map>
@@ -166,6 +166,7 @@
166166
</map>
167167
<key>manifest</key>
168168
<array>
169+
<string>lib/debug/minizip.lib</string>
169170
<string>lib/release/minizip.lib</string>
170171
</array>
171172
<key>name</key>

build-cmd.sh

Lines changed: 50 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -59,34 +59,60 @@ pushd "$MINIZLIB_SOURCE_DIR"
5959
windows*)
6060
load_vsvars
6161

62-
opts="$(replace_switch /Zi /Z7 $LL_BUILD_RELEASE)"
63-
plainopts="$(remove_switch /GR $(remove_cxxstd $opts))"
64-
65-
mkdir -p "build"
66-
pushd "build"
67-
cmake $(cygpath -m ${top}/${MINIZLIB_SOURCE_DIR}) -G "Ninja Multi-Config" \
68-
-DCMAKE_BUILD_TYPE="Release" \
69-
-DCMAKE_C_FLAGS:STRING="$plainopts" \
70-
-DCMAKE_CXX_FLAGS:STRING="$opts" \
71-
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT="Embedded" \
72-
"${config[@]}" \
73-
-DCMAKE_INSTALL_PREFIX=$(cygpath -m $stage) \
74-
-DCMAKE_INSTALL_LIBDIR="$(cygpath -m "$stage/lib/release")" \
75-
-DZLIB_INCLUDE_DIR="$(cygpath -m "$stage/packages/include/zlib-ng/")" \
76-
-DZLIB_LIBRARY="$(cygpath -m "$stage/packages/lib/release/zlib.lib")"
77-
78-
cmake --build . --config Release --parallel $AUTOBUILD_CPU_COUNT
79-
80-
# conditionally run unit tests
81-
# if [ "${DISABLE_UNIT_TESTS:-0}" = "0" ]; then
82-
# ctest -C Release
83-
# fi
62+
mkdir -p "build_debug"
63+
pushd "build_debug"
64+
opts="$(replace_switch /Zi /Z7 $LL_BUILD_DEBUG)"
65+
plainopts="$(remove_switch /GR $(remove_cxxstd $opts))"
66+
67+
cmake $(cygpath -m ${top}/${MINIZLIB_SOURCE_DIR}) -G "Ninja Multi-Config" \
68+
-DCMAKE_BUILD_TYPE="Debug" \
69+
-DCMAKE_C_FLAGS:STRING="$plainopts" \
70+
-DCMAKE_CXX_FLAGS:STRING="$opts" \
71+
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT="Embedded" \
72+
"${config[@]}" \
73+
-DCMAKE_INSTALL_PREFIX=$(cygpath -m $stage) \
74+
-DCMAKE_INSTALL_LIBDIR="$(cygpath -m "$stage/lib/debug")" \
75+
-DZLIB_INCLUDE_DIR="$(cygpath -m "$stage/packages/include/zlib-ng/")" \
76+
-DZLIB_LIBRARY="$(cygpath -m "$stage/packages/lib/debug/zlibd.lib")"
77+
78+
cmake --build . --config Debug --parallel $AUTOBUILD_CPU_COUNT
79+
80+
# conditionally run unit tests
81+
# if [ "${DISABLE_UNIT_TESTS:-0}" = "0" ]; then
82+
# ctest -C Debug
83+
# fi
84+
85+
cmake --install . --config Debug
86+
popd
8487

85-
cmake --install . --config Release
88+
mkdir -p "build_release"
89+
pushd "build_release"
90+
opts="$(replace_switch /Zi /Z7 $LL_BUILD_RELEASE)"
91+
plainopts="$(remove_switch /GR $(remove_cxxstd $opts))"
92+
93+
cmake $(cygpath -m ${top}/${MINIZLIB_SOURCE_DIR}) -G "Ninja Multi-Config" \
94+
-DCMAKE_BUILD_TYPE="Release" \
95+
-DCMAKE_C_FLAGS:STRING="$plainopts" \
96+
-DCMAKE_CXX_FLAGS:STRING="$opts" \
97+
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT="Embedded" \
98+
"${config[@]}" \
99+
-DCMAKE_INSTALL_PREFIX=$(cygpath -m $stage) \
100+
-DCMAKE_INSTALL_LIBDIR="$(cygpath -m "$stage/lib/release")" \
101+
-DZLIB_INCLUDE_DIR="$(cygpath -m "$stage/packages/include/zlib-ng/")" \
102+
-DZLIB_LIBRARY="$(cygpath -m "$stage/packages/lib/release/zlib.lib")"
103+
104+
cmake --build . --config Release --parallel $AUTOBUILD_CPU_COUNT
105+
106+
# conditionally run unit tests
107+
# if [ "${DISABLE_UNIT_TESTS:-0}" = "0" ]; then
108+
# ctest -C Release
109+
# fi
110+
111+
cmake --install . --config Release
112+
popd
86113

87114
mkdir -p $stage/include/minizip-ng
88115
mv $stage/include/minizip/*.h "$stage/include/minizip-ng/"
89-
popd
90116
;;
91117

92118
# ------------------------- darwin, darwin64 -------------------------

0 commit comments

Comments
 (0)