-
-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: browser support #894
Merged
Merged
Changes from all commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
02ca37f
browser support
IvanClementino 7b789be
Merge branch 'main' into browser
mehah 791ef9d
Merge branch 'main' into browser
Nottinghster 8a5624d
CMake: WASM should be tested and else left for Linux as before
IvanClementino f5e2e21
Merge branch 'mehah:main' into browser
OTArchive b5dbba2
Merge branch 'mehah:main' into browser
OTArchive 507c560
Merge branch 'mehah:main' into browser
OTArchive 9ac9b84
Remove conflicting vcpkg.json files
IvanClementino 8480d20
Use existing base64 encoder
IvanClementino 2f659bd
Check for emscripten before includes and declarations
IvanClementino bb34371
Improve CMakeLists
IvanClementino aab3407
Fix case-sensitivity issues
IvanClementino 211da69
Merge branch 'main' into browser
luanluciano93 628f49c
Merge branch 'mehah:main' into browser
OTArchive d6ac1f9
Implement bitlib and restore original .lua files bit operations
IvanClementino c614336
Merge branch 'mehah:main' into browser
OTArchive 20bcc3a
Merge branch 'mehah:main' into browser
OTArchive 17e8375
Merge branch 'mehah:main' into browser
OTArchive deef922
Support older protocols and improvements
IvanClementino 9e38012
Merge branch 'mehah:main' into browser
OTArchive e301e05
Set correct numpad keys
IvanClementino f7185d1
Intercept all browser keys
IvanClementino 7ef45fb
Allow pasting and writing symbols with shift
IvanClementino 5d003aa
Merge branch 'mehah:main' into browser
OTArchive bfed59b
Improve networking
IvanClementino 40e075a
Reload page on client exit
IvanClementino 9df1b90
Reduce CPU usage and connection improvements
IvanClementino 0aaa93d
Disable Emscripten's text decoder
IvanClementino d5b90a2
Merge branch 'mehah:main' into browser
OTArchive 9fcbcfd
Basic mobile support
IvanClementino 179c76d
Merge branch 'main' into browser
luanluciano93 017325c
Merge branch 'mehah:main' into browser
OTArchive 3c6bc5a
Improve performance
IvanClementino f1c2ce0
Merge branch 'mehah:main' into browser
OTArchive 4fd167f
Merge branch 'mehah:main' into browser
OTArchive 4bd3dbe
Merge branch 'mehah:main' into browser
OTArchive e3b0a13
Case insensitive FS and properly return if websocket fails to be created
IvanClementino 0a20f03
Fix Vorbis Linking (7cd3c82)
IvanClementino ec2c4e6
Allow gameWorld port to be set without rebuilding
IvanClementino 667b37c
Merge branch 'mehah:main' into browser
OTArchive 7f1b778
Merge branch 'mehah:main' into browser
OTArchive 3048c56
Merge branch 'mehah:main' into browser
OTArchive 7147164
Merge branch 'mehah:main' into browser
OTArchive 59c3dd3
Merge branch 'mehah:main' into browser
OTArchive afba916
Merge branch 'mehah:main' into browser
OTArchive 235f22b
Remove unused definition
IvanClementino 7e3ae66
Remove '&'
IvanClementino 4481ece
Remove swapBuffers call, we no longer use it
IvanClementino 244d1d4
Properly encode json
IvanClementino afae5db
Update src/framework/net/webconnection.cpp
OTArchive 87bccbf
Update src/framework/net/webconnection.cpp
OTArchive 425f712
Update src/framework/net/webconnection.cpp
OTArchive 1c4a835
Update src/framework/platform/browserplatform.cpp
OTArchive 75f69ea
Update src/framework/platform/browserplatform.cpp
OTArchive 2acc468
Update src/framework/platform/browserplatform.cpp
OTArchive b490cd1
Update src/framework/platform/browserplatform.cpp
OTArchive d580f27
c++17 remove file
IvanClementino f0d403e
Merge branch 'mehah:main' into browser
OTArchive e28420b
Merge branch 'mehah:main' into browser
OTArchive 543482a
Recommended improvements
IvanClementino 01c750d
Merge branch 'mehah:main' into browser
OTArchive 4eed1a1
Merge branch 'mehah/main' into browser
IvanClementino fbc8887
Merge branch 'mehah:main' into browser
OTArchive dfd6d79
Merge branch 'mehah:main' into browser
OTArchive 0ec4f8a
Remove uneeded link libs
IvanClementino f1f9046
remove regex
IvanClementino 89c8d2f
Merge branch 'mehah:main' into browser
OTArchive 2026960
Cleanup shell.html
IvanClementino aa27044
Make compiling easier
IvanClementino e59f844
Add baseline to overlay-ports vcpkg.json files
IvanClementino 1858ab9
Workflows: ignore overlay-ports vcpkg.json
IvanClementino af77e53
Merge branch 'mehah:main' into browser
OTArchive 5d62b82
Bot V8 basic fixes
IvanClementino 5b5019e
Merge branch 'mehah:main' into browser
OTArchive 8e80533
Merge branch 'mehah:main' into browser
OTArchive a9dc380
Merge branch 'mehah:main' into browser
OTArchive cb275d7
Merge branch 'mehah:main' into browser
OTArchive 9ba596b
Merge branch 'mehah:main' into browser
OTArchive e2b5416
Merge branch 'mehah:main' into browser
OTArchive d1d7ee7
Merge branch 'mehah:main' into browser
OTArchive eb60681
Merge branch 'mehah:main' into browser
OTArchive eeab378
Merge branch 'main' into browser
mehah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
bitlib | ||
------ | ||
|
||
by Reuben Thomas <[email protected]> | ||
http://luaforge.net/projects/bitlib | ||
|
||
|
||
bitlib is a C library for Lua 5.1 that provides bitwise operations. It | ||
is copyright Reuben Thomas 2000-2009, and is released under the MIT | ||
license, like Lua (see http://www.lua.org/copyright.html; it's | ||
basically the same as the BSD license). There is no warranty. | ||
|
||
Please report bugs and make suggestions to the email address above, or | ||
use the LuaForge trackers. | ||
|
||
Thanks to John Passaniti for his bitwise operations library, some of | ||
whose ideas I used, to Shmuel Zeigerman for the test suite, to | ||
Thatcher Ulrich for portability fixes, and to Enrico Tassi, John | ||
Stiles and Eduardo Ochs for bug reports. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#define BITLIB_FLOAT_BITS 53 | ||
#define BITLIB_FLOAT_MAX 0xfffffffffffffL | ||
#define BITLIB_FLOAT_MIN (-0x10000000000000L) | ||
#define BITLIB_FLOAT_UMAX 0x1fffffffffffffUL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
/* Bitwise operations library */ | ||
/* (c) Reuben Thomas 2000-2008 */ | ||
/* See README for license */ | ||
|
||
#include "bit_limits.h" | ||
|
||
|
||
/* FIXME: Assumes lua_Integer is ptrdiff_t */ | ||
#define LUA_INTEGER_MAX PTRDIFF_MAX | ||
#define LUA_INTEGER_MIN PTRDIFF_MIN | ||
|
||
/* FIXME: Assumes size_t is an unsigned lua_Integer */ | ||
typedef size_t lua_UInteger; | ||
#define LUA_UINTEGER_MAX SIZE_MAX | ||
|
||
|
||
/* Bit type size and limits */ | ||
|
||
#define BIT_BITS \ | ||
(CHAR_BIT * sizeof(lua_Integer) > BITLIB_FLOAT_BITS ? \ | ||
BITLIB_FLOAT_BITS : (CHAR_BIT * sizeof(lua_Integer))) | ||
|
||
/* This code may give warnings if BITLIB_FLOAT_* are too big to fit in | ||
long, but that doesn't matter since in that case they won't be | ||
used. */ | ||
#define BIT_MAX \ | ||
(CHAR_BIT * sizeof(lua_Integer) > BITLIB_FLOAT_BITS ? BITLIB_FLOAT_MAX : LUA_INTEGER_MAX) | ||
|
||
#define BIT_MIN \ | ||
(CHAR_BIT * sizeof(lua_Integer) > BITLIB_FLOAT_BITS ? BITLIB_FLOAT_MIN : LUA_INTEGER_MIN) | ||
|
||
#define BIT_UMAX \ | ||
(CHAR_BIT * sizeof(lua_Integer) > BITLIB_FLOAT_BITS ? BITLIB_FLOAT_UMAX : LUA_UINTEGER_MAX) | ||
|
||
|
||
/* Define TOBIT to get a bit value */ | ||
#ifdef BUILTIN_CAST | ||
#define | ||
#define TOBIT(L, n, res) \ | ||
((void)(res), luaL_checkinteger((L), (n))) | ||
#else | ||
#include <stdint.h> | ||
#include <math.h> | ||
|
||
/* FIXME: Assumes lua_Number fits in a double (use of fmod). */ | ||
#define TOBIT(L, n, res) \ | ||
((lua_Integer)(((res) = fmod(luaL_checknumber(L, (n)), (double)BIT_UMAX + 1.0)), \ | ||
(res) > BIT_MAX ? ((res) -= (double)BIT_UMAX, (res) -= 1) : \ | ||
((res) < BIT_MIN ? ((res) += (double)BIT_UMAX, (res) += 1) : (res)))) | ||
#endif | ||
|
||
|
||
#define BIT_TRUNCATE(i) \ | ||
((i) & BIT_UMAX) | ||
|
||
|
||
/* Operations | ||
|
||
The macros MONADIC and VARIADIC only deal with bitwise operations. | ||
|
||
LOGICAL_SHIFT truncates its left-hand operand before shifting so | ||
that any extra bits at the most-significant end are not shifted | ||
into the result. | ||
|
||
ARITHMETIC_SHIFT does not truncate its left-hand operand, so that | ||
the sign bits are not removed and right shift work properly. | ||
*/ | ||
|
||
#define MONADIC(name, op) \ | ||
static int bit_ ## name(lua_State *L) { \ | ||
lua_Number f; \ | ||
lua_pushinteger(L, BIT_TRUNCATE(op TOBIT(L, 1, f))); \ | ||
return 1; \ | ||
} | ||
|
||
#define VARIADIC(name, op) \ | ||
static int bit_ ## name(lua_State *L) { \ | ||
lua_Number f; \ | ||
int n = lua_gettop(L), i; \ | ||
lua_Integer w = TOBIT(L, 1, f); \ | ||
for (i = 2; i <= n; i++) \ | ||
w op TOBIT(L, i, f); \ | ||
lua_pushinteger(L, BIT_TRUNCATE(w)); \ | ||
return 1; \ | ||
} | ||
|
||
#define LOGICAL_SHIFT(name, op) \ | ||
static int bit_ ## name(lua_State *L) { \ | ||
lua_Number f; \ | ||
lua_pushinteger(L, BIT_TRUNCATE(BIT_TRUNCATE((lua_UInteger)TOBIT(L, 1, f)) op \ | ||
(unsigned)luaL_checknumber(L, 2))); \ | ||
return 1; \ | ||
} | ||
|
||
#define ARITHMETIC_SHIFT(name, op) \ | ||
static int bit_ ## name(lua_State *L) { \ | ||
lua_Number f; \ | ||
lua_pushinteger(L, BIT_TRUNCATE((lua_Integer)TOBIT(L, 1, f) op \ | ||
(unsigned)luaL_checknumber(L, 2))); \ | ||
return 1; \ | ||
} | ||
|
||
MONADIC(cast, +) | ||
MONADIC(bnot, ~) | ||
VARIADIC(band, &=) | ||
VARIADIC(bor, |=) | ||
VARIADIC(bxor, ^=) | ||
ARITHMETIC_SHIFT(lshift, <<) | ||
LOGICAL_SHIFT(rshift, >>) | ||
ARITHMETIC_SHIFT(arshift, >>) | ||
|
||
static const struct luaL_reg bitlib[] = { | ||
{"cast", bit_cast}, | ||
{"bnot", bit_bnot}, | ||
{"band", bit_band}, | ||
{"bor", bit_bor}, | ||
{"bxor", bit_bxor}, | ||
{"lshift", bit_lshift}, | ||
{"rshift", bit_rshift}, | ||
{"arshift", bit_arshift}, | ||
{NULL, NULL} | ||
}; | ||
|
||
LUALIB_API int luaopen_bit (lua_State *L) { | ||
luaL_register(L, "bit", bitlib); | ||
lua_pushnumber(L, BIT_BITS); | ||
lua_setfield(L, -2, "bits"); | ||
return 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
if(NOT VCPKG_TARGET_IS_WINDOWS) | ||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) | ||
endif() | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO abseil/abseil-cpp | ||
REF "${VERSION}" | ||
SHA512 bd2cca8f007f2eee66f51c95a979371622b850ceb2ce3608d00ba826f7c494a1da0fba3c1427728f2c173fe50d59b701da35c2c9fdad2752a5a49746b1c8ef31 | ||
HEAD_REF master | ||
PATCHES | ||
use_pthread.patch | ||
) | ||
|
||
# With ABSL_PROPAGATE_CXX_STD=ON abseil automatically detect if it is being | ||
# compiled with C++14 or C++17, and modifies the installed `absl/base/options.h` | ||
# header accordingly. This works even if CMAKE_CXX_STANDARD is not set. Abseil | ||
# uses the compiler default behavior to update `absl/base/options.h` as needed. | ||
set(ABSL_USE_CXX17_OPTION "") | ||
if("cxx17" IN_LIST FEATURES) | ||
set(ABSL_USE_CXX17_OPTION "-DCMAKE_CXX_STANDARD=17") | ||
endif() | ||
|
||
set(ABSL_STATIC_RUNTIME_OPTION "") | ||
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_CRT_LINKAGE STREQUAL "static") | ||
set(ABSL_STATIC_RUNTIME_OPTION "-DABSL_MSVC_STATIC_RUNTIME=ON") | ||
endif() | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
DISABLE_PARALLEL_CONFIGURE | ||
OPTIONS | ||
-DABSL_PROPAGATE_CXX_STD=ON | ||
${ABSL_USE_CXX17_OPTION} | ||
${ABSL_STATIC_RUNTIME_OPTION} | ||
) | ||
|
||
vcpkg_cmake_install() | ||
vcpkg_cmake_config_fixup(PACKAGE_NAME absl CONFIG_PATH lib/cmake/absl) | ||
vcpkg_fixup_pkgconfig() | ||
|
||
vcpkg_copy_pdbs() | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" | ||
"${CURRENT_PACKAGES_DIR}/debug/include" | ||
"${CURRENT_PACKAGES_DIR}/include/absl/copts" | ||
"${CURRENT_PACKAGES_DIR}/include/absl/strings/testdata" | ||
"${CURRENT_PACKAGES_DIR}/include/absl/time/internal/cctz/testdata" | ||
) | ||
|
||
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/config.h" "defined(ABSL_CONSUME_DLL)" "1") | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/internal/thread_identity.h" "defined(ABSL_CONSUME_DLL)" "1") | ||
endif() | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 7c82b3a..48474ec 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -27,6 +27,8 @@ project(absl LANGUAGES CXX VERSION 20240722) | ||
set(ABSL_SOVERSION "2407.0.0") | ||
include(CTest) | ||
|
||
+add_compile_options(-pthread) | ||
+ | ||
# Output directory is correct by default for most build setups. However, when | ||
# building Abseil as a DLL, it is important to have the DLL in the same | ||
# directory as the executable using it. Thus, we put all executables in a single |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "abseil", | ||
"version": "20240722.0", | ||
"description": [ | ||
"Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.", | ||
"In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.", | ||
"Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole." | ||
], | ||
"homepage": "https://github.com/abseil/abseil-cpp", | ||
"license": "Apache-2.0", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
], | ||
"features": { | ||
"cxx17": { | ||
"description": "Enable compiler C++17." | ||
} | ||
}, | ||
"builtin-baseline":"c82f74667287d3dc386bce81e44964370c91a289" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION} | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO icculus/physfs | ||
REF "release-${VERSION}" | ||
SHA512 e0d84d6ac6bd8f0973149a5add54ed5ed890b5fabb4592ba61b59a3b3e01c05e05f1754f18d7a1c8d72e68777a23cda0c50dc0512cf57a8310a950bf908f54b1 | ||
PATCHES | ||
use_pthread.patch | ||
) | ||
|
||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PHYSFS_STATIC) | ||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PHYSFS_SHARED) | ||
|
||
set(generator_param "") | ||
if(VCPKG_TARGET_IS_UWP) | ||
set(generator_param WINDOWS_USE_MSBUILD) | ||
endif() | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
${generator_param} | ||
OPTIONS | ||
-DPHYSFS_BUILD_STATIC=${PHYSFS_STATIC} | ||
-DPHYSFS_BUILD_SHARED=${PHYSFS_SHARED} | ||
-DPHYSFS_BUILD_TEST=OFF | ||
-DPHYSFS_BUILD_DOCS=OFF | ||
) | ||
|
||
vcpkg_cmake_install() | ||
vcpkg_copy_pdbs() | ||
|
||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/PhysFS) | ||
vcpkg_fixup_pkgconfig() | ||
|
||
if(PHYSFS_STATIC) | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/physfs.h" "defined(PHYSFS_STATIC)" "1") | ||
else() | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/physfs.h" "dllexport" "dllimport") | ||
endif() | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
|
||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
physfs provides CMake targets: | ||
|
||
find_package(PhysFS CONFIG REQUIRED) | ||
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:PhysFS::PhysFS>,PhysFS::PhysFS,PhysFS::PhysFS-static>) | ||
|
||
physfs is compatible with built-in CMake targets: | ||
|
||
find_package(PhysFS REQUIRED) | ||
target_include_directories(main PRIVATE ${PHYSFS_INCLUDE_DIR}) | ||
target_link_libraries(main PRIVATE ${PHYSFS_LIBRARY}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index b3291cc..a5d8225 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -25,6 +25,8 @@ set(PHYSFS_CPP_SRCS) | ||
|
||
# I hate that they define "WIN32" ... we're about to move to Win64...I hope! | ||
|
||
+add_compile_options(-pthread) | ||
+ | ||
if(APPLE) | ||
set(OTHER_LDFLAGS ${OTHER_LDFLAGS} "-framework IOKit -framework Foundation") | ||
list(APPEND PHYSFS_M_SRCS src/physfs_platform_apple.m) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
find_library(PHYSFS_LIBRARY_RELEASE NAMES physfs physfs-static NAMES_PER_DIR PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH) | ||
find_library(PHYSFS_LIBRARY_DEBUG NAMES physfs physfs-static NAMES_PER_DIR PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH) | ||
include(SelectLibraryConfigurations) | ||
select_library_configurations(PHYSFS) | ||
unset(PHYSFS_FOUND) | ||
_find_package(${ARGS}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "physfs", | ||
"version-semver": "3.2.0", | ||
"port-version": 1, | ||
"description": "a library to provide abstract access to various archives", | ||
"homepage": "https://icculus.org/physfs/", | ||
"license": "Zlib", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
], | ||
"builtin-baseline":"c82f74667287d3dc386bce81e44964370c91a289" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/src/google/protobuf/parse_context.h b/src/google/protobuf/parse_context.h | ||
index df12ee1ab..3eb2e56c7 100644 | ||
--- a/src/google/protobuf/parse_context.h | ||
+++ b/src/google/protobuf/parse_context.h | ||
@@ -653,7 +653,7 @@ inline const char* VarintParseSlow(const char* p, uint32_t res, uint64_t* out) { | ||
return tmp.first; | ||
} | ||
|
||
-#ifdef __aarch64__ | ||
+#if defined(__aarch64__) && !defined(_MSC_VER) | ||
// Generally, speaking, the ARM-optimized Varint decode algorithm is to extract | ||
// and concatenate all potentially valid data bits, compute the actual length | ||
// of the Varint, and mask off the data bits which are not actually part of the | ||
@@ -883,7 +883,7 @@ static const char* VarintParseSlowArm(const char* p, uint64_t* out, | ||
|
||
template <typename T> | ||
PROTOBUF_NODISCARD const char* VarintParse(const char* p, T* out) { | ||
-#if defined(__aarch64__) && defined(PROTOBUF_LITTLE_ENDIAN) | ||
+#if defined(__aarch64__) && defined(PROTOBUF_LITTLE_ENDIAN) && !defined(_MSC_VER) | ||
// This optimization is not supported in big endian mode | ||
uint64_t first8; | ||
std::memcpy(&first8, p, sizeof(first8)); | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as resolved.
Sorry, something went wrong.