Skip to content
Snippets Groups Projects
Commit 7e50a72e authored by dg's avatar dg
Browse files

plop

git-svn-id: http://svn.net-core.org/repos/t-engine4@2989 51575b47-30f0-44d4-a5cc-537603b46e54
parent c8d4a344
No related branches found
No related tags found
No related merge requests found
......@@ -91,18 +91,19 @@ project "TEngineRunner"
kind "WindowedApp"
language "C"
targetname "t-engine"
files { "src/runner/*.c", }
links { "dl" }
configuration {"linux", "Debug"}
postbuildcommands { "cp bin/Debug/t-engine t-engine", }
configuration {"linux", "Release"}
postbuildcommands { "cp bin/Release/t-engine t-engine", }
files { "src/runner/*.c", "src/getself.c" }
links { "physfs", "lua".._OPTIONS.lua }
configuration "linux"
links { "dl" }
defines { 'SELFEXE_LINUX' }
configuration "windows"
defines { 'SELFEXE_WINDOWS' }
configuration "macosx"
defines { "USE_TENGINE_MAIN", 'SELFEXE_MACOSX' }
configuration {"Debug"}
postbuildcommands { "cp bin/Debug/t-engine t-engine", }
configuration {"Release"}
postbuildcommands { "cp bin/Release/t-engine t-engine", }
project "TEngine"
targetprefix ""
......
/*
TE4 - T-Engine 4
Copyright (C) 2009, 2010 Nicolas Casalini
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Nicolas Casalini "DarkGod"
darkgod@te4.org
*/
#include <stdio.h>
#include <stdlib.h>
......@@ -7,6 +28,8 @@
#include <dlfcn.h>
#endif
#include "physfs.h"
// Load the shared lib containing the core and calls te4main inside it, passing control to that core
int run_core(int corenum, int argc, char **argv)
{
......@@ -83,6 +106,22 @@ int main(int argc, char **argv)
{
int core = 12;
/***************** Physfs Init *****************/
PHYSFS_init(argv[0]);
const char *selfexe = get_self_executable(argc, argv);
if (selfexe)
{
PHYSFS_mount(selfexe, "/", 1);
}
else
{
printf("NO SELFEXE: bootstrapping from CWD\n");
PHYSFS_mount("bootstrap", "/bootstrap", 1);
}
PHYSFS_deinit();
// Run the requested cores until we want no more
while (core) core = run_core(core, argc, argv);
......
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