mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-03 14:03:18 +08:00
expanding staged dir setup t other cmake builds
This commit is contained in:
parent
c104d62078
commit
232fad6d9e
90
.efrocachemap
generated
90
.efrocachemap
generated
@ -4068,53 +4068,53 @@
|
|||||||
"build/assets/windows/Win32/ucrtbased.dll": "https://files.ballistica.net/cache/ba1/2d/ef/5335207d41b21b9823f6805997f1",
|
"build/assets/windows/Win32/ucrtbased.dll": "https://files.ballistica.net/cache/ba1/2d/ef/5335207d41b21b9823f6805997f1",
|
||||||
"build/assets/windows/Win32/vc_redist.x86.exe": "https://files.ballistica.net/cache/ba1/b0/8a/55e2e77623fe657bea24f223a3ae",
|
"build/assets/windows/Win32/vc_redist.x86.exe": "https://files.ballistica.net/cache/ba1/b0/8a/55e2e77623fe657bea24f223a3ae",
|
||||||
"build/assets/windows/Win32/vcruntime140d.dll": "https://files.ballistica.net/cache/ba1/86/5b/2af4d1e26a1a8073c89acb06e599",
|
"build/assets/windows/Win32/vcruntime140d.dll": "https://files.ballistica.net/cache/ba1/86/5b/2af4d1e26a1a8073c89acb06e599",
|
||||||
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/bb/c7/4ef93af038e8d0e78e6bbf2d8ccd",
|
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/43/bb/f3b6fb14420485630241bd274a38",
|
||||||
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/00/69/d9d791018f665d404d4a07f3b73f",
|
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/c4/3f/63320f9c16adcbd31b7b6cb319a7",
|
||||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/43/2d/00ead34e49771ecae25eee72a639",
|
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/5f/7d/b5487416ecf67311f555440eb0f7",
|
||||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/ab/41/21d782497286df6450d6e248bdf1",
|
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/94/26/f73beeec4e0aa810f6b53cf03b09",
|
||||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/80/6d/62ee994bd6ea597b57a456518ace",
|
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/c0/73/01d793d8bdac3cdcb283cff8926a",
|
||||||
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/da/82/493db6580f691ed32372644ecb49",
|
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/18/2e/991e4832cba394133a81a015d77c",
|
||||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/7e/cf/9c8f54e170da2e8b4303f61f0257",
|
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/ef/77/96846f61fd0d213103def1d52b29",
|
||||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/2f/d8/b3da2bf81c5a1d1388085caf840d",
|
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/05/e9/749f0b02f10682dc8fa53166f633",
|
||||||
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/9b/5f/1f6c7b07de1000c279a0702a83bf",
|
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/4d/2e/4d2c8b42b702472b771ff39fa172",
|
||||||
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/f3/6f/9d86182a6a4677cdc9fd9c1f7f19",
|
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/86/fe/2f8bfb8e724da409f22b169b45e0",
|
||||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/ec/fe/7fe44e1fefbb6325e466fb0278bc",
|
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/09/52/0357755448188a270c314cb87b15",
|
||||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/c7/db/2b3ca393aad03121e7fa5cccd604",
|
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/d0/be/2f53922bc6a539c39cf43f777537",
|
||||||
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/ac/fa/0ee96e9ab51427dd0a8eaaf55546",
|
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/23/df/36ebc5359eed5cff6b1c8e2d2b16",
|
||||||
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/64/fd/108739d12925982818c16e4f69cc",
|
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/e9/92/e2ca53a5a9ead72d55fde408c6f2",
|
||||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/ba/65/d557f47ec557ff66d5077278947d",
|
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/3d/36/e9d0ad1f63c2c4566ea3f26bea72",
|
||||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/5a/d2/fd994e6ab6ea8315b51db3cbb274",
|
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/39/8b/74a52274ca432a4aedda6341ca78",
|
||||||
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/ff/aa/390c8329a0a1245bb61b72cf607b",
|
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/a4/ee/be57b1e322c830df0bcd0591bf11",
|
||||||
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/eb/2d/9b7e35156943a56521ae9ad07bf0",
|
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/0e/6f/ab42d4dd63dc057445a8a97b29ea",
|
||||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/20/fe/7ee64a746e94fd32ac152ecb20b1",
|
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/51/a4/1635aa809982cb1df226e0db12ee",
|
||||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/12/ec/6115f93a4b254cf4fa82522ee10a",
|
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/fb/ec/5dcb24d613b2c0913123c9dfa5c9",
|
||||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/4e/69/3d3715ffb88e61962dff80e52fa0",
|
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/b3/a2/5da0c4dc65f469e4a476e0395eb5",
|
||||||
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/df/78/f138dbf92a93dcd647831fb8fde4",
|
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/a9/9a/adb83188f9c7d7b51dafd0f8b8a8",
|
||||||
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/4e/69/3d3715ffb88e61962dff80e52fa0",
|
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/b3/a2/5da0c4dc65f469e4a476e0395eb5",
|
||||||
"build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/df/78/f138dbf92a93dcd647831fb8fde4",
|
"build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/a9/9a/adb83188f9c7d7b51dafd0f8b8a8",
|
||||||
"build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/4d/45/84cd8d36933f680c4c5ea6ed56e3",
|
"build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/27/f4/269f5d37a8e3938c0acdab299833",
|
||||||
"build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/31/e8/ebc78517b4f6c3dba799d96b6770",
|
"build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/7b/f3/f98278c9654a972baf65d5f04c12",
|
||||||
"build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/4d/45/84cd8d36933f680c4c5ea6ed56e3",
|
"build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/27/f4/269f5d37a8e3938c0acdab299833",
|
||||||
"build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/31/e8/ebc78517b4f6c3dba799d96b6770",
|
"build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/7b/f3/f98278c9654a972baf65d5f04c12",
|
||||||
"build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/16/31/fa50eca4cccba5819aba7598cdd2",
|
"build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/c7/a2/40728a3ebfb3006c7a47b698214f",
|
||||||
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/80/f5/1e75ca051bcc9cf5622443368820",
|
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/84/19/a1bbbf42c50329f0cd1377d103bb",
|
||||||
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/16/31/fa50eca4cccba5819aba7598cdd2",
|
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/c7/a2/40728a3ebfb3006c7a47b698214f",
|
||||||
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/80/f5/1e75ca051bcc9cf5622443368820",
|
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/84/19/a1bbbf42c50329f0cd1377d103bb",
|
||||||
"build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/34/26/fe4dacd23b76a39c024e220a6851",
|
"build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/53/e4/455c68ee50813fe89e3002cf1fe8",
|
||||||
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/84/7d/952ba7e47c98635853b6b3e046fa",
|
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/59/fe/a3e369f2db87a305641e74ae70ab",
|
||||||
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/ad/de/141e3f5ea646f9d359a7edc40524",
|
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/be/df/60063a6845e8654958f1a3e37867",
|
||||||
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/84/7d/952ba7e47c98635853b6b3e046fa",
|
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "https://files.ballistica.net/cache/ba1/59/fe/a3e369f2db87a305641e74ae70ab",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/23/f5/0cd5ec1a07a88f1ce69ffe46bbb4",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/91/9a/8b2f4a2f0ffc38128512a7b77498",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/6b/b7/0f20ebfc4aa3ce82b614f7c8553e",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/4e/5f/96bad4aad35e8c50111a88bdca3c",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/47/a1/87cfabb76c5af6922b36cae8585b",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/bb/6a/85a98907597e4a2d2b312c0d2a1d",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/5f/67/ca0e32734c731f1c1b6383f56aac",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/2e/f7/0252c1e7f9edc0e55423dcf91953",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/f3/e0/56006952bb54b29d7e6e319baa06",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/f0/78/e5d8083aac564b5993aac16832bf",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/6a/fc/495578c6c0b4aea6b863be6dd367",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/10/e8/6abb7ac9d3425ddf295cf867e7eb",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/5b/6a/e888f3a56a6b2af2ed638046767a",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/16/5a/174c7c46187abc923655fda133ea",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/d8/9a/6df73bd62b784c8ce277e0c704b4",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/6d/f3/074bc3f3a466ca0dbec3b18acf76",
|
||||||
"src/assets/ba_data/python/babase/_mgen/__init__.py": "https://files.ballistica.net/cache/ba1/f8/85/fed7f2ed98ff2ba271f9dbe3391c",
|
"src/assets/ba_data/python/babase/_mgen/__init__.py": "https://files.ballistica.net/cache/ba1/f8/85/fed7f2ed98ff2ba271f9dbe3391c",
|
||||||
"src/assets/ba_data/python/babase/_mgen/enums.py": "https://files.ballistica.net/cache/ba1/f8/cd/3af311ac63147882590123b78318",
|
"src/assets/ba_data/python/babase/_mgen/enums.py": "https://files.ballistica.net/cache/ba1/f8/cd/3af311ac63147882590123b78318",
|
||||||
"src/ballistica/base/mgen/pyembed/binding_base.inc": "https://files.ballistica.net/cache/ba1/3e/7a/203e2a5d2b5bb42cfe3fd2fe16c2",
|
"src/ballistica/base/mgen/pyembed/binding_base.inc": "https://files.ballistica.net/cache/ba1/ee/dd/ad968b176000e31c65be6206a2bc",
|
||||||
"src/ballistica/base/mgen/pyembed/binding_base_app.inc": "https://files.ballistica.net/cache/ba1/c2/f2/cb8d052d76a1f4abe163cab2276e",
|
"src/ballistica/base/mgen/pyembed/binding_base_app.inc": "https://files.ballistica.net/cache/ba1/c2/f2/cb8d052d76a1f4abe163cab2276e",
|
||||||
"src/ballistica/classic/mgen/pyembed/binding_classic.inc": "https://files.ballistica.net/cache/ba1/3c/eb/412513963f0818ab39c58bf292e3",
|
"src/ballistica/classic/mgen/pyembed/binding_classic.inc": "https://files.ballistica.net/cache/ba1/3c/eb/412513963f0818ab39c58bf292e3",
|
||||||
"src/ballistica/core/mgen/pyembed/binding_core.inc": "https://files.ballistica.net/cache/ba1/9d/0a/3c9636138e35284923e0c8311c69",
|
"src/ballistica/core/mgen/pyembed/binding_core.inc": "https://files.ballistica.net/cache/ba1/9d/0a/3c9636138e35284923e0c8311c69",
|
||||||
|
|||||||
5
.idea/dictionaries/ericf.xml
generated
5
.idea/dictionaries/ericf.xml
generated
@ -538,8 +538,10 @@
|
|||||||
<w>cmodel</w>
|
<w>cmodel</w>
|
||||||
<w>cmodule</w>
|
<w>cmodule</w>
|
||||||
<w>cmodules</w>
|
<w>cmodules</w>
|
||||||
|
<w>cmpbd</w>
|
||||||
<w>cmpf</w>
|
<w>cmpf</w>
|
||||||
<w>cmplen</w>
|
<w>cmplen</w>
|
||||||
|
<w>cmpnf</w>
|
||||||
<w>cnode</w>
|
<w>cnode</w>
|
||||||
<w>codecsmodule</w>
|
<w>codecsmodule</w>
|
||||||
<w>codedata</w>
|
<w>codedata</w>
|
||||||
@ -1737,6 +1739,7 @@
|
|||||||
<w>maxw</w>
|
<w>maxw</w>
|
||||||
<w>maxwait</w>
|
<w>maxwait</w>
|
||||||
<w>maxwidth</w>
|
<w>maxwidth</w>
|
||||||
|
<w>mbname</w>
|
||||||
<w>mbstowcs</w>
|
<w>mbstowcs</w>
|
||||||
<w>mbytecount</w>
|
<w>mbytecount</w>
|
||||||
<w>mdiv</w>
|
<w>mdiv</w>
|
||||||
@ -1778,6 +1781,7 @@
|
|||||||
<w>miniplayer</w>
|
<w>miniplayer</w>
|
||||||
<w>minlog</w>
|
<w>minlog</w>
|
||||||
<w>minping</w>
|
<w>minping</w>
|
||||||
|
<w>minsizerel</w>
|
||||||
<w>minusbutton</w>
|
<w>minusbutton</w>
|
||||||
<w>minval</w>
|
<w>minval</w>
|
||||||
<w>minver</w>
|
<w>minver</w>
|
||||||
@ -2434,6 +2438,7 @@
|
|||||||
<w>reimported</w>
|
<w>reimported</w>
|
||||||
<w>relfut</w>
|
<w>relfut</w>
|
||||||
<w>relpath</w>
|
<w>relpath</w>
|
||||||
|
<w>relwithdebinfo</w>
|
||||||
<w>remainingchecks</w>
|
<w>remainingchecks</w>
|
||||||
<w>remoteapp</w>
|
<w>remoteapp</w>
|
||||||
<w>rendertarget</w>
|
<w>rendertarget</w>
|
||||||
|
|||||||
14
CHANGELOG.md
14
CHANGELOG.md
@ -1,4 +1,4 @@
|
|||||||
### 1.7.24 (build 21188, api 8, 2023-07-22)
|
### 1.7.24 (build 21195, api 8, 2023-07-25)
|
||||||
|
|
||||||
- Due to the cleanup done in 1.7.20, it is now possible to build and run
|
- Due to the cleanup done in 1.7.20, it is now possible to build and run
|
||||||
Ballistica as a 'pure' Python app consisting of binary Python modules loaded
|
Ballistica as a 'pure' Python app consisting of binary Python modules loaded
|
||||||
@ -11,6 +11,13 @@
|
|||||||
default for certain situations such as server builds or possibly Linux builds
|
default for certain situations such as server builds or possibly Linux builds
|
||||||
if it seems beneficial. We'll see. Modular mode should work on Linux and Mac
|
if it seems beneficial. We'll see. Modular mode should work on Linux and Mac
|
||||||
currently; other platforms remain monolithic-only for now.
|
currently; other platforms remain monolithic-only for now.
|
||||||
|
- Changed builds such as `cmake` and `cmake-server` to be more like the new
|
||||||
|
`cmake-monolithic` setup; there is now a `staged` dir that built binaries are
|
||||||
|
symlinked into instead of just dumping a `ba_data` into the cmake build dir.
|
||||||
|
This keeps things a bit cleaner with fewer build-related files interspersed
|
||||||
|
with the stuff that Ballistica expects to be there at runtime. This also
|
||||||
|
allows an elegant `-dist` flag to be used with the staging command to copy
|
||||||
|
files instead of symlinking them.
|
||||||
- Changed path wrangling a bit in baenv.py. All ballistica Python paths
|
- Changed path wrangling a bit in baenv.py. All ballistica Python paths
|
||||||
(including python-site-packages) are now placed before any other existing
|
(including python-site-packages) are now placed before any other existing
|
||||||
Python paths. This should provide a more consistent environment and means
|
Python paths. This should provide a more consistent environment and means
|
||||||
@ -29,11 +36,14 @@
|
|||||||
-win-Win32 -debug .`. Please holler if you run into any broken asset-staging
|
-win-Win32 -debug .`. Please holler if you run into any broken asset-staging
|
||||||
calls in the Makefile/etc.
|
calls in the Makefile/etc.
|
||||||
- `FeatureSet.has_native_python_module` has been renamed to
|
- `FeatureSet.has_native_python_module` has been renamed to
|
||||||
`FeatureSet.has_python_binary_module` for better consistency with related
|
`FeatureSet.has_python_binary_module` to be more consistently with related
|
||||||
functionality.
|
functionality.
|
||||||
- Renamed `stage_assets` to `stage_build` and the module it lives in from
|
- Renamed `stage_assets` to `stage_build` and the module it lives in from
|
||||||
`assetstaging` to simply `staging`. The staging stuff now covers more things
|
`assetstaging` to simply `staging`. The staging stuff now covers more things
|
||||||
than simply asset files so this is a more accurate name.
|
than simply asset files so this is a more accurate name.
|
||||||
|
- Added `babase.fatal_error()`. Mod code should generally never use this, but it
|
||||||
|
can be useful for core engine code to directly and clearly point out problems
|
||||||
|
that cannot be recovered from.
|
||||||
|
|
||||||
### 1.7.23 (build 21178, api 8, 2023-07-19)
|
### 1.7.23 (build 21178, api 8, 2023-07-19)
|
||||||
|
|
||||||
|
|||||||
32
Makefile
32
Makefile
@ -1005,29 +1005,32 @@ windows-clean-list:
|
|||||||
|
|
||||||
# Set the following from the command line to influence the build:
|
# Set the following from the command line to influence the build:
|
||||||
|
|
||||||
# This can be Debug or Release.
|
# This can be Debug, Release, RelWithDebInfo, or MinSizeRel.
|
||||||
CMAKE_BUILD_TYPE ?= Debug
|
CMAKE_BUILD_TYPE ?= Debug
|
||||||
|
|
||||||
# Build and run the cmake build.
|
# Build and run the cmake build.
|
||||||
cmake: cmake-build
|
cmake: cmake-build
|
||||||
@cd build/cmake/$(CM_BT_LC) && ./ballisticakit
|
@cd build/cmake/$(CM_BT_LC)/staged && ./ballisticakit
|
||||||
|
|
||||||
# Build and run the cmake build under the gdb debugger.
|
# Build and run the cmake build under the gdb debugger.
|
||||||
# Sets up the ballistica environment to do things like abort() out to the
|
# Sets up the ballistica environment to do things like abort() out to the
|
||||||
# debugger on errors instead of trying to cleanly exit.
|
# debugger on errors instead of trying to cleanly exit.
|
||||||
cmake-gdb: cmake-build
|
cmake-gdb: cmake-build
|
||||||
@cd build/cmake/$(CM_BT_LC) && BA_DEBUGGER_ATTACHED=1 gdb ./ballisticakit
|
@cd build/cmake/$(CM_BT_LC)/staged && \
|
||||||
|
BA_DEBUGGER_ATTACHED=1 gdb ./ballisticakit
|
||||||
|
|
||||||
# Build and run the cmake build under the lldb debugger.
|
# Build and run the cmake build under the lldb debugger.
|
||||||
# Sets up the ballistica environment to do things like abort() out to the
|
# Sets up the ballistica environment to do things like abort() out to the
|
||||||
# debugger on errors instead of trying to cleanly exit.
|
# debugger on errors instead of trying to cleanly exit.
|
||||||
cmake-lldb: cmake-build
|
cmake-lldb: cmake-build
|
||||||
@cd build/cmake/$(CM_BT_LC) && BA_DEBUGGER_ATTACHED=1 lldb ./ballisticakit
|
@cd build/cmake/$(CM_BT_LC)/staged && \
|
||||||
|
BA_DEBUGGER_ATTACHED=1 lldb ./ballisticakit
|
||||||
|
|
||||||
# Build but don't run it.
|
# Build but don't run it.
|
||||||
cmake-build: assets-cmake resources cmake-binary
|
cmake-build: assets-cmake resources cmake-binary
|
||||||
@$(STAGE_BUILD) -cmake -$(CM_BT_LC) build/cmake/$(CM_BT_LC)
|
@$(STAGE_BUILD) -cmake -$(CM_BT_LC) -builddir build/cmake/$(CM_BT_LC) \
|
||||||
@tools/pcommand echo BLD Build complete: BLU build/cmake/$(CM_BT_LC)
|
build/cmake/$(CM_BT_LC)/staged
|
||||||
|
@tools/pcommand echo BLD Build complete: BLU build/cmake/$(CM_BT_LC)/staged
|
||||||
|
|
||||||
cmake-binary: meta
|
cmake-binary: meta
|
||||||
@tools/pcommand cmake_prep_dir build/cmake/$(CM_BT_LC)
|
@tools/pcommand cmake_prep_dir build/cmake/$(CM_BT_LC)
|
||||||
@ -1041,21 +1044,22 @@ cmake-clean:
|
|||||||
rm -rf build/cmake/$(CM_BT_LC)
|
rm -rf build/cmake/$(CM_BT_LC)
|
||||||
|
|
||||||
cmake-server: cmake-server-build
|
cmake-server: cmake-server-build
|
||||||
@cd build/cmake/server-$(CM_BT_LC) && ./ballisticakit_server
|
@cd build/cmake/server-$(CM_BT_LC)/staged && ./ballisticakit_server
|
||||||
|
|
||||||
cmake-server-build: assets-server meta cmake-server-binary
|
cmake-server-build: assets-server meta cmake-server-binary
|
||||||
@$(STAGE_BUILD) -cmakeserver -$(CM_BT_LC) build/cmake/server-$(CM_BT_LC)
|
@$(STAGE_BUILD) -cmakeserver -$(CM_BT_LC) \
|
||||||
|
-builddir build/cmake/server-$(CM_BT_LC) \
|
||||||
|
build/cmake/server-$(CM_BT_LC)/staged
|
||||||
@tools/pcommand echo BLD \
|
@tools/pcommand echo BLD \
|
||||||
Server build complete: BLU build/cmake/server-$(CM_BT_LC)
|
Server build complete: BLU build/cmake/server-$(CM_BT_LC)/staged
|
||||||
|
|
||||||
cmake-server-binary: meta
|
cmake-server-binary: meta
|
||||||
@tools/pcommand cmake_prep_dir build/cmake/server-$(CM_BT_LC)/dist
|
@tools/pcommand cmake_prep_dir build/cmake/server-$(CM_BT_LC)
|
||||||
@cd build/cmake/server-$(CM_BT_LC)/dist && test -f Makefile \
|
@cd build/cmake/server-$(CM_BT_LC) && test -f Makefile \
|
||||||
|| cmake -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) -DHEADLESS=true \
|
|| cmake -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) -DHEADLESS=true \
|
||||||
$(shell pwd)/ballisticakit-cmake
|
$(shell pwd)/ballisticakit-cmake
|
||||||
@tools/pcommand update_cmake_prefab_lib server $(CM_BT_LC) build/cmake/server-$(CM_BT_LC)/dist
|
@tools/pcommand update_cmake_prefab_lib server $(CM_BT_LC) build/cmake/server-$(CM_BT_LC)
|
||||||
@cd build/cmake/server-$(CM_BT_LC)/dist && $(MAKE) -j$(CPUS) \
|
@cd build/cmake/server-$(CM_BT_LC) && $(MAKE) -j$(CPUS) ballisticakitbin
|
||||||
ballisticakitbin
|
|
||||||
|
|
||||||
cmake-server-clean:
|
cmake-server-clean:
|
||||||
rm -rf build/cmake/server-$(CM_BT_LC)
|
rm -rf build/cmake/server-$(CM_BT_LC)
|
||||||
|
|||||||
5
ballisticakit-cmake/.idea/dictionaries/ericf.xml
generated
5
ballisticakit-cmake/.idea/dictionaries/ericf.xml
generated
@ -337,7 +337,9 @@
|
|||||||
<w>cmesh</w>
|
<w>cmesh</w>
|
||||||
<w>cmodule</w>
|
<w>cmodule</w>
|
||||||
<w>cmodules</w>
|
<w>cmodules</w>
|
||||||
|
<w>cmpbd</w>
|
||||||
<w>cmplen</w>
|
<w>cmplen</w>
|
||||||
|
<w>cmpnf</w>
|
||||||
<w>codedata</w>
|
<w>codedata</w>
|
||||||
<w>codewarrior</w>
|
<w>codewarrior</w>
|
||||||
<w>codewarrior's</w>
|
<w>codewarrior's</w>
|
||||||
@ -1014,6 +1016,7 @@
|
|||||||
<w>maxtries</w>
|
<w>maxtries</w>
|
||||||
<w>maxwait</w>
|
<w>maxwait</w>
|
||||||
<w>maxwidth</w>
|
<w>maxwidth</w>
|
||||||
|
<w>mbname</w>
|
||||||
<w>mbstowcs</w>
|
<w>mbstowcs</w>
|
||||||
<w>mdpath</w>
|
<w>mdpath</w>
|
||||||
<w>mediump</w>
|
<w>mediump</w>
|
||||||
@ -1042,6 +1045,7 @@
|
|||||||
<w>minlog</w>
|
<w>minlog</w>
|
||||||
<w>minping</w>
|
<w>minping</w>
|
||||||
<w>minsdl</w>
|
<w>minsdl</w>
|
||||||
|
<w>minsizerel</w>
|
||||||
<w>mipmapcount</w>
|
<w>mipmapcount</w>
|
||||||
<w>mipmaps</w>
|
<w>mipmaps</w>
|
||||||
<w>mkflags</w>
|
<w>mkflags</w>
|
||||||
@ -1435,6 +1439,7 @@
|
|||||||
<w>reimported</w>
|
<w>reimported</w>
|
||||||
<w>relfut</w>
|
<w>relfut</w>
|
||||||
<w>reloadmedia</w>
|
<w>reloadmedia</w>
|
||||||
|
<w>relwithdebinfo</w>
|
||||||
<w>rendererdata</w>
|
<w>rendererdata</w>
|
||||||
<w>rendertarget</w>
|
<w>rendertarget</w>
|
||||||
<w>renormalize</w>
|
<w>renormalize</w>
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="ballisticakit" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="BallisticaKit" TARGET_NAME="ballisticakit" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="BallisticaKit" RUN_TARGET_NAME="ballisticakit">
|
|
||||||
<method v="2">
|
|
||||||
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
|
|
||||||
</method>
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
||||||
@ -5,8 +5,11 @@
|
|||||||
((c++-mode (eval . (flycheck-mode)))
|
((c++-mode (eval . (flycheck-mode)))
|
||||||
|
|
||||||
|
|
||||||
(python-mode (jedi:server-args . ("--sys-path" "__EFRO_PROJECT_ROOT__/tools"
|
(python-ts-mode (jedi:server-args . ("--sys-path" "__EFRO_PROJECT_ROOT__/tools"
|
||||||
"--sys-path" "__EFRO_PROJECT_ROOT__/src/assets/ba_data/python"))
|
"--sys-path" "__EFRO_PROJECT_ROOT__/src/assets/ba_data/python"
|
||||||
|
"--sys-path" "__EFRO_PROJECT_ROOT__/build/dummymodules"
|
||||||
|
;; "--log-level" "DEBUG" "--log" "/Users/ericf/Desktop/jedilog"
|
||||||
|
))
|
||||||
(python-black-extra-args . __PYTHON_BLACK_EXTRA_ARGS__))
|
(python-black-extra-args . __PYTHON_BLACK_EXTRA_ARGS__))
|
||||||
|
|
||||||
;; Shorter name in projectile status bar to save valuable space.
|
;; Shorter name in projectile status bar to save valuable space.
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
# Released under the MIT License. See LICENSE for details.
|
# Released under the MIT License. See LICENSE for details.
|
||||||
#
|
#
|
||||||
"""Common shared ballistica components.
|
"""Common shared Ballistica components.
|
||||||
|
|
||||||
Often this package does not need to be used directly. Instead one can
|
For modding purposes, this package should generally not be used directly.
|
||||||
use versioned packages such as bascenev1 or bauiv1 which reexpose a more
|
Instead one should use purpose-built packages such as bascenev1 or bauiv1
|
||||||
focused set of the stuff contained here.
|
which themselves import various functionality from here and reexpose it in
|
||||||
|
a more focused way.
|
||||||
"""
|
"""
|
||||||
# pylint: disable=redefined-builtin
|
# pylint: disable=redefined-builtin
|
||||||
|
|
||||||
@ -38,6 +39,7 @@ from _babase import (
|
|||||||
do_once,
|
do_once,
|
||||||
env,
|
env,
|
||||||
fade_screen,
|
fade_screen,
|
||||||
|
fatal_error,
|
||||||
get_display_resolution,
|
get_display_resolution,
|
||||||
get_low_level_config_value,
|
get_low_level_config_value,
|
||||||
get_max_graphics_quality,
|
get_max_graphics_quality,
|
||||||
@ -199,6 +201,7 @@ __all__ = [
|
|||||||
'Existable',
|
'Existable',
|
||||||
'existing',
|
'existing',
|
||||||
'fade_screen',
|
'fade_screen',
|
||||||
|
'fatal_error',
|
||||||
'garbage_collect',
|
'garbage_collect',
|
||||||
'get_display_resolution',
|
'get_display_resolution',
|
||||||
'get_ip_address_type',
|
'get_ip_address_type',
|
||||||
|
|||||||
@ -443,42 +443,3 @@ class AppHealthMonitor(AppSubsystem):
|
|||||||
def on_app_resume(self) -> None:
|
def on_app_resume(self) -> None:
|
||||||
assert _babase.in_logic_thread()
|
assert _babase.in_logic_thread()
|
||||||
self._running = True
|
self._running = True
|
||||||
|
|
||||||
|
|
||||||
def on_too_many_file_descriptors() -> None:
|
|
||||||
"""Called when too many file descriptors are open; trying to debug."""
|
|
||||||
|
|
||||||
real_time = _babase.apptime()
|
|
||||||
|
|
||||||
def _do_log() -> None:
|
|
||||||
pid = os.getpid()
|
|
||||||
try:
|
|
||||||
fdcount: int | str = len(os.listdir(f'/proc/{pid}/fd'))
|
|
||||||
except Exception as exc:
|
|
||||||
fdcount = f'? ({exc})'
|
|
||||||
logging.warning(
|
|
||||||
'TOO MANY FDS at %.2f. We are pid %d. FDCount is %s.',
|
|
||||||
real_time,
|
|
||||||
pid,
|
|
||||||
fdcount,
|
|
||||||
)
|
|
||||||
|
|
||||||
Thread(target=_do_log, daemon=True).start()
|
|
||||||
|
|
||||||
# import io
|
|
||||||
# from efro.debug import printtypes
|
|
||||||
|
|
||||||
# with io.StringIO() as fstr:
|
|
||||||
# fstr.write('Too many FDs.\n')
|
|
||||||
# printtypes(file=fstr)
|
|
||||||
# fstr.seek(0)
|
|
||||||
# logging.warning(fstr.read())
|
|
||||||
# import socket
|
|
||||||
|
|
||||||
# objs: list[Any] = []
|
|
||||||
# for obj in gc.get_objects():
|
|
||||||
# if isinstance(obj, socket.socket):
|
|
||||||
# objs.append(obj)
|
|
||||||
# test = open('/Users/ericf/.zshrc', 'r', encoding='utf-8')
|
|
||||||
# reveal_type(test)
|
|
||||||
# print('FOUND', len(objs))
|
|
||||||
|
|||||||
@ -19,7 +19,12 @@ _g_babase_app_started = False # pylint: disable=invalid-name
|
|||||||
|
|
||||||
|
|
||||||
def on_native_module_import() -> None:
|
def on_native_module_import() -> None:
|
||||||
"""Called by _babase when it is imported; does some sanity checking/etc."""
|
"""Called when _babase is being imported.
|
||||||
|
|
||||||
|
This code should do as little as possible; we want to defer all
|
||||||
|
environment modifications until we actually commit to running an
|
||||||
|
app.
|
||||||
|
"""
|
||||||
import _babase
|
import _babase
|
||||||
import baenv
|
import baenv
|
||||||
|
|
||||||
@ -28,7 +33,8 @@ def on_native_module_import() -> None:
|
|||||||
assert not _g_babase_imported
|
assert not _g_babase_imported
|
||||||
_g_babase_imported = True
|
_g_babase_imported = True
|
||||||
|
|
||||||
# If we have a log_handler set up, wire it up to feed _babase its output.
|
# If we have a log_handler set up, wire it up to feed _babase its
|
||||||
|
# output.
|
||||||
envconfig = baenv.get_config()
|
envconfig = baenv.get_config()
|
||||||
if envconfig.log_handler is not None:
|
if envconfig.log_handler is not None:
|
||||||
_feed_logs_to_babase(envconfig.log_handler)
|
_feed_logs_to_babase(envconfig.log_handler)
|
||||||
@ -63,8 +69,13 @@ def on_native_module_import() -> None:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def setup_env_for_app_run() -> None:
|
def on_main_thread_start_app() -> None:
|
||||||
"""Set stuff such as interrupt handlers for a run of the app."""
|
"""Called in the main thread when we're starting an app.
|
||||||
|
|
||||||
|
We use this opportunity to set up the Python runtime environment
|
||||||
|
as we like it for running our app stuff. This includes things like
|
||||||
|
signal-handling, garbage-collection, and logging.
|
||||||
|
"""
|
||||||
import gc
|
import gc
|
||||||
import baenv
|
import baenv
|
||||||
import _babase
|
import _babase
|
||||||
@ -145,7 +156,7 @@ def on_app_launching() -> None:
|
|||||||
|
|
||||||
assert _babase.in_logic_thread()
|
assert _babase.in_logic_thread()
|
||||||
|
|
||||||
# Let the user know if the app python dir is a custom one.
|
# Let the user know if the app Python dir is a custom one.
|
||||||
user_sys_scripts_dir = baenv.get_user_system_scripts_dir()
|
user_sys_scripts_dir = baenv.get_user_system_scripts_dir()
|
||||||
if user_sys_scripts_dir is not None:
|
if user_sys_scripts_dir is not None:
|
||||||
_babase.screenmessage(
|
_babase.screenmessage(
|
||||||
|
|||||||
@ -149,16 +149,6 @@ def purchase_already_in_progress_error() -> None:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def gear_vr_controller_warning() -> None:
|
|
||||||
from babase._language import Lstr
|
|
||||||
|
|
||||||
if not _babase.app.headless_mode:
|
|
||||||
_babase.getsimplesound('error').play()
|
|
||||||
_babase.screenmessage(
|
|
||||||
Lstr(resource='usesExternalControllerText'), color=(1, 0, 0)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def uuid_str() -> str:
|
def uuid_str() -> str:
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
@ -249,12 +239,6 @@ def set_last_ad_network(sval: str) -> None:
|
|||||||
_babase.app.classic.ads.last_ad_network_set_time = time.time()
|
_babase.app.classic.ads.last_ad_network_set_time = time.time()
|
||||||
|
|
||||||
|
|
||||||
def no_game_circle_message() -> None:
|
|
||||||
from babase._language import Lstr
|
|
||||||
|
|
||||||
_babase.screenmessage(Lstr(resource='noGameCircleText'), color=(1, 0, 0))
|
|
||||||
|
|
||||||
|
|
||||||
def google_play_purchases_not_available_message() -> None:
|
def google_play_purchases_not_available_message() -> None:
|
||||||
from babase._language import Lstr
|
from babase._language import Lstr
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
# Build number and version of the ballistica binary we expect to be
|
# Build number and version of the ballistica binary we expect to be
|
||||||
# using.
|
# using.
|
||||||
TARGET_BALLISTICA_BUILD = 21188
|
TARGET_BALLISTICA_BUILD = 21195
|
||||||
TARGET_BALLISTICA_VERSION = '1.7.24'
|
TARGET_BALLISTICA_VERSION = '1.7.24'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -133,7 +133,6 @@ void NetworkReader::DoSelect(bool* can_read_4, bool* can_read_6) {
|
|||||||
// Try to get a clean error instead of a crash if we exceed our
|
// Try to get a clean error instead of a crash if we exceed our
|
||||||
// open file descriptor limit (except on windows where FD_SETSIZE
|
// open file descriptor limit (except on windows where FD_SETSIZE
|
||||||
// is apparently a dummy value).
|
// is apparently a dummy value).
|
||||||
CheckFDThreshold(sd4_);
|
|
||||||
if (sd4_ < 0 || sd4_ >= FD_SETSIZE) {
|
if (sd4_ < 0 || sd4_ >= FD_SETSIZE) {
|
||||||
FatalError("Socket/File Descriptor Overflow (sd4="
|
FatalError("Socket/File Descriptor Overflow (sd4="
|
||||||
+ std::to_string(sd4_) + ", FD_SETSIZE="
|
+ std::to_string(sd4_) + ", FD_SETSIZE="
|
||||||
@ -148,7 +147,6 @@ void NetworkReader::DoSelect(bool* can_read_4, bool* can_read_6) {
|
|||||||
// Try to get a clean error instead of a crash if we exceed our
|
// Try to get a clean error instead of a crash if we exceed our
|
||||||
// open file descriptor limit (except on windows where FD_SETSIZE
|
// open file descriptor limit (except on windows where FD_SETSIZE
|
||||||
// is apparently a dummy value).
|
// is apparently a dummy value).
|
||||||
CheckFDThreshold(sd6_);
|
|
||||||
if (sd6_ < 0 || sd6_ >= FD_SETSIZE) {
|
if (sd6_ < 0 || sd6_ >= FD_SETSIZE) {
|
||||||
FatalError("Socket/File Descriptor Overflow (sd6="
|
FatalError("Socket/File Descriptor Overflow (sd6="
|
||||||
+ std::to_string(sd6_) + ", FD_SETSIZE="
|
+ std::to_string(sd6_) + ", FD_SETSIZE="
|
||||||
@ -174,27 +172,6 @@ void NetworkReader::DoSelect(bool* can_read_4, bool* can_read_6) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NetworkReader::CheckFDThreshold(int val) {
|
|
||||||
if (passed_fd_threshold_) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Let's trigger when we pass 2/3 of the FD limit.
|
|
||||||
if (val < FD_SETSIZE * 2 / 3) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If we pass the threshold, do a one-time dump of info
|
|
||||||
// to try and debug it.
|
|
||||||
passed_fd_threshold_ = true;
|
|
||||||
g_base->logic->event_loop()->PushCall([] {
|
|
||||||
assert(g_base->InLogicThread());
|
|
||||||
g_base->python->objs()
|
|
||||||
.Get(BasePython::ObjID::kOnTooManyFileDescriptorsCall)
|
|
||||||
.Call();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
auto NetworkReader::RunThread() -> int {
|
auto NetworkReader::RunThread() -> int {
|
||||||
if (!g_core->HeadlessMode()) {
|
if (!g_core->HeadlessMode()) {
|
||||||
remote_server_ = std::make_unique<RemoteAppServer>();
|
remote_server_ = std::make_unique<RemoteAppServer>();
|
||||||
|
|||||||
@ -33,7 +33,6 @@ class NetworkReader {
|
|||||||
auto sd6() const { return sd6_; }
|
auto sd6() const { return sd6_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CheckFDThreshold(int val);
|
|
||||||
void DoSelect(bool* can_read_4, bool* can_read_6);
|
void DoSelect(bool* can_read_4, bool* can_read_6);
|
||||||
void DoPoll(bool* can_read_4, bool* can_read_6);
|
void DoPoll(bool* can_read_4, bool* can_read_6);
|
||||||
void OpenSockets();
|
void OpenSockets();
|
||||||
|
|||||||
@ -136,10 +136,10 @@ void BasePython::OnMainThreadStartApp() {
|
|||||||
auto gil{Python::ScopedInterpreterLock()};
|
auto gil{Python::ScopedInterpreterLock()};
|
||||||
// Set up some env stuff (interrupt handlers, etc.)
|
// Set up some env stuff (interrupt handlers, etc.)
|
||||||
auto result = g_base->python->objs()
|
auto result = g_base->python->objs()
|
||||||
.Get(BasePython::ObjID::kSetupEnvForAppRunCall)
|
.Get(BasePython::ObjID::kOnMainThreadStartAppCall)
|
||||||
.Call();
|
.Call();
|
||||||
if (!result.Exists()) {
|
if (!result.Exists()) {
|
||||||
FatalError("babase._env.setup_env_for_app_run() failed.");
|
FatalError("babase._env.on_main_thread_start_app() failed.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,6 @@ class BasePython {
|
|||||||
kErrorMessageCall,
|
kErrorMessageCall,
|
||||||
kPurchaseNotValidErrorCall,
|
kPurchaseNotValidErrorCall,
|
||||||
kPurchaseAlreadyInProgressErrorCall,
|
kPurchaseAlreadyInProgressErrorCall,
|
||||||
kGearVRControllerWarningCall,
|
|
||||||
kVROrientationResetCBMessageCall,
|
kVROrientationResetCBMessageCall,
|
||||||
kVROrientationResetMessageCall,
|
kVROrientationResetMessageCall,
|
||||||
kHandleV1CloudLogCall,
|
kHandleV1CloudLogCall,
|
||||||
@ -62,7 +61,6 @@ class BasePython {
|
|||||||
kDismissWiiRemotesWindowCall,
|
kDismissWiiRemotesWindowCall,
|
||||||
kUnavailableMessageCall,
|
kUnavailableMessageCall,
|
||||||
kSetLastAdNetworkCall,
|
kSetLastAdNetworkCall,
|
||||||
kNoGameCircleMessageCall,
|
|
||||||
kGooglePlayPurchasesNotAvailableMessageCall,
|
kGooglePlayPurchasesNotAvailableMessageCall,
|
||||||
kGooglePlayServicesNotAvailableMessageCall,
|
kGooglePlayServicesNotAvailableMessageCall,
|
||||||
kEmptyCall,
|
kEmptyCall,
|
||||||
@ -98,11 +96,10 @@ class BasePython {
|
|||||||
kImplicitSignInCall,
|
kImplicitSignInCall,
|
||||||
kImplicitSignOutCall,
|
kImplicitSignOutCall,
|
||||||
kLoginAdapterGetSignInTokenResponseCall,
|
kLoginAdapterGetSignInTokenResponseCall,
|
||||||
kOnTooManyFileDescriptorsCall,
|
|
||||||
kPreEnv,
|
kPreEnv,
|
||||||
kOpenURLWithWebBrowserModuleCall,
|
kOpenURLWithWebBrowserModuleCall,
|
||||||
kOnNativeModuleImportCall,
|
kOnNativeModuleImportCall,
|
||||||
kSetupEnvForAppRunCall,
|
kOnMainThreadStartAppCall,
|
||||||
kPushApplyAppConfigCall,
|
kPushApplyAppConfigCall,
|
||||||
kLast // Sentinel; must be at end.
|
kLast // Sentinel; must be at end.
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1254,31 +1254,6 @@ static PyMethodDef PyAndroidGetExternalFilesDirDef = {
|
|||||||
|
|
||||||
#pragma clang diagnostic pop
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
// --------------------- android_show_wifi_settings ----------------------------
|
|
||||||
|
|
||||||
static auto PyAndroidShowWifiSettings(PyObject* self, PyObject* args,
|
|
||||||
PyObject* keywds) -> PyObject* {
|
|
||||||
BA_PYTHON_TRY;
|
|
||||||
static const char* kwlist[] = {nullptr};
|
|
||||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "",
|
|
||||||
const_cast<char**>(kwlist))) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
g_core->platform->AndroidShowWifiSettings();
|
|
||||||
Py_RETURN_NONE;
|
|
||||||
BA_PYTHON_CATCH;
|
|
||||||
}
|
|
||||||
|
|
||||||
static PyMethodDef PyAndroidShowWifiSettingsDef = {
|
|
||||||
"android_show_wifi_settings", // name
|
|
||||||
(PyCFunction)PyAndroidShowWifiSettings, // method
|
|
||||||
METH_VARARGS | METH_KEYWORDS, // flags
|
|
||||||
|
|
||||||
"android_show_wifi_settings() -> None\n"
|
|
||||||
"\n"
|
|
||||||
"(internal)",
|
|
||||||
};
|
|
||||||
|
|
||||||
// ------------------------------- do_once -------------------------------------
|
// ------------------------------- do_once -------------------------------------
|
||||||
|
|
||||||
static auto PyDoOnce(PyObject* self, PyObject* args, PyObject* keywds)
|
static auto PyDoOnce(PyObject* self, PyObject* args, PyObject* keywds)
|
||||||
@ -1445,6 +1420,36 @@ static PyMethodDef PyOpenDirExternallyDef = {
|
|||||||
"Open the provided dir in the default external app.",
|
"Open the provided dir in the default external app.",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// ----------------------------- fatal_error -----------------------------------
|
||||||
|
|
||||||
|
static auto PyFatalError(PyObject* self, PyObject* args, PyObject* keywds)
|
||||||
|
-> PyObject* {
|
||||||
|
BA_PYTHON_TRY;
|
||||||
|
const char* message;
|
||||||
|
static const char* kwlist[] = {"message", nullptr};
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, keywds, "s",
|
||||||
|
const_cast<char**>(kwlist), &message)) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
FatalError(message);
|
||||||
|
Py_RETURN_NONE;
|
||||||
|
BA_PYTHON_CATCH;
|
||||||
|
}
|
||||||
|
|
||||||
|
static PyMethodDef PyFatalErrorDef = {
|
||||||
|
"fatal_error", // name
|
||||||
|
(PyCFunction)PyFatalError, // method
|
||||||
|
METH_VARARGS | METH_KEYWORDS, // flags
|
||||||
|
|
||||||
|
"fatal_error(message: str) -> None\n"
|
||||||
|
"\n"
|
||||||
|
"Trigger a fatal error. Use this in situations where it is not possible\n"
|
||||||
|
"for the engine to continue on in a useful way. This can sometimes\n"
|
||||||
|
"help provide more clear information at the exact source of a problem\n"
|
||||||
|
"as compared to raising an Exception. In the vast majority of cases,\n"
|
||||||
|
"however, Exceptions should be preferred.",
|
||||||
|
};
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
auto PythonMethodsMisc::GetMethods() -> std::vector<PyMethodDef> {
|
auto PythonMethodsMisc::GetMethods() -> std::vector<PyMethodDef> {
|
||||||
@ -1456,7 +1461,6 @@ auto PythonMethodsMisc::GetMethods() -> std::vector<PyMethodDef> {
|
|||||||
PyDoOnceDef,
|
PyDoOnceDef,
|
||||||
PyGetAppDef,
|
PyGetAppDef,
|
||||||
PyAndroidGetExternalFilesDirDef,
|
PyAndroidGetExternalFilesDirDef,
|
||||||
PyAndroidShowWifiSettingsDef,
|
|
||||||
PySetInternalLanguageKeysDef,
|
PySetInternalLanguageKeysDef,
|
||||||
PySetAnalyticsScreenDef,
|
PySetAnalyticsScreenDef,
|
||||||
PyLoginAdapterGetSignInTokenDef,
|
PyLoginAdapterGetSignInTokenDef,
|
||||||
@ -1500,6 +1504,7 @@ auto PythonMethodsMisc::GetMethods() -> std::vector<PyMethodDef> {
|
|||||||
PyHasTouchScreenDef,
|
PyHasTouchScreenDef,
|
||||||
PyNativeStackTraceDef,
|
PyNativeStackTraceDef,
|
||||||
PyOpenDirExternallyDef,
|
PyOpenDirExternallyDef,
|
||||||
|
PyFatalErrorDef,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -489,6 +489,8 @@ auto CorePlatform::IsRunningOnDesktop() -> bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CorePlatform::SleepMillisecs(millisecs_t ms) {
|
void CorePlatform::SleepMillisecs(millisecs_t ms) {
|
||||||
|
// If we're holding the Python GIL, release it while we sleep.
|
||||||
|
Python::ScopedInterpreterLockRelease release;
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(ms));
|
std::this_thread::sleep_for(std::chrono::milliseconds(ms));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -851,10 +853,6 @@ void CorePlatform::SignOutV1() {
|
|||||||
Log(LogLevel::kError, "SignOutV1() unimplemented");
|
Log(LogLevel::kError, "SignOutV1() unimplemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CorePlatform::AndroidShowWifiSettings() {
|
|
||||||
Log(LogLevel::kError, "AndroidShowWifiSettings() unimplemented");
|
|
||||||
}
|
|
||||||
|
|
||||||
void CorePlatform::SetHardwareCursorVisible(bool visible) {
|
void CorePlatform::SetHardwareCursorVisible(bool visible) {
|
||||||
// FIXME: Forward this to app?..
|
// FIXME: Forward this to app?..
|
||||||
#if BA_SDL_BUILD
|
#if BA_SDL_BUILD
|
||||||
|
|||||||
@ -248,7 +248,6 @@ class CorePlatform {
|
|||||||
virtual void AndroidShowAppInvite(const std::string& title,
|
virtual void AndroidShowAppInvite(const std::string& title,
|
||||||
const std::string& message,
|
const std::string& message,
|
||||||
const std::string& code);
|
const std::string& code);
|
||||||
virtual void AndroidShowWifiSettings();
|
|
||||||
virtual auto AndroidGetExternalFilesDir() -> std::string;
|
virtual auto AndroidGetExternalFilesDir() -> std::string;
|
||||||
|
|
||||||
#pragma mark PERMISSIONS -------------------------------------------------------
|
#pragma mark PERMISSIONS -------------------------------------------------------
|
||||||
|
|||||||
@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int {
|
|||||||
namespace ballistica {
|
namespace ballistica {
|
||||||
|
|
||||||
// These are set automatically via script; don't modify them here.
|
// These are set automatically via script; don't modify them here.
|
||||||
const int kEngineBuildNumber = 21188;
|
const int kEngineBuildNumber = 21195;
|
||||||
const char* kEngineVersion = "1.7.24";
|
const char* kEngineVersion = "1.7.24";
|
||||||
|
|
||||||
#if BA_MONOLITHIC_BUILD
|
#if BA_MONOLITHIC_BUILD
|
||||||
|
|||||||
@ -399,16 +399,21 @@ Python::ScopedInterpreterLock::~ScopedInterpreterLock() { delete impl_; }
|
|||||||
class Python::ScopedInterpreterLockRelease::Impl {
|
class Python::ScopedInterpreterLockRelease::Impl {
|
||||||
public:
|
public:
|
||||||
Impl() {
|
Impl() {
|
||||||
assert(HaveGIL());
|
had_gil_ = HaveGIL();
|
||||||
// Release the GIL.
|
if (had_gil_) {
|
||||||
thread_state_ = PyEval_SaveThread();
|
// Release the GIL.
|
||||||
|
thread_state_ = PyEval_SaveThread();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
~Impl() {
|
~Impl() {
|
||||||
// Restore the GIL.
|
if (had_gil_) {
|
||||||
PyEval_RestoreThread(thread_state_);
|
// Restore the GIL.
|
||||||
|
PyEval_RestoreThread(thread_state_);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool had_gil_{};
|
||||||
PyThreadState* thread_state_{};
|
PyThreadState* thread_state_{};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -55,8 +55,8 @@ class Python {
|
|||||||
Impl* impl_{};
|
Impl* impl_{};
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Use this for cases where we *do* hold the GIL but want to release
|
/// Use this for cases where, if we *do* hold the Python GIL, we want to
|
||||||
/// it for some operation.
|
/// temporarily release it.
|
||||||
class ScopedInterpreterLockRelease {
|
class ScopedInterpreterLockRelease {
|
||||||
public:
|
public:
|
||||||
ScopedInterpreterLockRelease();
|
ScopedInterpreterLockRelease();
|
||||||
|
|||||||
@ -31,7 +31,6 @@ values = [
|
|||||||
_hooks.error_message, # kErrorMessageCall
|
_hooks.error_message, # kErrorMessageCall
|
||||||
_hooks.purchase_not_valid_error, # kPurchaseNotValidErrorCall
|
_hooks.purchase_not_valid_error, # kPurchaseNotValidErrorCall
|
||||||
_hooks.purchase_already_in_progress_error, # kPurchaseAlreadyInProgressErrorCall
|
_hooks.purchase_already_in_progress_error, # kPurchaseAlreadyInProgressErrorCall
|
||||||
_hooks.gear_vr_controller_warning, # kGearVRControllerWarningCall
|
|
||||||
_hooks.orientation_reset_cb_message, # kVROrientationResetCBMessageCall
|
_hooks.orientation_reset_cb_message, # kVROrientationResetCBMessageCall
|
||||||
_hooks.orientation_reset_message, # kVROrientationResetMessageCall
|
_hooks.orientation_reset_message, # kVROrientationResetMessageCall
|
||||||
_apputils.handle_v1_cloud_log, # kHandleV1CloudLogCall
|
_apputils.handle_v1_cloud_log, # kHandleV1CloudLogCall
|
||||||
@ -44,7 +43,6 @@ values = [
|
|||||||
_hooks.purchases_restored_message, # kPurchasesRestoredMessageCall
|
_hooks.purchases_restored_message, # kPurchasesRestoredMessageCall
|
||||||
_hooks.unavailable_message, # kUnavailableMessageCall
|
_hooks.unavailable_message, # kUnavailableMessageCall
|
||||||
_hooks.set_last_ad_network, # kSetLastAdNetworkCall
|
_hooks.set_last_ad_network, # kSetLastAdNetworkCall
|
||||||
_hooks.no_game_circle_message, # kNoGameCircleMessageCall
|
|
||||||
_hooks.google_play_purchases_not_available_message, # kGooglePlayPurchasesNotAvailableMessageCall
|
_hooks.google_play_purchases_not_available_message, # kGooglePlayPurchasesNotAvailableMessageCall
|
||||||
_hooks.google_play_services_not_available_message, # kGooglePlayServicesNotAvailableMessageCall
|
_hooks.google_play_services_not_available_message, # kGooglePlayServicesNotAvailableMessageCall
|
||||||
_hooks.empty_call, # kEmptyCall
|
_hooks.empty_call, # kEmptyCall
|
||||||
@ -85,7 +83,6 @@ values = [
|
|||||||
_hooks.implicit_sign_out, # kImplicitSignOutCall
|
_hooks.implicit_sign_out, # kImplicitSignOutCall
|
||||||
_hooks.login_adapter_get_sign_in_token_response, # kLoginAdapterGetSignInTokenResponseCall
|
_hooks.login_adapter_get_sign_in_token_response, # kLoginAdapterGetSignInTokenResponseCall
|
||||||
_hooks.open_url_with_webbrowser_module, # kOpenURLWithWebBrowserModuleCall
|
_hooks.open_url_with_webbrowser_module, # kOpenURLWithWebBrowserModuleCall
|
||||||
_apputils.on_too_many_file_descriptors, # kOnTooManyFileDescriptorsCall
|
|
||||||
_env.on_native_module_import, # kOnNativeModuleImportCall
|
_env.on_native_module_import, # kOnNativeModuleImportCall
|
||||||
_env.setup_env_for_app_run, # kSetupEnvForAppRunCall
|
_env.on_main_thread_start_app, # kOnMainThreadStartAppCall
|
||||||
]
|
]
|
||||||
|
|||||||
@ -99,6 +99,7 @@ def acquire_binary(assets: bool, purpose: str) -> str:
|
|||||||
(equivalent to 'make cmake-server-build'). To do so, set environment
|
(equivalent to 'make cmake-server-build'). To do so, set environment
|
||||||
variable BA_APP_RUN_BUILD_HEADLESS=1.
|
variable BA_APP_RUN_BUILD_HEADLESS=1.
|
||||||
"""
|
"""
|
||||||
|
import textwrap
|
||||||
|
|
||||||
binary_build_command: list[str]
|
binary_build_command: list[str]
|
||||||
if os.environ.get('BA_APP_RUN_ENABLE_BUILDS') == '1':
|
if os.environ.get('BA_APP_RUN_ENABLE_BUILDS') == '1':
|
||||||
@ -120,7 +121,9 @@ def acquire_binary(assets: bool, purpose: str) -> str:
|
|||||||
flush=True,
|
flush=True,
|
||||||
)
|
)
|
||||||
binary_build_command = ['make', 'cmake-server-binary']
|
binary_build_command = ['make', 'cmake-server-binary']
|
||||||
binary_path = 'build/cmake/server-debug/dist/ballisticakit_headless'
|
binary_path = (
|
||||||
|
'build/cmake/server-debug/staged/dist/ballisticakit_headless'
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
# Using default gui builds.
|
# Using default gui builds.
|
||||||
if assets:
|
if assets:
|
||||||
@ -136,13 +139,22 @@ def acquire_binary(assets: bool, purpose: str) -> str:
|
|||||||
flush=True,
|
flush=True,
|
||||||
)
|
)
|
||||||
binary_build_command = ['make', 'cmake-binary']
|
binary_build_command = ['make', 'cmake-binary']
|
||||||
binary_path = 'build/cmake/debug/ballisticakit'
|
binary_path = 'build/cmake/debug/staged/ballisticakit'
|
||||||
else:
|
else:
|
||||||
# Ok; going with prefab headless stuff.
|
# Ok; going with prefab headless stuff.
|
||||||
|
|
||||||
|
# Let the user know how to use their own binaries instead.
|
||||||
|
note = '\n' + textwrap.fill(
|
||||||
|
'NOTE: You can set env-var BA_APP_RUN_ENABLE_BUILDS=1'
|
||||||
|
f' to use locally-built binaries for {purpose}'
|
||||||
|
' instead of prefab ones. This will properly reflect any changes'
|
||||||
|
' you\'ve made to the C/C++ layer.',
|
||||||
|
80,
|
||||||
|
)
|
||||||
if assets:
|
if assets:
|
||||||
print(
|
print(
|
||||||
f'{Clr.SMAG}Fetching prefab binary & assets for'
|
f'{Clr.SMAG}Fetching prefab binary & assets for'
|
||||||
f' {purpose}...{Clr.RST}',
|
f' {purpose}...{note}{Clr.RST}',
|
||||||
flush=True,
|
flush=True,
|
||||||
)
|
)
|
||||||
binary_path = (
|
binary_path = (
|
||||||
@ -157,7 +169,8 @@ def acquire_binary(assets: bool, purpose: str) -> str:
|
|||||||
binary_build_command = ['make', 'prefab-server-release-build']
|
binary_build_command = ['make', 'prefab-server-release-build']
|
||||||
else:
|
else:
|
||||||
print(
|
print(
|
||||||
f'{Clr.SMAG}Fetching prefab binary for {purpose}...{Clr.RST}',
|
f'{Clr.SMAG}Fetching prefab binary for {purpose}...'
|
||||||
|
f'{note}{Clr.RST}',
|
||||||
flush=True,
|
flush=True,
|
||||||
)
|
)
|
||||||
binary_path = (
|
binary_path = (
|
||||||
|
|||||||
@ -925,7 +925,7 @@ def generate_dummy_modules(projroot: str) -> None:
|
|||||||
)
|
)
|
||||||
|
|
||||||
binary_path = apprun.acquire_binary(
|
binary_path = apprun.acquire_binary(
|
||||||
assets=True, purpose='dummy modules generation'
|
assets=True, purpose='dummy-module generation'
|
||||||
)
|
)
|
||||||
|
|
||||||
pycmd = (
|
pycmd = (
|
||||||
@ -961,8 +961,8 @@ def generate_dummy_modules(projroot: str) -> None:
|
|||||||
flush=True,
|
flush=True,
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
# Note: ask Python to not scatter __pycache__ files throughout
|
# Note: Ask Python to kindly not scatter __pycache__ files
|
||||||
# our build output.
|
# throughout our build output.
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
[binary_path, '--command', pycmd],
|
[binary_path, '--command', pycmd],
|
||||||
env=dict(os.environ, PYTHONDONTWRITEBYTECODE='1'),
|
env=dict(os.environ, PYTHONDONTWRITEBYTECODE='1'),
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# Released under the MIT License. See LICENSE for details.
|
# Released under the MIT License. See LICENSE for details.
|
||||||
#
|
#
|
||||||
"""Stage assets for a build."""
|
"""Stage files for builds."""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
@ -19,9 +19,9 @@ if TYPE_CHECKING:
|
|||||||
# Suffix for the pyc files we include in stagings. We're using
|
# Suffix for the pyc files we include in stagings. We're using
|
||||||
# deterministic opt pyc files; see PEP 552.
|
# deterministic opt pyc files; see PEP 552.
|
||||||
#
|
#
|
||||||
# Note: this means anyone
|
# Note: this means anyone wanting to modify .py files in a build will
|
||||||
# wanting to modify .py files in a build will need to wipe out the
|
# need to wipe out the existing .pyc files first or the changes will be
|
||||||
# existing .pyc files first or the changes will be ignored.
|
# ignored.
|
||||||
OPT_PYC_SUFFIX = 'cpython-' + PYVER.replace('.', '') + '.opt-1.pyc'
|
OPT_PYC_SUFFIX = 'cpython-' + PYVER.replace('.', '') + '.opt-1.pyc'
|
||||||
|
|
||||||
|
|
||||||
@ -57,6 +57,8 @@ class AssetStager:
|
|||||||
self.include_fonts = True
|
self.include_fonts = True
|
||||||
self.include_json = True
|
self.include_json = True
|
||||||
self.include_pylib = False
|
self.include_pylib = False
|
||||||
|
self.include_monolithic_binary = False
|
||||||
|
self.monolithic_binary_name: str | None = None
|
||||||
self.pylib_src_name: str | None = None
|
self.pylib_src_name: str | None = None
|
||||||
self.include_payload_file = False
|
self.include_payload_file = False
|
||||||
self.tex_suffix: str | None = None
|
self.tex_suffix: str | None = None
|
||||||
@ -74,7 +76,7 @@ class AssetStager:
|
|||||||
|
|
||||||
# We can now use simple speedy timestamp based updates since we no
|
# We can now use simple speedy timestamp based updates since we no
|
||||||
# longer have to try to preserve timestamps to get .pyc files to
|
# longer have to try to preserve timestamps to get .pyc files to
|
||||||
# behave (hooray!)
|
# behave (hooray!).
|
||||||
|
|
||||||
# Do our stripped down pylib dir for platforms that use that.
|
# Do our stripped down pylib dir for platforms that use that.
|
||||||
if self.include_pylib:
|
if self.include_pylib:
|
||||||
@ -119,14 +121,19 @@ class AssetStager:
|
|||||||
self.dist_mode = extract_flag(args, '-dist')
|
self.dist_mode = extract_flag(args, '-dist')
|
||||||
|
|
||||||
# Require either -debug or -release in args.
|
# Require either -debug or -release in args.
|
||||||
|
# (or a few common variants from cmake, etc.)
|
||||||
if '-debug' in args:
|
if '-debug' in args:
|
||||||
self.debug = True
|
self.debug = True
|
||||||
assert '-release' not in args
|
assert '-release' not in args
|
||||||
elif '-release' in args:
|
elif any(
|
||||||
|
val in args
|
||||||
|
for val in ['-release', '-minsizerel', '-relwithdebinfo']
|
||||||
|
):
|
||||||
self.debug = False
|
self.debug = False
|
||||||
else:
|
else:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"Expected either '-debug' or '-release' in args."
|
"Expected some form of '-debug' or '-release' in args"
|
||||||
|
f' ({args=}).'
|
||||||
)
|
)
|
||||||
|
|
||||||
if platform_arg == '-android':
|
if platform_arg == '-android':
|
||||||
@ -136,6 +143,9 @@ class AssetStager:
|
|||||||
elif platform_arg == '-cmake':
|
elif platform_arg == '-cmake':
|
||||||
self.dst = args[-1]
|
self.dst = args[-1]
|
||||||
self.tex_suffix = '.dds'
|
self.tex_suffix = '.dds'
|
||||||
|
# Link/copy in a binary *if* builddir is provided.
|
||||||
|
self.include_monolithic_binary = self.builddir is not None
|
||||||
|
self.monolithic_binary_name = 'ballisticakit'
|
||||||
elif platform_arg == '-cmakemodular':
|
elif platform_arg == '-cmakemodular':
|
||||||
self.dst = args[-1]
|
self.dst = args[-1]
|
||||||
self.tex_suffix = '.dds'
|
self.tex_suffix = '.dds'
|
||||||
@ -147,6 +157,9 @@ class AssetStager:
|
|||||||
self.include_textures = False
|
self.include_textures = False
|
||||||
self.include_audio = False
|
self.include_audio = False
|
||||||
self.include_meshes = False
|
self.include_meshes = False
|
||||||
|
# Link/copy in a binary *if* builddir is provided.
|
||||||
|
self.include_monolithic_binary = self.builddir is not None
|
||||||
|
self.monolithic_binary_name = 'ballisticakit_headless'
|
||||||
|
|
||||||
elif platform_arg == '-xcode-mac':
|
elif platform_arg == '-xcode-mac':
|
||||||
self.src = os.environ['SOURCE_ROOT'] + '/build/assets'
|
self.src = os.environ['SOURCE_ROOT'] + '/build/assets'
|
||||||
@ -455,6 +468,9 @@ class AssetStager:
|
|||||||
]
|
]
|
||||||
subprocess.run(cmd, check=True)
|
subprocess.run(cmd, check=True)
|
||||||
|
|
||||||
|
if self.include_monolithic_binary:
|
||||||
|
self._sync_monolithic_binary()
|
||||||
|
|
||||||
if self.include_python_dylib:
|
if self.include_python_dylib:
|
||||||
self._sync_python_dylib()
|
self._sync_python_dylib()
|
||||||
|
|
||||||
@ -494,6 +510,31 @@ class AssetStager:
|
|||||||
)
|
)
|
||||||
subprocess.run(['chmod', '+x', path], check=True)
|
subprocess.run(['chmod', '+x', path], check=True)
|
||||||
|
|
||||||
|
def _copy_or_symlink_file(self, srcpath: str, dstpath: str) -> None:
|
||||||
|
# Copy the file in for dist mode; otherwise set up a symlink for
|
||||||
|
# faster iteration.
|
||||||
|
if self.dist_mode:
|
||||||
|
# Blow away any symlink.
|
||||||
|
if os.path.islink(dstpath):
|
||||||
|
os.unlink(dstpath)
|
||||||
|
if not os.path.isfile(dstpath):
|
||||||
|
subprocess.run(['cp', srcpath, dstpath], check=True)
|
||||||
|
else:
|
||||||
|
if not os.path.islink(dstpath):
|
||||||
|
relpath = os.path.relpath(srcpath, os.path.dirname(dstpath))
|
||||||
|
subprocess.run(['ln', '-sf', relpath, dstpath], check=True)
|
||||||
|
|
||||||
|
def _sync_monolithic_binary(self) -> None:
|
||||||
|
if self.builddir is None:
|
||||||
|
raise RuntimeError("This staging type requires '-builddir' arg.")
|
||||||
|
if self.monolithic_binary_name is None:
|
||||||
|
raise RuntimeError('monolithic-binary-name is not set.')
|
||||||
|
|
||||||
|
mbname = self.monolithic_binary_name
|
||||||
|
self._copy_or_symlink_file(
|
||||||
|
f'{self.builddir}/{mbname}', f'{self.dst}/{mbname}'
|
||||||
|
)
|
||||||
|
|
||||||
def _sync_python_dylib(self) -> None:
|
def _sync_python_dylib(self) -> None:
|
||||||
# pylint: disable=too-many-locals
|
# pylint: disable=too-many-locals
|
||||||
from batools.featureset import FeatureSet
|
from batools.featureset import FeatureSet
|
||||||
@ -534,22 +575,7 @@ class AssetStager:
|
|||||||
built_so_path = f'{self.builddir}/{soname}'
|
built_so_path = f'{self.builddir}/{soname}'
|
||||||
staged_so_path = f'{dylib_staging_dir}/{soname}'
|
staged_so_path = f'{dylib_staging_dir}/{soname}'
|
||||||
|
|
||||||
# Copy the file in for dist mode; otherwise set up a symlink for
|
self._copy_or_symlink_file(built_so_path, staged_so_path)
|
||||||
# faster iteration.
|
|
||||||
if self.dist_mode:
|
|
||||||
# Blow away any symlink.
|
|
||||||
if os.path.islink(staged_so_path):
|
|
||||||
os.unlink(staged_so_path)
|
|
||||||
if not os.path.isfile(staged_so_path):
|
|
||||||
subprocess.run(
|
|
||||||
['cp', built_so_path, staged_so_path], check=True
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
if not os.path.islink(staged_so_path):
|
|
||||||
relpath = os.path.relpath(built_so_path, dylib_staging_dir)
|
|
||||||
subprocess.run(
|
|
||||||
['ln', '-sf', relpath, staged_so_path], check=True
|
|
||||||
)
|
|
||||||
|
|
||||||
# Ok, now we want to create symlinks for each of our featureset
|
# Ok, now we want to create symlinks for each of our featureset
|
||||||
# Python modules. All of our stuff lives in the same .so and we
|
# Python modules. All of our stuff lives in the same .so and we
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user