Permalink
Browse files

Atomic C# iOS

Squashed commits:
[82410ba] Updating Linux Build
[38113c5] Build updates for Windows
[9024b32] Handle iOS AtomicNET reference on binary editor
[6a2b2d6] Map to AnyCPU for iPhone libraries, which aren't executables
[1f9bc0f] ./Build_AtomicEditor.sh --with-ios --with-android working on Mac
[1807791] Running on iOS
[10a6d4f] WIP Atomic C# iOS support
  • Loading branch information...
JoshEngebretson committed Sep 11, 2016
1 parent 64c3dd2 commit 1ec8f1037e86b1f48303fb5f3c5c0d18f1b181ab
Showing with 1,497 additions and 373 deletions.
  1. +58 −0 Build/CMake/IOS/AtomicNET.framework.plist
  2. +60 −0 Build/Scripts/Bootstrap.js
  3. +13 −8 Build/Scripts/BuildAndroid.js
  4. +44 −0 Build/Scripts/BuildAtomicNET.js
  5. +48 −0 Build/Scripts/BuildIOS.js
  6. +126 −63 Build/Scripts/BuildLinux.js
  7. +114 −59 Build/Scripts/BuildMac.js
  8. +107 −58 Build/Scripts/BuildWindows.js
  9. +2 −0 Build/Scripts/Host.js
  10. +24 −0 Build/Scripts/HostCommon.js
  11. +235 −0 Build/Scripts/Minimist.js
  12. +1 −1 Build/Scripts/Windows/CompileAndroid.bat
  13. +3 −0 Build/Scripts/Windows/CompileAtomicEditorPhase1.bat
  14. +2 −0 Build/Scripts/Windows/CompileAtomicEditorPhase2.bat
  15. +1 −36 Build_AtomicEditor.bat
  16. +3 −17 Build_AtomicEditor.sh
  17. +8 −1 Script/AtomicNET/AtomicNET/Application/Application.cs
  18. +2 −7 Script/AtomicNET/AtomicNET/Core/AtomicNET.cs
  19. +3 −1 Script/AtomicNET/AtomicNET/Core/Constants.cs
  20. +30 −13 Script/AtomicNET/AtomicNET/Core/NativeCore.cs
  21. +0 −18 Script/AtomicNET/AtomicNET/Core/NativeEvents.cs
  22. +144 −0 Script/AtomicNET/AtomicNET/Core/SDLEvents.cs
  23. +8 −0 Script/AtomicNET/AtomicNET/Graphics/Graphics.cs
  24. +26 −0 Script/AtomicNET/AtomicNETProject.json
  25. +0 −7 Script/AtomicNET/AtomicNETService/Program.cs
  26. +31 −0 Script/AtomicNET/AtomicProject.json
  27. +10 −0 Script/AtomicNET/Platform/iOS/ApiDefinition/ApiDefinition.cs
  28. +3 −0 Script/AtomicNET/Platform/iOS/AtomicNET/AtomicNETNative.framework.linkwith.cs
  29. +29 −0 Source/AtomicNET/NETNative/CMakeLists.txt
  30. +8 −6 Source/AtomicNET/NETNative/NETAtomicPlayer.cpp
  31. +53 −2 Source/AtomicNET/NETNative/NETCInterop.cpp
  32. +1 −1 Source/AtomicPlayer/Application/CMakeLists.txt
  33. +1 −1 Source/CMakeLists.txt
  34. +43 −9 Source/ToolCore/Command/NETCmd.cpp
  35. +2 −2 Source/ToolCore/Command/NETCmd.h
  36. +76 −32 Source/ToolCore/NETTools/NETBuildSystem.cpp
  37. +6 −5 Source/ToolCore/NETTools/NETBuildSystem.h
  38. +157 −23 Source/ToolCore/NETTools/NETProjectGen.cpp
  39. +13 −2 Source/ToolCore/NETTools/NETProjectGen.h
  40. +2 −1 Source/ToolCore/Project/ProjectSettings.cpp
