Просмотр исходного кода

tools: html5: use EMSCRIPTEN env var to locate file_packager

Daniele Bartolini 10 месяцев назад
Родитель
Сommit
803fc3a695
2 измененных файлов с 8 добавлено и 1 удалено
  1. 1 0
      docs/changelog.rst
  2. 7 1
      tools/level_editor/level_editor.vala

+ 1 - 0
docs/changelog.rst

@@ -16,6 +16,7 @@ Changelog
 * Fixed revealing resources while the Project Browser was hidden.
 * Fixed revealing resources while the Project Browser was hidden.
 * Fixed importing FBX files with references to non-existing textures.
 * Fixed importing FBX files with references to non-existing textures.
 * Fixed an issue that caused level's editor camera to be saved incorrectly in some cases.
 * Fixed an issue that caused level's editor camera to be saved incorrectly in some cases.
+* The HTML5 deployer will now use EMSCRIPTEN environment variable to locate emsdk.
 
 
 **Runtime**
 **Runtime**
 
 

+ 7 - 1
tools/level_editor/level_editor.vala

@@ -3630,6 +3630,12 @@ public class LevelEditorApplication : Gtk.Application
 
 
 		var exe_name = app_title.replace(" ", "_").down();
 		var exe_name = app_title.replace(" ", "_").down();
 
 
+		string? emscripten_sdk_path = GLib.Environment.get_variable("EMSCRIPTEN");
+		if (emscripten_sdk_path == null) {
+			loge("Please set a valid EMSCRIPTEN environment variable.");
+			return;
+		}
+
 		string config_path;
 		string config_path;
 		string package_path;
 		string package_path;
 		int err = deploy_create_package_folder(out config_path
 		int err = deploy_create_package_folder(out config_path
@@ -3698,7 +3704,7 @@ public class LevelEditorApplication : Gtk.Application
 			// Package bundle data with emscripten's file_packager.
 			// Package bundle data with emscripten's file_packager.
 			args = new string[]
 			args = new string[]
 			{
 			{
-				"file_packager",
+				Path.build_path(Path.DIR_SEPARATOR_S, emscripten_sdk_path, "tools", "file_packager"),
 				Path.build_path(Path.DIR_SEPARATOR_S, package_path, "data.bin"),
 				Path.build_path(Path.DIR_SEPARATOR_S, package_path, "data.bin"),
 				"--preload",
 				"--preload",
 				"./data",
 				"./data",