summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/audio_driver_jandroid.cpp2
-rw-r--r--platform/android/export/export.cpp10
-rw-r--r--platform/android/globals/global_defaults.cpp2
-rw-r--r--platform/android/godot_android.cpp2
-rw-r--r--platform/android/java_glue.cpp2
-rw-r--r--platform/android/os_android.cpp2
-rw-r--r--platform/bb10/export/export.cpp12
-rw-r--r--platform/bb10/os_bb10.cpp2
-rw-r--r--platform/haiku/audio_driver_media_kit.cpp2
-rw-r--r--platform/iphone/app_delegate.mm2
-rwxr-xr-xplatform/iphone/gl_view.mm2
-rwxr-xr-xplatform/iphone/globals/global_defaults.cpp2
-rw-r--r--platform/iphone/os_iphone.cpp2
-rw-r--r--platform/iphone/rasterizer_iphone.cpp2
-rw-r--r--platform/javascript/SCsub41
-rw-r--r--platform/javascript/audio_server_javascript.cpp3
-rw-r--r--platform/javascript/audio_server_javascript.h3
-rw-r--r--platform/javascript/detect.py52
-rw-r--r--platform/javascript/export/export.cpp12
-rw-r--r--platform/javascript/javascript_main.cpp7
-rw-r--r--platform/javascript/os_javascript.cpp4
-rw-r--r--platform/osx/export/export.cpp12
-rw-r--r--platform/uwp/export/export.cpp9
-rw-r--r--platform/uwp/os_uwp.cpp2
-rw-r--r--platform/windows/export/export.cpp9
-rw-r--r--platform/windows/os_windows.cpp19
-rw-r--r--platform/x11/export/export.cpp23
-rw-r--r--platform/x11/godot_x11.cpp9
-rw-r--r--platform/x11/os_x11.cpp7
29 files changed, 154 insertions, 104 deletions
diff --git a/platform/android/audio_driver_jandroid.cpp b/platform/android/audio_driver_jandroid.cpp
index e0e89e6344..415223c1da 100644
--- a/platform/android/audio_driver_jandroid.cpp
+++ b/platform/android/audio_driver_jandroid.cpp
@@ -28,7 +28,7 @@
/*************************************************************************/
#include "audio_driver_jandroid.h"
-#include "globals.h"
+#include "global_config.h"
#include "os/os.h"
#include "thread_jandroid.h"
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 8e1fda74ed..1d1ee25622 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -29,11 +29,11 @@
#include "version.h"
#include "export.h"
#include "tools/editor/editor_settings.h"
-#include "tools/editor/editor_import_export.h"
+#include "tools/editor/editor_export.h"
#include "tools/editor/editor_node.h"
#include "io/zip_io.h"
#include "io/marshalls.h"
-#include "globals.h"
+#include "global_config.h"
#include "os/file_access.h"
#include "os/os.h"
#include "platform/android/logo.h"
@@ -1892,9 +1892,11 @@ EditorExportPlatformAndroid::~EditorExportPlatformAndroid() {
memdelete(device_thread);
}
+#endif
void register_android_exporter() {
+#if 0
String exe_ext=OS::get_singleton()->get_name()=="Windows"?"exe":"";
EDITOR_DEF("export/android/adb","");
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"android/adb",PROPERTY_HINT_GLOBAL_FILE,exe_ext));
@@ -1913,6 +1915,6 @@ void register_android_exporter() {
Ref<EditorExportPlatformAndroid> exporter = Ref<EditorExportPlatformAndroid>( memnew(EditorExportPlatformAndroid) );
EditorImportExport::get_singleton()->add_export_platform(exporter);
-
-}
#endif
+}
+
diff --git a/platform/android/globals/global_defaults.cpp b/platform/android/globals/global_defaults.cpp
index bbf9bd5b0b..01daac9260 100644
--- a/platform/android/globals/global_defaults.cpp
+++ b/platform/android/globals/global_defaults.cpp
@@ -27,7 +27,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "global_defaults.h"
-#include "globals.h"
+#include "global_config.h"
void register_android_global_defaults() {
diff --git a/platform/android/godot_android.cpp b/platform/android/godot_android.cpp
index 3c7f7f5854..83d5a413c0 100644
--- a/platform/android/godot_android.cpp
+++ b/platform/android/godot_android.cpp
@@ -43,7 +43,7 @@
#include <unistd.h>
#include <stdlib.h>
#include "os_android.h"
-#include "globals.h"
+#include "global_config.h"
#include "main/main.h"
#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "godot", __VA_ARGS__))
#define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, "godot", __VA_ARGS__))
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index dfbb437344..41558cf86a 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -36,7 +36,7 @@
#include "file_access_android.h"
#include "dir_access_jandroid.h"
#include "audio_driver_jandroid.h"
-#include "globals.h"
+#include "global_config.h"
#include "thread_jandroid.h"
#include "core/os/keyboard.h"
#include "java_class_wrapper.h"
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 1095689a5b..2290571735 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -36,7 +36,7 @@
#include "servers/visual/visual_server_wrap_mt.h"
#include "main/main.h"
#include "file_access_android.h"
-#include "core/globals.h"
+#include "core/global_config.h"
#ifdef ANDROID_NATIVE_ACTIVITY
#include "file_access_android.h"
diff --git a/platform/bb10/export/export.cpp b/platform/bb10/export/export.cpp
index 3e6dadb094..2643c96576 100644
--- a/platform/bb10/export/export.cpp
+++ b/platform/bb10/export/export.cpp
@@ -29,11 +29,11 @@
#include "version.h"
#include "export.h"
#include "tools/editor/editor_settings.h"
-#include "tools/editor/editor_import_export.h"
+#include "tools/editor/editor_export.h"
#include "tools/editor/editor_node.h"
#include "io/zip_io.h"
#include "io/marshalls.h"
-#include "globals.h"
+#include "global_config.h"
#include "os/file_access.h"
#include "os/os.h"
#include "platform/bb10/logo.h"
@@ -803,9 +803,9 @@ EditorExportPlatformBB10::~EditorExportPlatformBB10() {
memdelete(device_thread);
}
-
+#endif
void register_bb10_exporter() {
-
+#if 0
EDITOR_DEF("export/blackberry/host_tools","");
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"export/blackberry/host_tools",PROPERTY_HINT_GLOBAL_DIR));
EDITOR_DEF("export/blackberry/debug_token","");
@@ -824,7 +824,7 @@ void register_bb10_exporter() {
Ref<EditorExportPlatformBB10> exporter = Ref<EditorExportPlatformBB10>( memnew(EditorExportPlatformBB10) );
EditorImportExport::get_singleton()->add_export_platform(exporter);
-
+#endif
}
-#endif
+
diff --git a/platform/bb10/os_bb10.cpp b/platform/bb10/os_bb10.cpp
index c51f1c6092..728707628b 100644
--- a/platform/bb10/os_bb10.cpp
+++ b/platform/bb10/os_bb10.cpp
@@ -31,7 +31,7 @@
#include "drivers/gles2/rasterizer_gles2.h"
#include "servers/visual/visual_server_raster.h"
#include "core/os/dir_access.h"
-#include "core/globals.h"
+#include "core/global_config.h"
#include "main/main.h"
#include "bbutil.h"
#include "core/os/keyboard.h"
diff --git a/platform/haiku/audio_driver_media_kit.cpp b/platform/haiku/audio_driver_media_kit.cpp
index c6afe7a261..bd485214c8 100644
--- a/platform/haiku/audio_driver_media_kit.cpp
+++ b/platform/haiku/audio_driver_media_kit.cpp
@@ -30,7 +30,7 @@
#ifdef MEDIA_KIT_ENABLED
-#include "globals.h"
+#include "global_config.h"
int32_t* AudioDriverMediaKit::samples_in = NULL;
diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm
index 740f1d7edc..1c47801b8e 100644
--- a/platform/iphone/app_delegate.mm
+++ b/platform/iphone/app_delegate.mm
@@ -30,7 +30,7 @@
#import "gl_view.h"
#include "os_iphone.h"
-#include "core/globals.h"
+#include "core/global_config.h"
#include "main/main.h"
#ifdef MODULE_FACEBOOKSCORER_IOS_ENABLED
diff --git a/platform/iphone/gl_view.mm b/platform/iphone/gl_view.mm
index a3af8f4aa8..adc76a622e 100755
--- a/platform/iphone/gl_view.mm
+++ b/platform/iphone/gl_view.mm
@@ -31,7 +31,7 @@
#import <OpenGLES/EAGLDrawable.h>
#include "os_iphone.h"
#include "core/os/keyboard.h"
-#include "core/globals.h"
+#include "core/global_config.h"
#include "servers/audio_server.h"
#import "gl_view.h"
diff --git a/platform/iphone/globals/global_defaults.cpp b/platform/iphone/globals/global_defaults.cpp
index 76b5c9aa01..bf716c36f0 100755
--- a/platform/iphone/globals/global_defaults.cpp
+++ b/platform/iphone/globals/global_defaults.cpp
@@ -27,7 +27,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "global_defaults.h"
-#include "globals.h"
+#include "global_config.h"
void register_iphone_global_defaults() {
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index e34dbae017..816e456838 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -40,7 +40,7 @@
#include "core/os/dir_access.h"
#include "core/os/file_access.h"
#include "core/io/file_access_pack.h"
-#include "core/globals.h"
+#include "core/global_config.h"
#include "sem_iphone.h"
diff --git a/platform/iphone/rasterizer_iphone.cpp b/platform/iphone/rasterizer_iphone.cpp
index ee0457cfb1..b8f3dd0d05 100644
--- a/platform/iphone/rasterizer_iphone.cpp
+++ b/platform/iphone/rasterizer_iphone.cpp
@@ -30,7 +30,7 @@
#include "rasterizer_iphone.h"
#include "os/os.h"
-#include "globals.h"
+#include "global_config.h"
#include <stdio.h>
_FORCE_INLINE_ static void _gl_load_transform(const Transform& tr) {
diff --git a/platform/javascript/SCsub b/platform/javascript/SCsub
index a20c0f7a70..bd7b0c304d 100644
--- a/platform/javascript/SCsub
+++ b/platform/javascript/SCsub
@@ -2,6 +2,9 @@
Import('env')
+env.Tool('textfile')
+env.Tool('zip')
+
javascript_files = [
"os_javascript.cpp",
"audio_driver_javascript.cpp",
@@ -21,18 +24,26 @@ for x in javascript_files:
env.Append(LINKFLAGS=["-s", "EXPORTED_FUNCTIONS=\"['_main','_audio_server_mix_function','_main_after_fs_sync']\""])
env.Append(LINKFLAGS=["--shell-file", '"platform/javascript/godot_shell.html"'])
-build = env.Program('#bin/godot', javascript_objects, PROGSUFFIX=env["PROGSUFFIX"] + ".html")
-Depends(build, "godot_shell.html")
-
-def make_html_shell(target, source, env):
- html_path = target[0].rstr()
- assert html_path[:4] == 'bin/'
- assert html_path[-5:] == '.html'
- basename = html_path[4:-5]
- with open(html_path, 'r+') as html_file:
- fixed_html = html_file.read().replace('.html.mem', '.mem').replace(basename, '$GODOT_BASE')
- html_file.seek(0)
- html_file.truncate()
- html_file.write(fixed_html)
-
-env.AddPostAction(build, Action(make_html_shell, "Creating HTML shell file"))
+html_file = env.Program('#bin/godot', javascript_objects, PROGSUFFIX=env["PROGSUFFIX"] + ".html")[0]
+Depends(html_file, "godot_shell.html")
+basename = "godot" + env["PROGSUFFIX"] # output file name without file extension
+
+# Emscripten hardcodes file names, so replace common base name with
+# placeholder while leaving extension; also change `.html.mem` to just `.mem`
+fixup_html = env.Substfile(html_file, SUBST_DICT=[(basename, '$$GODOT_BASE'), ('.html.mem', '.mem')], SUBSTFILESUFFIX='.fixup.html')
+
+zip_dir = env.Dir('#bin/.javascript_zip')
+zip_files = []
+js_file = env.SideEffect(html_file.File(basename+'.js'), html_file)
+zip_files.append(env.InstallAs(
+ [zip_dir.File('godot.html'), zip_dir.File('godot.js'), zip_dir.File('godotfs.js')],
+ [fixup_html, js_file, '#misc/dist/html_fs/godotfs.js']))
+
+if env['wasm'] == 'yes':
+ wasm_file = env.SideEffect(html_file.File(basename+'.wasm'), html_file)
+ zip_files.append(env.InstallAs(zip_dir.File('godot.wasm'), wasm_file))
+else:
+ asmjs_files = env.SideEffect([html_file.File(basename+'.asm.js'), html_file.File(basename+'.html.mem')], html_file)
+ zip_files.append(env.InstallAs([zip_dir.File('godot.asm.js'), zip_dir.File('godot.mem')], asmjs_files))
+
+Zip('#bin/godot', zip_files, ZIPSUFFIX=env['PROGSUFFIX']+env['ZIPSUFFIX'], ZIPROOT=zip_dir)
diff --git a/platform/javascript/audio_server_javascript.cpp b/platform/javascript/audio_server_javascript.cpp
index d5940fb102..bb238ede0c 100644
--- a/platform/javascript/audio_server_javascript.cpp
+++ b/platform/javascript/audio_server_javascript.cpp
@@ -27,7 +27,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "audio_server_javascript.h"
-
+#if 0
#include "emscripten.h"
AudioMixer *AudioServerJavascript::get_mixer() {
@@ -847,3 +847,4 @@ AudioServerJavascript::AudioServerJavascript() {
stream_volume_scale=1.0;
}
+#endif
diff --git a/platform/javascript/audio_server_javascript.h b/platform/javascript/audio_server_javascript.h
index f8c8774e4c..2f48e7e79e 100644
--- a/platform/javascript/audio_server_javascript.h
+++ b/platform/javascript/audio_server_javascript.h
@@ -28,7 +28,7 @@
/*************************************************************************/
#ifndef AUDIO_SERVER_JAVASCRIPT_H
#define AUDIO_SERVER_JAVASCRIPT_H
-
+#if 0
#include "servers/audio_server.h"
class AudioServerJavascript : public AudioServer {
@@ -223,3 +223,4 @@ public:
};
#endif // AUDIO_SERVER_JAVASCRIPT_H
+#endif
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index a701823b2e..799b550899 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -12,8 +12,6 @@ def get_name():
def can_build():
-
- import os
return os.environ.has_key("EMSCRIPTEN_ROOT")
@@ -35,31 +33,41 @@ def get_flags():
]
+def create(env):
+ # remove Windows' .exe suffix
+ return env.Clone(PROGSUFFIX='')
+
+
+def escape_sources_backslashes(target, source, env, for_signature):
+ return [path.replace('\\','\\\\') for path in env.GetBuildPath(source)]
+
+def escape_target_backslashes(target, source, env, for_signature):
+ return env.GetBuildPath(target[0]).replace('\\','\\\\')
+
+
def configure(env):
env['ENV'] = os.environ
- env.use_windows_spawn_fix('javascript')
env.Append(CPPPATH=['#platform/javascript'])
- em_path = os.environ["EMSCRIPTEN_ROOT"]
-
- env['ENV']['PATH'] = em_path + ":" + env['ENV']['PATH']
- env['CC'] = em_path + '/emcc'
- env['CXX'] = em_path + '/emcc'
- #env['AR'] = em_path+"/emar"
- env['AR'] = em_path + "/emcc"
- env['ARFLAGS'] = "-o"
+ env.PrependENVPath('PATH', os.environ['EMSCRIPTEN_ROOT'])
+ env['CC'] = 'emcc'
+ env['CXX'] = 'em++'
+ env['LINK'] = 'emcc'
+ env['RANLIB'] = 'emranlib'
+ # Emscripten's ar has issues with duplicate file names, so use cc
+ env['AR'] = 'emcc'
+ env['ARFLAGS'] = '-o'
+ if (os.name == 'nt'):
+ # use TempFileMunge on Windows since some commands get too long for
+ # cmd.exe even with spawn_fix
+ # need to escape backslashes for this
+ env['ESCAPED_SOURCES'] = escape_sources_backslashes
+ env['ESCAPED_TARGET'] = escape_target_backslashes
+ env['ARCOM'] = '${TEMPFILE("%s")}' % env['ARCOM'].replace('$SOURCES', '$ESCAPED_SOURCES').replace('$TARGET', '$ESCAPED_TARGET')
-# env['RANLIB'] = em_path+"/emranlib"
- env['RANLIB'] = em_path + "/emcc"
env['OBJSUFFIX'] = '.bc'
env['LIBSUFFIX'] = '.bc'
- env['CCCOM'] = "$CC -o $TARGET $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES"
- env['CXXCOM'] = "$CC -o $TARGET $CFLAGS $CCFLAGS $_CCCOMCOM $SOURCES"
-
-# env.Append(LIBS=['c','m','stdc++','log','GLESv1_CM','GLESv2'])
-
-# env["LINKFLAGS"]= string.split(" -g --sysroot="+ld_sysroot+" -Wl,--no-undefined -Wl,-z,noexecstack ")
if (env["target"] == "release"):
env.Append(CCFLAGS=['-O2'])
@@ -78,7 +86,6 @@ def configure(env):
env.Append(CPPFLAGS=["-fno-exceptions", '-DNO_SAFE_CAST', '-fno-rtti'])
env.Append(CPPFLAGS=['-DJAVASCRIPT_ENABLED', '-DUNIX_ENABLED', '-DPTHREAD_NO_RENAME', '-DNO_FCNTL', '-DMPC_FIXED_POINT', '-DTYPED_METHOD_BIND', '-DNO_THREADS'])
env.Append(CPPFLAGS=['-DGLES3_ENABLED'])
- env.Append(CPPFLAGS=['-DGLES_NO_CLIENT_ARRAYS'])
if env['wasm'] == 'yes':
env.Append(LINKFLAGS=['-s', 'BINARYEN=1'])
@@ -88,7 +95,7 @@ def configure(env):
# what is set during compilation, check TOTAL_MEMORY in Emscripten's
# src/settings.js for the default.
env.Append(LINKFLAGS=['-s', 'ALLOW_MEMORY_GROWTH=1'])
- env["PROGSUFFIX"] += ".webassembly"
+ env.extra_suffix = '.webassembly' + env.extra_suffix
else:
env.Append(CPPFLAGS=['-s', 'ASM_JS=1'])
env.Append(LINKFLAGS=['-s', 'ASM_JS=1'])
@@ -101,7 +108,4 @@ def configure(env):
env.Append(LINKFLAGS=['-s', 'USE_WEBGL2=1'])
# env.Append(LINKFLAGS=['-g4'])
- # print "CCCOM is:", env.subst('$CCCOM')
- # print "P: ", env['p'], " Platofrm: ", env['platform']
-
import methods
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp
index e487383ef4..2657eaddb5 100644
--- a/platform/javascript/export/export.cpp
+++ b/platform/javascript/export/export.cpp
@@ -29,11 +29,11 @@
#include "version.h"
#include "export.h"
#include "tools/editor/editor_settings.h"
-#include "tools/editor/editor_import_export.h"
+#include "tools/editor/editor_export.h"
#include "tools/editor/editor_node.h"
#include "io/zip_io.h"
#include "io/marshalls.h"
-#include "globals.h"
+#include "global_config.h"
#include "os/file_access.h"
#include "os/os.h"
#include "platform/javascript/logo.h"
@@ -417,14 +417,14 @@ EditorExportPlatformJavaScript::~EditorExportPlatformJavaScript() {
}
-
+#endif
void register_javascript_exporter() {
- Ref<EditorExportPlatformJavaScript> exporter = Ref<EditorExportPlatformJavaScript>( memnew(EditorExportPlatformJavaScript) );
- EditorImportExport::get_singleton()->add_export_platform(exporter);
+ //Ref<EditorExportPlatformJavaScript> exporter = Ref<EditorExportPlatformJavaScript>( memnew(EditorExportPlatformJavaScript) );
+ //EditorImportExport::get_singleton()->add_export_platform(exporter);
}
-#endif
+
diff --git a/platform/javascript/javascript_main.cpp b/platform/javascript/javascript_main.cpp
index 94320d53c1..076f93f0df 100644
--- a/platform/javascript/javascript_main.cpp
+++ b/platform/javascript/javascript_main.cpp
@@ -151,16 +151,15 @@ int main(int argc, char *argv[]) {
/* Initialize the window */
- printf("let it go!\n");
+ printf("let it go dude!\n");
glutInit(&argc, argv);
os = new OS_JavaScript(_gfx_init,NULL,NULL);
#if 0
char *args[]={"-test","gui","-v",NULL};
Error err = Main::setup("apk",3,args);
#else
- //char *args[]={"-v",NULL};//
- //Error err = Main::setup("",1,args);
- Error err = Main::setup("",0,NULL);
+ char *args[]={"-main_pack","data.pck",NULL}; //pass location of main pack manually, because it wont get an executable name
+ Error err = Main::setup("",2,args);
#endif
ResourceLoader::set_abort_on_missing_resources(false); //ease up compatibility
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index b8c3dea3b4..201008b1db 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -34,7 +34,7 @@
#include "drivers/unix/dir_access_unix.h"
#include "servers/visual/visual_server_raster.h"
#include "main/main.h"
-#include "core/globals.h"
+#include "core/global_config.h"
#include "dom_keys.h"
#include <stdlib.h>
@@ -282,6 +282,8 @@ void OS_JavaScript::initialize(const VideoMode& p_desired,int p_video_driver,int
javascript_eval = memnew(JavaScript);
GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton("JavaScript", javascript_eval));
#endif
+
+ visual_server->init();
}
void OS_JavaScript::set_main_loop( MainLoop * p_main_loop ) {
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index 3a97827c16..69973dc95d 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -29,12 +29,12 @@
#include "version.h"
#include "export.h"
#include "tools/editor/editor_settings.h"
-#include "tools/editor/editor_import_export.h"
+#include "tools/editor/editor_export.h"
#include "tools/editor/editor_node.h"
#include "io/zip_io.h"
#include "io/marshalls.h"
#include "io/resource_saver.h"
-#include "globals.h"
+#include "global_config.h"
#include "os/file_access.h"
#include "os/os.h"
#include "platform/osx/logo.h"
@@ -536,14 +536,14 @@ EditorExportPlatformOSX::~EditorExportPlatformOSX() {
}
-
+#endif
void register_osx_exporter() {
-
+#if 0
Ref<EditorExportPlatformOSX> exporter = Ref<EditorExportPlatformOSX>( memnew(EditorExportPlatformOSX) );
EditorImportExport::get_singleton()->add_export_platform(exporter);
-
+#endif
}
-#endif
+
diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp
index 167a5831cf..4966489188 100644
--- a/platform/uwp/export/export.cpp
+++ b/platform/uwp/export/export.cpp
@@ -79,7 +79,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "io/sha256.h"
#include "io/base64.h"
#include "bind/core_bind.h"
-#include "globals.h"
+#include "global_config.h"
#include "io/marshalls.h"
#include <zlib.h>
@@ -2384,10 +2384,11 @@ EditorExportPlatformUWP::EditorExportPlatformUWP() {
EditorExportPlatformUWP::~EditorExportPlatformUWP() {}
-
+#endif
void register_uwp_exporter() {
-
+#if 0
Ref<EditorExportPlatformUWP> exporter = Ref<EditorExportPlatformUWP>(memnew(EditorExportPlatformUWP));
EditorImportExport::get_singleton()->add_export_platform(exporter);
-}
#endif
+}
+
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index 90c21e11a1..61b8a1c240 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -40,7 +40,7 @@
#include "servers/audio_server.h"
//#include "servers/visual/visual_server_wrap_mt.h"
#include "os/memory_pool_dynamic_prealloc.h"
-#include "globals.h"
+#include "global_config.h"
#include "io/marshalls.h"
#include "platform/windows/packet_peer_udp_winsock.h"
#include "platform/windows/stream_peer_winsock.h"
diff --git a/platform/windows/export/export.cpp b/platform/windows/export/export.cpp
index 88d534887b..1c827a93b0 100644
--- a/platform/windows/export/export.cpp
+++ b/platform/windows/export/export.cpp
@@ -28,10 +28,11 @@
/*************************************************************************/
#include "export.h"
#include "platform/windows/logo.h"
-#include "tools/editor/editor_import_export.h"
-#if 0
+#include "tools/editor/editor_export.h"
+
void register_windows_exporter() {
+#if 0
Image img(_windows_logo);
Ref<ImageTexture> logo = memnew( ImageTexture );
logo->create_from_image(img);
@@ -48,6 +49,6 @@ void register_windows_exporter() {
EditorImportExport::get_singleton()->add_export_platform(exporter);
}
-
-}
#endif
+}
+
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 1e51c18b63..0ef964522b 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -44,7 +44,7 @@
#include "packet_peer_udp_winsock.h"
#include "stream_peer_winsock.h"
#include "lang_table.h"
-#include "globals.h"
+#include "global_config.h"
#include "io/marshalls.h"
#include "joypad.h"
@@ -1255,6 +1255,10 @@ void OS_Windows::finalize() {
main_loop=NULL;
+ for (int i = 0; i < get_audio_driver_count(); i++) {
+ AudioDriverManager::get_driver(i)->finish();
+ }
+
memdelete(joypad);
memdelete(input);
@@ -1282,13 +1286,8 @@ void OS_Windows::finalize() {
memdelete(physics_2d_server);
monitor_info.clear();
-
- for (int i = 0; i < get_audio_driver_count(); i++)
- {
- AudioDriverManager::get_driver(i)->finish();
- }
-
}
+
void OS_Windows::finalize_core() {
memdelete(process_map);
@@ -1969,10 +1968,10 @@ Error OS_Windows::execute(const String& p_path, const List<String>& p_arguments,
String argss;
argss="\"\""+p_path+"\"";
+
+ for (const List<String>::Element* E=p_arguments.front(); E; E=E->next()) {
- for(int i=0;i<p_arguments.size();i++) {
-
- argss+=String(" \"")+p_arguments[i]+"\"";
+ argss+=String(" \"")+E->get()+"\"";
}
//print_line("ARGS: "+argss);
diff --git a/platform/x11/export/export.cpp b/platform/x11/export/export.cpp
index 5a4751b387..5c7f98c1f3 100644
--- a/platform/x11/export/export.cpp
+++ b/platform/x11/export/export.cpp
@@ -28,11 +28,27 @@
/*************************************************************************/
#include "export.h"
#include "platform/x11/logo.h"
-#include "tools/editor/editor_import_export.h"
+#include "tools/editor/editor_export.h"
#include "scene/resources/texture.h"
-#if 0
+
+
+
void register_x11_exporter() {
+ Ref<EditorExportPlatformPC> platform;
+ platform.instance();
+
+ Image img(_x11_logo);
+ Ref<ImageTexture> logo;
+ logo.instance();
+ logo->create_from_image(img);
+ platform->set_logo(logo);
+ platform->set_name("Linux/X11");
+ platform->set_extension("");
+
+ EditorExport::get_singleton()->add_export_platform(platform);
+
+ #if 0
Image img(_x11_logo);
Ref<ImageTexture> logo = memnew( ImageTexture );
logo->create_from_image(img);
@@ -49,5 +65,6 @@ void register_x11_exporter() {
EditorImportExport::get_singleton()->add_export_platform(exporter);
}
+ #endif
}
-#endif
+
diff --git a/platform/x11/godot_x11.cpp b/platform/x11/godot_x11.cpp
index f85ba17020..b727ecbd17 100644
--- a/platform/x11/godot_x11.cpp
+++ b/platform/x11/godot_x11.cpp
@@ -26,6 +26,9 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#include <unistd.h>
+#include <limits.h>
+
#include "main/main.h"
#include "os_x11.h"
@@ -33,6 +36,9 @@ int main(int argc, char* argv[]) {
OS_X11 os;
+ char *cwd = (char*)malloc(PATH_MAX);
+ getcwd(cwd, PATH_MAX);
+
Error err = Main::setup(argv[0],argc-1,&argv[1]);
if (err!=OK)
return 255;
@@ -41,5 +47,8 @@ int main(int argc, char* argv[]) {
os.run(); // it is actually the OS that decides how to run
Main::cleanup();
+ chdir(cwd);
+ free(cwd);
+
return os.get_exit_code();
}
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index e792d0465e..a4ed08f330 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -464,6 +464,9 @@ void OS_X11::finalize() {
memdelete(main_loop);
main_loop=NULL;
+ for (int i = 0; i < get_audio_driver_count(); i++) {
+ AudioDriverManager::get_driver(i)->finish();
+ }
/*
if (debugger_connection_console) {
@@ -476,7 +479,6 @@ void OS_X11::finalize() {
#endif
memdelete(input);
-
visual_server->finish();
memdelete(visual_server);
//memdelete(rasterizer);
@@ -512,6 +514,7 @@ void OS_X11::finalize() {
args.clear();
+
}
@@ -1238,7 +1241,7 @@ static Property read_property(Display* p_display, Window p_window, Atom p_proper
}while(bytes_after != 0);
- Property p = {ret, actual_format, nitems, actual_type};
+ Property p = {ret, actual_format, (int)nitems, actual_type};
return p;
}