@@ -0,0 +1,58 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleIdentifier</key>
<string>com.atomicgameengine.atomicnetframework</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Mono</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>3.12</string>
<key>NSPrincipalClass</key>
<string></string>
<key>CFBundleExecutable</key>
<string>AtomicNETNative</string>
<key>BuildMachineOSBuild</key>
<string>13F34</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>iPhoneOS</string>
</array>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>12D508</string>
<key>DTPlatformName</key>
<string>iphoneos</string>
<key>DTPlatformVersion</key>
<string>8.2</string>
<key>DTSDKBuild</key>
<string>12D508</string>
<key>DTSDKName</key>
<string>iphoneos8.2</string>
<key>DTXcode</key>
<string>0620</string>
<key>DTXcodeBuild</key>
<string>6C131e</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
</dict>
</plist>
View
@@ -1 +1,61 @@
var os = require('os');
// Parse args
var options = require('./Minimist')(process.argv.slice(2));
var cmd = options._[0];
// Load `jake` global
require('../node_modules/jake/lib/jake');
// Load jake tasks, etc
var host = require('./Host');
// Make options availabe to host
host.options = options;
function printHelp() {
console.log("\nAtomic Editor Build Script")
console.log("--------------------------")
console.log("--help : This help text")
console.log("--with-android : Build with Android platform support");
console.log("--with-ios : Build with iOS platform support");
console.log("--debug : Build debug version of the editor and associated platform runtimes")
console.log("--noclean : Do not clean before building, useful during development")
console.log("--nonet : Build without AtomicNET C# scripting support")
console.log("--------------------------")
process.exit(0);
}
if (options["help"]) {
printHelp();
}
// Atomic Editor Build
if (cmd == "buildeditor") {
console.log("\n\nBuilding Atomic Editor, this process will take a few minutes\n");
var buildTask = jake.Task['build:atomiceditor'];
if (options["with-android"]) {
if (!process.env.ANDROID_NDK) {
console.log("\nANDROID_NDK environment variable not set, exiting\n");
process.exit(1);
}
}
if (options["with-ios"]) {
if (os.platform() != "darwin") {
console.log("\niOS platform requires macOS, exiting\n");
process.exit(1);
}
}
buildTask.invoke();
}
@@ -2,8 +2,8 @@ var fs = require('fs-extra');
var path = require("path");
var host = require("./Host");
var os = require('os');
var atomicRoot = host.atomicRoot;
var atomicRoot = host.atomicRoot;
var buildDir = host.artifactsRoot + "Build/Android/";
namespace('build', function() {
@@ -12,34 +12,39 @@ namespace('build', function() {
async: true
}, function() {
// Clean build
common.cleanCreateDir(buildDir);
var options = host.options;
var cleanBuild = options["noclean"] ? false : true;
var debug = options["debug"] ? true : false;
var config = debug ? "Debug" : "Release";
host.setupDirs(cleanBuild, [buildDir]);
process.chdir(buildDir);
var cmds = [];
if (os.platform() == "win32") {
cmds.push(atomicRoot + "Build/Scripts/Windows/CompileAndroid.bat");
cmds.push(atomicRoot + "Build/Scripts/Windows/CompileAndroid.bat " + config);
}
else {
cmds.push("cmake -G \"Unix Makefiles\" -DCMAKE_TOOLCHAIN_FILE=../../../Build/CMake/Toolchains/android.toolchain.cmake -DCMAKE_BUILD_TYPE=Release ../../../");
cmds.push("cmake -G \"Unix Makefiles\" -DCMAKE_TOOLCHAIN_FILE=../../../Build/CMake/Toolchains/android.toolchain.cmake -DCMAKE_BUILD_TYPE=" + config + " ../../../");
cmds.push("make -j4");
}
jake.exec(cmds, function() {
var editorAppFolder = host.artifactsRoot + (os.platform() == "win32" ? "AtomicEditor/" : "AtomicEditor/AtomicEditor.app/");
var editorResourceFolder = host.artifactsRoot + (os.platform() == "win32" ? "AtomicEditor/Resources/" : "AtomicEditor/AtomicEditor.app/Contents/Resources/");
// Install Deployment
fs.copySync(buildDir + "Source/AtomicPlayer/Application/libAtomicPlayer.so",
editorAppFolder + "Contents/Resources/ToolData/Deployment/Android/libs/armeabi-v7a/libAtomicPlayer.so");
editorResourceFolder + "ToolData/Deployment/Android/libs/armeabi-v7a/libAtomicPlayer.so");
complete();
}, {
printStdout: true,
breakOnError : false
printStderr: true
});
});
@@ -0,0 +1,44 @@
var fs = require('fs-extra');
var path = require("path");
var host = require("./Host");
var os = require('os');
var atomicRoot = host.atomicRoot;
namespace('build', function() {
task('atomicnet', {
async: true
}, function() {
var options = host.options;
var android = options["with-android"] ? true : false;
var ios = options["with-ios"] ? true : false;
var debug = options["debug"] ? true : false;
var cmds = [];
platforms = "-platform desktop";
if (android)
platforms += " -platform android";
if (ios)
platforms += " -platform ios";
var netCmd = host.atomicTool + " net compile " + atomicRoot + "Script/AtomicNET/AtomicNETProject.json " + platforms + " -config " + (debug ? "Debug" : "Release");
console.log(netCmd);
cmds.push(netCmd);
jake.exec(cmds, function() {
complete();
}, {
printStdout: true,
printStderr: true
});
});
}); // end of build namespace
View
@@ -0,0 +1,48 @@
var fs = require('fs-extra');
var path = require("path");
var host = require("./Host");
var os = require('os');
var atomicRoot = host.atomicRoot;
var buildDir = host.artifactsRoot + "Build/IOS/";
namespace('build', function() {
task('ios_native', {
async: true
}, function() {
var options = host.options;
var cleanBuild = options["noclean"] ? false : true;
var debug = options["debug"] ? true : false;
var NETNativeSrcDir = buildDir + "Source/AtomicNET/NETNative/" + (debug ? "Debug" : "Release") + "-iphoneos/";
var NETNativeDestDir = host.artifactsRoot + "AtomicNET/" + (debug ? "Debug" : "Release") + "/Native/iOS/";
host.setupDirs(cleanBuild, [buildDir, NETNativeDestDir]);
process.chdir(buildDir);
var cmds = [];
cmds.push("cmake -DIOS=1 -DATOMIC_DEV_BUILD=0 -G Xcode ../../../");
cmds.push("xcodebuild -configuration " + (debug ? "Debug" : "Release") + " -parallelizeTargets -jobs 4");
//cmds.push("cd \"" + NETNativeSrcDir + "\" && install_name_tool -id @rpath/AtomicNETNative.framework/AtomicNETNative AtomicNETNative.framework/AtomicNETNative");
//cmds.push("cd \"" + NETNativeSrcDir + "\" && codesign --deep --force --verify --sign \"iPhone Developer\" ./AtomicNETNative.framework/");
cmds.push("cd \"" + NETNativeSrcDir + "\" && zip -r AtomicNETNative.framework.zip AtomicNETNative.framework");
jake.exec(cmds, function() {
fs.copySync(NETNativeSrcDir + "AtomicNETNative.framework", NETNativeDestDir + "AtomicNETNative.framework");
fs.copySync(NETNativeSrcDir + "AtomicNETNative.framework.zip", NETNativeDestDir + "AtomicNETNative.framework.zip");
complete();
}, {
printStdout: true,
printStderr: true
});
});
}); // end of build namespace
Oops, something went wrong.

0 comments on commit 1ec8f10

Please sign in to comment.