mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-07 19:18:19 +02:00
EmsdkDep1
This commit is contained in:
parent
05c31c3e13
commit
f609062c2a
3 changed files with 19 additions and 10 deletions
|
@ -695,23 +695,32 @@ namespace IDE
|
|||
return false;
|
||||
}
|
||||
|
||||
String compilerExePath = scope String();
|
||||
// Set for auto-install without prompting
|
||||
gApp.mSettings.mEmscriptenPendingInstall = false;
|
||||
|
||||
String wasmPath = Path.GetAbsolutePath("../wasm", gApp.mInstallDir, .. scope .());
|
||||
if (!Directory.Exists(wasmPath))
|
||||
Path.GetAbsolutePath("../../wasm", gApp.mInstallDir, wasmPath..Clear());
|
||||
IDEUtils.FixFilePath(wasmPath);
|
||||
|
||||
if (gApp.mSettings.mEmscriptenPath.IsEmpty)
|
||||
{
|
||||
// Set for auto-install without prompting
|
||||
gApp.mSettings.mEmscriptenPendingInstall = true;
|
||||
}
|
||||
else if (!File.Exists(scope $"{wasmPath}/EmsdkDep1_Done.txt"))
|
||||
{
|
||||
gApp.mSettings.mEmscriptenPendingInstall = true;
|
||||
}
|
||||
|
||||
String compilerExePath = scope String();
|
||||
if (gApp.mSettings.mEmscriptenPendingInstall)
|
||||
{
|
||||
#if CLI
|
||||
gApp.Fail("Emscripten path not configured. Check Wasm configuration in File\\Preferences\\Settings.");
|
||||
return false;
|
||||
#else
|
||||
if (gApp.mSettings.mEmscriptenPendingInstall)
|
||||
{
|
||||
String wasmPath = Path.GetAbsolutePath("../wasm", gApp.mInstallDir, .. scope .());
|
||||
if (!Directory.Exists(wasmPath))
|
||||
Path.GetAbsolutePath("../../wasm", gApp.mInstallDir, wasmPath..Clear());
|
||||
IDEUtils.FixFilePath(wasmPath);
|
||||
|
||||
var runCmd = gApp.QueueRun(scope $"{wasmPath}/fetch_wasm.bat", "", wasmPath, .UTF8);
|
||||
runCmd.mOnlyIfNotFailed = true;
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1,13 +1,13 @@
|
|||
@ECHO OFF
|
||||
|
||||
@ECHO Downloading Emscripten...
|
||||
..\bin\curl.exe -O https://www.beeflang.org/EmsdkDep0.zip
|
||||
..\bin\curl.exe -O https://www.beeflang.org/EmsdkDep1.zip
|
||||
@IF %ERRORLEVEL% NEQ 0 GOTO HADERROR
|
||||
@ECHO Extracting Emscripten...
|
||||
cd ..
|
||||
bin\tar.exe -xf wasm\EmsdkDep0.zip
|
||||
bin\tar.exe -xf wasm\EmsdkDep1.zip
|
||||
@IF %ERRORLEVEL% NEQ 0 GOTO HADERROR
|
||||
del wasm\EmsdkDep0.zip
|
||||
del wasm\EmsdkDep1.zip
|
||||
@IF %ERRORLEVEL% NEQ 0 GOTO HADERROR
|
||||
|
||||
:SUCCESS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue