mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-06-04 20:46:29 +03:00
Fixed compilation in OS X.
This commit is contained in:
@@ -144,6 +144,7 @@ newoption { trigger = "with-static-eepp", description = "Force to build the demo
|
||||
newoption { trigger = "with-static-backend", description = "It will try to compile the library with a static backend (only for gcc and mingw).\n\t\t\t\tThe backend should be placed in libs/your_platform/libYourBackend.a" }
|
||||
newoption { trigger = "with-gles2", description = "Compile with GLES2 support" }
|
||||
newoption { trigger = "with-gles1", description = "Compile with GLES1 support" }
|
||||
newoption { trigger = "use-frameworks", description = "In Mac OS X it will try to link the external libraries from its frameworks. For example, instead of linking against SDL2 it will link agains SDL2.framework." }
|
||||
newoption {
|
||||
trigger = "with-backend",
|
||||
description = "Select the backend to use for window and input handling.\n\t\t\tIf no backend is selected or if the selected is not installed the script will search for a backend present in the system, and will use it.\n\t\t\tIt's possible to build with more than one backend support.\n\t\t\t\tUse comma to separate the backends to build ( you can't mix SDL and SDL2, you'll get random crashes ).\n\t\t\t\tExample: --with-backend=SDL2,SFML",
|
||||
@@ -220,7 +221,7 @@ function get_ios_arch()
|
||||
end
|
||||
|
||||
function os_findlib( name )
|
||||
if os.is_real("macosx") and is_xcode() then
|
||||
if os.is_real("macosx") and ( is_xcode() or _OPTIONS["use-frameworks"] ) then
|
||||
local path = "/Library/Frameworks/" .. name
|
||||
|
||||
if os.isdir( path ) then
|
||||
@@ -232,7 +233,7 @@ function os_findlib( name )
|
||||
end
|
||||
|
||||
function get_backend_link_name( name )
|
||||
if os.is_real("macosx") and is_xcode() then
|
||||
if os.is_real("macosx") and ( is_xcode() or _OPTIONS["use-frameworks"] ) then
|
||||
local fname = name .. ".framework"
|
||||
|
||||
if os_findlib( fname ) then -- Search for the framework
|
||||
|
||||
9
projects/osx/make.sh
Executable file
9
projects/osx/make.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
cd $(dirname "$0")
|
||||
/usr/local/bin/premake4 --file=../../premake4.lua --with-static-freetype --use-frameworks gmake
|
||||
cd ../../make/macosx/
|
||||
make $@
|
||||
|
||||
cd ../../bin/
|
||||
ln -sf ../libs/macosx/libeepp.dylib .
|
||||
ln -sf ../libs/macosx/libeepp-debug.dylib .
|
||||
@@ -6,8 +6,8 @@ namespace EE { namespace System { namespace Platform {
|
||||
|
||||
#if defined( EE_PLATFORM_POSIX )
|
||||
|
||||
Uint32 cThreadImpl::GetCurrentThreadId() {
|
||||
return (Uint32)pthread_self();
|
||||
UintPtr cThreadImpl::GetCurrentThreadId() {
|
||||
return (UintPtr)pthread_self();
|
||||
}
|
||||
|
||||
cThreadImpl::cThreadImpl( cThread * owner ) :
|
||||
@@ -42,8 +42,8 @@ void cThreadImpl::Terminate() {
|
||||
}
|
||||
}
|
||||
|
||||
Uint32 cThreadImpl::Id() {
|
||||
return (Uint32)mThread;
|
||||
UintPtr cThreadImpl::Id() {
|
||||
return (UintPtr)mThread;
|
||||
}
|
||||
|
||||
void * cThreadImpl::EntryPoint( void * userData ) {
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Platform {
|
||||
|
||||
class cThreadImpl {
|
||||
public:
|
||||
static Uint32 GetCurrentThreadId();
|
||||
static UintPtr GetCurrentThreadId();
|
||||
|
||||
cThreadImpl( cThread * owner );
|
||||
|
||||
@@ -23,7 +23,7 @@ class cThreadImpl {
|
||||
|
||||
void Terminate();
|
||||
|
||||
Uint32 Id();
|
||||
UintPtr Id();
|
||||
protected:
|
||||
static void * EntryPoint( void* userData );
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ namespace EE { namespace System { namespace Platform {
|
||||
|
||||
#if EE_PLATFORM == EE_PLATFORM_WIN
|
||||
|
||||
Uint32 cThreadImpl::GetCurrentThreadId() {
|
||||
return (Uint32)::GetCurrentThreadId();
|
||||
UintPtr cThreadImpl::GetCurrentThreadId() {
|
||||
return (UintPtr)::GetCurrentThreadId();
|
||||
}
|
||||
|
||||
cThreadImpl::cThreadImpl( cThread * owner ) {
|
||||
@@ -32,8 +32,8 @@ void cThreadImpl::Terminate() {
|
||||
}
|
||||
}
|
||||
|
||||
Uint32 cThreadImpl::Id() {
|
||||
return (Uint32)mThreadId;
|
||||
UintPtr cThreadImpl::Id() {
|
||||
return (UintPtr)mThreadId;
|
||||
}
|
||||
|
||||
unsigned int __stdcall cThreadImpl::EntryPoint( void * userData ) {
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Platform {
|
||||
|
||||
class cThreadImpl {
|
||||
public:
|
||||
static Uint32 GetCurrentThreadId();
|
||||
static UintPtr GetCurrentThreadId();
|
||||
|
||||
cThreadImpl( cThread * owner );
|
||||
|
||||
@@ -26,7 +26,7 @@ class cThreadImpl {
|
||||
|
||||
void Terminate();
|
||||
|
||||
Uint32 Id();
|
||||
UintPtr Id();
|
||||
protected:
|
||||
static unsigned int __stdcall EntryPoint(void* userData);
|
||||
|
||||
|
||||
@@ -136,9 +136,6 @@ class cEETest : private cThread {
|
||||
|
||||
cMap Map;
|
||||
|
||||
eeFloat H;
|
||||
Int32 NH;
|
||||
|
||||
Uint8 Screen;
|
||||
SceneCb Scenes[6];
|
||||
void Screen1();
|
||||
|
||||
Reference in New Issue
Block a user