Skip to content
Snippets Groups Projects
Commit 67f31c08 authored by neil's avatar neil
Browse files

Support running bootstrap from bundle

git-svn-id: http://svn.net-core.org/repos/t-engine4@617 51575b47-30f0-44d4-a5cc-537603b46e54
parent 010772fc
No related branches found
No related tags found
No related merge requests found
......@@ -11,8 +11,10 @@ if __SELFEXE then
-- Remove bin/Debug from the path, to make dev easier
dir = dir:gsub("bin"..fs.getPathSeparator().."Debug"..fs.getPathSeparator(), "")
-- Now remove executable name
dir = dir:gsub("(.*"..fs.getPathSeparator()..").+", "%1")
if not __APPLE__ then
-- Now remove executable name
dir = dir:gsub("(.*"..fs.getPathSeparator()..").+", "%1")
end
print("SelfExe gave us app directory of:", dir)
fs.mount(dir..fs.getPathSeparator().."game"..fs.getPathSeparator().."thirdparty", "/", true)
......
......@@ -462,6 +462,12 @@ int main(int argc, char *argv[])
lua_pushnil(L);
lua_setglobal(L, "__SELFEXE");
// Will be useful
#ifdef __APPLE__
lua_pushboolean(L, TRUE);
lua_setglobal(L, "__APPLE__");
#endif
// Run bootstrapping
if (!luaL_loadfile(L, "/bootstrap/boot.lua"))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment