ios compilation

This commit is contained in:
2026-05-05 18:20:20 +03:00
parent 386c2fc045
commit c5aef33171
23 changed files with 71 additions and 41 deletions

View File

@@ -16,7 +16,7 @@
#include "TargetConditionals.h"
#if TARGET_OS_IPHONE
// iOS
#include "SDL3/SDL_main.h"
//#include "SDL3/SDL_main.h"
#else
// macOS
#endif
@@ -38,9 +38,11 @@ void *pTier0Lib = NULL;
typedef void (*EngineMainFn)(int argc, char** argv);
EngineMainFn pEngineMain;
//extern "C" void FunnyMain( int argc, char **argv );
extern "C" void FunnyMain( int argc, char **argv );
int main( int argc, char **argv ) {
printf("HIIII!\n");
return 0;
#ifdef __linux__
readlink("/proc/self/exe",szLauncherPath, MAX_PATH);
dirname(szLauncherPath);
@@ -50,11 +52,11 @@ int main( int argc, char **argv ) {
snprintf(szSteamPath, MAX_PATH, "%s/libsteam_api.so", szLauncherPath);
#endif
#ifdef __APPLE__
uint32_t pathSize = sizeof(szLauncherPath);
int pathResult = _NSGetExecutablePath(szLauncherPath, &pathSize);
char *szLauncherPath2 = dirname(szLauncherPath);
snprintf(szEnginePath, MAX_PATH, "%s/libengine.dylib", szLauncherPath2);
snprintf(szTier0Path, MAX_PATH, "%s/libtier0.dylib", szLauncherPath2);
//uint32_t pathSize = sizeof(szLauncherPath);
//int pathResult = _NSGetExecutablePath(szLauncherPath, &pathSize);
//char *szLauncherPath2 = dirname(szLauncherPath);
//snprintf(szEnginePath, MAX_PATH, "%s/libengine.dylib", szLauncherPath2);
//snprintf(szTier0Path, MAX_PATH, "%s/libtier0.dylib", szLauncherPath2);
#endif
#ifndef __WIN32__
if ( !dlopen(szSteamPath, RTLD_NOW ))
@@ -100,5 +102,6 @@ int main( int argc, char **argv ) {
SetCurrentDirectoryA(szLauncherPath);
pEngineMain(argc, argv);
#endif
//FunnyMain(argc, argv);
FunnyMain(argc, argv);
return 0;
};