summaryrefslogtreecommitdiffstats
path: root/docs/release/scripts/src/main.lua
diff options
context:
space:
mode:
author Robbbert <pac0446@bigpond.net.au>2016-02-26 11:05:20 +1100
committer Robbbert <pac0446@bigpond.net.au>2016-02-26 11:05:20 +1100
commitc33749165c7e8181353216925ae9f2558db5b51d (patch)
tree6b0230243965ee3ec8e926242082bbd1f56bacaf /docs/release/scripts/src/main.lua
parent60b1a4a750cb059c65eb77b6de7a5fed5f4f457a (diff)
0.171 Release Fileshbmame171
Diffstat (limited to 'docs/release/scripts/src/main.lua')
-rw-r--r--docs/release/scripts/src/main.lua36
1 files changed, 27 insertions, 9 deletions
diff --git a/docs/release/scripts/src/main.lua b/docs/release/scripts/src/main.lua
index da633c55212..b8125bf1989 100644
--- a/docs/release/scripts/src/main.lua
+++ b/docs/release/scripts/src/main.lua
@@ -87,8 +87,21 @@ end
configuration { "asmjs" }
targetextension ".bc"
if os.getenv("EMSCRIPTEN") then
+ local emccopts = ""
+ emccopts = emccopts .. " -O3"
+ emccopts = emccopts .. " -s USE_SDL=2"
+ emccopts = emccopts .. " --memory-init-file 0"
+ emccopts = emccopts .. " -s ALLOW_MEMORY_GROWTH=0"
+ emccopts = emccopts .. " -s TOTAL_MEMORY=268435456"
+ emccopts = emccopts .. " -s DISABLE_EXCEPTION_CATCHING=2"
+ emccopts = emccopts .. " -s EXCEPTION_CATCHING_WHITELIST='[\"__ZN15running_machine17start_all_devicesEv\"]'"
+ emccopts = emccopts .. " -s EXPORTED_FUNCTIONS=\"['_main', '_malloc', '__Z14js_get_machinev', '__Z9js_get_uiv', '__Z12js_get_soundv', '__ZN10ui_manager12set_show_fpsEb', '__ZNK10ui_manager8show_fpsEv', '__ZN13sound_manager4muteEbh', '_SDL_PauseAudio']\""
+ emccopts = emccopts .. " --pre-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/modules/sound/js_sound.js"
+ emccopts = emccopts .. " --post-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/sdl/emscripten_post.js"
+ emccopts = emccopts .. " --embed-file " .. _MAKE.esc(MAME_DIR) .. "bgfx@bgfx"
+ emccopts = emccopts .. " --embed-file " .. _MAKE.esc(MAME_DIR) .. "shaders/gles@shaders/gles"
postbuildcommands {
- os.getenv("EMSCRIPTEN") .. "/emcc -O3 -s DISABLE_EXCEPTION_CATCHING=2 -s USE_SDL=2 --memory-init-file 0 -s ALLOW_MEMORY_GROWTH=0 -s TOTAL_MEMORY=268435456 -s EXCEPTION_CATCHING_WHITELIST='[\"__ZN15running_machine17start_all_devicesEv\"]' -s EXPORTED_FUNCTIONS=\"['_main', '_malloc', '__Z14js_get_machinev', '__Z9js_get_uiv', '__Z12js_get_soundv', '__ZN10ui_manager12set_show_fpsEb', '__ZNK10ui_manager8show_fpsEv', '__ZN13sound_manager4muteEbh', '_SDL_PauseAudio']\" $(TARGET) -o " .. _MAKE.esc(MAME_DIR) .. _OPTIONS["target"] .. _OPTIONS["subtarget"] .. ".js --post-js " .. _MAKE.esc(MAME_DIR) .. "src/osd/sdl/emscripten_post.js",
+ os.getenv("EMSCRIPTEN") .. "/emcc " .. emccopts .. " $(TARGET) -o " .. _MAKE.esc(MAME_DIR) .. _OPTIONS["target"] .. _OPTIONS["subtarget"] .. ".js",
}
end
@@ -128,7 +141,10 @@ end
"jpeg",
"7z",
"lua",
- "lsqlite3",
+ "lualibs",
+ "luv",
+ "uv",
+ "http-parser",
}
if _OPTIONS["with-bundled-zlib"] then
@@ -166,12 +182,8 @@ end
"portmidi",
}
end
- if (USE_BGFX == 1) then
- links {
- "bgfx"
- }
- end
- links{
+ links {
+ "bgfx",
"ocore_" .. _OPTIONS["osd"],
}
@@ -272,8 +284,14 @@ end
"@echo Emitting ".. rctarget .. "vers.rc...",
PYTHON .. " " .. path.translate(MAME_DIR .. "scripts/build/verinfo.py","\\") .. " -r -b " .. rctarget .. " " .. path.translate(MAME_DIR .. "src/version.cpp","\\") .. " > " .. path.translate(GEN_DIR .. "resource/" .. rctarget .. "vers.rc", "\\") ,
}
+
+ if (_OPTIONS["osd"] == "sdl") then
+ configuration { "x64","vs*" }
+ prelinkcommands { "copy " .. path.translate(MAME_DIR .."3rdparty/sdl2/lib/x64/SDL2.dll", "\\") .. " " .. path.translate(MAME_DIR .."SDL2.dll","\\") .. " /Y" }
+ configuration { "x32","vs*" }
+ prelinkcommands { "copy " .. path.translate(MAME_DIR .."3rdparty/sdl2/lib/x86/SDL2.dll", "\\") .. " " .. path.translate(MAME_DIR .."SDL2.dll","\\") .. " /Y" }
+ end
-
configuration { }
debugdir (MAME_DIR)