Skip to content

Commit

Permalink
Revert "use liblzma for compression, remove 7zip SDK from codebase"
Browse files Browse the repository at this point in the history
This reverts commit eead467.

There's no telling how deep the rabbit hole goes with xz, so better use the
good old 7zip SDK.
  • Loading branch information
DyXel committed Apr 2, 2024
1 parent 5ac03cb commit 355803b
Show file tree
Hide file tree
Showing 16 changed files with 5,312 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/x64-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fetch-depth: 1
- name: Install dependencies
run: |
sudo apt-get --no-install-recommends --yes install libfmt-dev liblzma-dev libgit2-dev libsqlite3-dev libssl-dev ninja-build
sudo apt-get --no-install-recommends --yes install libfmt-dev libgit2-dev libsqlite3-dev libssl-dev ninja-build
pip install meson
- name: Get boost
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/x86-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
vcpkgGitCommitId: 8eb57355a4ffb410a2e94c07b4dca2dffbee8e50
vcpkgTriplet: ${{ env.VCPKG_TRIPLET }}
vcpkgArguments: boost-asio boost-filesystem boost-date-time boost-interprocess boost-json fmt libgit2 liblzma openssl sqlite3
vcpkgArguments: boost-asio boost-filesystem boost-date-time boost-interprocess boost-json fmt libgit2 openssl sqlite3
- name: Fix Boost.Filesystem library location
shell: bash
run: |
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Install all the runtime dependencies for Multirole.
FROM alpine:edge AS base
RUN apk add --no-cache --repository "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" boost-filesystem ca-certificates libgit2 libssl3 tcmalloc-minimal@testing sqlite-libs xz && \
RUN apk add --no-cache --repository "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" boost-filesystem ca-certificates libgit2 libssl3 tcmalloc-minimal@testing sqlite-libs && \
rm -rf /var/log/* /tmp/* /var/tmp/*

# Install all the development environment that Multirole needs.
FROM base AS base-dev
RUN apk add --no-cache --repository "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" boost-dev fmt-dev g++ gperftools-dev@testing libgit2-dev meson ninja openssl-dev sqlite-dev xz-dev && \
RUN apk add --no-cache --repository "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" boost-dev fmt-dev g++ gperftools-dev@testing libgit2-dev meson ninja openssl-dev sqlite-dev && \
rm -rf /var/log/* /tmp/* /var/tmp/*

# Build multirole, stripping debug symbols to their own files.
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ This project depends on the following libraries:
* json
* fmt
* libgit2
* liblzma (provided as xz in some systems)
* openssl
* sqlite3

Expand Down
6 changes: 4 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ atomic_dep = meson.get_compiler('cpp').find_library('atomic', required : false)
boost_dep = dependency('boost', version : '>=1.78', modules : ['filesystem'], static : static_deps)
dl_dep = meson.get_compiler('cpp').find_library('dl', required : false)
libgit2_dep = dependency('libgit2', static : static_deps)
lzma_dep = dependency('liblzma')
openssl_dep = dependency('openssl', static : static_deps)
rt_dep = meson.get_compiler('cpp').find_library('rt', required : false)
sqlite3_dep = dependency('sqlite3', static : static_deps)
Expand Down Expand Up @@ -68,6 +67,9 @@ multirole_src_files = files([
'src/Multirole/YGOPro/Deck.cpp',
'src/Multirole/YGOPro/Replay.cpp',
'src/Multirole/YGOPro/StringUtils.cpp',
'src/Multirole/YGOPro/LZMA/Alloc.c',
'src/Multirole/YGOPro/LZMA/LzFind.c',
'src/Multirole/YGOPro/LZMA/LzmaEnc.c'
])

hornet_src_files = files([
Expand All @@ -77,6 +79,7 @@ hornet_src_files = files([

executable('multirole', multirole_src_files,
c_args: [
'-D_7ZIP_ST',
'-D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS',
'-D_WINSOCK_DEPRECATED_NO_WARNINGS',
'-DNOMINMAX'
Expand All @@ -92,7 +95,6 @@ executable('multirole', multirole_src_files,
dl_dep,
fmt_dep,
libgit2_dep,
lzma_dep,
openssl_dep,
rt_dep,
sqlite3_dep,
Expand Down

0 comments on commit 355803b

Please sign in to comment.