summaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/export/export.cpp181
-rw-r--r--platform/bb10/export/export.cpp122
-rw-r--r--platform/haiku/detect.py7
-rw-r--r--platform/osx/detect.py7
-rw-r--r--platform/osx/platform_config.h3
-rw-r--r--platform/windows/detect.py4
-rw-r--r--platform/windows/platform_config.h2
-rw-r--r--platform/x11/detect.py3
-rw-r--r--platform/x11/platform_config.h2
9 files changed, 169 insertions, 162 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index bd63cadc57..060819b90e 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -1377,120 +1377,125 @@ void EditorExportPlatformAndroid::_device_poll_thread(void *ud) {
while(!ea->quit_request) {
String adb=EditorSettings::get_singleton()->get("android/adb");
- if (!FileAccess::exists(adb)) {
- OS::get_singleton()->delay_usec(3000000);
- continue; //adb not configured
- }
-
- String devices;
- List<String> args;
- args.push_back("devices");
- int ec;
- Error err = OS::get_singleton()->execute(adb,args,true,NULL,&devices,&ec);
- Vector<String> ds = devices.split("\n");
- Vector<String> ldevices;
- for(int i=1;i<ds.size();i++) {
-
- String d = ds[i];
- int dpos = d.find("device");
- if (dpos==-1)
- continue;
- d=d.substr(0,dpos).strip_edges();
-// print_line("found devuce: "+d);
- ldevices.push_back(d);
- }
+ if (FileAccess::exists(adb)) {
+
+ String devices;
+ List<String> args;
+ args.push_back("devices");
+ int ec;
+ Error err = OS::get_singleton()->execute(adb,args,true,NULL,&devices,&ec);
+ Vector<String> ds = devices.split("\n");
+ Vector<String> ldevices;
+ for(int i=1;i<ds.size();i++) {
+
+ String d = ds[i];
+ int dpos = d.find("device");
+ if (dpos==-1)
+ continue;
+ d=d.substr(0,dpos).strip_edges();
+ // print_line("found devuce: "+d);
+ ldevices.push_back(d);
+ }
- ea->device_lock->lock();
+ ea->device_lock->lock();
- bool different=false;
+ bool different=false;
- if (devices.size()!=ldevices.size()) {
+ if (devices.size()!=ldevices.size()) {
- different=true;
- } else {
+ different=true;
+ } else {
- for(int i=0;i<ea->devices.size();i++) {
+ for(int i=0;i<ea->devices.size();i++) {
- if (ea->devices[i].id!=ldevices[i]) {
- different=true;
- break;
+ if (ea->devices[i].id!=ldevices[i]) {
+ different=true;
+ break;
+ }
}
}
- }
- if (different) {
+ if (different) {
- Vector<Device> ndevices;
+ Vector<Device> ndevices;
- for(int i=0;i<ldevices.size();i++) {
+ for(int i=0;i<ldevices.size();i++) {
- Device d;
- d.id=ldevices[i];
- for(int j=0;j<ea->devices.size();j++) {
- if (ea->devices[j].id==ldevices[i]) {
- d.description=ea->devices[j].description;
- d.name=ea->devices[j].name;
+ Device d;
+ d.id=ldevices[i];
+ for(int j=0;j<ea->devices.size();j++) {
+ if (ea->devices[j].id==ldevices[i]) {
+ d.description=ea->devices[j].description;
+ d.name=ea->devices[j].name;
+ }
}
- }
- if (d.description=="") {
- //in the oven, request!
- args.clear();
- args.push_back("-s");
- args.push_back(d.id);
- args.push_back("shell");
- args.push_back("cat");
- args.push_back("/system/build.prop");
- int ec;
- String dp;
-
- Error err = OS::get_singleton()->execute(adb,args,true,NULL,&dp,&ec);
- print_line("RV: "+itos(ec));
- Vector<String> props = dp.split("\n");
- String vendor;
- String device;
- d.description+"Device ID: "+d.id+"\n";
- for(int j=0;j<props.size();j++) {
-
- String p = props[j];
- if (p.begins_with("ro.product.model=")) {
- device=p.get_slice("=",1).strip_edges();
- } else if (p.begins_with("ro.product.brand=")) {
- vendor=p.get_slice("=",1).strip_edges().capitalize();
- } else if (p.begins_with("ro.build.display.id=")) {
- d.description+="Build: "+p.get_slice("=",1).strip_edges()+"\n";
- } else if (p.begins_with("ro.build.version.release=")) {
- d.description+="Release: "+p.get_slice("=",1).strip_edges()+"\n";
- } else if (p.begins_with("ro.product.cpu.abi=")) {
- d.description+="CPU: "+p.get_slice("=",1).strip_edges()+"\n";
- } else if (p.begins_with("ro.product.manufacturer=")) {
- d.description+="Manufacturer: "+p.get_slice("=",1).strip_edges()+"\n";
- } else if (p.begins_with("ro.board.platform=")) {
- d.description+="Chipset: "+p.get_slice("=",1).strip_edges()+"\n";
- } else if (p.begins_with("ro.opengles.version=")) {
- uint32_t opengl = p.get_slice("=",1).to_int();
- d.description+="OpenGL: "+itos(opengl>>16)+"."+itos((opengl>>8)&0xFF)+"."+itos((opengl)&0xFF)+"\n";
+ if (d.description=="") {
+ //in the oven, request!
+ args.clear();
+ args.push_back("-s");
+ args.push_back(d.id);
+ args.push_back("shell");
+ args.push_back("cat");
+ args.push_back("/system/build.prop");
+ int ec;
+ String dp;
+
+ Error err = OS::get_singleton()->execute(adb,args,true,NULL,&dp,&ec);
+ print_line("RV: "+itos(ec));
+ Vector<String> props = dp.split("\n");
+ String vendor;
+ String device;
+ d.description+"Device ID: "+d.id+"\n";
+ for(int j=0;j<props.size();j++) {
+
+ String p = props[j];
+ if (p.begins_with("ro.product.model=")) {
+ device=p.get_slice("=",1).strip_edges();
+ } else if (p.begins_with("ro.product.brand=")) {
+ vendor=p.get_slice("=",1).strip_edges().capitalize();
+ } else if (p.begins_with("ro.build.display.id=")) {
+ d.description+="Build: "+p.get_slice("=",1).strip_edges()+"\n";
+ } else if (p.begins_with("ro.build.version.release=")) {
+ d.description+="Release: "+p.get_slice("=",1).strip_edges()+"\n";
+ } else if (p.begins_with("ro.product.cpu.abi=")) {
+ d.description+="CPU: "+p.get_slice("=",1).strip_edges()+"\n";
+ } else if (p.begins_with("ro.product.manufacturer=")) {
+ d.description+="Manufacturer: "+p.get_slice("=",1).strip_edges()+"\n";
+ } else if (p.begins_with("ro.board.platform=")) {
+ d.description+="Chipset: "+p.get_slice("=",1).strip_edges()+"\n";
+ } else if (p.begins_with("ro.opengles.version=")) {
+ uint32_t opengl = p.get_slice("=",1).to_int();
+ d.description+="OpenGL: "+itos(opengl>>16)+"."+itos((opengl>>8)&0xFF)+"."+itos((opengl)&0xFF)+"\n";
+ }
}
+
+ d.name=vendor+" "+device;
+ // print_line("name: "+d.name);
+ // print_line("description: "+d.description);
+
}
- d.name=vendor+" "+device;
-// print_line("name: "+d.name);
-// print_line("description: "+d.description);
+ ndevices.push_back(d);
}
- ndevices.push_back(d);
-
+ ea->devices=ndevices;
+ ea->devices_changed=true;
}
- ea->devices=ndevices;
- ea->devices_changed=true;
+ ea->device_lock->unlock();
}
- ea->device_lock->unlock();
+ uint64_t wait = 3000000;
+ uint64_t time = OS::get_singleton()->get_ticks_usec();
+ while(OS::get_singleton()->get_ticks_usec() - time < wait ) {
+ OS::get_singleton()->delay_usec(1000);
+ if (ea->quit_request)
+ break;
+ }
- OS::get_singleton()->delay_usec(3000000);
}
if (EditorSettings::get_singleton()->get("android/shutdown_adb_on_exit")) {
diff --git a/platform/bb10/export/export.cpp b/platform/bb10/export/export.cpp
index da3a958a56..daee5aab9b 100644
--- a/platform/bb10/export/export.cpp
+++ b/platform/bb10/export/export.cpp
@@ -532,95 +532,99 @@ void EditorExportPlatformBB10::_device_poll_thread(void *ud) {
if (windows)
bb_deploy+=".bat";
- if (!FileAccess::exists(bb_deploy)) {
- OS::get_singleton()->delay_usec(3000000);
- continue; //adb not configured
- }
+ if (FileAccess::exists(bb_deploy)) {
- Vector<Device> devices;
+ Vector<Device> devices;
- for (int i=0;i<MAX_DEVICES;i++) {
+ for (int i=0;i<MAX_DEVICES;i++) {
- String host = EditorSettings::get_singleton()->get("blackberry/device_"+itos(i+1)+"/host");
- if (host==String())
- continue;
- String pass = EditorSettings::get_singleton()->get("blackberry/device_"+itos(i+1)+"/password");
- if (pass==String())
- continue;
+ String host = EditorSettings::get_singleton()->get("blackberry/device_"+itos(i+1)+"/host");
+ if (host==String())
+ continue;
+ String pass = EditorSettings::get_singleton()->get("blackberry/device_"+itos(i+1)+"/password");
+ if (pass==String())
+ continue;
- List<String> args;
- args.push_back("-listDeviceInfo");
- args.push_back(host);
- args.push_back("-password");
- args.push_back(pass);
+ List<String> args;
+ args.push_back("-listDeviceInfo");
+ args.push_back(host);
+ args.push_back("-password");
+ args.push_back(pass);
- int ec;
- String dp;
+ int ec;
+ String dp;
- Error err = OS::get_singleton()->execute(bb_deploy,args,true,NULL,&dp,&ec);
+ Error err = OS::get_singleton()->execute(bb_deploy,args,true,NULL,&dp,&ec);
- if (err==OK && ec==0) {
+ if (err==OK && ec==0) {
- Device dev;
- dev.index=i;
- String descr;
- Vector<String> ls=dp.split("\n");
+ Device dev;
+ dev.index=i;
+ String descr;
+ Vector<String> ls=dp.split("\n");
- for(int i=0;i<ls.size();i++) {
+ for(int i=0;i<ls.size();i++) {
+
+ String l = ls[i].strip_edges();
+ if (l.begins_with("modelfullname::")) {
+ dev.name=l.get_slice("::",1);
+ descr+="Model: "+dev.name+"\n";
+ }
+ if (l.begins_with("modelnumber::")) {
+ String s = l.get_slice("::",1);
+ dev.name+=" ("+s+")";
+ descr+="Model Number: "+s+"\n";
+ }
+ if (l.begins_with("scmbundle::"))
+ descr+="OS Version: "+l.get_slice("::",1)+"\n";
+ if (l.begins_with("[n]debug_token_expiration::"))
+ descr+="Debug Token Expires:: "+l.get_slice("::",1)+"\n";
- String l = ls[i].strip_edges();
- if (l.begins_with("modelfullname::")) {
- dev.name=l.get_slice("::",1);
- descr+="Model: "+dev.name+"\n";
- }
- if (l.begins_with("modelnumber::")) {
- String s = l.get_slice("::",1);
- dev.name+=" ("+s+")";
- descr+="Model Number: "+s+"\n";
}
- if (l.begins_with("scmbundle::"))
- descr+="OS Version: "+l.get_slice("::",1)+"\n";
- if (l.begins_with("[n]debug_token_expiration::"))
- descr+="Debug Token Expires:: "+l.get_slice("::",1)+"\n";
+ dev.description=descr;
+ devices.push_back(dev);
}
- dev.description=descr;
- devices.push_back(dev);
}
- }
-
- bool changed=false;
+ bool changed=false;
- ea->device_lock->lock();
+ ea->device_lock->lock();
- if (ea->devices.size()!=devices.size()) {
- changed=true;
- } else {
+ if (ea->devices.size()!=devices.size()) {
+ changed=true;
+ } else {
- for(int i=0;i<ea->devices.size();i++) {
+ for(int i=0;i<ea->devices.size();i++) {
- if (ea->devices[i].index!=devices[i].index) {
- changed=true;
- break;
+ if (ea->devices[i].index!=devices[i].index) {
+ changed=true;
+ break;
+ }
}
}
- }
- if (changed) {
+ if (changed) {
- ea->devices=devices;
- ea->devices_changed=true;
- }
+ ea->devices=devices;
+ ea->devices_changed=true;
+ }
- ea->device_lock->unlock();
+ ea->device_lock->unlock();
+ }
- OS::get_singleton()->delay_usec(3000000);
+ uint64_t wait = 3000000;
+ uint64_t time = OS::get_singleton()->get_ticks_usec();
+ while(OS::get_singleton()->get_ticks_usec() - time < wait ) {
+ OS::get_singleton()->delay_usec(1000);
+ if (ea->quit_request)
+ break;
+ }
}
}
diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py
index 637b42dc03..6d1a96a8da 100644
--- a/platform/haiku/detect.py
+++ b/platform/haiku/detect.py
@@ -23,7 +23,8 @@ def get_opts():
def get_flags():
return [
- ('builtin_zlib', 'no')
+ ('builtin_zlib', 'no'),
+ #('glew', 'yes'), # TODO: investigate the GLEW situation on Haiku
]
def configure(env):
@@ -52,9 +53,9 @@ def configure(env):
#env.Append(CCFLAGS=['-DFREETYPE_ENABLED'])
env.Append(CPPFLAGS = ['-DPTHREAD_NO_RENAME']) # TODO: enable when we have pthread_setname_np
- env.Append(CPPFLAGS = ['-DGLEW_ENABLED', '-DOPENGL_ENABLED', '-DMEDIA_KIT_ENABLED'])
+ env.Append(CPPFLAGS = ['-DOPENGL_ENABLED', '-DMEDIA_KIT_ENABLED'])
env.Append(CPPFLAGS = ['-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DGLES_OVER_GL'])
- env.Append(LIBS = ['be', 'game', 'media', 'network', 'bnetapi', 'z', 'GL', 'GLEW'])
+ env.Append(LIBS = ['be', 'game', 'media', 'network', 'bnetapi', 'z', 'GL'])
import methods
env.Append(BUILDERS = {'GLSL120' : env.Builder(action = methods.build_legacygl_headers, suffix = 'glsl.h',src_suffix = '.glsl')})
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index d668509b90..d1aa54b71d 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -28,10 +28,10 @@ def get_opts():
def get_flags():
return [
- ('opengl', 'no'),
('legacygl', 'yes'),
('builtin_zlib', 'no'),
('freetype','builtin'), #use builtin freetype
+ ('glew', 'yes'),
]
@@ -94,11 +94,8 @@ def configure(env):
# env.Append(LIBPATH=['#platform/osx/lib'])
- #if env['opengl'] == 'yes':
- # env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED'])
-
env.Append(CPPFLAGS=["-DAPPLE_STYLE_KEYS"])
- env.Append(CPPFLAGS=['-DUNIX_ENABLED','-DGLES2_ENABLED','-DGLEW_ENABLED', '-DOSX_ENABLED'])
+ env.Append(CPPFLAGS=['-DUNIX_ENABLED','-DGLES2_ENABLED','-DOSX_ENABLED'])
env.Append(LIBS=['pthread'])
#env.Append(CPPFLAGS=['-F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks', '-isysroot', '/Developer/SDKs/MacOSX10.4u.sdk', '-mmacosx-version-min=10.4'])
#env.Append(LINKFLAGS=['-mmacosx-version-min=10.4', '-isysroot', '/Developer/SDKs/MacOSX10.4u.sdk', '-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk'])
diff --git a/platform/osx/platform_config.h b/platform/osx/platform_config.h
index 085f13df73..86505206ae 100644
--- a/platform/osx/platform_config.h
+++ b/platform/osx/platform_config.h
@@ -27,6 +27,5 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include <alloca.h>
-#define GLES2_INCLUDE_H "gl_context/glew.h"
-#define GLES1_INCLUDE_H "gl_context/glew.h"
+#define GLES2_INCLUDE_H "gl_context/GL/glew.h"
#define PTHREAD_RENAME_SELF
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 97d2461e58..a6a949a11a 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -169,6 +169,7 @@ def get_flags():
return [
('freetype','builtin'), #use builtin freetype
+ ('glew','yes'),
('openssl','builtin'), #use builtin openssl
]
@@ -242,7 +243,6 @@ def configure(env):
env.Append(CCFLAGS=['/DGLES2_ENABLED'])
- env.Append(CCFLAGS=['/DGLEW_ENABLED'])
LIBS=['winmm','opengl32','dsound','kernel32','ole32','oleaut32','user32','gdi32', 'IPHLPAPI','Shlwapi', 'wsock32', 'shell32','advapi32','dinput8','dxguid']
env.Append(LINKFLAGS=[p+env["LIBSUFFIX"] for p in LIBS])
@@ -369,7 +369,7 @@ def configure(env):
env.Append(CCFLAGS=['-DWINDOWS_ENABLED','-mwindows'])
env.Append(CPPFLAGS=['-DRTAUDIO_ENABLED'])
- env.Append(CCFLAGS=['-DGLES2_ENABLED','-DGLEW_ENABLED'])
+ env.Append(CCFLAGS=['-DGLES2_ENABLED'])
env.Append(LIBS=['mingw32','opengl32', 'dsound', 'ole32', 'd3d9','winmm','gdi32','iphlpapi','shlwapi','wsock32','kernel32', 'oleaut32', 'dinput8', 'dxguid'])
# if (env["bits"]=="32"):
diff --git a/platform/windows/platform_config.h b/platform/windows/platform_config.h
index 55f6b5547e..9e20750816 100644
--- a/platform/windows/platform_config.h
+++ b/platform/windows/platform_config.h
@@ -30,6 +30,6 @@
//#else
//#include <alloca.h>
//#endif
-#define GLES2_INCLUDE_H "gl_context/glew.h"
+#define GLES2_INCLUDE_H "gl_context/GL/glew.h"
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 5a43bf9323..2561e09b9a 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -65,6 +65,7 @@ def get_flags():
return [
('builtin_zlib', 'no'),
+ ('glew', 'yes'),
("openssl", "yes"),
#("theora","no"),
]
@@ -147,7 +148,7 @@ def configure(env):
env.Append(CPPPATH=['#drivers/freetype/freetype/include'])
- env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED'])
+ env.Append(CPPFLAGS=['-DOPENGL_ENABLED'])
if os.system("pkg-config --exists alsa")==0:
print("Enabling ALSA")
diff --git a/platform/x11/platform_config.h b/platform/x11/platform_config.h
index aac50c27c2..3b47b2c92d 100644
--- a/platform/x11/platform_config.h
+++ b/platform/x11/platform_config.h
@@ -34,6 +34,6 @@
#define PTHREAD_BSD_SET_NAME
#endif
-#define GLES2_INCLUDE_H "gl_context/glew.h"
+#define GLES2_INCLUDE_H "gl_context/GL/glew.h"