mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-23 18:43:37 +00:00
Add miniaudio and stb as dependencies
This commit is contained in:
parent
c63491ab81
commit
901f7f9cb1
|
|
@ -5,7 +5,7 @@ render_sources = files(
|
|||
|
||||
lib_render = static_library('4J_Render',
|
||||
render_sources,
|
||||
include_directories : include_directories('.'),
|
||||
include_directories : [include_directories('.'), stb],
|
||||
dependencies : [sdl2_dep, gl_dep, thread_dep],
|
||||
cpp_args : global_cpp_args + global_cpp_defs + [
|
||||
'-include', meson.current_source_dir() / 'stdafx.h',
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -15,11 +15,25 @@
|
|||
#endif
|
||||
#ifdef __linux__
|
||||
#define STB_VORBIS_HEADER_ONLY
|
||||
#include "./stb_vorbis.h"
|
||||
#include "stb_vorbis.c"
|
||||
// Fixes strcasecmp in miniaudio
|
||||
// https://stackoverflow.com/questions/31127260/strcasecmp-a-non-standard-function
|
||||
int strcasecmp(const char *a, const char *b) {
|
||||
int ca, cb;
|
||||
do {
|
||||
ca = * (unsigned char *)a;
|
||||
cb = * (unsigned char *)b;
|
||||
ca = tolower(toupper(ca));
|
||||
cb = tolower(toupper(cb));
|
||||
a++;
|
||||
b++;
|
||||
} while (ca == cb && ca != '\0');
|
||||
return ca - cb;
|
||||
}
|
||||
#define MINIAUDIO_IMPLEMENTATION
|
||||
#include "./miniaudio.h"
|
||||
#include "miniaudio.h"
|
||||
#undef STB_VORBIS_HEADER_ONLY
|
||||
#include "./stb_vorbis.h"
|
||||
#include "stb_vorbis.c"
|
||||
#endif
|
||||
#ifdef _WINDOWS64
|
||||
#include "../../Minecraft.Client/Platform/Windows64/Windows64_App.h"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -57,6 +57,7 @@ client_dependencies = [
|
|||
thread_dep,
|
||||
thread_dep,
|
||||
dependency('zlib'),
|
||||
miniaudio_dep
|
||||
]
|
||||
|
||||
if get_option('enable_vsync')
|
||||
|
|
@ -83,7 +84,7 @@ endif
|
|||
|
||||
client = executable('Minecraft.Client',
|
||||
client_sources + platform_sources + localisation[1],
|
||||
include_directories : include_directories('Platform', 'Platform/Linux/Iggy/include'),
|
||||
include_directories : [include_directories('Platform', 'Platform/Linux/Iggy/include'),stb],
|
||||
dependencies : client_dependencies,
|
||||
cpp_args : global_cpp_args + global_cpp_defs + [
|
||||
'-DUNICODE', '-D_UNICODE',
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ glu_dep = dependency('glu')
|
|||
sdl2_dep = dependency('sdl2') # Yes.. i know sdl3 is out, but there's not point upgrading right now except when
|
||||
# someone is gonna ask me "Hey juicey can you make it SDL3?" and i'd be like fuck you and still do it.
|
||||
thread_dep = dependency('threads')
|
||||
|
||||
miniaudio_dep = dependency('miniaudio')
|
||||
stb = subproject('stb').get_variable('stb_inc')
|
||||
# compile flags (chagne ts juicey)
|
||||
global_cpp_args = [
|
||||
'-fpermissive',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
option('enable_java_guis',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
value : true,
|
||||
description : 'Re-enable the Java UI remnants in the code (for testing only)')
|
||||
|
||||
option('enable_vsync',
|
||||
|
|
@ -10,5 +10,5 @@ option('enable_vsync',
|
|||
|
||||
option('enable_shiggy',
|
||||
type : 'boolean',
|
||||
value : true,
|
||||
value : false,
|
||||
description : 'Toggles shimmed PS4 Iggy binaries and UI for x86_64 Linux.')
|
||||
|
|
|
|||
13
subprojects/miniaudio.wrap
Normal file
13
subprojects/miniaudio.wrap
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[wrap-file]
|
||||
directory = miniaudio-0.11.22
|
||||
source_url = https://github.com/mackron/miniaudio/archive/refs/tags/0.11.22.tar.gz
|
||||
source_filename = miniaudio-0.11.22.tar.gz
|
||||
source_hash = bcb07bfb27e6fa94d34da73ba2d5642d4940b208ec2a660dbf4e52e6b7cd492f
|
||||
patch_filename = miniaudio_0.11.22-2_patch.zip
|
||||
patch_url = https://wrapdb.mesonbuild.com/v2/miniaudio_0.11.22-2/get_patch
|
||||
patch_hash = 345bc40914588b9901aff3d95213e25fdd678c24e976588a63442ad2c5171c77
|
||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/miniaudio_0.11.22-2/miniaudio-0.11.22.tar.gz
|
||||
wrapdb_version = 0.11.22-2
|
||||
|
||||
[provide]
|
||||
dependency_names = miniaudio
|
||||
3
subprojects/packagefiles/stb/meson.build
Normal file
3
subprojects/packagefiles/stb/meson.build
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
project('stb', 'c')
|
||||
|
||||
stb_inc = include_directories('.')
|
||||
5
subprojects/stb.wrap
Normal file
5
subprojects/stb.wrap
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[wrap-git]
|
||||
directory = stb
|
||||
url = https://github.com/nothings/stb.git
|
||||
revision = master
|
||||
patch_directory = stb
|
||||
Loading…
Reference in a new issue