mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-19 21:37:57 +08:00
bacloud cleanup and language updates
This commit is contained in:
parent
239e2be1d4
commit
72ef33ea2b
@ -420,41 +420,41 @@
|
||||
"assets/build/ba_data/audio/zoeOw.ogg": "https://files.ballistica.net/cache/ba1/dc/d2/160fc27fcaff10793327ac2c70fd",
|
||||
"assets/build/ba_data/audio/zoePickup01.ogg": "https://files.ballistica.net/cache/ba1/11/7a/87d6bca0acfb877fd4fd8fe3a598",
|
||||
"assets/build/ba_data/audio/zoeScream01.ogg": "https://files.ballistica.net/cache/ba1/44/f5/c943c9075abb3e1835d2408a1ef8",
|
||||
"assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/72/48/d091c881fba4f5e2febb3cb3682a",
|
||||
"assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/d8/0d/d6dad794d0f2396af2a9fb530a94",
|
||||
"assets/build/ba_data/data/languages/arabic.json": "https://files.ballistica.net/cache/ba1/ec/97/713007418488dd543cf6edcdd9d2",
|
||||
"assets/build/ba_data/data/languages/belarussian.json": "https://files.ballistica.net/cache/ba1/61/03/89070ca765e06da3a419a579f503",
|
||||
"assets/build/ba_data/data/languages/chinese.json": "https://files.ballistica.net/cache/ba1/6f/88/b74dac280d4dbd07dea74abb5fc6",
|
||||
"assets/build/ba_data/data/languages/chinese.json": "https://files.ballistica.net/cache/ba1/17/21/7b6371bde52392eb4a38e7c6d55a",
|
||||
"assets/build/ba_data/data/languages/chinesetraditional.json": "https://files.ballistica.net/cache/ba1/44/aa/c12568afb4558dc7f9f2fa155467",
|
||||
"assets/build/ba_data/data/languages/croatian.json": "https://files.ballistica.net/cache/ba1/6c/2b/7a0669cc74fbcebbb76c440c6c04",
|
||||
"assets/build/ba_data/data/languages/croatian.json": "https://files.ballistica.net/cache/ba1/c9/73/01a1343af814131b1ee96af0b687",
|
||||
"assets/build/ba_data/data/languages/czech.json": "https://files.ballistica.net/cache/ba1/19/c5/7fab8fbd8c2b78bd5fc11cf6bfdd",
|
||||
"assets/build/ba_data/data/languages/danish.json": "https://files.ballistica.net/cache/ba1/3f/46/e4da3c1d2b0ebf916df55c608b28",
|
||||
"assets/build/ba_data/data/languages/dutch.json": "https://files.ballistica.net/cache/ba1/68/93/da8e9874f41a786edf52ba4ccaad",
|
||||
"assets/build/ba_data/data/languages/english.json": "https://files.ballistica.net/cache/ba1/c0/03/106450033fe01fba06d733b6b107",
|
||||
"assets/build/ba_data/data/languages/english.json": "https://files.ballistica.net/cache/ba1/70/7d/6cbdaf130eaa5c58cffb1f321e3d",
|
||||
"assets/build/ba_data/data/languages/esperanto.json": "https://files.ballistica.net/cache/ba1/4c/c7/0184b8178869d1a3827a1bfcd5bb",
|
||||
"assets/build/ba_data/data/languages/filipino.json": "https://files.ballistica.net/cache/ba1/69/ee/bd7ab2f7da13e65efc46a9e5f78e",
|
||||
"assets/build/ba_data/data/languages/french.json": "https://files.ballistica.net/cache/ba1/49/42/328c5ed7a47a5e9c44a1c11bb2f4",
|
||||
"assets/build/ba_data/data/languages/filipino.json": "https://files.ballistica.net/cache/ba1/c1/3c/2d45627563fbfbbbda2b7e6799e1",
|
||||
"assets/build/ba_data/data/languages/french.json": "https://files.ballistica.net/cache/ba1/3f/f9/6097340f73ab465b0565c0e96e41",
|
||||
"assets/build/ba_data/data/languages/german.json": "https://files.ballistica.net/cache/ba1/ef/e6/d4909f571d7473fd04055728490e",
|
||||
"assets/build/ba_data/data/languages/gibberish.json": "https://files.ballistica.net/cache/ba1/23/b6/8f7175147d8a6d5de45c2147e294",
|
||||
"assets/build/ba_data/data/languages/greek.json": "https://files.ballistica.net/cache/ba1/82/eb/37ff44af76812097f9c98f05c730",
|
||||
"assets/build/ba_data/data/languages/hindi.json": "https://files.ballistica.net/cache/ba1/08/3b/68cea4d16f7020d932829af85323",
|
||||
"assets/build/ba_data/data/languages/hungarian.json": "https://files.ballistica.net/cache/ba1/d8/f2/aa16bc336bd7660cc86c3264bfc4",
|
||||
"assets/build/ba_data/data/languages/indonesian.json": "https://files.ballistica.net/cache/ba1/df/28/0c30263bcb49720889730e5d20b9",
|
||||
"assets/build/ba_data/data/languages/italian.json": "https://files.ballistica.net/cache/ba1/e6/fd/0d1e560035538035c882852045f9",
|
||||
"assets/build/ba_data/data/languages/indonesian.json": "https://files.ballistica.net/cache/ba1/09/6c/942dd354447772a69ea5cae1d486",
|
||||
"assets/build/ba_data/data/languages/italian.json": "https://files.ballistica.net/cache/ba1/91/70/05ad4a6fdbdaa0f471225f7ad317",
|
||||
"assets/build/ba_data/data/languages/korean.json": "https://files.ballistica.net/cache/ba1/07/37/ab65ccee3a555bd40e9661860c58",
|
||||
"assets/build/ba_data/data/languages/persian.json": "https://files.ballistica.net/cache/ba1/bf/71/11141b8a8c92604da47c7c575034",
|
||||
"assets/build/ba_data/data/languages/polish.json": "https://files.ballistica.net/cache/ba1/76/be/84e567de0aabd9f9145b62179c2c",
|
||||
"assets/build/ba_data/data/languages/persian.json": "https://files.ballistica.net/cache/ba1/83/4a/ec10142ac479bf8d80455b47a62b",
|
||||
"assets/build/ba_data/data/languages/polish.json": "https://files.ballistica.net/cache/ba1/19/e9/59c891b1fb85f3ba9f19283c233d",
|
||||
"assets/build/ba_data/data/languages/portuguese.json": "https://files.ballistica.net/cache/ba1/23/18/33f3364310ccc4c03930e2ac50b0",
|
||||
"assets/build/ba_data/data/languages/romanian.json": "https://files.ballistica.net/cache/ba1/d7/06/9d70642d0a4d1e3b1c2149d7a17c",
|
||||
"assets/build/ba_data/data/languages/russian.json": "https://files.ballistica.net/cache/ba1/8d/8a/dc288451eb6a1120a5868d64b771",
|
||||
"assets/build/ba_data/data/languages/russian.json": "https://files.ballistica.net/cache/ba1/87/92/1b72c1d2e635b8db3c1640ee1b17",
|
||||
"assets/build/ba_data/data/languages/serbian.json": "https://files.ballistica.net/cache/ba1/4e/91/6f2a9a3ce733908e91377a6ddb9a",
|
||||
"assets/build/ba_data/data/languages/slovak.json": "https://files.ballistica.net/cache/ba1/f9/4b/d9f01814224066856695452ef57c",
|
||||
"assets/build/ba_data/data/languages/spanish.json": "https://files.ballistica.net/cache/ba1/e7/cb/69267e2a863a12e9ce90ab3ba209",
|
||||
"assets/build/ba_data/data/languages/spanish.json": "https://files.ballistica.net/cache/ba1/fe/5c/39f3cedbe24f8e31b4e3004f49bc",
|
||||
"assets/build/ba_data/data/languages/swedish.json": "https://files.ballistica.net/cache/ba1/91/0a/35c4baf539d5951fc03a794c0e0b",
|
||||
"assets/build/ba_data/data/languages/tamil.json": "https://files.ballistica.net/cache/ba1/41/a4/841ab82927c41a6bc8fc9ae5ea11",
|
||||
"assets/build/ba_data/data/languages/thai.json": "https://files.ballistica.net/cache/ba1/9d/51/f699dbd4beb88bc3cff699a287a7",
|
||||
"assets/build/ba_data/data/languages/tamil.json": "https://files.ballistica.net/cache/ba1/b5/7e/8dc92a39fb826c1d360ad639d9cb",
|
||||
"assets/build/ba_data/data/languages/thai.json": "https://files.ballistica.net/cache/ba1/f7/df/7ba5f99c5c2c4c86fc0503fcf0b7",
|
||||
"assets/build/ba_data/data/languages/turkish.json": "https://files.ballistica.net/cache/ba1/37/30/ba543ac18fa6c7f9721942d6984f",
|
||||
"assets/build/ba_data/data/languages/ukrainian.json": "https://files.ballistica.net/cache/ba1/ab/35/644e4239cfa62a597a905412b90c",
|
||||
"assets/build/ba_data/data/languages/venetian.json": "https://files.ballistica.net/cache/ba1/7c/98/c0f7c965a3ac36d86cc17f55428f",
|
||||
"assets/build/ba_data/data/languages/venetian.json": "https://files.ballistica.net/cache/ba1/af/98/82ceb2748a068ad03245dcb9eeff",
|
||||
"assets/build/ba_data/data/languages/vietnamese.json": "https://files.ballistica.net/cache/ba1/25/13/b64b849fc9fedcc18d81f6e08c4d",
|
||||
"assets/build/ba_data/data/maps/big_g.json": "https://files.ballistica.net/cache/ba1/47/0a/a617cc85d927b576c4e6fc1091ed",
|
||||
"assets/build/ba_data/data/maps/bridgit.json": "https://files.ballistica.net/cache/ba1/03/4b/57ee9b42854b26f23f81bd8c58ef",
|
||||
@ -3995,26 +3995,26 @@
|
||||
"assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e",
|
||||
"assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34",
|
||||
"ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a",
|
||||
"build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/18/6e/24051c8e6bfe30369b80178474c9",
|
||||
"build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/bc/87/98ded0028d8b223be82b6c5298e5",
|
||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/97/8f/3f51628756af6d1591cf91a47276",
|
||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3b/86/a11e18756b15bd96db4eaeee5e77",
|
||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c0/7c/8e585909fea3d992de8d739fd446",
|
||||
"build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/26/fd/5b8fbb3c8c3c67916f561a1bc33a",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3e/be/b0acad56e699b0ed55e7fa6fef8e",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a9/50/f67705c8eea4656174a018c7a1d7",
|
||||
"build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/4c/d1/4595ca81c56c71d74259a3d187df",
|
||||
"build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/74/ac/ffbcff39ad4e23ab7584ef7e4eff",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/6b/8c/decb34b66f740e2672493592b5fc",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3b/c2/b55e1dd2565a519e5b57c05db3c4",
|
||||
"build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/d0/3c/a7076c1d4a48457ef050ab8b4afd",
|
||||
"build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ac/ad/8e3e1a128e2cca3269e2f0aae0b2",
|
||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0d/ca/8360348a9f9d1e7ad46c2da1dee7",
|
||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1f/98/09989c161cd149a3a57a9dca3911",
|
||||
"build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/5f/34/466ce1bfaf234072b6f7d6809af3",
|
||||
"build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/6c/b6/77299395809cd4d5531dcdb36ab3",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/78/e9/5be96c7e80501c5e91649d45a379",
|
||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/c0/a9/e7bae7f0ee35f3f5d06ea586538e",
|
||||
"build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/02/e0/0336db3c3989a1768271ee7a12ba",
|
||||
"build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3d/8c/9689aa6ff3fa826fc3f524b3115f",
|
||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/00/04/1ea1f6833f131458cbc8e7039591",
|
||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d9/f7/c87406c9229cbe5aa9439e3562c5",
|
||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/66/1e/53122c4f96bca326aaa42d5cb98b",
|
||||
"build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/6b/28/ee8a01e3155e05c5c970ace23107",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/89/5e/fbf702ecbd5376efe63720632883",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c2/c4/958ba681823bcad105bc51d6b3ac",
|
||||
"build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/95/55/3188c8463c50ce1cb7182788d0b8",
|
||||
"build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/70/10/b99df359d806c3f4fc3c91685749",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3e/40/9778e11391ca3832caf982a03832",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7a/0c/756391725d7bbbab568b8d946753",
|
||||
"build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b9/fe/e0f9747f9f03647d1becb31ac08d",
|
||||
"build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ee/d1/b0e387dfdbe8ac032456d4124bdf",
|
||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/10/db/85cb3b50f58df978a42f5b199c0d",
|
||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3f/77/d66d99ba56643c20493a56cb3dba",
|
||||
"build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/2b/23/eb989bada6166e03bf5756717194",
|
||||
"build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/73/26/4670e939bfef0ad417f56d532fc0",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/04/73/6951027e00d62310e59eca1737c3",
|
||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/1d/31/7698b0ee7abe6090d62295df170e",
|
||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/02/ca/38de2750e629dd5f193a7c00a7d9",
|
||||
"build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7a/b3/e30adb7116efb17abe63ce70def8",
|
||||
"build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e9/c3/191d440460fbb95eb8c131081c4a",
|
||||
@ -4031,14 +4031,14 @@
|
||||
"build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/49/ca/11a87c0fecc6220b9756caa2a86e",
|
||||
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/59/65/0b8fb1aeb2ae528f31d1455bb180",
|
||||
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9f/88/c4ec00dff29865d4899395067b03",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/d0/ef/ddac0f50efd29ab24b1dbe19a33b",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/5d/0b/d7bfac74b0e8b3ac852b2aa0af53",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/01/87/d6522611fd1394e65b32fda56f01",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/27/8c/639b58005e6e7640a0d0b75115e1",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/b6/e8/144e2303bfb2d88efc4e2c175fc6",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/da/d6/599a92f06a0597675676055e47cc",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/12/03/c9534f6f82af8a5d44d7eaf4101a",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/be/72/7d608ba56495856f771864fa4ce6",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/6c/05/f66f58d20fab5d0e658961ac65b5",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/e9/54/b71bde6d97129447853b43879d5b",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/66/90/610ebef166a7729d764f8ef34d5d",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/09/a7/875d4894eac1ec9bdbc2634b4815",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/96/bc/6d79640b1553959e85df1c12fb8d",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/a0/64/5b30f7f3139e59e54ad5244e9101",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/35/f8/8e2e0eb328b241af4e73b81d59a9",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/b2/5c/3008c02fffd966044e7ba803f52d",
|
||||
"src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7",
|
||||
"src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/d3/db/e73d4dcf1280d5f677c3cf8b47c3"
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
### 1.7.6 (build 20679, api 7, 2022-07-26)
|
||||
### 1.7.6 (build 20681, api 7, 2022-08-10)
|
||||
- Cleaned up da MetaSubsystem code.
|
||||
- It is now possible to tell the meta system about arbitrary classes (ba_meta export foo.bar.Class) instead of just the preset types 'plugin', 'game', etc.
|
||||
- Newly discovered plugins are now activated immediately instead of requiring a restart.
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
namespace ballistica {
|
||||
|
||||
// These are set automatically via script; don't modify them here.
|
||||
const int kAppBuildNumber = 20679;
|
||||
const int kAppBuildNumber = 20681;
|
||||
const char* kAppVersion = "1.7.6";
|
||||
|
||||
// Our standalone globals.
|
||||
|
||||
@ -11,14 +11,11 @@ import os
|
||||
import sys
|
||||
import zlib
|
||||
import time
|
||||
import base64
|
||||
import datetime
|
||||
import tempfile
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING
|
||||
from dataclasses import dataclass
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
|
||||
import requests
|
||||
|
||||
@ -27,7 +24,6 @@ from efro.error import CleanError
|
||||
from efro.dataclassio import (dataclass_from_json, dataclass_to_dict,
|
||||
dataclass_to_json, ioprepped)
|
||||
from bacommon.bacloud import RequestData, ResponseData, BACLOUD_VERSION
|
||||
from bacommon.transfer import DirectoryManifest
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from typing import BinaryIO, IO
|
||||
@ -72,7 +68,7 @@ class App:
|
||||
raise CleanError('Unable to locate project directory.')
|
||||
|
||||
# Also run project prereqs checks so we can hopefully inform the user
|
||||
# of missing python modules/etc. instead of just failing cryptically.
|
||||
# of missing Python modules/etc. instead of just failing cryptically.
|
||||
try:
|
||||
subprocess.run(['make', '--quiet', 'prereqs'],
|
||||
check=True,
|
||||
@ -122,27 +118,48 @@ class App:
|
||||
files: dict[str, IO] | None = None) -> ResponseData:
|
||||
"""Issue a command to the server and get a response."""
|
||||
|
||||
response_raw = requests.post(
|
||||
f'{BACLOUD_SERVER_URL}/bacloudcmd',
|
||||
headers={'User-Agent': f'bacloud/{BACLOUD_VERSION}'},
|
||||
data={
|
||||
'v':
|
||||
BACLOUD_VERSION,
|
||||
'r':
|
||||
dataclass_to_json(
|
||||
RequestData(command=cmd,
|
||||
token=self._state.login_token,
|
||||
payload=payload,
|
||||
tzoffset=get_tz_offset_seconds(),
|
||||
isatty=sys.stdout.isatty())),
|
||||
},
|
||||
files=files,
|
||||
)
|
||||
response_raw.raise_for_status() # Error if anything went wrong.
|
||||
assert isinstance(response_raw.content, bytes)
|
||||
response_content: str | None = None
|
||||
|
||||
response = dataclass_from_json(ResponseData,
|
||||
response_raw.content.decode())
|
||||
url = f'{BACLOUD_SERVER_URL}/bacloudcmd'
|
||||
headers = {'User-Agent': f'bacloud/{BACLOUD_VERSION}'}
|
||||
|
||||
rdata = {
|
||||
'v':
|
||||
BACLOUD_VERSION,
|
||||
'r':
|
||||
dataclass_to_json(
|
||||
RequestData(command=cmd,
|
||||
token=self._state.login_token,
|
||||
payload=payload,
|
||||
tzoffset=get_tz_offset_seconds(),
|
||||
isatty=sys.stdout.isatty())),
|
||||
}
|
||||
|
||||
# Trying urllib for comparison (note that this doesn't support
|
||||
# files arg so not actually production ready)
|
||||
if bool(False):
|
||||
import urllib.request
|
||||
import urllib.parse
|
||||
|
||||
with urllib.request.urlopen(
|
||||
urllib.request.Request(
|
||||
url,
|
||||
urllib.parse.urlencode(rdata).encode(),
|
||||
headers)) as raw_response:
|
||||
if raw_response.getcode() != 200:
|
||||
raise RuntimeError('Error talking to server')
|
||||
response_content = raw_response.read().decode()
|
||||
|
||||
# Using requests module.
|
||||
else:
|
||||
with requests.post(url, headers=headers, data=rdata,
|
||||
files=files) as response_raw:
|
||||
response_raw.raise_for_status()
|
||||
assert isinstance(response_raw.content, bytes)
|
||||
response_content = response_raw.content.decode()
|
||||
|
||||
assert response_content is not None
|
||||
response = dataclass_from_json(ResponseData, response_content)
|
||||
|
||||
# Handle a few things inline.
|
||||
# (so this functionality is available even to recursive commands, etc.)
|
||||
@ -158,6 +175,7 @@ class App:
|
||||
return response
|
||||
|
||||
def _upload_file(self, filename: str, call: str, args: dict) -> None:
|
||||
import tempfile
|
||||
print(f'Uploading {Clr.BLU}{filename}{Clr.RST}', flush=True)
|
||||
with tempfile.TemporaryDirectory() as tempdir:
|
||||
srcpath = Path(filename)
|
||||
@ -174,10 +192,12 @@ class App:
|
||||
)
|
||||
|
||||
def _handle_dir_manifest_response(self, dirmanifest: str) -> None:
|
||||
from bacommon.transfer import DirectoryManifest
|
||||
self._end_command_args['manifest'] = dataclass_to_dict(
|
||||
DirectoryManifest.create_from_disk(Path(dirmanifest)))
|
||||
|
||||
def _handle_uploads(self, uploads: tuple[list[str], str, dict]) -> None:
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
assert len(uploads) == 3
|
||||
filenames, uploadcmd, uploadargs = uploads
|
||||
assert isinstance(filenames, list)
|
||||
@ -207,6 +227,7 @@ class App:
|
||||
downloads_inline: dict[str, str],
|
||||
) -> None:
|
||||
"""Handle inline file data to be saved to the client."""
|
||||
import base64
|
||||
for fname, fdata in downloads_inline.items():
|
||||
|
||||
# If there's a directory where we want our file to go, clear it
|
||||
@ -242,6 +263,7 @@ class App:
|
||||
|
||||
def _handle_uploads_inline(self, uploads_inline: list[str]) -> None:
|
||||
"""Handle uploading files inline."""
|
||||
import base64
|
||||
files: dict[str, str] = {}
|
||||
for filepath in uploads_inline:
|
||||
if not os.path.exists(filepath):
|
||||
|
||||
@ -140,7 +140,8 @@ class MessageSender:
|
||||
# Any error in the raw send call gets recorded as either
|
||||
# a local or communication error.
|
||||
return ErrorResponse(
|
||||
error_message=f'Error in send async method: {exc}',
|
||||
error_message=(
|
||||
f'Error in send async method ({type(exc)}): {exc}'),
|
||||
error_type=(ErrorResponse.ErrorType.COMMUNICATION
|
||||
if isinstance(exc, CommunicationError) else
|
||||
ErrorResponse.ErrorType.LOCAL))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user