Use versioned tpt-libs
Also move bzip2 sources out of their own subproject.
This commit is contained in:
parent
12e0fda02f
commit
0832615599
2
.github/build.sh
vendored
2
.github/build.sh
vendored
@ -41,7 +41,7 @@ static_flag=
|
||||
if [ $STATIC_DYNAMIC == "static" ]; then
|
||||
static_flag=-Dstatic=prebuilt
|
||||
if [ $PLATFORM_SHORT == "win" ]; then
|
||||
other_flags+=$'\t-Db_vscrt=mt'
|
||||
other_flags+=$'\t-Db_vscrt=static_from_buildtype'
|
||||
fi
|
||||
fi
|
||||
if [ $PLATFORM_SHORT == "lin" ]; then
|
||||
|
15
meson.build
15
meson.build
@ -1,7 +1,5 @@
|
||||
project('the-powder-toy', [ 'c', 'cpp' ], version: 'the.cake.is.a.lie', default_options: [
|
||||
'cpp_std=c++11',
|
||||
'b_vscrt=md',
|
||||
'backend_startup_project=powder',
|
||||
])
|
||||
|
||||
prog_python3 = import('python').find_installation('python3')
|
||||
@ -45,6 +43,7 @@ endif
|
||||
|
||||
uopt_static = get_option('static')
|
||||
use_tpt_libs = false
|
||||
tpt_libs_vtag = 'v20210103095432'
|
||||
if uopt_static == 'system'
|
||||
if copt_platform == 'windows'
|
||||
error('no way to find static system libraries on windows')
|
||||
@ -52,18 +51,18 @@ if uopt_static == 'system'
|
||||
elif uopt_static == 'prebuilt'
|
||||
if copt_platform == 'windows'
|
||||
use_tpt_libs = true
|
||||
tpt_libs = subproject('tpt-libs-prebuilt-win64-static')
|
||||
tpt_libs = subproject('tpt-libs-prebuilt-win64-static-' + tpt_libs_vtag)
|
||||
elif copt_platform == 'linux'
|
||||
use_tpt_libs = true
|
||||
tpt_libs = subproject('tpt-libs-prebuilt-lin64-static')
|
||||
tpt_libs = subproject('tpt-libs-prebuilt-lin64-static-' + tpt_libs_vtag)
|
||||
elif copt_platform == 'macosx'
|
||||
use_tpt_libs = true
|
||||
tpt_libs = subproject('tpt-libs-prebuilt-mac64-static')
|
||||
tpt_libs = subproject('tpt-libs-prebuilt-mac64-static-' + tpt_libs_vtag)
|
||||
endif
|
||||
else
|
||||
if copt_platform == 'windows'
|
||||
use_tpt_libs = true
|
||||
tpt_libs = subproject('tpt-libs-prebuilt-win64-dynamic')
|
||||
tpt_libs = subproject('tpt-libs-prebuilt-win64-dynamic-' + tpt_libs_vtag)
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -112,7 +111,6 @@ endif
|
||||
threads_dep = dependency('threads')
|
||||
zlib_dep = use_tpt_libs ? tpt_libs.get_variable('zlib_dep') : dependency('zlib', static: uopt_static == 'system')
|
||||
sdl2_dep = use_tpt_libs ? tpt_libs.get_variable('sdl2_dep') : dependency('sdl2', static: uopt_static == 'system')
|
||||
bzip2_dep = subproject('tpt-bzip2').get_variable('bzip2_dep')
|
||||
|
||||
if copt_msvc
|
||||
if uopt_x86_sse_level >= 30
|
||||
@ -258,7 +256,6 @@ if get_option('build_powder')
|
||||
threads_dep,
|
||||
zlib_dep,
|
||||
sdl2_dep,
|
||||
bzip2_dep,
|
||||
lua_opt_dep,
|
||||
curl_opt_dep,
|
||||
fftw_opt_dep,
|
||||
@ -285,7 +282,6 @@ if get_option('build_render')
|
||||
render_deps = [
|
||||
threads_dep,
|
||||
zlib_dep,
|
||||
bzip2_dep,
|
||||
]
|
||||
executable(
|
||||
'render',
|
||||
@ -305,7 +301,6 @@ if get_option('build_font')
|
||||
threads_dep,
|
||||
zlib_dep,
|
||||
sdl2_dep,
|
||||
bzip2_dep,
|
||||
]
|
||||
if copt_platform == 'windows'
|
||||
font_deps += other_dep
|
||||
|
@ -82,7 +82,6 @@
|
||||
# include <winsock.h>
|
||||
#endif
|
||||
|
||||
#include <bzlib.h>
|
||||
#include <curl/curl.h>
|
||||
#include <bson/BSON.h>
|
||||
#include <json/json-forwards.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "bz2wrap.h"
|
||||
|
||||
#include <bzlib.h>
|
||||
#include "bzlib.h"
|
||||
|
||||
#include <memory>
|
||||
#include <functional>
|
@ -1,5 +1,6 @@
|
||||
bzip2_src = files(
|
||||
common_files += files(
|
||||
'blocksort.c',
|
||||
'bz2wrap.cpp',
|
||||
'bzlib.c',
|
||||
'compress.c',
|
||||
'crctable.c',
|
@ -5,9 +5,9 @@
|
||||
#include <climits>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <bzlib.h>
|
||||
#include <cmath>
|
||||
|
||||
#include "bzip2/bzlib.h"
|
||||
#include "Config.h"
|
||||
#include "Format.h"
|
||||
#include "hmap.h"
|
||||
|
@ -1,5 +1,4 @@
|
||||
common_files += files(
|
||||
'bz2wrap.cpp',
|
||||
'String.cpp',
|
||||
'tpt-rand.cpp',
|
||||
)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "FontReader.h"
|
||||
|
||||
#include "common/bz2wrap.h"
|
||||
#include "bzip2/bz2wrap.h"
|
||||
#include "font.h"
|
||||
|
||||
unsigned char *font_data = nullptr;
|
||||
|
@ -4,7 +4,8 @@
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <bzlib.h>
|
||||
|
||||
#include "bzip2/bzlib.h"
|
||||
|
||||
#include "FontReader.h"
|
||||
#ifdef HIGH_QUALITY_RESAMPLE
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "FontEditor.h"
|
||||
#include "common/bz2wrap.h"
|
||||
#include "bzip2/bz2wrap.h"
|
||||
|
||||
#include "Config.h"
|
||||
#include "gui/interface/Textbox.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "UpdateActivity.h"
|
||||
|
||||
#include <bzlib.h>
|
||||
#include "bzip2/bzlib.h"
|
||||
|
||||
#include "gui/dialogues/ConfirmPrompt.h"
|
||||
#include "gui/interface/Engine.h"
|
||||
|
@ -30,6 +30,7 @@ common_files = files(
|
||||
)
|
||||
|
||||
subdir('bson')
|
||||
subdir('bzip2')
|
||||
subdir('client')
|
||||
subdir('common')
|
||||
subdir('debug')
|
||||
|
@ -1,14 +0,0 @@
|
||||
project('tpt-bzip2', 'c')
|
||||
|
||||
subdir('src')
|
||||
|
||||
bzip2_inc = include_directories('include')
|
||||
bzip2_sta = static_library(
|
||||
'bzip2',
|
||||
sources: bzip2_src,
|
||||
include_directories: bzip2_inc,
|
||||
)
|
||||
bzip2_dep = declare_dependency(
|
||||
link_with: bzip2_sta,
|
||||
include_directories: bzip2_inc,
|
||||
)
|
@ -0,0 +1,6 @@
|
||||
[wrap-file]
|
||||
directory = tpt-libs-prebuilt-lin64-static-v20210103095432
|
||||
|
||||
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20210103095432/tpt-libs-prebuilt-lin64-static-v20210103095432.zip
|
||||
source_filename = tpt-libs-prebuilt-lin64-static-v20210103095432.zip
|
||||
source_hash = d2ede0e8fb54802789cbd729397cb8083151cbbf8219cdc0d70844e0a03196f4
|
@ -1,6 +0,0 @@
|
||||
[wrap-file]
|
||||
directory = tpt-libs-prebuilt-lin64-static
|
||||
|
||||
source_url = https://github.com/LBPHacker/tpt-libs/releases/download/v20210103011010/tpt-libs-prebuilt-lin64-static.zip
|
||||
source_filename = tpt-libs-prebuilt-lin64-static.zip
|
||||
source_hash = 042c9687cc418c1425c2c95c9d48bb76972f3df9b06d131409c1d3c67c22c53a
|
@ -0,0 +1,6 @@
|
||||
[wrap-file]
|
||||
directory = tpt-libs-prebuilt-mac64-static-v20210103095432
|
||||
|
||||
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20210103095432/tpt-libs-prebuilt-mac64-static-v20210103095432.zip
|
||||
source_filename = tpt-libs-prebuilt-mac64-static-v20210103095432.zip
|
||||
source_hash = 5b1e20dd5ef6bd4220cb6d3cc8b5aa5d3ae20a8b89ec05ef56958fcf58085e7a
|
@ -1,6 +0,0 @@
|
||||
[wrap-file]
|
||||
directory = tpt-libs-prebuilt-mac64-static
|
||||
|
||||
source_url = https://github.com/LBPHacker/tpt-libs/releases/download/v20210103011010/tpt-libs-prebuilt-mac64-static.zip
|
||||
source_filename = tpt-libs-prebuilt-mac64-static.zip
|
||||
source_hash = 3e848020919ed5993fcef0f579d1401227659a31a621324e0830d7bebb4b9b10
|
@ -0,0 +1,6 @@
|
||||
[wrap-file]
|
||||
directory = tpt-libs-prebuilt-win64-dynamic-v20210103095432
|
||||
|
||||
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20210103095432/tpt-libs-prebuilt-win64-dynamic-v20210103095432.zip
|
||||
source_filename = tpt-libs-prebuilt-win64-dynamic-v20210103095432.zip
|
||||
source_hash = 84226bce4c89028479f9c41860cfae3ed07bfbabf9f4316f11cffa0bf8964624
|
@ -1,6 +0,0 @@
|
||||
[wrap-file]
|
||||
directory = tpt-libs-prebuilt-win64-dynamic
|
||||
|
||||
source_url = https://github.com/LBPHacker/tpt-libs/releases/download/v20210103011010/tpt-libs-prebuilt-win64-dynamic.zip
|
||||
source_filename = tpt-libs-prebuilt-win64-dynamic.zip
|
||||
source_hash = 5e1fbee5b39413ef9703ea0455e9f2c117a6f34c59c225945381a50fe10e5aef
|
@ -0,0 +1,6 @@
|
||||
[wrap-file]
|
||||
directory = tpt-libs-prebuilt-win64-static-v20210103095432
|
||||
|
||||
source_url = https://github.com/The-Powder-Toy/tpt-libs/releases/download/v20210103095432/tpt-libs-prebuilt-win64-static-v20210103095432.zip
|
||||
source_filename = tpt-libs-prebuilt-win64-static-v20210103095432.zip
|
||||
source_hash = b60bc426655e9bb8583998aff5c004ed3e61c3ceac7b28c3a9834bef46c43437
|
@ -1,6 +0,0 @@
|
||||
[wrap-file]
|
||||
directory = tpt-libs-prebuilt-win64-static
|
||||
|
||||
source_url = https://github.com/LBPHacker/tpt-libs/releases/download/v20210103011010/tpt-libs-prebuilt-win64-static.zip
|
||||
source_filename = tpt-libs-prebuilt-win64-static.zip
|
||||
source_hash = 6348d2dcd99ceedb63fb7c27b4fd4d02f9837244981eaf60ed2d255e25d4dfe3
|
Loading…
Reference in New Issue
Block a user