mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-05 23:13:46 +08:00
Updated internal Python builds to 3.8.7
This commit is contained in:
parent
f5c12ef669
commit
efe7050445
1108
.efrocachemap
1108
.efrocachemap
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
<!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND -->
|
<!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND -->
|
||||||
<h4><em>last updated on 2021-01-04 for Ballistica version 1.5.30 build 20265</em></h4>
|
<h4><em>last updated on 2021-01-08 for Ballistica version 1.5.30 build 20266</em></h4>
|
||||||
<p>This page documents the Python classes and functions in the 'ba' module,
|
<p>This page documents the Python classes and functions in the 'ba' module,
|
||||||
which are the ones most relevant to modding in Ballistica. If you come across something you feel should be included here or could be better explained, please <a href="mailto:support@froemling.net">let me know</a>. Happy modding!</p>
|
which are the ones most relevant to modding in Ballistica. If you come across something you feel should be included here or could be better explained, please <a href="mailto:support@froemling.net">let me know</a>. Happy modding!</p>
|
||||||
<hr>
|
<hr>
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
namespace ballistica {
|
namespace ballistica {
|
||||||
|
|
||||||
// These are set automatically via script; don't change here.
|
// These are set automatically via script; don't change here.
|
||||||
const int kAppBuildNumber = 20265;
|
const int kAppBuildNumber = 20267;
|
||||||
const char* kAppVersion = "1.5.30";
|
const char* kAppVersion = "1.5.30";
|
||||||
|
|
||||||
// Our standalone globals.
|
// Our standalone globals.
|
||||||
|
|||||||
@ -100,7 +100,7 @@ float Utils::precalc_rands_3[kPrecalcRandsCount] = {
|
|||||||
0.376926f, 0.508574f, 0.809908f, 0.862359f, 0.863431f, 0.884588f,
|
0.376926f, 0.508574f, 0.809908f, 0.862359f, 0.863431f, 0.884588f,
|
||||||
0.895885f, 0.391311f, 0.976098f, 0.473118f, 0.286659f, 0.0946781f,
|
0.895885f, 0.391311f, 0.976098f, 0.473118f, 0.286659f, 0.0946781f,
|
||||||
0.402437f, 0.347471f};
|
0.402437f, 0.347471f};
|
||||||
#else // USE_BAKED_RANDS
|
#else // USE_BAKED_RANDS
|
||||||
float Utils::precalc_rands_1[kPrecalcRandsCount];
|
float Utils::precalc_rands_1[kPrecalcRandsCount];
|
||||||
float Utils::precalc_rands_2[kPrecalcRandsCount];
|
float Utils::precalc_rands_2[kPrecalcRandsCount];
|
||||||
float Utils::precalc_rands_3[kPrecalcRandsCount];
|
float Utils::precalc_rands_3[kPrecalcRandsCount];
|
||||||
|
|||||||
@ -327,7 +327,7 @@ GLContext::~GLContext() {
|
|||||||
if (!IsVRMode()) {
|
if (!IsVRMode()) {
|
||||||
BA_PRECONDITION_LOG(sdl_window_);
|
BA_PRECONDITION_LOG(sdl_window_);
|
||||||
}
|
}
|
||||||
#else // BA_RIFT_MODE
|
#else // BA_RIFT_MODE
|
||||||
BA_PRECONDITION_LOG(sdl_window_);
|
BA_PRECONDITION_LOG(sdl_window_);
|
||||||
#endif // BA_RIFT_BUILD
|
#endif // BA_RIFT_BUILD
|
||||||
|
|
||||||
|
|||||||
@ -178,7 +178,7 @@ class GLContext {
|
|||||||
assert(surface_);
|
assert(surface_);
|
||||||
return surface_;
|
return surface_;
|
||||||
}
|
}
|
||||||
#endif // BA_SDL2_BUILD
|
#endif // BA_SDL2_BUILD
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if BA_SDL2_BUILD
|
#if BA_SDL2_BUILD
|
||||||
|
|||||||
@ -408,7 +408,7 @@ void RendererGL::CheckGLExtensions() {
|
|||||||
supports_depth_textures_ = true;
|
supports_depth_textures_ = true;
|
||||||
#if BA_CARDBOARD_BUILD
|
#if BA_CARDBOARD_BUILD
|
||||||
g_graphics->SetSupportsHighQualityGraphics(false);
|
g_graphics->SetSupportsHighQualityGraphics(false);
|
||||||
#else // BA_CARDBOARD_BUILD
|
#else // BA_CARDBOARD_BUILD
|
||||||
g_graphics->SetSupportsHighQualityGraphics(true);
|
g_graphics->SetSupportsHighQualityGraphics(true);
|
||||||
#endif // BA_CARDBOARD_BUILD
|
#endif // BA_CARDBOARD_BUILD
|
||||||
} else {
|
} else {
|
||||||
@ -2476,7 +2476,7 @@ class RendererGL::PostProcessProgramGL : public RendererGL::ProgramGL {
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // msaa bug test
|
#else // msaa bug test
|
||||||
|
|
||||||
auto GetVertexCode(int flags) -> std::string {
|
auto GetVertexCode(int flags) -> std::string {
|
||||||
std::string s;
|
std::string s;
|
||||||
@ -5879,7 +5879,7 @@ auto RendererGL::GetAutoTextureQuality() -> TextureQuality {
|
|||||||
// high
|
// high
|
||||||
#if BA_OUYA_BUILD
|
#if BA_OUYA_BUILD
|
||||||
qual = TextureQuality::kHigh;
|
qual = TextureQuality::kHigh;
|
||||||
#else // BA_OUYA_BUILD
|
#else // BA_OUYA_BUILD
|
||||||
// on android we default to high quality mode if we support ETC2;
|
// on android we default to high quality mode if we support ETC2;
|
||||||
// otherwise go with medium
|
// otherwise go with medium
|
||||||
if (g_graphics_server->SupportsTextureCompressionType(
|
if (g_graphics_server->SupportsTextureCompressionType(
|
||||||
@ -5900,7 +5900,7 @@ auto RendererGL::GetAutoTextureQuality() -> TextureQuality {
|
|||||||
qual = TextureQuality::kHigh;
|
qual = TextureQuality::kHigh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else // BA_OSTYPE_ANDROID
|
#else // BA_OSTYPE_ANDROID
|
||||||
{
|
{
|
||||||
// On other platforms (mac,pc,etc) just default to high.
|
// On other platforms (mac,pc,etc) just default to high.
|
||||||
qual = TextureQuality::kHigh;
|
qual = TextureQuality::kHigh;
|
||||||
|
|||||||
@ -1283,7 +1283,7 @@ void Graphics::DrawFades(FrameDef* frame_def, millisecs_t real_time) {
|
|||||||
c.DrawModel(g_media->GetModel(SystemModelID::kVRFade));
|
c.DrawModel(g_media->GetModel(SystemModelID::kVRFade));
|
||||||
c.PopTransform();
|
c.PopTransform();
|
||||||
c.Submit();
|
c.Submit();
|
||||||
#else // BA_VR_BUILD
|
#else // BA_VR_BUILD
|
||||||
throw Exception();
|
throw Exception();
|
||||||
#endif // BA_VR_BUILD
|
#endif // BA_VR_BUILD
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -539,7 +539,7 @@ void GraphicsServer::HandleFullscreenToggling(bool do_set_existing_fs,
|
|||||||
#if BA_OSTYPE_IOS_TVOS
|
#if BA_OSTYPE_IOS_TVOS
|
||||||
set_fullscreen_enabled(true);
|
set_fullscreen_enabled(true);
|
||||||
|
|
||||||
#else // BA_OSTYPE_IOS_TVOS
|
#else // BA_OSTYPE_IOS_TVOS
|
||||||
uint32_t fullscreen_flag = SDL_WINDOW_FULLSCREEN_DESKTOP;
|
uint32_t fullscreen_flag = SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||||
SDL_SetWindowFullscreen(gl_context_->sdl_window(),
|
SDL_SetWindowFullscreen(gl_context_->sdl_window(),
|
||||||
fullscreen ? fullscreen_flag : 0);
|
fullscreen ? fullscreen_flag : 0);
|
||||||
|
|||||||
@ -93,7 +93,7 @@ Joystick::Joystick(int sdl_joystick_id, const std::string& custom_device_name,
|
|||||||
is_mac_ps3_controller_ = true;
|
is_mac_ps3_controller_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // BA_ENABLE_SDL_JOYSTICKS
|
#else // BA_ENABLE_SDL_JOYSTICKS
|
||||||
throw Exception(); // Shouldn't happen.
|
throw Exception(); // Shouldn't happen.
|
||||||
#endif // BA_ENABLE_SDL_JOYSTICKS
|
#endif // BA_ENABLE_SDL_JOYSTICKS
|
||||||
|
|
||||||
|
|||||||
@ -1073,7 +1073,7 @@ auto Media::FindMediaFile(FileType type, const std::string& name)
|
|||||||
case FileType::kSound:
|
case FileType::kSound:
|
||||||
#if BA_HEADLESS_BUILD
|
#if BA_HEADLESS_BUILD
|
||||||
return "headless_dummy_path.sound";
|
return "headless_dummy_path.sound";
|
||||||
#else // BA_HEADLESS_BUILD
|
#else // BA_HEADLESS_BUILD
|
||||||
prefix = "audio/";
|
prefix = "audio/";
|
||||||
ext = ".ogg";
|
ext = ".ogg";
|
||||||
break;
|
break;
|
||||||
@ -1082,7 +1082,7 @@ auto Media::FindMediaFile(FileType type, const std::string& name)
|
|||||||
case FileType::kModel:
|
case FileType::kModel:
|
||||||
#if BA_HEADLESS_BUILD
|
#if BA_HEADLESS_BUILD
|
||||||
return "headless_dummy_path.model";
|
return "headless_dummy_path.model";
|
||||||
#else // BA_HEADLESS_BUILD
|
#else // BA_HEADLESS_BUILD
|
||||||
prefix = "models/";
|
prefix = "models/";
|
||||||
ext = ".bob";
|
ext = ".bob";
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -200,7 +200,7 @@ void SDLApp::HandleSDLEvent(const SDL_Event& event) {
|
|||||||
case SDL_WINDOWEVENT_SIZE_CHANGED: {
|
case SDL_WINDOWEVENT_SIZE_CHANGED: {
|
||||||
#if BA_OSTYPE_IOS_TVOS
|
#if BA_OSTYPE_IOS_TVOS
|
||||||
// Do nothing here currently.
|
// Do nothing here currently.
|
||||||
#else // Generic SDL:
|
#else // Generic SDL:
|
||||||
int pixels_x, pixels_y;
|
int pixels_x, pixels_y;
|
||||||
SDL_GL_GetDrawableSize(g_graphics_server->gl_context()->sdl_window(),
|
SDL_GL_GetDrawableSize(g_graphics_server->gl_context()->sdl_window(),
|
||||||
&pixels_x, &pixels_y);
|
&pixels_x, &pixels_y);
|
||||||
@ -220,7 +220,7 @@ void SDLApp::HandleSDLEvent(const SDL_Event& event) {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#else // BA_SDL2_BUILD
|
#else // BA_SDL2_BUILD
|
||||||
case SDL_VIDEORESIZE: {
|
case SDL_VIDEORESIZE: {
|
||||||
screen_dimensions_ = Vector2f(event.resize.w, event.resize.h);
|
screen_dimensions_ = Vector2f(event.resize.w, event.resize.h);
|
||||||
SetScreenResolution(event.resize.w, event.resize.h);
|
SetScreenResolution(event.resize.w, event.resize.h);
|
||||||
|
|||||||
@ -688,7 +688,7 @@ auto PyAndroidGetExternalStoragePath(PyObject* self, PyObject* args,
|
|||||||
assert(Utils::IsValidUTF8(path));
|
assert(Utils::IsValidUTF8(path));
|
||||||
return PyUnicode_FromString(path.c_str());
|
return PyUnicode_FromString(path.c_str());
|
||||||
}
|
}
|
||||||
#else // BA_OSTYPE_ANDROID
|
#else // BA_OSTYPE_ANDROID
|
||||||
throw Exception("Only valid on android.");
|
throw Exception("Only valid on android.");
|
||||||
#endif // BA_OSTYPE_ANDROID
|
#endif // BA_OSTYPE_ANDROID
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
|
|||||||
@ -127,7 +127,7 @@ auto Console::HandleKeyPress(const SDL_Keysym* keysym) -> bool {
|
|||||||
#if BA_SDL2_BUILD || BA_MINSDL_BUILD
|
#if BA_SDL2_BUILD || BA_MINSDL_BUILD
|
||||||
// (in SDL2/Non-SDL we dont' get chars from keypress events;
|
// (in SDL2/Non-SDL we dont' get chars from keypress events;
|
||||||
// they come through as text edit events)
|
// they come through as text edit events)
|
||||||
#else // BA_SDL2_BUILD
|
#else // BA_SDL2_BUILD
|
||||||
if (keysym->unicode < 0x80 && keysym->unicode > 0) {
|
if (keysym->unicode < 0x80 && keysym->unicode > 0) {
|
||||||
std::vector<uint32_t> unichars =
|
std::vector<uint32_t> unichars =
|
||||||
Utils::UnicodeFromUTF8(input_string_, "cjofrh0");
|
Utils::UnicodeFromUTF8(input_string_, "cjofrh0");
|
||||||
|
|||||||
@ -185,7 +185,7 @@ class ClrBase:
|
|||||||
SBWHT: ClassVar[str]
|
SBWHT: ClassVar[str]
|
||||||
|
|
||||||
|
|
||||||
class Clr1(ClrBase):
|
class ClrAlways(ClrBase):
|
||||||
"""Convenience class for color terminal output.
|
"""Convenience class for color terminal output.
|
||||||
|
|
||||||
This version has colors always enabled. Generally you should use Clr which
|
This version has colors always enabled. Generally you should use Clr which
|
||||||
@ -240,7 +240,7 @@ class Clr1(ClrBase):
|
|||||||
SBWHT = TerminalColor.STRONG_BG_WHITE.value
|
SBWHT = TerminalColor.STRONG_BG_WHITE.value
|
||||||
|
|
||||||
|
|
||||||
class Clr0(ClrBase):
|
class ClrNever(ClrBase):
|
||||||
"""Convenience class for color terminal output.
|
"""Convenience class for color terminal output.
|
||||||
|
|
||||||
This version has colors disabled. Generally you should use Clr which
|
This version has colors disabled. Generally you should use Clr which
|
||||||
@ -300,6 +300,6 @@ _color_enabled: bool = (True if _envval == '1' else
|
|||||||
False if _envval == '0' else _default_color_enabled())
|
False if _envval == '0' else _default_color_enabled())
|
||||||
Clr: Type[ClrBase]
|
Clr: Type[ClrBase]
|
||||||
if _color_enabled:
|
if _color_enabled:
|
||||||
Clr = Clr1
|
Clr = ClrAlways
|
||||||
else:
|
else:
|
||||||
Clr = Clr0
|
Clr = ClrNever
|
||||||
|
|||||||
@ -220,6 +220,7 @@ def build_android(rootdir: str, arch: str, debug: bool = False) -> None:
|
|||||||
|
|
||||||
(can be arm, arm64, x86, or x86_64)
|
(can be arm, arm64, x86, or x86_64)
|
||||||
"""
|
"""
|
||||||
|
# pylint: disable=too-many-statements
|
||||||
import subprocess
|
import subprocess
|
||||||
import platform
|
import platform
|
||||||
builddir = 'build/python_android_' + arch + ('_debug' if debug else '')
|
builddir = 'build/python_android_' + arch + ('_debug' if debug else '')
|
||||||
@ -246,7 +247,8 @@ def build_android(rootdir: str, arch: str, debug: bool = False) -> None:
|
|||||||
|
|
||||||
# Commit from Jan 8, 2020. Right after this, the build system was switched
|
# Commit from Jan 8, 2020. Right after this, the build system was switched
|
||||||
# a a completely new minimal one which will take some work to update here.
|
# a a completely new minimal one which will take some work to update here.
|
||||||
# Punting on that for now...
|
# Punting on that for now... (tentative plan is to try and adopt the new
|
||||||
|
# one when we update for Python 3.10 in a year or two).
|
||||||
if True: # pylint: disable=using-constant-test
|
if True: # pylint: disable=using-constant-test
|
||||||
run('git checkout 9adbcfaca37f40b7a86381f83f0f6af4187233ae')
|
run('git checkout 9adbcfaca37f40b7a86381f83f0f6af4187233ae')
|
||||||
ftxt = readfile('pybuild/env.py')
|
ftxt = readfile('pybuild/env.py')
|
||||||
@ -302,27 +304,37 @@ def build_android(rootdir: str, arch: str, debug: bool = False) -> None:
|
|||||||
|
|
||||||
writefile('pybuild/packages/python.py', ftxt)
|
writefile('pybuild/packages/python.py', ftxt)
|
||||||
|
|
||||||
# Set this to a particular cpython commit to target exact releases from git
|
# Set these to particular releases to use those.
|
||||||
# commit = 'd7c567b08f9d7d6aef21b881340a2b72731129db' # 3.7.7 release
|
# py_commit = '580fbb018fd0844806119614d752b41fc69660f9' # 3.8.5
|
||||||
# commit = '4b47a5b6ba66b02df9392feb97b8ead916f8c1fa' # 3.7.8 release
|
py_commit = '6503f05dd59e26a9986bdea097b3da9b3546f45b' # 3.8.7
|
||||||
commit = '580fbb018fd0844806119614d752b41fc69660f9' # 3.8.5
|
|
||||||
|
|
||||||
if commit is not None:
|
# cpython-source-deps stuff started failing for OpenSSL on Jan 8 2021.
|
||||||
ftxt = readfile('pybuild/source.py')
|
# Pinning it to an older one for now.
|
||||||
|
py_ssl_commit = '7f34c3085feb4692bbbb6c8b19d053ebc5049dad' # From 6/12/20
|
||||||
|
|
||||||
# Check out a particular commit right after the clone.
|
commit_lines = ''
|
||||||
ftxt = replace_one(
|
if py_commit is not None:
|
||||||
ftxt, "'git', 'clone', '--single-branch', '-b',"
|
commit_lines += (' if self.source_url == '
|
||||||
' self.branch, self.source_url, self.dest])',
|
"'https://github.com/python/cpython/':\n"
|
||||||
"'git', 'clone', '-b',"
|
" run_in_dir(['git', 'checkout', '" +
|
||||||
' self.branch, self.source_url, self.dest])\n'
|
py_commit + "'], self.source_dir)\n")
|
||||||
' # efro: hack to get the python we want.\n'
|
if py_ssl_commit is not None:
|
||||||
" print('DOING URL', self.source_url)\n"
|
commit_lines += (' if self.source_url == '
|
||||||
' if self.source_url == '
|
"'https://github.com/python/cpython-source-deps'"
|
||||||
"'https://github.com/python/cpython/':\n"
|
" and self.branch == 'openssl-1.1.1':\n"
|
||||||
" run_in_dir(['git', 'checkout', '" + commit +
|
" run_in_dir(['git', 'checkout', '" +
|
||||||
"'], self.source_dir)")
|
py_ssl_commit + "'], self.source_dir)\n")
|
||||||
writefile('pybuild/source.py', ftxt)
|
|
||||||
|
ftxt = readfile('pybuild/source.py')
|
||||||
|
|
||||||
|
# Check out a particular commit right after the clone.
|
||||||
|
ftxt = replace_one(
|
||||||
|
ftxt, "'git', 'clone', '--single-branch', '-b',"
|
||||||
|
' self.branch, self.source_url, self.dest])', "'git', 'clone', '-b',"
|
||||||
|
' self.branch, self.source_url, self.dest])\n'
|
||||||
|
' # efro: hack to get exact commits we want.\n'
|
||||||
|
" print('DOING URL', self.source_url)\n" + commit_lines)
|
||||||
|
writefile('pybuild/source.py', ftxt)
|
||||||
ftxt = readfile('pybuild/util.py')
|
ftxt = readfile('pybuild/util.py')
|
||||||
|
|
||||||
# Still don't wanna bother with gpg signing stuff.
|
# Still don't wanna bother with gpg signing stuff.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user