소스 검색

Working on Mac CI build

Josh Engebretson 10 년 전
부모
커밋
937bf2dc0a

+ 3 - 3
Build/CIScripts/BuildMac.js

@@ -58,12 +58,12 @@ namespace('build', function() {
       atomicTool + " bind " + bcommon.atomicRoot + " Script/Packages/AtomicNET/ MACOSX",
       atomicTool + " bind " + bcommon.atomicRoot + " Script/Packages/AtomicWebView/ MACOSX",
       "cmake -DATOMIC_DEV_BUILD=0 -G Xcode ../../../../",
-      "xcodebuild -target AtomicEditor -configuration Release -parallelizeTargets -jobs 4"
+      "xcodebuild -target AtomicEditor -configuration Release -parallelizeTargets -jobs 4",
+      "cd " + editorBuildDir + "Source/AtomicEditor/Release && zip -r -X " + buildDir + "Bin/AtomicEditor.zip ./AtomicEditor.app"
     ];
 
     jake.exec(cmds, function() {
-      var macEditorBinary = editorBuildDir + "Source/AtomicEditor/Release/AtomicEditor.app/Contents/MacOS/AtomicEditor";
-      fs.copySync(macEditorBinary, buildDir + "Bin/AtomicEditor");
+
       console.log("Built Mac Editor");
       complete();
 

+ 2 - 5
Build/CIScripts/GenEditorData.js

@@ -117,16 +117,13 @@ namespace('build', function() {
 
     // Mac App
 
-    fs.copySync(atomicRoot + "Build/CIScripts/Mac/EditorApp",
-      buildDir + "MacApps/EditorApp");
-
     fs.copySync(atomicRoot + "Build/CIScripts/Mac/PlayerApp/",
       buildDir + "MacApps/PlayerApp/");
 
     // Editor Binaries
 
-    fs.copySync(bcommon.artifactsRoot + "Build/Mac/Bin/AtomicEditor",
-      buildDir + "EditorBinaries/Mac/AtomicEditor");
+    fs.copySync(bcommon.artifactsRoot + "Build/Mac/Bin/AtomicEditor.zip",
+      buildDir + "EditorBinaries/Mac/AtomicEditor.zip");
 
     fs.copySync(bcommon.artifactsRoot + "Build/Windows/Bin/AtomicEditor.exe",
       buildDir + "EditorBinaries/Windows/AtomicEditor.exe");

+ 4 - 6
Build/CIScripts/GenMacEditor.js

@@ -43,7 +43,8 @@ namespace('build', function() {
 
     bcommon.cleanCreateDir(dstDir);
 
-    cmds = ["unzip " + srcDir + "EditorData.zip -d " + srcDir];
+    cmds = ["unzip " + srcDir + "EditorData.zip -d " + srcDir,
+            "unzip " + srcDir + "EditorBinaries/Mac/AtomicEditor.zip -d " + srcDir + "EditorBinaries/Mac"];
 
     jake.exec(cmds, function() {
 
@@ -51,11 +52,8 @@ namespace('build', function() {
 
       var editorAppFolder = dstDir + "AtomicEditor.app/Contents/";
 
-      fs.copySync(srcDir + "MacApps/EditorApp",
-        editorAppFolder);
-
-      fs.copySync(srcDir + "EditorBinaries/Mac/AtomicEditor",
-        editorAppFolder + "MacOS/AtomicEditor");
+      fs.copySync(srcDir + "EditorBinaries/Mac/AtomicEditor.app",
+        dstDir + "AtomicEditor.app");
 
       fs.copySync(srcDir + "Resources/CoreData",
         editorAppFolder + "Resources/CoreData");

+ 0 - 53
Build/CIScripts/Mac/EditorApp/Info.plist

@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>BuildMachineOSBuild</key>
-	<string>15B42</string>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>AtomicEditor</string>
-	<key>CFBundleIconFile</key>
-	<string>Atomic.icns</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleLongVersionString</key>
-	<string></string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleSupportedPlatforms</key>
-	<array>
-		<string>MacOSX</string>
-	</array>
-	<key>CFBundleVersion</key>
-	<string></string>
-	<key>CSResourcesFileMapped</key>
-	<true/>
-	<key>DTCompiler</key>
-	<string>com.apple.compilers.llvm.clang.1_0</string>
-	<key>DTPlatformBuild</key>
-	<string>7A1001</string>
-	<key>DTPlatformVersion</key>
-	<string>GM</string>
-	<key>DTSDKBuild</key>
-	<string>15A278</string>
-	<key>DTSDKName</key>
-	<string>macosx10.11</string>
-	<key>DTXcode</key>
-	<string>0701</string>
-	<key>DTXcodeBuild</key>
-	<string>7A1001</string>
-	<key>LSEnvironment</key>
-	<dict>
-		<key>URHO3D_PREFIX_PATH</key>
-		<string>../Resources</string>
-	</dict>
-	<key>LSRequiresCarbon</key>
-	<true/>
-	<key>NSHumanReadableCopyright</key>
-	<string></string>
-</dict>
-</plist>

+ 0 - 1
Build/CIScripts/Mac/EditorApp/PkgInfo

@@ -1 +0,0 @@
-APPL????

BIN
Build/CIScripts/Mac/EditorApp/Resources/Atomic.icns


+ 4 - 6
Source/AtomicEditor/CMakeLists.txt

@@ -13,7 +13,6 @@ list(REMOVE_ITEM SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/WebView/WebProcessHelp
 file (GLOB JAVASCRIPT_BINDINGS_SOURCE ${CMAKE_SOURCE_DIR}/Artifacts/Build/Source/Generated/${JAVASCRIPT_BINDINGS_PLATFORM}/Javascript/Packages/Editor/*.cpp)
 
 set (SOURCE_FILES ${SOURCE_FILES} ${JAVASCRIPT_BINDINGS_SOURCE})
-
 set (SOURCE_FILES ${SOURCE_FILES} ${CSHARP_BINDINGS_SOURCE} ${CSHARPATOMICPLAYER_BINDINGS_SOURCE} ${CSHARPATOMICNET_BINDINGS_SOURCE})
 
 if (APPLE)
@@ -133,15 +132,14 @@ if(OS_WINDOWS)
 
 endif()
 
-endif()
-
+endif(ATOMIC_WEBVIEW)
 
 
 if (APPLE)
-    set (TARGET_PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/Build/CMake/Modules/AtomicEditorInfo.plist.template")
 
-    SET( MACOSX_BUNDLE_GUI_IDENTIFIER "com.thunderbeastgames.atomiceditor")
-    SET( MACOSX_BUNDLE_BUNDLE_NAME "AtomicEditor")
+    set (TARGET_PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/Build/CMake/Modules/AtomicEditorInfo.plist.template")
+    set (MACOSX_BUNDLE_GUI_IDENTIFIER "com.thunderbeastgames.atomiceditor")
+    set (MACOSX_BUNDLE_BUNDLE_NAME "AtomicEditor")
 
     target_link_libraries(AtomicEditor NETCore NETScript libcurl)
 

+ 4 - 0
Source/AtomicEditor/WebView/WebProcessHelperMac.cpp

@@ -2,6 +2,8 @@
 // reserved. Use of this source code is governed by a BSD-style license that can
 // be found in the LICENSE file.
 
+#ifdef ATOMIC_PLATFORM_OSX
+
 #include <AtomicWebView/AtomicWebView.h>
 
 // Entry point function for sub-processes.
@@ -9,3 +11,5 @@ int main(int argc, char* argv[])
 {
     return Atomic::WebMain(argc, argv);
 }
+
+#endif

+ 6 - 3
Source/AtomicWebView/UIWebView.cpp

@@ -218,8 +218,7 @@ bool UIWebView::OnEvent(const TBWidgetEvent &ev)
     }
     else if (ev.type == EVENT_TYPE_SHORTCUT)
     {
-        // Currently handled by key combinations
-        /*
+        // These shortcuts are not being invoked with key combinations (Handle KeyDown/KeyUp)
         if (ev.ref_id == TBIDC("copy"))
         {
             webClient_->ShortcutCopy();
@@ -230,11 +229,14 @@ bool UIWebView::OnEvent(const TBWidgetEvent &ev)
             webClient_->ShortcutPaste();
             return true;
         }
-        if (ev.ref_id == TBIDC("cut"))
+        else if (ev.ref_id == TBIDC("cut"))
         {
             webClient_->ShortcutCut();
             return true;
         }
+
+        // Handled by key combinations in Handle KeyDown/KeyUp
+        /*
         else if (ev.ref_id == TBIDC("selectall"))
         {
             webClient_->ShortcutSelectAll();
@@ -252,6 +254,7 @@ bool UIWebView::OnEvent(const TBWidgetEvent &ev)
         }
         */
 
+
     }
 
     return UIWidget::OnEvent(ev);