Skip to content

Commit

Permalink
Rename emscripten target to wasm, and don't build jsprime for general…
Browse files Browse the repository at this point in the history
… distribution
  • Loading branch information
Hugh Sanderson committed Sep 16, 2024
1 parent a244f7d commit 6311d36
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 24 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,6 @@ jobs:
cd acadnme
haxelib run nme cpp build -DHXCPP_M64
- name: Setup Emscripten
if: startsWith(matrix.os,'ubuntu')
uses: mymindstorm/setup-emsdk@v11

- name: Build JSPRIME
if: startsWith(matrix.os,'ubuntu')
run: |
cd project
neko build.n jsprime
- name: Clean Project
if: startsWith(matrix.os,'ubuntu')
run: |
Expand All @@ -90,13 +80,6 @@ jobs:
path: |
ndll/Linux64/nme.ndll
bin/Linux/Acadnme
ndll/Emscripten/nme.wasm
ndll/Emscripten/nme.js
ndll/Emscripten/nme.js.mem
ndll/Emscripten/NmeClasses.js
ndll/Emscripten/preloader.js
ndll/Emscripten/parsenme.js
ndll/Emscripten/export_classes.info
src/cppia/export_classes.info
version.env
tools
Expand Down
4 changes: 2 additions & 2 deletions tools/nme/src/CommandLineTools.hx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class CommandLineTools
"androidview", "android-view", "iphonesim", "android", "androidsim", "rpi",
"windows", "mac", "linux", "flash", "cppia", "emscripten", "html5",
"watchsimulator", "watchos", "jsprime", "winrt", "uwp", "rg350",
"bundlerelease", "bundledebug", "arm64" ];
"bundlerelease", "bundledebug", "arm64", "wasm" ];
static var allCommands =
[ "help", "setup", "document", "generate", "create", "xcode", "clone", "demo",
"installer", "copy-if-newer", "tidy", "set", "unset", "nocompile",
Expand Down Expand Up @@ -137,7 +137,7 @@ class CommandLineTools
if (jsPlatform!=null)
jsPlatform.copyOutputTo(platform.getOutputDir());

case Platform.EMSCRIPTEN:
case Platform.EMSCRIPTEN, Platform.WASM:
platform = new platforms.EmscriptenPlatform(project);

case Platform.JS:
Expand Down
4 changes: 2 additions & 2 deletions tools/nme/src/platforms/EmscriptenPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class EmscriptenPlatform extends DesktopPlatform
project.haxeflags.push('-D HXCPP_LINK_MEM_FILE=1');
}

override public function getPlatformDir() : String { return "emscripten"; }
override public function getBinName() : String { return "Emscripten"; }
override public function getPlatformDir() : String { return "wasm"; }
override public function getBinName() : String { return "Wasm"; }
override public function getNativeDllExt() { return ".js"; }
override public function getLibExt() { return ".a"; }

Expand Down
1 change: 1 addition & 0 deletions tools/nme/src/platforms/Platform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class Platform
public static inline var WATCH = "WATCH";
public static inline var JSPRIME = "JSPRIME"; // Alias for HTML5
public static inline var RG350 = "RG350";
public static inline var WASM = "wasm";


public static inline var TYPE_WEB = "WEB";
Expand Down
6 changes: 3 additions & 3 deletions tools/nme/src/project/NMEProject.hx
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ class NMEProject
classPaths.push(cp);
macros.push("--macro cpp.cppia.HostClasses.include()");

case "emscripten":
target = Platform.EMSCRIPTEN;
case "emscripten", "wasm":
target = Platform.WASM;
targetFlags.set("emscripten", "");
staticLink = true;
haxedefs.set("emscripten","1");
Expand Down Expand Up @@ -451,7 +451,7 @@ class NMEProject
platformType = Platform.TYPE_WEB;
embedAssets = false;

case Platform.EMSCRIPTEN:
case Platform.EMSCRIPTEN, Platform.WASM:
platformType = Platform.TYPE_WEB;
embedAssets = true;

Expand Down

0 comments on commit 6311d36

Please sign in to comment.