Use bundled python from Emscripten SDK on Windows too
This commit is contained in:
@@ -183,20 +183,27 @@ bool WebPlatformTools::OnPostProcess(CookingData& data)
|
||||
String emscriptenSdk = TEXT("EMSDK");
|
||||
Platform::GetEnvironmentVariable(emscriptenSdk, emscriptenSdk);
|
||||
procSettings.FileName = emscriptenSdk / TEXT("upstream/emscripten/tools/file_packager");
|
||||
#if PLATFORM_WIN32
|
||||
procSettings.FileName += TEXT(".bat");
|
||||
#endif
|
||||
procSettings.Arguments = String::Format(TEXT("files.data --preload \"{}@/\" --lz4 --js-output=files.js"), data.DataOutputPath);
|
||||
procSettings.WorkingDirectory = data.OriginalOutputPath;
|
||||
#if PLATFORM_MAC
|
||||
#if PLATFORM_MAC || PLATFORM_WINDOWS
|
||||
// Use python bundled with SDK (python from min-spec XCode 16.4 is 3.9.6 which is < 3.10 needed by SDK 5.0)
|
||||
Array<String> pythons;
|
||||
FileSystem::GetChildDirectories(pythons, emscriptenSdk / TEXT("/python"));
|
||||
if (pythons.HasItems())
|
||||
{
|
||||
procSettings.Arguments = procSettings.FileName + TEXT(".py ") + procSettings.Arguments;
|
||||
#if PLATFORM_WINDOWS
|
||||
procSettings.FileName = pythons[0] / TEXT("/python.exe");
|
||||
#else
|
||||
procSettings.FileName = pythons[0] / TEXT("/bin/python3");
|
||||
#endif
|
||||
}
|
||||
#if PLATFORM_WINDOWS
|
||||
else
|
||||
{
|
||||
procSettings.FileName += TEXT(".bat");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
const int32 result = Platform::CreateProcess(procSettings);
|
||||
if (result != 0)
|
||||
|
||||
Reference in New Issue
Block a user