Browse Source

Fix issue with enums and constants going to wrong namespace, message when attempting to deploy iOS from Windows

JoshEngebretson 10 years ago
parent
commit
6a161a41c7

+ 12 - 0
Script/AtomicEditor/ui/modal/build/BuildSettingsWindow.ts

@@ -125,6 +125,18 @@ class BuildSettingsWindow extends ModalWindow {
 
 
                         var platform = toolSystem.getPlatformByName(name);
                         var platform = toolSystem.getPlatformByName(name);
 
 
+                        if (platform.platformID == ToolCore.PLATFORMID_IOS) {
+
+                            if (Atomic.platform == "Windows") {
+
+                                var message = "\niOS Deployment requires running the Atomic Editor on MacOSX\n\n";
+                                new Atomic.UIMessageWindow(this, "modal_error").show("MacOSX Required", message, Atomic.UI_MESSAGEWINDOW_SETTINGS_OK, true, 640, 260);
+                                return true;
+
+                            }
+
+                        }
+
                         if (!platform.license) {
                         if (!platform.license) {
                             this.hide();
                             this.hide();
                             EditorUI.getModelOps().showProPlatformWindow();
                             EditorUI.getModelOps().showProPlatformWindow();

+ 1 - 2
Source/ToolCore/JSBind/JSBModuleWriter.cpp

@@ -175,8 +175,7 @@ void JSBModuleWriter::WriteModulePreInit(String& source)
     // register enums and constants
     // register enums and constants
     source += "// enums and constants\n";
     source += "// enums and constants\n";
     source += "duk_context* ctx = vm->GetJSContext();\n";
     source += "duk_context* ctx = vm->GetJSContext();\n";
-    source += "duk_get_global_string(ctx, \"Atomic\");\n";
-
+    source.AppendWithFormat("duk_get_global_string(ctx, \"%s\");\n", module_->package_->GetName().CString());
     source += "// enums\n";
     source += "// enums\n";
 
 
     Vector<SharedPtr<JSBEnum>> enums = module_->enums_.Values();
     Vector<SharedPtr<JSBEnum>> enums = module_->enums_.Values();