浏览代码

EmsdkDep1

Brian Fiete 6 月之前
父节点
当前提交
f609062c2a
共有 3 个文件被更改,包括 19 次插入10 次删除
  1. 16 7
      IDE/src/BuildContext.bf
  2. 二进制
      bin/WasmLaunch.exe
  3. 3 3
      wasm/fetch_wasm.bat

+ 16 - 7
IDE/src/BuildContext.bf

@@ -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;
 

二进制
bin/WasmLaunch.exe


+ 3 - 3
wasm/fetch_wasm.bat

@@ -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