Skip to content

Commit

Permalink
Update JSPRIME defines
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsando committed Aug 28, 2024
1 parent 48b8b9f commit 1869bdf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion project/ToolkitBuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@
<vflag name="-framework" value="QuartzCore" />
</section>

<section if="jsprime">
<section if="HXCPP_JS_PRIME">
<vflag name="-s" value="EXPORTED_FUNCTIONS=['_malloc']" />
</section>

Expand Down
4 changes: 2 additions & 2 deletions project/src/common/Font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ FontMap sgFontMap;
#ifdef LINKED_FONT_DATA
FontBuffer decompressFontData(int srcLen, int destLen, const unsigned char *inData)
{
#ifdef JS_PRIME
FontBuffer data = new FontBuffer();
#ifdef HXCPP_JS_PRIME
FontBuffer data = new BufferData();
data->IncRef();
data->setDataSize(destLen,false);
Bytef *dataPtr = (Bytef*)data->getData();
Expand Down
14 changes: 7 additions & 7 deletions tools/nme/src/platforms/EmscriptenPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,9 @@ class EmscriptenPlatform extends DesktopPlatform
executablePath = applicationDirectory + "/" + executableFile;
outputFiles.push(executableFile);

var wasmFile = "ApplicationMain.js";
executablePath = applicationDirectory + "/" + executableFile;
outputFiles.push(executableFile);

project.haxeflags.push('-D exe_link');
project.haxeflags.push('-D HXCPP_LINK_EMSCRIPTEN_EXT=$ext');
project.haxeflags.push('-D HXCPP_LINK_EMRUN');
project.haxeflags.push('-D HXCPP_LINK_MEMORY_GROWTH=1');

memFile = project.getBool("emscriptenMemFile", false);
if (memFile)
Expand Down Expand Up @@ -98,15 +94,19 @@ class EmscriptenPlatform extends DesktopPlatform
Sys.println(" -browser ID, for specific one");
}


override public function run(arguments:Array<String>):Void
{
if (true)
if (false)
{
runPython(arguments);
}
else
{
var server = new nme.net.http.Server( new nme.net.http.FileServer([FileSystem.fullPath(applicationDirectory) ]).onRequest );
var server = new nme.net.http.Server(
new nme.net.http.FileServer([FileSystem.fullPath(applicationDirectory) ],
new nme.net.http.StdioHandler(),
).onRequest );

var port = 2323;
server.listen(port);
Expand Down

0 comments on commit 1869bdf

Please sign in to comment.