diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2b6cc3b --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +build/ +/lib/ +util/android-studio/Moai/moai/src/main/libs/ +util/android-studio/Moai/moai/src/main/obj/local/ +util/android-studio/Moai/moai/src/main/jni/ +bin/env-local.bat +util/moai.exe +bin/moai.exe +scripts/env-local.bat +env-local.sh +/bin/moai +/moaisdk-* +host-templates/ios/Moai Template/host-ios +host-templates/ios/Moai Template/lib +host-templates/osx/Moai Template/app/host-modules +host-templates/osx/Moai Template/app/host-sdl +host-templates/osx/Moai Template/lib +host-templates/windows/vs2015/host-sdl/ +host-templates/windows/vs2015/host-modules/ +host-templates/windows/vs2015/Debug/ +plugins/ diff --git a/.gitmodules b/.gitmodules index 3095463..148e6b5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,3 @@ -[submodule "moai-dev"] - path = moai-dev - url = https://github.com/moai/moai-dev - branch = develop +[submodule "sdk/moai"] + path = sdk/moai +url=https://github.com/halfnelson/moai-sdk \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 47a192c..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,6 +0,0 @@ -shallow_clone: true -clone_depth: 2 - -build_script: bin\ci-windows.bat - -test: off diff --git a/bin/.gitignore b/bin/.gitignore deleted file mode 100644 index dc3da10..0000000 --- a/bin/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -ios/ -osx/ diff --git a/bin/api-reference-parser/.bundle/config b/bin/api-reference-parser/.bundle/config deleted file mode 100644 index 57d4641..0000000 --- a/bin/api-reference-parser/.bundle/config +++ /dev/null @@ -1,3 +0,0 @@ ---- -BUNDLE_PATH: vendor/bundle -BUNDLE_DISABLE_SHARED_GEMS: '1' diff --git a/bin/api-reference-parser/Gemfile b/bin/api-reference-parser/Gemfile deleted file mode 100644 index c0e746c..0000000 --- a/bin/api-reference-parser/Gemfile +++ /dev/null @@ -1,5 +0,0 @@ -source 'https://rubygems.org' - -gem 'ruby-progressbar' -gem 'haml' -gem 'nokogiri' \ No newline at end of file diff --git a/bin/api-reference-parser/Gemfile.lock b/bin/api-reference-parser/Gemfile.lock deleted file mode 100644 index 9561820..0000000 --- a/bin/api-reference-parser/Gemfile.lock +++ /dev/null @@ -1,16 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - haml (4.0.3) - tilt - nokogiri (1.5.9) - ruby-progressbar (1.0.2) - tilt (1.4.1) - -PLATFORMS - ruby - -DEPENDENCIES - haml - nokogiri - ruby-progressbar diff --git a/bin/api-reference-parser/intro_page.haml b/bin/api-reference-parser/intro_page.haml deleted file mode 100644 index b890e6d..0000000 --- a/bin/api-reference-parser/intro_page.haml +++ /dev/null @@ -1,59 +0,0 @@ -%h1 Welcome to Moai! - -%p - Thanks for installing the SDK.  Here's the scoop. - -%h2 Sample code - -%p - Go to the samples folder, choose a sample, then execute run.bat (or run.sh) to see it perform. -%p - One of our priorities is to build richer samples for Moai developers, so if you'd like to see a particular code sample, let us know by posting in the - %a{ href: "http://getmoai.com/forums/" } Moai Forums. - -%h2 FAQ - -%p - Answers to frequently asked questions are available in the - %a{ href: "http://getmoai.com/marketing/moai-faqs.html" } Moai FAQ. - -%h2 Wiki - -%p - You can find detailed documentation, instructions and other helpful information in the - %a{ href: "http://getmoai.com/wiki/" } Moai Wiki. - -%h2 Moai Cloud - -%p - You can sign in for a Moai Cloud account which allows you to upload Lua scripts to be hosted and run as web services via the - %a{ href: "http://dashboard.moaicloud.com/" } Moai Cloud Dashboard. - -%p - If you have support questions, post them to the - %a{ href: "http://getmoai.com/forums/moai-cloud-developer-support.html" } Moai Cloud Developer Support Forum - or check out the - %a{ href: "http://getmoai.com/wiki/" } Moai Wiki. - -%h2 License -%p - This SDK uses the - %a{ href: "http://www.opensource.org/licenses/cpal_1.0" } CPAL license. - -%h2 Made with Moai SDK -%p - Refer to the - %a{ href: "http://getmoai.com/marketing/made-with-moai.html"} Made With Moai page - for attribution screens to include with games made with Moai. - -%h2 Summary -%p - Happy game-making with Moai. -%p - Check out the - %a{ href: "http://getmoai.com/wiki/" } Moai Wiki - , ping us through - %a{ href: "http://getmoai.com/forums/" } the forums - or email us at - %a{ href: "mailto:support@getmoai.com" } support@getmoai.com - if you need help. The Moai team is here to help. \ No newline at end of file diff --git a/bin/api-reference-parser/lib/moai_api_parser.rb b/bin/api-reference-parser/lib/moai_api_parser.rb deleted file mode 100644 index 77da088..0000000 --- a/bin/api-reference-parser/lib/moai_api_parser.rb +++ /dev/null @@ -1,417 +0,0 @@ -require 'ruby-progressbar' -require 'haml' -require 'nokogiri' -require 'fileutils' - -class MoaiAPIParser - - # - # source should be a string indicating the directory - # where all the source files are located. - attr_accessor :source, :version_major, :version_revision, :version_author - - # - # destination should be a string indicating the directory - # where the generated documentation should go to. - attr_accessor :destination - - def initialize ( source, destination ) - - # - # Check if source directory exists and it's actually - # a directory. - if !(File.exists?(source) and File.directory?(source)) - # Raise an error and exit if that's the case - raise "Source directory doesn't exist" - exit 1 - end - - self.source = source - self.destination = destination - - end - - # - # this will make all the magic happen - def parse - copy_source - parse_with_lua - parse_version - parse_with_doxygen - inject_intro_page - cleanup_doxygen_html - cleanup_doxygen_js - cleanup_extra_files - end - - # - # This method copies our source tree to a temporary directory - def copy_source - FileUtils.makedirs(destination) - FileUtils.cp_r source, destination - self.source = destination + "src" - - # Remove the files that are not from MOAI - # This includes: - # * FMOD Files ( using /Source/ as the pattern to match ) - # * OpenGLContext from NaCL - Dir.glob(destination + 'src/**/*').each { |f| - if !File.directory?(f) and (( f =~ /\/Source\// ) or ( f =~ /opengl_context\.h/)) - File.delete(f) - end - } - - end - - # - # We use some custom tags to annotate our source code. - # In order for that to be parsable by doxygen we need to - # run a couple of replacements. - def parse_with_lua - ['h', 'cpp', 'mm'].each do |extension| - parse_with_lua_for(extension) - end - end - - # - # We have lua-based parsers that search and replace - # our code for specific stuff using MOAIParser. - # This method searchs for all the files for a specific - # extension and then runs the replacements using - # the system's moai executable - def parse_with_lua_for(extension) - - # - # Our parsers expect a file called - # input.[extension] and return a file called output.[extension] - # so we need to cleanup everything just in case. - if File.exists?("input.#{extension}") - FileUtils.rm ("input.#{extension}") - end - if File.exists?("output.#{extension}") - FileUtils.rm ("output.#{extension}") - end - - # Since we have different scripts for each different - # file type, we have to decide which script to run... - parser_script = File.dirname(__FILE__) + "/../lua-parsers/" - case extension - when "h" - parser_script += "header-files.lua" - when "cpp" - parser_script += "source-files-cpp.lua" - when "mm" - parser_script += "source-files-mm.lua" - end - - # Now we iterate through all these files and - # parse them. - files = all_source_files(source, extension) - pb = ProgressBar.create(:title => "Fixing #{extension}", :total => files.size) - files.each do |file| - FileUtils.cp file, "input.#{extension}" - system "moai #{parser_script} >/dev/null" - - # The moai parser outputs a file called output.[extension] - # so we want to copy it back. - FileUtils.mv "output.#{extension}", file - FileUtils.rm "input.#{extension}" - pb.increment - end - - end - - def parse_version - File.open ( destination + "src/config-default/moai_version_major.h" ) do |file| - data = file.read - - data.match ( /MOAI_SDK_VERSION_MAJOR_MINOR\s(\S*)\s*/ ) - self.version_major = $1 - end - File.open ( destination + "src/config-default/moai_version_minor.h" ) do |file| - data = file.read - - data.match ( /MOAI_SDK_VERSION_REVISION\s(\S*)\s*/ ) - self.version_revision = $1 - end - File.open ( destination + "src/config-default/moai_version_author.h" ) do |file| - data = file.read - - data.match ( /MOAI_SDK_VERSION_AUTHOR\s\"(.*)\"\s*/ ) - self.version_author = $1 - end - end - - def full_version - v = "#{version_major}" - - if version_revision.to_i > 0 - v += " revision #{version_revision}" - v += " (#{version_author})" if version_author.length > 0 - else - v += " (ad hoc build by #{version_author})" if version_author.length > 0 - end - v - end - - def parse_with_doxygen - configure_doxygen - system ( "doxygen #{destination}moai-api-doxygen.cfg" ) - end - - def configure_doxygen - # Copy default configuration file to our destination - # directory. - FileUtils.cp(File.dirname(__FILE__) + '/../moai-api-doxygen.cfg', destination + "moai-api-doxygen.cfg") - - # Replace the output and input directories with the correct ones - file = File.open(destination + 'moai-api-doxygen.cfg', 'r') - config = file.read - - config.gsub!(/@@OUTPUT_DIRECTORY@@/, destination) - config.gsub!(/@@INPUT_DIRECTORY@@/, source) - config.gsub!(/@@VERSION@@/, "#{full_version}") - - File.open(destination + 'moai-api-doxygen.cfg', 'w') do |file| - file.write config - end - end - - # - # We're using a customized intro page that gets injected into - # doxygen's index.html through this method. - # To modify the intro page, just change the intro_page.haml on - # the root directory of this library. - # It's written using http://haml.info/ - def inject_intro_page - - # Open the haml file and get the html version - file = File.open(File.dirname(__FILE__) + "/../intro_page.haml", "r") - haml_string = file.read - html_string = Haml::Engine.new(haml_string).render - file.close - - # Open doxygen's index.html and inject the generated html - file = File.open(destination + "html/index.html", "r") - index_string = file.read - index_string.gsub!(/
\s+<\/div>/, - "
\n#{html_string}<\/div>") - file.close - - # write the result string into index.html - file = File.open(destination + "html/index.html", "w") do |file| - file.write ( index_string ) - end - end - - # There are some other replacements that are needed - # for our final version of the docs. - # These are made using gsub and a set of predefined regexps - HTML_REPLACEMENTS = [ - { :regexp => /Static .*? Member Functions/, :replace_with => "Function List" }, - { :regexp => /Member Function Documentation/, :replace_with => "Function Documentation" }, - { :regexp => /static int(?.*?\"\>?)_(?.*?\<\/a\>?)/, :replace_with => "\\k\\k" }, - { :regexp => /\(lua_State \*L\)/, :replace_with => "" }, - { :regexp => /\>lua_State \*.*?\ "><" }, - { :regexp => /int \<(?.*?)MOAI.*?::.*_(?.*?)\<\/a\>/, :replace_with => "<\\k\\k" }, - { :regexp => /\L\<\/em\>/, :replace_with => "" }, - { :regexp => /\\<\/td\>/, :replace_with => "" }, - { :regexp => /\\<\/td\>/, :replace_with => "" }, - { :regexp => /\\(\<\/td\>/, :replace_with => "" }, - { :regexp => /\\)\<\/td\>/, :replace_with => "" }, - { :regexp => /\[static, private\]/, :replace_with => "" }, - { :regexp => /\[static, protected\]/, :replace_with => "" }, - { :regexp => /\[private, static\]/, :replace_with => "" }, - { :regexp => /\[protected, static\]/, :replace_with => "" }, - { :regexp => /\_(?.*?)\n/, :replace_with => "
  • \\k" }, - - # Methods in -members.html files - { :regexp => /\\.+?)\"\>_(?.+?)\<\/a\>\<\/td\>/, :replace_with => "\">\\k\n"}, - - # - # Doxytags - { :regexp => /\<\!\-\-\sdoxytag:\smember="(?.+?)_(?.+?)\"/, :replace_with => " + 64dp + diff --git a/host-templates/android/moai/src/main/res/values/dimens.xml b/host-templates/android/moai/src/main/res/values/dimens.xml new file mode 100644 index 0000000..47c8224 --- /dev/null +++ b/host-templates/android/moai/src/main/res/values/dimens.xml @@ -0,0 +1,5 @@ + + + 16dp + 16dp + diff --git a/host-templates/android/moai/src/main/res/values/strings.xml b/host-templates/android/moai/src/main/res/values/strings.xml new file mode 100644 index 0000000..c404811 --- /dev/null +++ b/host-templates/android/moai/src/main/res/values/strings.xml @@ -0,0 +1,8 @@ + + + + Moai + Hello world! + Settings + + diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/res/values/styles.xml b/host-templates/android/moai/src/main/res/values/styles.xml similarity index 96% rename from host-templates/android/studio/MoaiTemplate/app/src/main/res/values/styles.xml rename to host-templates/android/moai/src/main/res/values/styles.xml index 084b42b..766ab99 100644 --- a/host-templates/android/studio/MoaiTemplate/app/src/main/res/values/styles.xml +++ b/host-templates/android/moai/src/main/res/values/styles.xml @@ -1,8 +1,8 @@ - - - - - - + + + + + + diff --git a/host-templates/android/settings.gradle b/host-templates/android/settings.gradle new file mode 100644 index 0000000..4c14712 --- /dev/null +++ b/host-templates/android/settings.gradle @@ -0,0 +1,15 @@ +include ':moai' +include ':moai-adcolony' +include ':moai-amazonbilling' +include ':moai-chartboost' +include ':moai-core' +include ':moai-crittercism' +include ':moai-facebook' +include ':moai-flurry' +include ':moai-fortumo' +include ':moai-googlebilling' +include ':moai-googleplayservices' +include ':moai-googlepush' +include ':moai-tapjoy' +include ':moai-twitter' +include ':moai-vungle' diff --git a/host-templates/android/studio/MoaiTemplate/MoaiTemplate.iml b/host-templates/android/studio/MoaiTemplate/MoaiTemplate.iml deleted file mode 100644 index 0bb6048..0000000 --- a/host-templates/android/studio/MoaiTemplate/MoaiTemplate.iml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/host-templates/android/studio/MoaiTemplate/Readme.md b/host-templates/android/studio/MoaiTemplate/Readme.md deleted file mode 100644 index 0d19caa..0000000 --- a/host-templates/android/studio/MoaiTemplate/Readme.md +++ /dev/null @@ -1,35 +0,0 @@ -##Android Host (Android Studio Gradle) - -###Requirements - * Oracle JDK 1.7+ - * set `JAVA_HOME` to path of the jdk - * Download and Install [Android Studio and SDK Manager](https://developer.android.com/sdk/installing/studio.html) - * Download and Install Android NDK r9d - * [Windows](http://dl.google.com/android/ndk/android-ndk-r9d-windows-x86.zip) - * [Mac](http://dl.google.com/android/ndk/android-ndk-r9d-darwin-x86_64.tar.bz2) - * [Linux](http://dl.google.com/android/ndk/android-ndk-r9d-linux-x86_64.tar.bz2) - -###Setup your lua path - * open `gradle.properties` in the root of the project - * edit the moaiLuaRoot setting to point to your lua sources (you can use paths relative to the `gradle.properties` file, avoid drive letters or escape the `:` with `\`) - * edit moaiModules to include the plugins you want (currently for this proof of concept only moai-android-twitter is available) - - -###Customise your application - * You can edit your application config from android studio or just from a file browser - * At the very least you will need to change the applicationId in the `./app/build.gradle` file (this is what identifies your app on the play store and must be unique and constant per app) - * open `./app/build.gradle` - * Change applicationId, (and version etc if required) under `defaultConfig` - - - * To change what your app is called you should edit the `app_name` in the `./app/src/main/res/values/strings.xml` file - * open `./app/src/main/res/values/strings.xml` - * Change the fields you want changed (`app_name` at least). - - -###Compile with android studio - * Before compiling gradle/android studio need to know where your ndk and sdk are, edit the `local.properties` in the root of the project and ensure `sdk.dir` and `ndk.dir` are set correctly - - * Run android studio and `Import Project...`, then launch with the play button __OR__ run `build.sh` (build.bat on windows) - - \ No newline at end of file diff --git a/host-templates/android/studio/MoaiTemplate/app/.gitignore b/host-templates/android/studio/MoaiTemplate/app/.gitignore deleted file mode 100644 index 3543521..0000000 --- a/host-templates/android/studio/MoaiTemplate/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/host-templates/android/studio/MoaiTemplate/app/build.gradle b/host-templates/android/studio/MoaiTemplate/app/build.gradle deleted file mode 100644 index d10645c..0000000 --- a/host-templates/android/studio/MoaiTemplate/app/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -apply plugin: 'com.android.application' - - - -android { - - defaultConfig { - applicationId "com.getmoai.MoaiTemplate" - versionCode 1 - versionName "1.0" - } - - sourceSets.main { - jni.srcDirs = [] - jniLibs.srcDir 'src/main/libs' - assets.srcDir 'bootstrap' - } - - packagingOptions { - exclude 'META-INF/LICENSE.txt' - } -} - -apply from: 'moai.gradle' //leave after android config block, it needs applicationId - - -dependencies { - compile 'com.android.support:appcompat-v7:22.1.1' -} diff --git a/host-templates/android/studio/MoaiTemplate/app/moai.gradle b/host-templates/android/studio/MoaiTemplate/app/moai.gradle deleted file mode 100644 index 0c3db96..0000000 --- a/host-templates/android/studio/MoaiTemplate/app/moai.gradle +++ /dev/null @@ -1,101 +0,0 @@ - - -apply plugin: MoaiPlugin - - - -class MoaiPlugin implements Plugin { - - void apply(Project project) { - - project.task( type: Exec, 'runApp') { - println("APPID="+project.android.defaultConfig.applicationId) - def appId = project.android.defaultConfig.applicationId - if (System.properties['os.name'].toLowerCase().contains('windows')) { - - commandLine "cmd", "/c", "adb", "shell", "am","start","-n","$appId/com.moaisdk.core.MoaiActivity" - } - else { - commandLine "adb", "shell", "am","start","-n","$appId/com.moaisdk.core.MoaiActivity" - } - } - project.tasks.getByName("runApp").dependsOn('installDebug') - - def libRoot = project.file("../"+project.moaiLibRoot) //gradle properties are one down - - //def srcRoot = project.file("../"+project.moaiSrcRoot) - //ndk build task - project.task( type: Exec, 'libmoaiBuild' ) { - workingDir project.file('src/main/jni') - def ndkDir = project.plugins.getPlugin('com.android.application').sdkHandler.getNdkFolder() - - - def my_modules = project.moaiModules.replaceAll(","," ") - def my_flags = project.moaiModules.split(',').findAll { w -> w.trim() != ""} - my_flags = my_flags.collect { - i -> i.trim().toUpperCase().replaceAll('-','_').replaceFirst('^MOAI_','-DAKU_WITH_') + "=1" - } - def flags = my_flags.join(' ') - println("Building with flags: ${flags}") - println("Building with libs: ${my_modules}") - if (System.properties['os.name'].toLowerCase().contains('windows')) { - def winLibRoot = libRoot.getCanonicalPath().replace('\\','/') - commandLine "$ndkDir/ndk-build.cmd", "MOAI_LIB_DIR=$winLibRoot", "MOAI_STATIC_LIBRARIES=$my_modules", "MOAI_AKU_FLAGS=$flags" - } - else { - commandLine "$ndkDir/ndk-build", "MOAI_LIB_DIR=$libRoot", "MOAI_STATIC_LIBRARIES=$my_modules", "MOAI_AKU_FLAGS=$flags" - } - } - - project.task( type: Delete, 'libmoaiClean' ) { - def libmoais = project.fileTree('src/main/libs') { - include '**/libmoai.so' - } - delete libmoais - delete project.file('src/main/obj/local') - - } - - //dependency setup - project.tasks.withType(JavaCompile) { - compileTask -> compileTask.dependsOn('libmoaiBuild') - } - - project.tasks.getByName("clean").dependsOn('libmoaiClean') - - - //add lua source - if (project.hasProperty('moaiLuaRoot')) { - def luaRoot = project.file(project.moaiLuaRoot) - if (!luaRoot.exists()) luaRoot = project.file('../'+project.moaiLuaRoot) //relative path in gradle.properties is relative to template not project - project.android.sourceSets.main { - assets.srcDir luaRoot - } - } - - - //add moai-android items - project.dependencies { - compile project.project(":core") - } - - //add module items - def modules = project.moaiModules.split(',').collect { i -> i.trim() } - modules.each { module -> - if (module == "") return - //include a project if it has one - if (project.findProject(":${module}")) { - project.dependencies { - compile project.project(":${module}") - } - } - } - - - } -} - - - - - diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/AndroidManifest.xml b/host-templates/android/studio/MoaiTemplate/app/src/main/AndroidManifest.xml deleted file mode 100644 index 5664141..0000000 --- a/host-templates/android/studio/MoaiTemplate/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/jni/Android.mk b/host-templates/android/studio/MoaiTemplate/app/src/main/jni/Android.mk deleted file mode 100644 index d5ef546..0000000 --- a/host-templates/android/studio/MoaiTemplate/app/src/main/jni/Android.mk +++ /dev/null @@ -1,51 +0,0 @@ -LOCAL_PATH := $(call my-dir) -MOAI_LIB_DIR := $(LOCAL_PATH)/../../../libmoai -MOAI_LIB_ROOT := $(MOAI_LIB_DIR)/$(TARGET_ARCH_ABI) -MOAI_MODULES := $(LOCAL_PATH)/MoaiModules.mk -MOAI_AKU_FLAGS := - -include $(MOAI_MODULES) - - -MOAI_ANDROID_MODULES := $(MOAI_LIB_DIR)/modules/jni/moaiandroid.mk -MOAI_JNI_MODULES := -MOAI_STATIC_LIBRARIES := - -include $(MOAI_ANDROID_MODULES) - - - -include $(CLEAR_VARS) - - -LOCAL_MODULE := moai -LOCAL_CFLAGS := -DDISABLE_IMPORTGL -LOCAL_LDLIBS := -llog -lGLESv1_CM -lGLESv2 -landroid -lEGL -LOCAL_STATIC_LIBRARIES := $(MOAI_STATIC_LIBRARIES) moai-android moai-image-webp moai-image-pvr moai-image-jpg moai-image-png moai-http-client moai-http-server moai-luaext moai-box2d moai-untz moai-crypto moai-sim moai-util moai-core zlcore luaext luasql luacrypto luacurl luasocket luafilesystem liblua-static zlcrypto zlvfs contrib expat freetype png box2d zlib jpg pvr jansson untz vorbis ogg sqlite3 mongoose tinyxml tlsf curl ssl crypto cares sfmt tess webp cpufeatures - -# sfmt chipmunk curl ssl crypto tlsf tinyxml mongoose sqlite3 ogg vorbis untz jansson cares jpg zlib box2d png freetype expat contrib zlvfs liblua-static luafilesystem luasocket luacurl luacrypto luasql luaext zlcore moai-core moai-util moai-sim moai-untz moai-box2d moai-luaext moai-http-client moai-chipmunk moai-android - -LOCAL_SRC_PATH := $(LOCAL_PATH) -LOCAL_SRC_FILES := $(MOAI_JNI_MODULES) -LOCAL_SRC_FILES += jni.cpp -LOCAL_SRC_FILES += moai.cpp -LOCAL_SRC_FILES += host-modules/aku_modules.cpp -LOCAL_SRC_FILES += host-modules/aku_modules_util.cpp -LOCAL_SRC_FILES += $(MOAI_LIB_DIR)/src/host-modules/aku_plugins.cpp -LOCAL_SRC_FILES += host-modules/aku_modules_android.cpp - - -LOCAL_C_INCLUDES := $(LOCAL_PATH) -LOCAL_C_INCLUDES += $(MOAI_LIB_ROOT)/include -LOCAL_C_INCLUDES += $(MOAI_LIB_ROOT)/include/config -LOCAL_C_INCLUDES += $(MOAI_LIB_ROOT)/include/lua -LOCAL_C_INCLUDES += $(MOAI_LIB_ROOT)/include/expat -LOCAL_C_INCLUDES += $(MOAI_LIB_ROOT)/include/tinyxml -LOCAL_C_INCLUDES += $(MOAI_LIB_ROOT)/include/freetype -LOCAL_C_INCLUDES += $(MOAI_LIB_ROOT)/include/jansson - -LOCAL_CPPFLAGS := -DAKU_WITH_ANDROID=1 $(MOAI_AKU_FLAGS) - -include $(BUILD_SHARED_LIBRARY) - - diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/jni/Application.mk b/host-templates/android/studio/MoaiTemplate/app/src/main/jni/Application.mk deleted file mode 100644 index 5c26626..0000000 --- a/host-templates/android/studio/MoaiTemplate/app/src/main/jni/Application.mk +++ /dev/null @@ -1,3 +0,0 @@ -APP_ABI := armeabi armeabi-v7a x86 -APP_PLATFORM := android-10 - APP_STL := gnustl_static \ No newline at end of file diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/jni/MoaiModules.mk b/host-templates/android/studio/MoaiTemplate/app/src/main/jni/MoaiModules.mk deleted file mode 100644 index e26842c..0000000 --- a/host-templates/android/studio/MoaiTemplate/app/src/main/jni/MoaiModules.mk +++ /dev/null @@ -1,289 +0,0 @@ - -MOAI_LIBS := $(MOAI_LIB_ROOT)/lib -include $(CLEAR_VARS) - - -LOCAL_MODULE := sfmt -LOCAL_SRC_FILES := $(MOAI_LIBS)/libsfmt.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := pvr -LOCAL_SRC_FILES := $(MOAI_LIBS)/libpvr.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := moai-core -LOCAL_SRC_FILES := $(MOAI_LIBS)/libmoai-core.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := curl -LOCAL_SRC_FILES := $(MOAI_LIBS)/libcurl.a - -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) - -LOCAL_MODULE := ssl -LOCAL_SRC_FILES := $(MOAI_LIBS)/libssl.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := tess -LOCAL_SRC_FILES := $(MOAI_LIBS)/libtess.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := crypto -LOCAL_SRC_FILES := $(MOAI_LIBS)/libcrypto.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := tlsf -LOCAL_SRC_FILES := $(MOAI_LIBS)/libtlsf.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := moai-http-client -LOCAL_SRC_FILES := $(MOAI_LIBS)/libmoai-http-client.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := luacrypto -LOCAL_SRC_FILES := $(MOAI_LIBS)/libluacrypto.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := tinyxml -LOCAL_SRC_FILES := $(MOAI_LIBS)/libtinyxml.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := mongoose -LOCAL_SRC_FILES := $(MOAI_LIBS)/libmongoose.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := sqlite3 -LOCAL_SRC_FILES := $(MOAI_LIBS)/libsqlite3.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := ogg -LOCAL_SRC_FILES := $(MOAI_LIBS)/libogg.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := vorbis -LOCAL_SRC_FILES := $(MOAI_LIBS)/libvorbis.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := untz -LOCAL_SRC_FILES := $(MOAI_LIBS)/libuntz.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := moai-luaext -LOCAL_SRC_FILES := $(MOAI_LIBS)/libmoai-luaext.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := moai-untz -LOCAL_SRC_FILES := $(MOAI_LIBS)/libmoai-untz.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := moai-box2d -LOCAL_SRC_FILES := $(MOAI_LIBS)/libmoai-box2d.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := moai-crypto -LOCAL_SRC_FILES := $(MOAI_LIBS)/libmoai-crypto.a - -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) - -LOCAL_MODULE := moai-util -LOCAL_SRC_FILES := $(MOAI_LIBS)/libmoai-util.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := moai-sim -LOCAL_SRC_FILES := $(MOAI_LIBS)/libmoai-sim.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := liblua-static -LOCAL_SRC_FILES := $(MOAI_LIBS)/libliblua-static.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := luafilesystem -LOCAL_SRC_FILES := $(MOAI_LIBS)/libluafilesystem.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := jansson -LOCAL_SRC_FILES := $(MOAI_LIBS)/libjansson.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := cares -LOCAL_SRC_FILES := $(MOAI_LIBS)/libcares.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := jpg -LOCAL_SRC_FILES := $(MOAI_LIBS)/libjpg.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := luasocket -LOCAL_SRC_FILES := $(MOAI_LIBS)/libluasocket.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := zlcore -LOCAL_SRC_FILES := $(MOAI_LIBS)/libzlcore.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := zlcrypto -LOCAL_SRC_FILES := $(MOAI_LIBS)/libzlcrypto.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := zlib -LOCAL_SRC_FILES := $(MOAI_LIBS)/libzlib.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := box2d -LOCAL_SRC_FILES := $(MOAI_LIBS)/libbox2d.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := moai-android -LOCAL_SRC_FILES := $(MOAI_LIBS)/libmoai-android.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := png -LOCAL_SRC_FILES := $(MOAI_LIBS)/libpng.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := freetype -LOCAL_SRC_FILES := $(MOAI_LIBS)/libfreetype.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := expat -LOCAL_SRC_FILES := $(MOAI_LIBS)/libexpat.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := contrib -LOCAL_SRC_FILES := $(MOAI_LIBS)/libcontrib.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := luasql -LOCAL_SRC_FILES := $(MOAI_LIBS)/libluasql.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := moai-spine -LOCAL_SRC_FILES := $(MOAI_LIBS)/libmoai-spine.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := zlvfs -LOCAL_SRC_FILES := $(MOAI_LIBS)/libzlvfs.a - -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) - -LOCAL_MODULE := luacurl -LOCAL_SRC_FILES := $(MOAI_LIBS)/libluacurl.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := moai-image-jpg -LOCAL_SRC_FILES := $(MOAI_LIBS)/libmoai-image-jpg.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := moai-image-png -LOCAL_SRC_FILES := $(MOAI_LIBS)/libmoai-image-png.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := moai-image-pvr -LOCAL_SRC_FILES := $(MOAI_LIBS)/libmoai-image-pvr.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := cpufeatures -LOCAL_SRC_FILES := $(MOAI_LIBS)/libcpufeatures.a - -include $(PREBUILT_STATIC_LIBRARY) -include $(CLEAR_VARS) - -LOCAL_MODULE := webp -LOCAL_SRC_FILES := $(MOAI_LIBS)/libwebp.a - -include $(PREBUILT_STATIC_LIBRARY) - -include $(CLEAR_VARS) - -LOCAL_MODULE := moai-image-webp -LOCAL_SRC_FILES := $(MOAI_LIBS)/libmoai-image-webp.a - -include $(PREBUILT_STATIC_LIBRARY) diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/jni/jni.cpp b/host-templates/android/studio/MoaiTemplate/app/src/main/jni/jni.cpp deleted file mode 100644 index 1453b3e..0000000 --- a/host-templates/android/studio/MoaiTemplate/app/src/main/jni/jni.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include - -//================================================================// -// JNI set up -//================================================================// - -JavaVM* jvm; - -//----------------------------------------------------------------// -int JNI_OnLoad ( JavaVM* vm, void* reserved ) { - - jvm = vm; - - return JNI_VERSION_1_4; -} diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-hdpi/icon.png b/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-hdpi/icon.png deleted file mode 100644 index a6a333a..0000000 Binary files a/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-hdpi/icon.png and /dev/null differ diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-mdpi/icon.png b/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-mdpi/icon.png deleted file mode 100644 index 76df4e4..0000000 Binary files a/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-mdpi/icon.png and /dev/null differ diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-xhdpi/icon.png b/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-xhdpi/icon.png deleted file mode 100644 index 24e94d5..0000000 Binary files a/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-xhdpi/icon.png and /dev/null differ diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-xxhdpi/icon.png b/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-xxhdpi/icon.png deleted file mode 100644 index a60767b..0000000 Binary files a/host-templates/android/studio/MoaiTemplate/app/src/main/res/drawable-xxhdpi/icon.png and /dev/null differ diff --git a/host-templates/android/studio/MoaiTemplate/app/src/main/res/values/strings.xml b/host-templates/android/studio/MoaiTemplate/app/src/main/res/values/strings.xml deleted file mode 100644 index 00113df..0000000 --- a/host-templates/android/studio/MoaiTemplate/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - Moai Template - - - 0 - - - moaischeme - - - 0 - - - 0 - diff --git a/host-templates/android/studio/MoaiTemplate/build.gradle b/host-templates/android/studio/MoaiTemplate/build.gradle deleted file mode 100644 index 2194326..0000000 --- a/host-templates/android/studio/MoaiTemplate/build.gradle +++ /dev/null @@ -1,65 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' - - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - jcenter() - } -} - -//common settings for all but our app -subprojects { - apply plugin: MoaiModulePlugin - - //get our build artifacts out of src - buildDir = new File(rootProject.projectDir, "gradleBuild/" + project.name) - - //android defaults - if (project.name == 'app') { - apply plugin: 'com.android.application' - } else { - println("configuring: " + project.name) - apply plugin: 'com.android.library' - } - - android { - compileSdkVersion 22 - buildToolsVersion "22.0.1" - - defaultConfig { - minSdkVersion 17 - targetSdkVersion 22 - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - } - -} - - - -class MoaiModulePlugin implements Plugin { - void apply(Project project) { - project.extensions.create("moai", MoaiModuleExtension) - } -} - -class MoaiModuleExtension { - String nativeLib -} \ No newline at end of file diff --git a/host-templates/android/studio/MoaiTemplate/build.sh b/host-templates/android/studio/MoaiTemplate/build.sh deleted file mode 100755 index 550cea6..0000000 --- a/host-templates/android/studio/MoaiTemplate/build.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -ndkdir=$( awk -F"=" '/^ndk.dir=/{print $2}' < local.properties ) -if [ ! $? -eq 0 ]; then - echo "could not find the 'ndk.dir' property in your local.properties file" - exit 1; -fi - - -if [ ! -e "$ndkdir" ]; then - echo "path set for 'ndk.dir' in local.properties was not found ($ndkdir)" - exit 1; -fi - -bash ./gradlew assembleDebug \ No newline at end of file diff --git a/host-templates/android/studio/MoaiTemplate/moaisettings.gradle b/host-templates/android/studio/MoaiTemplate/moaisettings.gradle deleted file mode 100644 index eb1b3aa..0000000 --- a/host-templates/android/studio/MoaiTemplate/moaisettings.gradle +++ /dev/null @@ -1,55 +0,0 @@ -apply plugin: MoaiSettings - -class MoaiSettings implements Plugin { - - - void apply(Settings settings) { - //get any enabled modules - - def libRoot = "lib" - if (settings.hasProperty('moaiLibRoot')) { - libRoot = settings.moaiLibRoot - } else { - settings.moaiLibRoot = libRoot - } - - - def srcRoot = "src" - if (settings.hasProperty('moaiSrcRoot')) { - srcRoot = settings.moaiSrcRoot - } else { - settings.moaiSrcRoot = srcRoot - } - - if (!settings.hasProperty('moaiModules') || settings.moaiModules == null) { - settings.moaiModules="" - } - def modules = settings.moaiModules.toString().split(",").collect { i -> i.trim() } - if (settings.moaiModules == "") { - modules = [] - } - //always include core - settings.include(":core") - settings.project(":core").projectDir = new File(srcRoot+"/moai-android/java") - - def enableModule = { - module -> - def modproj = new File(srcRoot+"/"+module+"/java/build.gradle") - if (modproj.exists()) { - println("enabling ${module}") - settings.include(":${module}") - settings.project(":${module}").projectDir = new File(srcRoot+"/"+module+"/java") - settings.project(":${module}").name = module - } else { - throw new Exception("Missing module ${module} not found at ${srcRoot}/${module}/java") - } - } - - //include enabled modules projects - for (module in modules) { - enableModule(module) - } - - settings.ext.enableModule = enableModule - } -} \ No newline at end of file diff --git a/host-templates/android/studio/MoaiTemplate/run.bat b/host-templates/android/studio/MoaiTemplate/run.bat deleted file mode 100644 index 72a882d..0000000 --- a/host-templates/android/studio/MoaiTemplate/run.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -call gradlew runApp diff --git a/host-templates/android/studio/MoaiTemplate/run.sh b/host-templates/android/studio/MoaiTemplate/run.sh deleted file mode 100755 index bb5b482..0000000 --- a/host-templates/android/studio/MoaiTemplate/run.sh +++ /dev/null @@ -1 +0,0 @@ -./gradlew runApp \ No newline at end of file diff --git a/host-templates/android/studio/MoaiTemplate/settings.gradle b/host-templates/android/studio/MoaiTemplate/settings.gradle deleted file mode 100644 index 10710d6..0000000 --- a/host-templates/android/studio/MoaiTemplate/settings.gradle +++ /dev/null @@ -1,3 +0,0 @@ -apply from: 'moaisettings.gradle' - -include ':app' diff --git a/host-templates/html/www/css/style.css b/host-templates/html/www/css/style.css index b586d26..73d14de 100644 --- a/host-templates/html/www/css/style.css +++ b/host-templates/html/www/css/style.css @@ -24,7 +24,7 @@ position: absolute; left: 0; bottom: 30px; - top: 0; + top: 30px; right: 0; text-align: center; /* display:table-row; */ diff --git a/host-templates/html/www/moaihost.js b/host-templates/html/www/moaihost.js index 8fa3cc8..7731947 100644 --- a/host-templates/html/www/moaihost.js +++ b/host-templates/html/www/moaihost.js @@ -343,7 +343,7 @@ MoaiJS.prototype.getEmscripten = function() { var Module = this.emscripten; this.RefreshContext = Module.cwrap('RefreshContext','number',null); this.AKURunString = function(str) { - Module.cwrap('AKULoadFuncFromString','number',['string'])(str); + Module.cwrap('AKULoadFuncFromString','number',['string','number','string'])(str,str.length,'AKURunString'); Module.cwrap('AKUCallFunc','number',null)(); } this.AKURunScript = function(str) { diff --git a/host-templates/ios/Moai Template/Moai Template.xcodeproj/project.pbxproj b/host-templates/ios/Moai Template/Moai Template.xcodeproj/project.pbxproj index 28f63a5..b90c76a 100644 --- a/host-templates/ios/Moai Template/Moai Template.xcodeproj/project.pbxproj +++ b/host-templates/ios/Moai Template/Moai Template.xcodeproj/project.pbxproj @@ -8,84 +8,58 @@ /* Begin PBXBuildFile section */ 633667A71A3C4C100020E6BF /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 633667A61A3C4C100020E6BF /* Images.xcassets */; }; + 636B59711CA77BCE00AAD4B0 /* libmoai-ios-3rdparty-crypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59591CA77BCE00AAD4B0 /* libmoai-ios-3rdparty-crypto.a */; }; + 636B59721CA77BCE00AAD4B0 /* libmoai-ios-apple.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B595A1CA77BCE00AAD4B0 /* libmoai-ios-apple.a */; }; + 636B59731CA77BCE00AAD4B0 /* libmoai-ios-audio-sampler.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B595B1CA77BCE00AAD4B0 /* libmoai-ios-audio-sampler.a */; }; + 636B59741CA77BCE00AAD4B0 /* libmoai-ios-billing.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B595C1CA77BCE00AAD4B0 /* libmoai-ios-billing.a */; }; + 636B59751CA77BCE00AAD4B0 /* libmoai-ios-box2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B595D1CA77BCE00AAD4B0 /* libmoai-ios-box2d.a */; }; + 636B59761CA77BCE00AAD4B0 /* libmoai-ios-crypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B595E1CA77BCE00AAD4B0 /* libmoai-ios-crypto.a */; }; + 636B59771CA77BCE00AAD4B0 /* libmoai-ios-facebook.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B595F1CA77BCE00AAD4B0 /* libmoai-ios-facebook.a */; }; + 636B59781CA77BCE00AAD4B0 /* libmoai-ios-gamecenter.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59601CA77BCE00AAD4B0 /* libmoai-ios-gamecenter.a */; }; + 636B59791CA77BCE00AAD4B0 /* libmoai-ios-http-client.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59611CA77BCE00AAD4B0 /* libmoai-ios-http-client.a */; }; + 636B597A1CA77BCE00AAD4B0 /* libmoai-ios-http-server.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59621CA77BCE00AAD4B0 /* libmoai-ios-http-server.a */; }; + 636B597B1CA77BCE00AAD4B0 /* libmoai-ios-image-jpg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59631CA77BCE00AAD4B0 /* libmoai-ios-image-jpg.a */; }; + 636B597C1CA77BCE00AAD4B0 /* libmoai-ios-image-png.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59641CA77BCE00AAD4B0 /* libmoai-ios-image-png.a */; }; + 636B597D1CA77BCE00AAD4B0 /* libmoai-ios-image-pvr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59651CA77BCE00AAD4B0 /* libmoai-ios-image-pvr.a */; }; + 636B597E1CA77BCE00AAD4B0 /* libmoai-ios-image-webp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59661CA77BCE00AAD4B0 /* libmoai-ios-image-webp.a */; }; + 636B597F1CA77BCE00AAD4B0 /* libmoai-ios-luaext.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59671CA77BCE00AAD4B0 /* libmoai-ios-luaext.a */; }; + 636B59801CA77BCE00AAD4B0 /* libmoai-ios-motion.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59681CA77BCE00AAD4B0 /* libmoai-ios-motion.a */; }; + 636B59811CA77BCE00AAD4B0 /* libmoai-ios-movie.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59691CA77BCE00AAD4B0 /* libmoai-ios-movie.a */; }; + 636B59821CA77BCE00AAD4B0 /* libmoai-ios-sim.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B596A1CA77BCE00AAD4B0 /* libmoai-ios-sim.a */; }; + 636B59831CA77BCE00AAD4B0 /* libmoai-ios-untz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B596B1CA77BCE00AAD4B0 /* libmoai-ios-untz.a */; }; + 636B59841CA77BCE00AAD4B0 /* libmoai-ios-zl-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B596C1CA77BCE00AAD4B0 /* libmoai-ios-zl-core.a */; }; + 636B59851CA77BCE00AAD4B0 /* libmoai-ios-zl-crypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B596D1CA77BCE00AAD4B0 /* libmoai-ios-zl-crypto.a */; }; + 636B59861CA77BCE00AAD4B0 /* libmoai-ios-zl-vfs.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B596E1CA77BCE00AAD4B0 /* libmoai-ios-zl-vfs.a */; }; + 636B59871CA77BCE00AAD4B0 /* libmoai-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B596F1CA77BCE00AAD4B0 /* libmoai-ios.a */; }; + 636B599C1CA783E200AAD4B0 /* FBSDKCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59991CA783E200AAD4B0 /* FBSDKCoreKit.framework */; }; + 636B599D1CA783E200AAD4B0 /* FBSDKLoginKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B599A1CA783E200AAD4B0 /* FBSDKLoginKit.framework */; }; + 636B599E1CA783E200AAD4B0 /* FBSDKShareKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B599B1CA783E200AAD4B0 /* FBSDKShareKit.framework */; }; 6396B95D1BD67CA20065A9E7 /* aku_plugins.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6396B95C1BD67CA20065A9E7 /* aku_plugins.cpp */; }; - 6396B9631BD67CE00065A9E7 /* AdColony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6396B95E1BD67CE00065A9E7 /* AdColony.framework */; }; - 6396B9641BD67CE00065A9E7 /* FBSDKCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6396B95F1BD67CE00065A9E7 /* FBSDKCoreKit.framework */; }; - 6396B9651BD67CE00065A9E7 /* FBSDKLoginKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6396B9601BD67CE00065A9E7 /* FBSDKLoginKit.framework */; }; - 6396B9661BD67CE00065A9E7 /* FBSDKShareKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6396B9611BD67CE00065A9E7 /* FBSDKShareKit.framework */; }; - 6396B9671BD67CE00065A9E7 /* Kontagent.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6396B9621BD67CE00065A9E7 /* Kontagent.framework */; }; - 6396B96C1BD67CF40065A9E7 /* libmoai-image-jpg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6396B9681BD67CF40065A9E7 /* libmoai-image-jpg.a */; }; - 6396B96D1BD67CF40065A9E7 /* libmoai-image-png.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6396B9691BD67CF40065A9E7 /* libmoai-image-png.a */; }; - 6396B96E1BD67CF40065A9E7 /* libmoai-image-pvr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6396B96A1BD67CF40065A9E7 /* libmoai-image-pvr.a */; }; - 6396B96F1BD67CF40065A9E7 /* libmoai-image-webp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6396B96B1BD67CF40065A9E7 /* libmoai-image-webp.a */; }; - 6396B9731BD67D2B0065A9E7 /* MobileAppTracker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6396B9701BD67D2B0065A9E7 /* MobileAppTracker.framework */; }; - 6396B9741BD67D2B0065A9E7 /* Tapjoy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6396B9711BD67D2B0065A9E7 /* Tapjoy.framework */; }; - 6396B9751BD67D2B0065A9E7 /* vunglepub.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6396B9721BD67D2B0065A9E7 /* vunglepub.framework */; }; - 63C4D5B91A1075A2009DBA1D /* libliblua-static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C4D5B81A1075A2009DBA1D /* libliblua-static.a */; }; + 63A2AD191D1BEF6D008D5D59 /* MOAICommandThread.mm in Sources */ = {isa = PBXBuildFile; fileRef = 63A2AD121D1BEF6D008D5D59 /* MOAICommandThread.mm */; }; + 63A2AD1A1D1BEF6D008D5D59 /* MOAIContextMgr.mm in Sources */ = {isa = PBXBuildFile; fileRef = 63A2AD141D1BEF6D008D5D59 /* MOAIContextMgr.mm */; }; + 63A2AD1B1D1BEF6D008D5D59 /* MOAIRenderer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 63A2AD161D1BEF6D008D5D59 /* MOAIRenderer.mm */; }; + 63A2AD1C1D1BEF6D008D5D59 /* MOAIRendererAsync.mm in Sources */ = {isa = PBXBuildFile; fileRef = 63A2AD181D1BEF6D008D5D59 /* MOAIRendererAsync.mm */; }; + 63A2AD311D1BEFB3008D5D59 /* libmoai-ios-3rdparty-contrib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD1D1D1BEFB3008D5D59 /* libmoai-ios-3rdparty-contrib.a */; }; + 63A2AD321D1BEFB3008D5D59 /* libmoai-ios-3rdparty-expat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD1E1D1BEFB3008D5D59 /* libmoai-ios-3rdparty-expat.a */; }; + 63A2AD331D1BEFB3008D5D59 /* libmoai-ios-3rdparty-freetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD1F1D1BEFB3008D5D59 /* libmoai-ios-3rdparty-freetype.a */; }; + 63A2AD341D1BEFB3008D5D59 /* libmoai-ios-3rdparty-jannson.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD201D1BEFB3008D5D59 /* libmoai-ios-3rdparty-jannson.a */; }; + 63A2AD351D1BEFB3008D5D59 /* libmoai-ios-3rdparty-liblua.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD211D1BEFB3008D5D59 /* libmoai-ios-3rdparty-liblua.a */; }; + 63A2AD361D1BEFB3008D5D59 /* libmoai-ios-3rdparty-libtess.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD221D1BEFB3008D5D59 /* libmoai-ios-3rdparty-libtess.a */; }; + 63A2AD371D1BEFB3008D5D59 /* libmoai-ios-3rdparty-sfmt.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD231D1BEFB3008D5D59 /* libmoai-ios-3rdparty-sfmt.a */; }; + 63A2AD381D1BEFB3008D5D59 /* libmoai-ios-3rdparty-tinyxml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD241D1BEFB3008D5D59 /* libmoai-ios-3rdparty-tinyxml.a */; }; + 63A2AD391D1BEFB3008D5D59 /* libmoai-ios-3rdparty-tlsf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD251D1BEFB3008D5D59 /* libmoai-ios-3rdparty-tlsf.a */; }; + 63A2AD3A1D1BEFB3008D5D59 /* libmoai-ios-3rdparty-zlib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD261D1BEFB3008D5D59 /* libmoai-ios-3rdparty-zlib.a */; }; + 63A2AD3B1D1BEFB3008D5D59 /* libmoai-ios-adcolony.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD271D1BEFB3008D5D59 /* libmoai-ios-adcolony.a */; }; + 63A2AD3C1D1BEFB3008D5D59 /* libmoai-ios-chartboost.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD281D1BEFB3008D5D59 /* libmoai-ios-chartboost.a */; }; + 63A2AD3D1D1BEFB3008D5D59 /* libmoai-ios-crittercism.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD291D1BEFB3008D5D59 /* libmoai-ios-crittercism.a */; }; + 63A2AD3E1D1BEFB3008D5D59 /* libmoai-ios-flurry.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD2A1D1BEFB3008D5D59 /* libmoai-ios-flurry.a */; }; + 63A2AD3F1D1BEFB3008D5D59 /* libmoai-ios-harfbuzz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD2B1D1BEFB3008D5D59 /* libmoai-ios-harfbuzz.a */; }; + 63A2AD401D1BEFB3008D5D59 /* libmoai-ios-kontagent.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD2C1D1BEFB3008D5D59 /* libmoai-ios-kontagent.a */; }; + 63A2AD411D1BEFB3008D5D59 /* libmoai-ios-mobile-app-tracker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD2D1D1BEFB3008D5D59 /* libmoai-ios-mobile-app-tracker.a */; }; + 63A2AD421D1BEFB3008D5D59 /* libmoai-ios-tapjoy.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD2E1D1BEFB3008D5D59 /* libmoai-ios-tapjoy.a */; }; + 63A2AD431D1BEFB3008D5D59 /* libmoai-ios-urban-airship.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD2F1D1BEFB3008D5D59 /* libmoai-ios-urban-airship.a */; }; + 63A2AD441D1BEFB3008D5D59 /* libmoai-ios-vungle.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2AD301D1BEFB3008D5D59 /* libmoai-ios-vungle.a */; }; 63CF1A0B1A065C7700F731F1 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 63CF19FA1A065C7700F731F1 /* Default-568h@2x.png */; }; - 63CF1A611A065DF300F731F1 /* AdColony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A1E1A065DF300F731F1 /* AdColony.framework */; }; - 63CF1A631A065DF300F731F1 /* Kontagent.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A201A065DF300F731F1 /* Kontagent.framework */; }; - 63CF1A641A065DF300F731F1 /* libbox2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A211A065DF300F731F1 /* libbox2d.a */; }; - 63CF1A651A065DF300F731F1 /* libcares.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A221A065DF300F731F1 /* libcares.a */; }; - 63CF1A661A065DF300F731F1 /* libChartboost.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A231A065DF300F731F1 /* libChartboost.a */; }; - 63CF1A681A065DF300F731F1 /* libcontrib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A251A065DF300F731F1 /* libcontrib.a */; }; - 63CF1A691A065DF300F731F1 /* libCrittercism_v4_3_3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A261A065DF300F731F1 /* libCrittercism_v4_3_3.a */; }; - 63CF1A6A1A065DF300F731F1 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A271A065DF300F731F1 /* libcrypto.a */; }; - 63CF1A6B1A065DF300F731F1 /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A281A065DF300F731F1 /* libcurl.a */; }; - 63CF1A6C1A065DF300F731F1 /* libexpat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A291A065DF300F731F1 /* libexpat.a */; }; - 63CF1A6D1A065DF300F731F1 /* libFlurry.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A2A1A065DF300F731F1 /* libFlurry.a */; }; - 63CF1A6E1A065DF300F731F1 /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A2B1A065DF300F731F1 /* libfreetype.a */; }; - 63CF1A6F1A065DF300F731F1 /* libjansson.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A2C1A065DF300F731F1 /* libjansson.a */; }; - 63CF1A701A065DF300F731F1 /* libjpg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A2D1A065DF300F731F1 /* libjpg.a */; }; - 63CF1A711A065DF300F731F1 /* libluacrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A2E1A065DF300F731F1 /* libluacrypto.a */; }; - 63CF1A721A065DF300F731F1 /* libluacurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A2F1A065DF300F731F1 /* libluacurl.a */; }; - 63CF1A731A065DF300F731F1 /* libluafilesystem.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A301A065DF300F731F1 /* libluafilesystem.a */; }; - 63CF1A751A065DF300F731F1 /* libluasocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A321A065DF300F731F1 /* libluasocket.a */; }; - 63CF1A761A065DF300F731F1 /* libluasql.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A331A065DF300F731F1 /* libluasql.a */; }; - 63CF1A771A065DF300F731F1 /* libmoai-audiosampler.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A341A065DF300F731F1 /* libmoai-audiosampler.a */; }; - 63CF1A781A065DF300F731F1 /* libmoai-box2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A351A065DF300F731F1 /* libmoai-box2d.a */; }; - 63CF1A7A1A065DF300F731F1 /* libmoai-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A371A065DF300F731F1 /* libmoai-core.a */; }; - 63CF1A7B1A065DF300F731F1 /* libmoai-crypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A381A065DF300F731F1 /* libmoai-crypto.a */; }; - 63CF1A7C1A065DF300F731F1 /* libmoai-http-client.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A391A065DF300F731F1 /* libmoai-http-client.a */; }; - 63CF1A7D1A065DF300F731F1 /* libmoai-ios-adcolony.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A3A1A065DF300F731F1 /* libmoai-ios-adcolony.a */; }; - 63CF1A7E1A065DF300F731F1 /* libmoai-ios-billing.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A3B1A065DF300F731F1 /* libmoai-ios-billing.a */; }; - 63CF1A7F1A065DF300F731F1 /* libmoai-ios-chartboost.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A3C1A065DF300F731F1 /* libmoai-ios-chartboost.a */; }; - 63CF1A801A065DF300F731F1 /* libmoai-ios-crittercism.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A3D1A065DF300F731F1 /* libmoai-ios-crittercism.a */; }; - 63CF1A811A065DF300F731F1 /* libmoai-ios-facebook.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A3E1A065DF300F731F1 /* libmoai-ios-facebook.a */; }; - 63CF1A821A065DF300F731F1 /* libmoai-ios-flurry.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A3F1A065DF300F731F1 /* libmoai-ios-flurry.a */; }; - 63CF1A831A065DF300F731F1 /* libmoai-ios-gamecenter.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A401A065DF300F731F1 /* libmoai-ios-gamecenter.a */; }; - 63CF1A841A065DF300F731F1 /* libmoai-ios-kontagent.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A411A065DF300F731F1 /* libmoai-ios-kontagent.a */; }; - 63CF1A851A065DF300F731F1 /* libmoai-ios-mobile-app-tracker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A421A065DF300F731F1 /* libmoai-ios-mobile-app-tracker.a */; }; - 63CF1A861A065DF300F731F1 /* libmoai-ios-playhaven.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A431A065DF300F731F1 /* libmoai-ios-playhaven.a */; }; - 63CF1A871A065DF300F731F1 /* libmoai-ios-tapjoy.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A441A065DF300F731F1 /* libmoai-ios-tapjoy.a */; }; - 63CF1A881A065DF300F731F1 /* libmoai-ios-twitter.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A451A065DF300F731F1 /* libmoai-ios-twitter.a */; }; - 63CF1A891A065DF300F731F1 /* libmoai-ios-urban-airship.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A461A065DF300F731F1 /* libmoai-ios-urban-airship.a */; }; - 63CF1A8A1A065DF300F731F1 /* libmoai-ios-vungle.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A471A065DF300F731F1 /* libmoai-ios-vungle.a */; }; - 63CF1A8B1A065DF300F731F1 /* libmoai-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A481A065DF300F731F1 /* libmoai-ios.a */; }; - 63CF1A8C1A065DF300F731F1 /* libmoai-luaext.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A491A065DF300F731F1 /* libmoai-luaext.a */; }; - 63CF1A8D1A065DF300F731F1 /* libmoai-sim.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A4A1A065DF300F731F1 /* libmoai-sim.a */; }; - 63CF1A8E1A065DF300F731F1 /* libmoai-untz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A4B1A065DF300F731F1 /* libmoai-untz.a */; }; - 63CF1A8F1A065DF300F731F1 /* libmoai-util.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A4C1A065DF300F731F1 /* libmoai-util.a */; }; - 63CF1A901A065DF300F731F1 /* libmongoose.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A4D1A065DF300F731F1 /* libmongoose.a */; }; - 63CF1A911A065DF300F731F1 /* libogg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A4E1A065DF300F731F1 /* libogg.a */; }; - 63CF1A921A065DF300F731F1 /* libplayhaven-ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A4F1A065DF300F731F1 /* libplayhaven-ios.a */; }; - 63CF1A931A065DF300F731F1 /* libpng.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A501A065DF300F731F1 /* libpng.a */; }; - 63CF1A941A065DF300F731F1 /* libsfmt.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A511A065DF300F731F1 /* libsfmt.a */; }; - 63CF1A951A065DF300F731F1 /* libsqlite3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A521A065DF300F731F1 /* libsqlite3.a */; }; - 63CF1A961A065DF300F731F1 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A531A065DF300F731F1 /* libssl.a */; }; - 63CF1A971A065DF300F731F1 /* libtess.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A541A065DF300F731F1 /* libtess.a */; }; - 63CF1A981A065DF300F731F1 /* libtinyxml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A551A065DF300F731F1 /* libtinyxml.a */; }; - 63CF1A991A065DF300F731F1 /* libtlsf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A561A065DF300F731F1 /* libtlsf.a */; }; - 63CF1A9A1A065DF300F731F1 /* libUAirship.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A571A065DF300F731F1 /* libUAirship.a */; }; - 63CF1A9B1A065DF300F731F1 /* libuntz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A581A065DF300F731F1 /* libuntz.a */; }; - 63CF1A9C1A065DF300F731F1 /* libvorbis.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A591A065DF300F731F1 /* libvorbis.a */; }; - 63CF1A9D1A065DF300F731F1 /* libwebp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A5A1A065DF300F731F1 /* libwebp.a */; }; - 63CF1A9E1A065DF300F731F1 /* libzlcore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A5B1A065DF300F731F1 /* libzlcore.a */; }; - 63CF1A9F1A065DF300F731F1 /* libzlib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A5C1A065DF300F731F1 /* libzlib.a */; }; - 63CF1AA01A065DF300F731F1 /* libzlvfs.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A5D1A065DF300F731F1 /* libzlvfs.a */; }; - 63CF1AA11A065DF300F731F1 /* MobileAppTracker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A5E1A065DF300F731F1 /* MobileAppTracker.framework */; }; - 63CF1AA21A065DF300F731F1 /* Tapjoy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A5F1A065DF300F731F1 /* Tapjoy.framework */; }; - 63CF1AA31A065DF300F731F1 /* vunglepub.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63CF1A601A065DF300F731F1 /* vunglepub.framework */; }; 63CF1AC01A06610600F731F1 /* aku_modules.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CF1AB61A06610600F731F1 /* aku_modules.cpp */; }; 63CF1AC11A06610600F731F1 /* aku_modules_ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = 63CF1ABA1A06610600F731F1 /* aku_modules_ios.mm */; }; 63CF1AC21A06610600F731F1 /* aku_modules_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63CF1ABC1A06610600F731F1 /* aku_modules_util.cpp */; }; @@ -118,94 +92,68 @@ 63D01EBC1A3864620097C3E8 /* MOAIAppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 63D01EB61A3864620097C3E8 /* MOAIAppDelegate.mm */; }; 63D01EBD1A3864620097C3E8 /* MOAIView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 63D01EB81A3864620097C3E8 /* MOAIView.mm */; }; 63D01EC11A38659C0097C3E8 /* hello-moai in Resources */ = {isa = PBXBuildFile; fileRef = 63D01EC01A38659C0097C3E8 /* hello-moai */; }; - 63D01EC31A3865FB0097C3E8 /* libzlcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63D01EC21A3865FB0097C3E8 /* libzlcrypto.a */; }; - BD02B4121AB5C5BD006743DE /* libmoai-ios-movie.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BD02B4111AB5C5BD006743DE /* libmoai-ios-movie.a */; }; - BD02B4141AB5C769006743DE /* libmoai-apple.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BD02B4131AB5C769006743DE /* libmoai-apple.a */; }; - BD02B4161AB5C797006743DE /* libpvr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BD02B4151AB5C797006743DE /* libpvr.a */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 633667A61A3C4C100020E6BF /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = res/Images.xcassets; sourceTree = ""; }; + 636B59591CA77BCE00AAD4B0 /* libmoai-ios-3rdparty-crypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-crypto.a"; path = "lib/libmoai-ios-3rdparty-crypto.a"; sourceTree = ""; }; + 636B595A1CA77BCE00AAD4B0 /* libmoai-ios-apple.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-apple.a"; path = "lib/libmoai-ios-apple.a"; sourceTree = ""; }; + 636B595B1CA77BCE00AAD4B0 /* libmoai-ios-audio-sampler.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-audio-sampler.a"; path = "lib/libmoai-ios-audio-sampler.a"; sourceTree = ""; }; + 636B595C1CA77BCE00AAD4B0 /* libmoai-ios-billing.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-billing.a"; path = "lib/libmoai-ios-billing.a"; sourceTree = ""; }; + 636B595D1CA77BCE00AAD4B0 /* libmoai-ios-box2d.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-box2d.a"; path = "lib/libmoai-ios-box2d.a"; sourceTree = ""; }; + 636B595E1CA77BCE00AAD4B0 /* libmoai-ios-crypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-crypto.a"; path = "lib/libmoai-ios-crypto.a"; sourceTree = ""; }; + 636B595F1CA77BCE00AAD4B0 /* libmoai-ios-facebook.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-facebook.a"; path = "lib/libmoai-ios-facebook.a"; sourceTree = ""; }; + 636B59601CA77BCE00AAD4B0 /* libmoai-ios-gamecenter.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-gamecenter.a"; path = "lib/libmoai-ios-gamecenter.a"; sourceTree = ""; }; + 636B59611CA77BCE00AAD4B0 /* libmoai-ios-http-client.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-http-client.a"; path = "lib/libmoai-ios-http-client.a"; sourceTree = ""; }; + 636B59621CA77BCE00AAD4B0 /* libmoai-ios-http-server.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-http-server.a"; path = "lib/libmoai-ios-http-server.a"; sourceTree = ""; }; + 636B59631CA77BCE00AAD4B0 /* libmoai-ios-image-jpg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-image-jpg.a"; path = "lib/libmoai-ios-image-jpg.a"; sourceTree = ""; }; + 636B59641CA77BCE00AAD4B0 /* libmoai-ios-image-png.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-image-png.a"; path = "lib/libmoai-ios-image-png.a"; sourceTree = ""; }; + 636B59651CA77BCE00AAD4B0 /* libmoai-ios-image-pvr.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-image-pvr.a"; path = "lib/libmoai-ios-image-pvr.a"; sourceTree = ""; }; + 636B59661CA77BCE00AAD4B0 /* libmoai-ios-image-webp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-image-webp.a"; path = "lib/libmoai-ios-image-webp.a"; sourceTree = ""; }; + 636B59671CA77BCE00AAD4B0 /* libmoai-ios-luaext.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-luaext.a"; path = "lib/libmoai-ios-luaext.a"; sourceTree = ""; }; + 636B59681CA77BCE00AAD4B0 /* libmoai-ios-motion.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-motion.a"; path = "lib/libmoai-ios-motion.a"; sourceTree = ""; }; + 636B59691CA77BCE00AAD4B0 /* libmoai-ios-movie.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-movie.a"; path = "lib/libmoai-ios-movie.a"; sourceTree = ""; }; + 636B596A1CA77BCE00AAD4B0 /* libmoai-ios-sim.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-sim.a"; path = "lib/libmoai-ios-sim.a"; sourceTree = ""; }; + 636B596B1CA77BCE00AAD4B0 /* libmoai-ios-untz.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-untz.a"; path = "lib/libmoai-ios-untz.a"; sourceTree = ""; }; + 636B596C1CA77BCE00AAD4B0 /* libmoai-ios-zl-core.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-zl-core.a"; path = "lib/libmoai-ios-zl-core.a"; sourceTree = ""; }; + 636B596D1CA77BCE00AAD4B0 /* libmoai-ios-zl-crypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-zl-crypto.a"; path = "lib/libmoai-ios-zl-crypto.a"; sourceTree = ""; }; + 636B596E1CA77BCE00AAD4B0 /* libmoai-ios-zl-vfs.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-zl-vfs.a"; path = "lib/libmoai-ios-zl-vfs.a"; sourceTree = ""; }; + 636B596F1CA77BCE00AAD4B0 /* libmoai-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios.a"; path = "lib/libmoai-ios.a"; sourceTree = ""; }; + 636B59991CA783E200AAD4B0 /* FBSDKCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBSDKCoreKit.framework; path = "3rdparty/facebook-ios-sdk-4.5.1/FBSDKCoreKit.framework"; sourceTree = ""; }; + 636B599A1CA783E200AAD4B0 /* FBSDKLoginKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBSDKLoginKit.framework; path = "3rdparty/facebook-ios-sdk-4.5.1/FBSDKLoginKit.framework"; sourceTree = ""; }; + 636B599B1CA783E200AAD4B0 /* FBSDKShareKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBSDKShareKit.framework; path = "3rdparty/facebook-ios-sdk-4.5.1/FBSDKShareKit.framework"; sourceTree = ""; }; 6396B95C1BD67CA20065A9E7 /* aku_plugins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = aku_plugins.cpp; sourceTree = ""; }; - 6396B95E1BD67CE00065A9E7 /* AdColony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdColony.framework; path = libmoai/lib/AdColony.framework; sourceTree = ""; }; - 6396B95F1BD67CE00065A9E7 /* FBSDKCoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBSDKCoreKit.framework; path = libmoai/lib/FBSDKCoreKit.framework; sourceTree = ""; }; - 6396B9601BD67CE00065A9E7 /* FBSDKLoginKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBSDKLoginKit.framework; path = libmoai/lib/FBSDKLoginKit.framework; sourceTree = ""; }; - 6396B9611BD67CE00065A9E7 /* FBSDKShareKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBSDKShareKit.framework; path = libmoai/lib/FBSDKShareKit.framework; sourceTree = ""; }; - 6396B9621BD67CE00065A9E7 /* Kontagent.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kontagent.framework; path = libmoai/lib/Kontagent.framework; sourceTree = ""; }; - 6396B9681BD67CF40065A9E7 /* libmoai-image-jpg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-image-jpg.a"; path = "libmoai/lib/libmoai-image-jpg.a"; sourceTree = ""; }; - 6396B9691BD67CF40065A9E7 /* libmoai-image-png.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-image-png.a"; path = "libmoai/lib/libmoai-image-png.a"; sourceTree = ""; }; - 6396B96A1BD67CF40065A9E7 /* libmoai-image-pvr.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-image-pvr.a"; path = "libmoai/lib/libmoai-image-pvr.a"; sourceTree = ""; }; - 6396B96B1BD67CF40065A9E7 /* libmoai-image-webp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-image-webp.a"; path = "libmoai/lib/libmoai-image-webp.a"; sourceTree = ""; }; - 6396B9701BD67D2B0065A9E7 /* MobileAppTracker.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileAppTracker.framework; path = libmoai/lib/MobileAppTracker.framework; sourceTree = ""; }; - 6396B9711BD67D2B0065A9E7 /* Tapjoy.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Tapjoy.framework; path = libmoai/lib/Tapjoy.framework; sourceTree = ""; }; - 6396B9721BD67D2B0065A9E7 /* vunglepub.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = vunglepub.framework; path = libmoai/lib/vunglepub.framework; sourceTree = ""; }; - 63C4D5B81A1075A2009DBA1D /* libliblua-static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libliblua-static.a"; path = "libmoai/lib/libliblua-static.a"; sourceTree = ""; }; + 63A2AD111D1BEF6D008D5D59 /* MOAICommandThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOAICommandThread.h; path = "host-ios/MOAICommandThread.h"; sourceTree = ""; }; + 63A2AD121D1BEF6D008D5D59 /* MOAICommandThread.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAICommandThread.mm; path = "host-ios/MOAICommandThread.mm"; sourceTree = ""; }; + 63A2AD131D1BEF6D008D5D59 /* MOAIContextMgr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOAIContextMgr.h; path = "host-ios/MOAIContextMgr.h"; sourceTree = ""; }; + 63A2AD141D1BEF6D008D5D59 /* MOAIContextMgr.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAIContextMgr.mm; path = "host-ios/MOAIContextMgr.mm"; sourceTree = ""; }; + 63A2AD151D1BEF6D008D5D59 /* MOAIRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOAIRenderer.h; path = "host-ios/MOAIRenderer.h"; sourceTree = ""; }; + 63A2AD161D1BEF6D008D5D59 /* MOAIRenderer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAIRenderer.mm; path = "host-ios/MOAIRenderer.mm"; sourceTree = ""; }; + 63A2AD171D1BEF6D008D5D59 /* MOAIRendererAsync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOAIRendererAsync.h; path = "host-ios/MOAIRendererAsync.h"; sourceTree = ""; }; + 63A2AD181D1BEF6D008D5D59 /* MOAIRendererAsync.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAIRendererAsync.mm; path = "host-ios/MOAIRendererAsync.mm"; sourceTree = ""; }; + 63A2AD1D1D1BEFB3008D5D59 /* libmoai-ios-3rdparty-contrib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-contrib.a"; path = "lib/libmoai-ios-3rdparty-contrib.a"; sourceTree = ""; }; + 63A2AD1E1D1BEFB3008D5D59 /* libmoai-ios-3rdparty-expat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-expat.a"; path = "lib/libmoai-ios-3rdparty-expat.a"; sourceTree = ""; }; + 63A2AD1F1D1BEFB3008D5D59 /* libmoai-ios-3rdparty-freetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-freetype.a"; path = "lib/libmoai-ios-3rdparty-freetype.a"; sourceTree = ""; }; + 63A2AD201D1BEFB3008D5D59 /* libmoai-ios-3rdparty-jannson.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-jannson.a"; path = "lib/libmoai-ios-3rdparty-jannson.a"; sourceTree = ""; }; + 63A2AD211D1BEFB3008D5D59 /* libmoai-ios-3rdparty-liblua.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-liblua.a"; path = "lib/libmoai-ios-3rdparty-liblua.a"; sourceTree = ""; }; + 63A2AD221D1BEFB3008D5D59 /* libmoai-ios-3rdparty-libtess.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-libtess.a"; path = "lib/libmoai-ios-3rdparty-libtess.a"; sourceTree = ""; }; + 63A2AD231D1BEFB3008D5D59 /* libmoai-ios-3rdparty-sfmt.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-sfmt.a"; path = "lib/libmoai-ios-3rdparty-sfmt.a"; sourceTree = ""; }; + 63A2AD241D1BEFB3008D5D59 /* libmoai-ios-3rdparty-tinyxml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-tinyxml.a"; path = "lib/libmoai-ios-3rdparty-tinyxml.a"; sourceTree = ""; }; + 63A2AD251D1BEFB3008D5D59 /* libmoai-ios-3rdparty-tlsf.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-tlsf.a"; path = "lib/libmoai-ios-3rdparty-tlsf.a"; sourceTree = ""; }; + 63A2AD261D1BEFB3008D5D59 /* libmoai-ios-3rdparty-zlib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-3rdparty-zlib.a"; path = "lib/libmoai-ios-3rdparty-zlib.a"; sourceTree = ""; }; + 63A2AD271D1BEFB3008D5D59 /* libmoai-ios-adcolony.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-adcolony.a"; path = "lib/libmoai-ios-adcolony.a"; sourceTree = ""; }; + 63A2AD281D1BEFB3008D5D59 /* libmoai-ios-chartboost.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-chartboost.a"; path = "lib/libmoai-ios-chartboost.a"; sourceTree = ""; }; + 63A2AD291D1BEFB3008D5D59 /* libmoai-ios-crittercism.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-crittercism.a"; path = "lib/libmoai-ios-crittercism.a"; sourceTree = ""; }; + 63A2AD2A1D1BEFB3008D5D59 /* libmoai-ios-flurry.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-flurry.a"; path = "lib/libmoai-ios-flurry.a"; sourceTree = ""; }; + 63A2AD2B1D1BEFB3008D5D59 /* libmoai-ios-harfbuzz.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-harfbuzz.a"; path = "lib/libmoai-ios-harfbuzz.a"; sourceTree = ""; }; + 63A2AD2C1D1BEFB3008D5D59 /* libmoai-ios-kontagent.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-kontagent.a"; path = "lib/libmoai-ios-kontagent.a"; sourceTree = ""; }; + 63A2AD2D1D1BEFB3008D5D59 /* libmoai-ios-mobile-app-tracker.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-mobile-app-tracker.a"; path = "lib/libmoai-ios-mobile-app-tracker.a"; sourceTree = ""; }; + 63A2AD2E1D1BEFB3008D5D59 /* libmoai-ios-tapjoy.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-tapjoy.a"; path = "lib/libmoai-ios-tapjoy.a"; sourceTree = ""; }; + 63A2AD2F1D1BEFB3008D5D59 /* libmoai-ios-urban-airship.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-urban-airship.a"; path = "lib/libmoai-ios-urban-airship.a"; sourceTree = ""; }; + 63A2AD301D1BEFB3008D5D59 /* libmoai-ios-vungle.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-vungle.a"; path = "lib/libmoai-ios-vungle.a"; sourceTree = ""; }; 63CF19C11A065B5400F731F1 /* Moai Template.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Moai Template.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 63CF19FA1A065C7700F731F1 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "res/Default-568h@2x.png"; sourceTree = ""; }; 63CF1A1C1A065D4900F731F1 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = res/Info.plist; sourceTree = ""; }; - 63CF1A1E1A065DF300F731F1 /* AdColony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdColony.framework; path = libmoai/lib/AdColony.framework; sourceTree = ""; }; - 63CF1A201A065DF300F731F1 /* Kontagent.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kontagent.framework; path = libmoai/lib/Kontagent.framework; sourceTree = ""; }; - 63CF1A211A065DF300F731F1 /* libbox2d.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libbox2d.a; path = libmoai/lib/libbox2d.a; sourceTree = ""; }; - 63CF1A221A065DF300F731F1 /* libcares.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcares.a; path = libmoai/lib/libcares.a; sourceTree = ""; }; - 63CF1A231A065DF300F731F1 /* libChartboost.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libChartboost.a; path = libmoai/lib/libChartboost.a; sourceTree = ""; }; - 63CF1A251A065DF300F731F1 /* libcontrib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcontrib.a; path = libmoai/lib/libcontrib.a; sourceTree = ""; }; - 63CF1A261A065DF300F731F1 /* libCrittercism_v4_3_3.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCrittercism_v4_3_3.a; path = libmoai/lib/libCrittercism_v4_3_3.a; sourceTree = ""; }; - 63CF1A271A065DF300F731F1 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = libmoai/lib/libcrypto.a; sourceTree = ""; }; - 63CF1A281A065DF300F731F1 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = libmoai/lib/libcurl.a; sourceTree = ""; }; - 63CF1A291A065DF300F731F1 /* libexpat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libexpat.a; path = libmoai/lib/libexpat.a; sourceTree = ""; }; - 63CF1A2A1A065DF300F731F1 /* libFlurry.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libFlurry.a; path = libmoai/lib/libFlurry.a; sourceTree = ""; }; - 63CF1A2B1A065DF300F731F1 /* libfreetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfreetype.a; path = libmoai/lib/libfreetype.a; sourceTree = ""; }; - 63CF1A2C1A065DF300F731F1 /* libjansson.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjansson.a; path = libmoai/lib/libjansson.a; sourceTree = ""; }; - 63CF1A2D1A065DF300F731F1 /* libjpg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjpg.a; path = libmoai/lib/libjpg.a; sourceTree = ""; }; - 63CF1A2E1A065DF300F731F1 /* libluacrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libluacrypto.a; path = libmoai/lib/libluacrypto.a; sourceTree = ""; }; - 63CF1A2F1A065DF300F731F1 /* libluacurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libluacurl.a; path = libmoai/lib/libluacurl.a; sourceTree = ""; }; - 63CF1A301A065DF300F731F1 /* libluafilesystem.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libluafilesystem.a; path = libmoai/lib/libluafilesystem.a; sourceTree = ""; }; - 63CF1A321A065DF300F731F1 /* libluasocket.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libluasocket.a; path = libmoai/lib/libluasocket.a; sourceTree = ""; }; - 63CF1A331A065DF300F731F1 /* libluasql.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libluasql.a; path = libmoai/lib/libluasql.a; sourceTree = ""; }; - 63CF1A341A065DF300F731F1 /* libmoai-audiosampler.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-audiosampler.a"; path = "libmoai/lib/libmoai-audiosampler.a"; sourceTree = ""; }; - 63CF1A351A065DF300F731F1 /* libmoai-box2d.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-box2d.a"; path = "libmoai/lib/libmoai-box2d.a"; sourceTree = ""; }; - 63CF1A371A065DF300F731F1 /* libmoai-core.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-core.a"; path = "libmoai/lib/libmoai-core.a"; sourceTree = ""; }; - 63CF1A381A065DF300F731F1 /* libmoai-crypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-crypto.a"; path = "libmoai/lib/libmoai-crypto.a"; sourceTree = ""; }; - 63CF1A391A065DF300F731F1 /* libmoai-http-client.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-http-client.a"; path = "libmoai/lib/libmoai-http-client.a"; sourceTree = ""; }; - 63CF1A3A1A065DF300F731F1 /* libmoai-ios-adcolony.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-adcolony.a"; path = "libmoai/lib/libmoai-ios-adcolony.a"; sourceTree = ""; }; - 63CF1A3B1A065DF300F731F1 /* libmoai-ios-billing.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-billing.a"; path = "libmoai/lib/libmoai-ios-billing.a"; sourceTree = ""; }; - 63CF1A3C1A065DF300F731F1 /* libmoai-ios-chartboost.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-chartboost.a"; path = "libmoai/lib/libmoai-ios-chartboost.a"; sourceTree = ""; }; - 63CF1A3D1A065DF300F731F1 /* libmoai-ios-crittercism.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-crittercism.a"; path = "libmoai/lib/libmoai-ios-crittercism.a"; sourceTree = ""; }; - 63CF1A3E1A065DF300F731F1 /* libmoai-ios-facebook.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-facebook.a"; path = "libmoai/lib/libmoai-ios-facebook.a"; sourceTree = ""; }; - 63CF1A3F1A065DF300F731F1 /* libmoai-ios-flurry.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-flurry.a"; path = "libmoai/lib/libmoai-ios-flurry.a"; sourceTree = ""; }; - 63CF1A401A065DF300F731F1 /* libmoai-ios-gamecenter.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-gamecenter.a"; path = "libmoai/lib/libmoai-ios-gamecenter.a"; sourceTree = ""; }; - 63CF1A411A065DF300F731F1 /* libmoai-ios-kontagent.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-kontagent.a"; path = "libmoai/lib/libmoai-ios-kontagent.a"; sourceTree = ""; }; - 63CF1A421A065DF300F731F1 /* libmoai-ios-mobile-app-tracker.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-mobile-app-tracker.a"; path = "libmoai/lib/libmoai-ios-mobile-app-tracker.a"; sourceTree = ""; }; - 63CF1A431A065DF300F731F1 /* libmoai-ios-playhaven.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-playhaven.a"; path = "libmoai/lib/libmoai-ios-playhaven.a"; sourceTree = ""; }; - 63CF1A441A065DF300F731F1 /* libmoai-ios-tapjoy.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-tapjoy.a"; path = "libmoai/lib/libmoai-ios-tapjoy.a"; sourceTree = ""; }; - 63CF1A451A065DF300F731F1 /* libmoai-ios-twitter.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-twitter.a"; path = "libmoai/lib/libmoai-ios-twitter.a"; sourceTree = ""; }; - 63CF1A461A065DF300F731F1 /* libmoai-ios-urban-airship.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-urban-airship.a"; path = "libmoai/lib/libmoai-ios-urban-airship.a"; sourceTree = ""; }; - 63CF1A471A065DF300F731F1 /* libmoai-ios-vungle.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-vungle.a"; path = "libmoai/lib/libmoai-ios-vungle.a"; sourceTree = ""; }; - 63CF1A481A065DF300F731F1 /* libmoai-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios.a"; path = "libmoai/lib/libmoai-ios.a"; sourceTree = ""; }; - 63CF1A491A065DF300F731F1 /* libmoai-luaext.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-luaext.a"; path = "libmoai/lib/libmoai-luaext.a"; sourceTree = ""; }; - 63CF1A4A1A065DF300F731F1 /* libmoai-sim.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-sim.a"; path = "libmoai/lib/libmoai-sim.a"; sourceTree = ""; }; - 63CF1A4B1A065DF300F731F1 /* libmoai-untz.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-untz.a"; path = "libmoai/lib/libmoai-untz.a"; sourceTree = ""; }; - 63CF1A4C1A065DF300F731F1 /* libmoai-util.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-util.a"; path = "libmoai/lib/libmoai-util.a"; sourceTree = ""; }; - 63CF1A4D1A065DF300F731F1 /* libmongoose.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmongoose.a; path = libmoai/lib/libmongoose.a; sourceTree = ""; }; - 63CF1A4E1A065DF300F731F1 /* libogg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libogg.a; path = libmoai/lib/libogg.a; sourceTree = ""; }; - 63CF1A4F1A065DF300F731F1 /* libplayhaven-ios.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libplayhaven-ios.a"; path = "libmoai/lib/libplayhaven-ios.a"; sourceTree = ""; }; - 63CF1A501A065DF300F731F1 /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng.a; path = libmoai/lib/libpng.a; sourceTree = ""; }; - 63CF1A511A065DF300F731F1 /* libsfmt.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsfmt.a; path = libmoai/lib/libsfmt.a; sourceTree = ""; }; - 63CF1A521A065DF300F731F1 /* libsqlite3.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsqlite3.a; path = libmoai/lib/libsqlite3.a; sourceTree = ""; }; - 63CF1A531A065DF300F731F1 /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = libmoai/lib/libssl.a; sourceTree = ""; }; - 63CF1A541A065DF300F731F1 /* libtess.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libtess.a; path = libmoai/lib/libtess.a; sourceTree = ""; }; - 63CF1A551A065DF300F731F1 /* libtinyxml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libtinyxml.a; path = libmoai/lib/libtinyxml.a; sourceTree = ""; }; - 63CF1A561A065DF300F731F1 /* libtlsf.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libtlsf.a; path = libmoai/lib/libtlsf.a; sourceTree = ""; }; - 63CF1A571A065DF300F731F1 /* libUAirship.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libUAirship.a; path = libmoai/lib/libUAirship.a; sourceTree = ""; }; - 63CF1A581A065DF300F731F1 /* libuntz.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libuntz.a; path = libmoai/lib/libuntz.a; sourceTree = ""; }; - 63CF1A591A065DF300F731F1 /* libvorbis.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvorbis.a; path = libmoai/lib/libvorbis.a; sourceTree = ""; }; - 63CF1A5A1A065DF300F731F1 /* libwebp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libwebp.a; path = libmoai/lib/libwebp.a; sourceTree = ""; }; - 63CF1A5B1A065DF300F731F1 /* libzlcore.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzlcore.a; path = libmoai/lib/libzlcore.a; sourceTree = ""; }; - 63CF1A5C1A065DF300F731F1 /* libzlib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzlib.a; path = libmoai/lib/libzlib.a; sourceTree = ""; }; - 63CF1A5D1A065DF300F731F1 /* libzlvfs.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzlvfs.a; path = libmoai/lib/libzlvfs.a; sourceTree = ""; }; - 63CF1A5E1A065DF300F731F1 /* MobileAppTracker.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileAppTracker.framework; path = libmoai/lib/MobileAppTracker.framework; sourceTree = ""; }; - 63CF1A5F1A065DF300F731F1 /* Tapjoy.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Tapjoy.framework; path = libmoai/lib/Tapjoy.framework; sourceTree = ""; }; - 63CF1A601A065DF300F731F1 /* vunglepub.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = vunglepub.framework; path = libmoai/lib/vunglepub.framework; sourceTree = ""; }; 63CF1AB61A06610600F731F1 /* aku_modules.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = aku_modules.cpp; sourceTree = ""; }; 63CF1AB71A06610600F731F1 /* aku_modules.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aku_modules.h; sourceTree = ""; }; 63CF1AB81A06610600F731F1 /* aku_modules_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aku_modules_config.h; sourceTree = ""; }; @@ -246,10 +194,6 @@ 63D01EB71A3864620097C3E8 /* MOAIView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MOAIView.h; path = "host-ios/MOAIView.h"; sourceTree = ""; }; 63D01EB81A3864620097C3E8 /* MOAIView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MOAIView.mm; path = "host-ios/MOAIView.mm"; sourceTree = ""; }; 63D01EC01A38659C0097C3E8 /* hello-moai */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "hello-moai"; path = "../../../samples/hello-moai"; sourceTree = ""; }; - 63D01EC21A3865FB0097C3E8 /* libzlcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzlcrypto.a; path = libmoai/lib/libzlcrypto.a; sourceTree = ""; }; - BD02B4111AB5C5BD006743DE /* libmoai-ios-movie.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-ios-movie.a"; path = "libmoai/lib/libmoai-ios-movie.a"; sourceTree = ""; }; - BD02B4131AB5C769006743DE /* libmoai-apple.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libmoai-apple.a"; path = "libmoai/lib/libmoai-apple.a"; sourceTree = ""; }; - BD02B4151AB5C797006743DE /* libpvr.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpvr.a; path = libmoai/lib/libpvr.a; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -257,8 +201,49 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - BD02B4161AB5C797006743DE /* libpvr.a in Frameworks */, - BD02B4141AB5C769006743DE /* libmoai-apple.a in Frameworks */, + 636B599C1CA783E200AAD4B0 /* FBSDKCoreKit.framework in Frameworks */, + 636B599D1CA783E200AAD4B0 /* FBSDKLoginKit.framework in Frameworks */, + 63A2AD351D1BEFB3008D5D59 /* libmoai-ios-3rdparty-liblua.a in Frameworks */, + 63A2AD3D1D1BEFB3008D5D59 /* libmoai-ios-crittercism.a in Frameworks */, + 63A2AD421D1BEFB3008D5D59 /* libmoai-ios-tapjoy.a in Frameworks */, + 636B599E1CA783E200AAD4B0 /* FBSDKShareKit.framework in Frameworks */, + 636B59711CA77BCE00AAD4B0 /* libmoai-ios-3rdparty-crypto.a in Frameworks */, + 636B59721CA77BCE00AAD4B0 /* libmoai-ios-apple.a in Frameworks */, + 636B59731CA77BCE00AAD4B0 /* libmoai-ios-audio-sampler.a in Frameworks */, + 636B59741CA77BCE00AAD4B0 /* libmoai-ios-billing.a in Frameworks */, + 63A2AD3E1D1BEFB3008D5D59 /* libmoai-ios-flurry.a in Frameworks */, + 636B59751CA77BCE00AAD4B0 /* libmoai-ios-box2d.a in Frameworks */, + 63A2AD401D1BEFB3008D5D59 /* libmoai-ios-kontagent.a in Frameworks */, + 636B59761CA77BCE00AAD4B0 /* libmoai-ios-crypto.a in Frameworks */, + 636B59771CA77BCE00AAD4B0 /* libmoai-ios-facebook.a in Frameworks */, + 63A2AD371D1BEFB3008D5D59 /* libmoai-ios-3rdparty-sfmt.a in Frameworks */, + 63A2AD3C1D1BEFB3008D5D59 /* libmoai-ios-chartboost.a in Frameworks */, + 63A2AD381D1BEFB3008D5D59 /* libmoai-ios-3rdparty-tinyxml.a in Frameworks */, + 636B59781CA77BCE00AAD4B0 /* libmoai-ios-gamecenter.a in Frameworks */, + 636B59791CA77BCE00AAD4B0 /* libmoai-ios-http-client.a in Frameworks */, + 63A2AD331D1BEFB3008D5D59 /* libmoai-ios-3rdparty-freetype.a in Frameworks */, + 636B597A1CA77BCE00AAD4B0 /* libmoai-ios-http-server.a in Frameworks */, + 636B597B1CA77BCE00AAD4B0 /* libmoai-ios-image-jpg.a in Frameworks */, + 636B597C1CA77BCE00AAD4B0 /* libmoai-ios-image-png.a in Frameworks */, + 63A2AD341D1BEFB3008D5D59 /* libmoai-ios-3rdparty-jannson.a in Frameworks */, + 63A2AD311D1BEFB3008D5D59 /* libmoai-ios-3rdparty-contrib.a in Frameworks */, + 63A2AD361D1BEFB3008D5D59 /* libmoai-ios-3rdparty-libtess.a in Frameworks */, + 636B597D1CA77BCE00AAD4B0 /* libmoai-ios-image-pvr.a in Frameworks */, + 636B597E1CA77BCE00AAD4B0 /* libmoai-ios-image-webp.a in Frameworks */, + 636B597F1CA77BCE00AAD4B0 /* libmoai-ios-luaext.a in Frameworks */, + 636B59801CA77BCE00AAD4B0 /* libmoai-ios-motion.a in Frameworks */, + 636B59811CA77BCE00AAD4B0 /* libmoai-ios-movie.a in Frameworks */, + 63A2AD431D1BEFB3008D5D59 /* libmoai-ios-urban-airship.a in Frameworks */, + 636B59821CA77BCE00AAD4B0 /* libmoai-ios-sim.a in Frameworks */, + 636B59831CA77BCE00AAD4B0 /* libmoai-ios-untz.a in Frameworks */, + 63A2AD391D1BEFB3008D5D59 /* libmoai-ios-3rdparty-tlsf.a in Frameworks */, + 636B59841CA77BCE00AAD4B0 /* libmoai-ios-zl-core.a in Frameworks */, + 63A2AD3A1D1BEFB3008D5D59 /* libmoai-ios-3rdparty-zlib.a in Frameworks */, + 636B59851CA77BCE00AAD4B0 /* libmoai-ios-zl-crypto.a in Frameworks */, + 63A2AD321D1BEFB3008D5D59 /* libmoai-ios-3rdparty-expat.a in Frameworks */, + 63A2AD441D1BEFB3008D5D59 /* libmoai-ios-vungle.a in Frameworks */, + 636B59861CA77BCE00AAD4B0 /* libmoai-ios-zl-vfs.a in Frameworks */, + 636B59871CA77BCE00AAD4B0 /* libmoai-ios.a in Frameworks */, 63CF1AF61A06675B00F731F1 /* Security.framework in Frameworks */, 63CF1AF41A06667500F731F1 /* UIKit.framework in Frameworks */, 63CF1AE01A06664500F731F1 /* AdSupport.framework in Frameworks */, @@ -269,104 +254,40 @@ 63CF1AE51A06664500F731F1 /* CoreMotion.framework in Frameworks */, 63CF1AE61A06664500F731F1 /* CoreTelephony.framework in Frameworks */, 63CF1AE71A06664500F731F1 /* EventKit.framework in Frameworks */, + 63A2AD411D1BEFB3008D5D59 /* libmoai-ios-mobile-app-tracker.a in Frameworks */, 63CF1AE81A06664500F731F1 /* Foundation.framework in Frameworks */, 63CF1AE91A06664500F731F1 /* GameKit.framework in Frameworks */, 63CF1AEA1A06664500F731F1 /* MediaPlayer.framework in Frameworks */, 63CF1AEB1A06664500F731F1 /* MessageUI.framework in Frameworks */, - 63CF1AA21A065DF300F731F1 /* Tapjoy.framework in Frameworks */, 63CF1AEC1A06664500F731F1 /* MobileCoreServices.framework in Frameworks */, 63CF1AED1A06664500F731F1 /* OpenGLES.framework in Frameworks */, - 63CF1AA31A065DF300F731F1 /* vunglepub.framework in Frameworks */, 63CF1AEE1A06664500F731F1 /* QuartzCore.framework in Frameworks */, 63CF1AEF1A06664500F731F1 /* Social.framework in Frameworks */, - 6396B9631BD67CE00065A9E7 /* AdColony.framework in Frameworks */, - 63CF1AA11A065DF300F731F1 /* MobileAppTracker.framework in Frameworks */, 63CF1AF01A06664500F731F1 /* StoreKit.framework in Frameworks */, 63CF1AF11A06664500F731F1 /* SystemConfiguration.framework in Frameworks */, + 63A2AD3F1D1BEFB3008D5D59 /* libmoai-ios-harfbuzz.a in Frameworks */, 63CF1AF21A06664500F731F1 /* Twitter.framework in Frameworks */, + 63A2AD3B1D1BEFB3008D5D59 /* libmoai-ios-adcolony.a in Frameworks */, 63CF1ACC1A06664400F731F1 /* CoreAudio.framework in Frameworks */, 63CF1AC81A06655F00F731F1 /* AudioToolbox.framework in Frameworks */, 63CF1AC61A06654E00F731F1 /* AVFoundation.framework in Frameworks */, - 63CF1A611A065DF300F731F1 /* AdColony.framework in Frameworks */, - 63CF1A631A065DF300F731F1 /* Kontagent.framework in Frameworks */, - 6396B9651BD67CE00065A9E7 /* FBSDKLoginKit.framework in Frameworks */, - 63CF1A641A065DF300F731F1 /* libbox2d.a in Frameworks */, - 63CF1A651A065DF300F731F1 /* libcares.a in Frameworks */, - 63CF1A661A065DF300F731F1 /* libChartboost.a in Frameworks */, - 63CF1A681A065DF300F731F1 /* libcontrib.a in Frameworks */, - 63CF1A691A065DF300F731F1 /* libCrittercism_v4_3_3.a in Frameworks */, - 63CF1A6A1A065DF300F731F1 /* libcrypto.a in Frameworks */, - 6396B9751BD67D2B0065A9E7 /* vunglepub.framework in Frameworks */, - 63CF1A6B1A065DF300F731F1 /* libcurl.a in Frameworks */, - 63CF1A6C1A065DF300F731F1 /* libexpat.a in Frameworks */, - 6396B9671BD67CE00065A9E7 /* Kontagent.framework in Frameworks */, - 63CF1A6D1A065DF300F731F1 /* libFlurry.a in Frameworks */, - 63CF1A6E1A065DF300F731F1 /* libfreetype.a in Frameworks */, - 63CF1A6F1A065DF300F731F1 /* libjansson.a in Frameworks */, - 63CF1A701A065DF300F731F1 /* libjpg.a in Frameworks */, - 63CF1A711A065DF300F731F1 /* libluacrypto.a in Frameworks */, - 63CF1A721A065DF300F731F1 /* libluacurl.a in Frameworks */, - 63CF1A731A065DF300F731F1 /* libluafilesystem.a in Frameworks */, - 6396B96F1BD67CF40065A9E7 /* libmoai-image-webp.a in Frameworks */, - 63CF1A751A065DF300F731F1 /* libluasocket.a in Frameworks */, - 63CF1A761A065DF300F731F1 /* libluasql.a in Frameworks */, - 63CF1A771A065DF300F731F1 /* libmoai-audiosampler.a in Frameworks */, - 6396B96E1BD67CF40065A9E7 /* libmoai-image-pvr.a in Frameworks */, - 63CF1A781A065DF300F731F1 /* libmoai-box2d.a in Frameworks */, - 63CF1A7A1A065DF300F731F1 /* libmoai-core.a in Frameworks */, - 63C4D5B91A1075A2009DBA1D /* libliblua-static.a in Frameworks */, - 63CF1A7B1A065DF300F731F1 /* libmoai-crypto.a in Frameworks */, - 63CF1A7C1A065DF300F731F1 /* libmoai-http-client.a in Frameworks */, - 6396B96C1BD67CF40065A9E7 /* libmoai-image-jpg.a in Frameworks */, - 6396B9661BD67CE00065A9E7 /* FBSDKShareKit.framework in Frameworks */, - 63CF1A7D1A065DF300F731F1 /* libmoai-ios-adcolony.a in Frameworks */, - 63CF1A7E1A065DF300F731F1 /* libmoai-ios-billing.a in Frameworks */, - 6396B9731BD67D2B0065A9E7 /* MobileAppTracker.framework in Frameworks */, - 63CF1A7F1A065DF300F731F1 /* libmoai-ios-chartboost.a in Frameworks */, - 63CF1A801A065DF300F731F1 /* libmoai-ios-crittercism.a in Frameworks */, - 63CF1A811A065DF300F731F1 /* libmoai-ios-facebook.a in Frameworks */, - 63CF1A821A065DF300F731F1 /* libmoai-ios-flurry.a in Frameworks */, - 63CF1A831A065DF300F731F1 /* libmoai-ios-gamecenter.a in Frameworks */, - 63CF1A841A065DF300F731F1 /* libmoai-ios-kontagent.a in Frameworks */, - 63CF1A851A065DF300F731F1 /* libmoai-ios-mobile-app-tracker.a in Frameworks */, - BD02B4121AB5C5BD006743DE /* libmoai-ios-movie.a in Frameworks */, - 63CF1A861A065DF300F731F1 /* libmoai-ios-playhaven.a in Frameworks */, - 63CF1A871A065DF300F731F1 /* libmoai-ios-tapjoy.a in Frameworks */, - 63CF1A881A065DF300F731F1 /* libmoai-ios-twitter.a in Frameworks */, - 63CF1A891A065DF300F731F1 /* libmoai-ios-urban-airship.a in Frameworks */, - 63CF1A8A1A065DF300F731F1 /* libmoai-ios-vungle.a in Frameworks */, - 63CF1A8B1A065DF300F731F1 /* libmoai-ios.a in Frameworks */, - 63CF1A8C1A065DF300F731F1 /* libmoai-luaext.a in Frameworks */, - 63CF1A8D1A065DF300F731F1 /* libmoai-sim.a in Frameworks */, - 63CF1A8E1A065DF300F731F1 /* libmoai-untz.a in Frameworks */, - 6396B9741BD67D2B0065A9E7 /* Tapjoy.framework in Frameworks */, - 63CF1A8F1A065DF300F731F1 /* libmoai-util.a in Frameworks */, - 63CF1A901A065DF300F731F1 /* libmongoose.a in Frameworks */, - 63CF1A911A065DF300F731F1 /* libogg.a in Frameworks */, - 6396B9641BD67CE00065A9E7 /* FBSDKCoreKit.framework in Frameworks */, - 63CF1A921A065DF300F731F1 /* libplayhaven-ios.a in Frameworks */, - 63CF1A931A065DF300F731F1 /* libpng.a in Frameworks */, - 63D01EC31A3865FB0097C3E8 /* libzlcrypto.a in Frameworks */, - 63CF1A941A065DF300F731F1 /* libsfmt.a in Frameworks */, - 63CF1A951A065DF300F731F1 /* libsqlite3.a in Frameworks */, - 6396B96D1BD67CF40065A9E7 /* libmoai-image-png.a in Frameworks */, - 63CF1A961A065DF300F731F1 /* libssl.a in Frameworks */, - 63CF1A971A065DF300F731F1 /* libtess.a in Frameworks */, - 63CF1A981A065DF300F731F1 /* libtinyxml.a in Frameworks */, - 63CF1A991A065DF300F731F1 /* libtlsf.a in Frameworks */, - 63CF1A9A1A065DF300F731F1 /* libUAirship.a in Frameworks */, - 63CF1A9B1A065DF300F731F1 /* libuntz.a in Frameworks */, - 63CF1A9C1A065DF300F731F1 /* libvorbis.a in Frameworks */, - 63CF1A9D1A065DF300F731F1 /* libwebp.a in Frameworks */, - 63CF1A9E1A065DF300F731F1 /* libzlcore.a in Frameworks */, - 63CF1A9F1A065DF300F731F1 /* libzlib.a in Frameworks */, - 63CF1AA01A065DF300F731F1 /* libzlvfs.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 636B59981CA77F3F00AAD4B0 /* SDK Libraries */ = { + isa = PBXGroup; + children = ( + 636B59991CA783E200AAD4B0 /* FBSDKCoreKit.framework */, + 636B599A1CA783E200AAD4B0 /* FBSDKLoginKit.framework */, + 636B599B1CA783E200AAD4B0 /* FBSDKShareKit.framework */, + ); + name = "SDK Libraries"; + path = ../../../sdk/moai; + sourceTree = ""; + }; 63CF19B81A065B5400F731F1 = { isa = PBXGroup; children = ( @@ -374,6 +295,7 @@ 63D01EC01A38659C0097C3E8 /* hello-moai */, 63D01EBF1A3864760097C3E8 /* host-ios */, 63CF19FA1A065C7700F731F1 /* Default-568h@2x.png */, + 636B59981CA77F3F00AAD4B0 /* SDK Libraries */, 63CF1AF71A066B4100F731F1 /* iOS Libraries */, 63CF1AB51A06610600F731F1 /* host-modules */, 63CF1AA51A065E0F00F731F1 /* Moai Libraries */, @@ -394,86 +316,49 @@ 63CF1AA51A065E0F00F731F1 /* Moai Libraries */ = { isa = PBXGroup; children = ( - 6396B9701BD67D2B0065A9E7 /* MobileAppTracker.framework */, - 6396B9711BD67D2B0065A9E7 /* Tapjoy.framework */, - 6396B9721BD67D2B0065A9E7 /* vunglepub.framework */, - 6396B9681BD67CF40065A9E7 /* libmoai-image-jpg.a */, - 6396B9691BD67CF40065A9E7 /* libmoai-image-png.a */, - 6396B96A1BD67CF40065A9E7 /* libmoai-image-pvr.a */, - 6396B96B1BD67CF40065A9E7 /* libmoai-image-webp.a */, - 6396B95E1BD67CE00065A9E7 /* AdColony.framework */, - 6396B95F1BD67CE00065A9E7 /* FBSDKCoreKit.framework */, - 6396B9601BD67CE00065A9E7 /* FBSDKLoginKit.framework */, - 6396B9611BD67CE00065A9E7 /* FBSDKShareKit.framework */, - 6396B9621BD67CE00065A9E7 /* Kontagent.framework */, - 63D01EC21A3865FB0097C3E8 /* libzlcrypto.a */, - 63CF1A5E1A065DF300F731F1 /* MobileAppTracker.framework */, - 63CF1A5F1A065DF300F731F1 /* Tapjoy.framework */, - 63CF1A601A065DF300F731F1 /* vunglepub.framework */, - 63CF1A211A065DF300F731F1 /* libbox2d.a */, - 63CF1A221A065DF300F731F1 /* libcares.a */, - 63CF1A231A065DF300F731F1 /* libChartboost.a */, - 63CF1A251A065DF300F731F1 /* libcontrib.a */, - 63CF1A261A065DF300F731F1 /* libCrittercism_v4_3_3.a */, - 63CF1A271A065DF300F731F1 /* libcrypto.a */, - 63CF1A281A065DF300F731F1 /* libcurl.a */, - 63CF1A291A065DF300F731F1 /* libexpat.a */, - 63CF1A2A1A065DF300F731F1 /* libFlurry.a */, - 63CF1A2B1A065DF300F731F1 /* libfreetype.a */, - 63CF1A2C1A065DF300F731F1 /* libjansson.a */, - 63CF1A2D1A065DF300F731F1 /* libjpg.a */, - 63CF1A2E1A065DF300F731F1 /* libluacrypto.a */, - 63CF1A2F1A065DF300F731F1 /* libluacurl.a */, - 63CF1A301A065DF300F731F1 /* libluafilesystem.a */, - 63CF1A321A065DF300F731F1 /* libluasocket.a */, - 63CF1A331A065DF300F731F1 /* libluasql.a */, - 63C4D5B81A1075A2009DBA1D /* libliblua-static.a */, - BD02B4131AB5C769006743DE /* libmoai-apple.a */, - 63CF1A341A065DF300F731F1 /* libmoai-audiosampler.a */, - 63CF1A351A065DF300F731F1 /* libmoai-box2d.a */, - 63CF1A371A065DF300F731F1 /* libmoai-core.a */, - 63CF1A381A065DF300F731F1 /* libmoai-crypto.a */, - 63CF1A391A065DF300F731F1 /* libmoai-http-client.a */, - 63CF1A3A1A065DF300F731F1 /* libmoai-ios-adcolony.a */, - 63CF1A3B1A065DF300F731F1 /* libmoai-ios-billing.a */, - 63CF1A3C1A065DF300F731F1 /* libmoai-ios-chartboost.a */, - 63CF1A3D1A065DF300F731F1 /* libmoai-ios-crittercism.a */, - 63CF1A3E1A065DF300F731F1 /* libmoai-ios-facebook.a */, - 63CF1A3F1A065DF300F731F1 /* libmoai-ios-flurry.a */, - 63CF1A401A065DF300F731F1 /* libmoai-ios-gamecenter.a */, - 63CF1A411A065DF300F731F1 /* libmoai-ios-kontagent.a */, - 63CF1A421A065DF300F731F1 /* libmoai-ios-mobile-app-tracker.a */, - BD02B4111AB5C5BD006743DE /* libmoai-ios-movie.a */, - 63CF1A431A065DF300F731F1 /* libmoai-ios-playhaven.a */, - 63CF1A441A065DF300F731F1 /* libmoai-ios-tapjoy.a */, - 63CF1A451A065DF300F731F1 /* libmoai-ios-twitter.a */, - 63CF1A461A065DF300F731F1 /* libmoai-ios-urban-airship.a */, - 63CF1A471A065DF300F731F1 /* libmoai-ios-vungle.a */, - 63CF1A481A065DF300F731F1 /* libmoai-ios.a */, - 63CF1A491A065DF300F731F1 /* libmoai-luaext.a */, - 63CF1A4A1A065DF300F731F1 /* libmoai-sim.a */, - 63CF1A4B1A065DF300F731F1 /* libmoai-untz.a */, - 63CF1A4C1A065DF300F731F1 /* libmoai-util.a */, - 63CF1A4D1A065DF300F731F1 /* libmongoose.a */, - 63CF1A4E1A065DF300F731F1 /* libogg.a */, - 63CF1A4F1A065DF300F731F1 /* libplayhaven-ios.a */, - 63CF1A501A065DF300F731F1 /* libpng.a */, - BD02B4151AB5C797006743DE /* libpvr.a */, - 63CF1A511A065DF300F731F1 /* libsfmt.a */, - 63CF1A521A065DF300F731F1 /* libsqlite3.a */, - 63CF1A531A065DF300F731F1 /* libssl.a */, - 63CF1A541A065DF300F731F1 /* libtess.a */, - 63CF1A551A065DF300F731F1 /* libtinyxml.a */, - 63CF1A561A065DF300F731F1 /* libtlsf.a */, - 63CF1A571A065DF300F731F1 /* libUAirship.a */, - 63CF1A581A065DF300F731F1 /* libuntz.a */, - 63CF1A591A065DF300F731F1 /* libvorbis.a */, - 63CF1A5A1A065DF300F731F1 /* libwebp.a */, - 63CF1A5B1A065DF300F731F1 /* libzlcore.a */, - 63CF1A5C1A065DF300F731F1 /* libzlib.a */, - 63CF1A5D1A065DF300F731F1 /* libzlvfs.a */, - 63CF1A1E1A065DF300F731F1 /* AdColony.framework */, - 63CF1A201A065DF300F731F1 /* Kontagent.framework */, + 63A2AD1D1D1BEFB3008D5D59 /* libmoai-ios-3rdparty-contrib.a */, + 63A2AD1E1D1BEFB3008D5D59 /* libmoai-ios-3rdparty-expat.a */, + 63A2AD1F1D1BEFB3008D5D59 /* libmoai-ios-3rdparty-freetype.a */, + 63A2AD201D1BEFB3008D5D59 /* libmoai-ios-3rdparty-jannson.a */, + 63A2AD211D1BEFB3008D5D59 /* libmoai-ios-3rdparty-liblua.a */, + 63A2AD221D1BEFB3008D5D59 /* libmoai-ios-3rdparty-libtess.a */, + 63A2AD231D1BEFB3008D5D59 /* libmoai-ios-3rdparty-sfmt.a */, + 63A2AD241D1BEFB3008D5D59 /* libmoai-ios-3rdparty-tinyxml.a */, + 63A2AD251D1BEFB3008D5D59 /* libmoai-ios-3rdparty-tlsf.a */, + 63A2AD261D1BEFB3008D5D59 /* libmoai-ios-3rdparty-zlib.a */, + 63A2AD271D1BEFB3008D5D59 /* libmoai-ios-adcolony.a */, + 63A2AD281D1BEFB3008D5D59 /* libmoai-ios-chartboost.a */, + 63A2AD291D1BEFB3008D5D59 /* libmoai-ios-crittercism.a */, + 63A2AD2A1D1BEFB3008D5D59 /* libmoai-ios-flurry.a */, + 63A2AD2B1D1BEFB3008D5D59 /* libmoai-ios-harfbuzz.a */, + 63A2AD2C1D1BEFB3008D5D59 /* libmoai-ios-kontagent.a */, + 63A2AD2D1D1BEFB3008D5D59 /* libmoai-ios-mobile-app-tracker.a */, + 63A2AD2E1D1BEFB3008D5D59 /* libmoai-ios-tapjoy.a */, + 63A2AD2F1D1BEFB3008D5D59 /* libmoai-ios-urban-airship.a */, + 63A2AD301D1BEFB3008D5D59 /* libmoai-ios-vungle.a */, + 636B59591CA77BCE00AAD4B0 /* libmoai-ios-3rdparty-crypto.a */, + 636B595A1CA77BCE00AAD4B0 /* libmoai-ios-apple.a */, + 636B595B1CA77BCE00AAD4B0 /* libmoai-ios-audio-sampler.a */, + 636B595C1CA77BCE00AAD4B0 /* libmoai-ios-billing.a */, + 636B595D1CA77BCE00AAD4B0 /* libmoai-ios-box2d.a */, + 636B595E1CA77BCE00AAD4B0 /* libmoai-ios-crypto.a */, + 636B595F1CA77BCE00AAD4B0 /* libmoai-ios-facebook.a */, + 636B59601CA77BCE00AAD4B0 /* libmoai-ios-gamecenter.a */, + 636B59611CA77BCE00AAD4B0 /* libmoai-ios-http-client.a */, + 636B59621CA77BCE00AAD4B0 /* libmoai-ios-http-server.a */, + 636B59631CA77BCE00AAD4B0 /* libmoai-ios-image-jpg.a */, + 636B59641CA77BCE00AAD4B0 /* libmoai-ios-image-png.a */, + 636B59651CA77BCE00AAD4B0 /* libmoai-ios-image-pvr.a */, + 636B59661CA77BCE00AAD4B0 /* libmoai-ios-image-webp.a */, + 636B59671CA77BCE00AAD4B0 /* libmoai-ios-luaext.a */, + 636B59681CA77BCE00AAD4B0 /* libmoai-ios-motion.a */, + 636B59691CA77BCE00AAD4B0 /* libmoai-ios-movie.a */, + 636B596A1CA77BCE00AAD4B0 /* libmoai-ios-sim.a */, + 636B596B1CA77BCE00AAD4B0 /* libmoai-ios-untz.a */, + 636B596C1CA77BCE00AAD4B0 /* libmoai-ios-zl-core.a */, + 636B596D1CA77BCE00AAD4B0 /* libmoai-ios-zl-crypto.a */, + 636B596E1CA77BCE00AAD4B0 /* libmoai-ios-zl-vfs.a */, + 636B596F1CA77BCE00AAD4B0 /* libmoai-ios.a */, ); name = "Moai Libraries"; sourceTree = ""; @@ -529,6 +414,14 @@ 63D01EBF1A3864760097C3E8 /* host-ios */ = { isa = PBXGroup; children = ( + 63A2AD111D1BEF6D008D5D59 /* MOAICommandThread.h */, + 63A2AD121D1BEF6D008D5D59 /* MOAICommandThread.mm */, + 63A2AD131D1BEF6D008D5D59 /* MOAIContextMgr.h */, + 63A2AD141D1BEF6D008D5D59 /* MOAIContextMgr.mm */, + 63A2AD151D1BEF6D008D5D59 /* MOAIRenderer.h */, + 63A2AD161D1BEF6D008D5D59 /* MOAIRenderer.mm */, + 63A2AD171D1BEF6D008D5D59 /* MOAIRendererAsync.h */, + 63A2AD181D1BEF6D008D5D59 /* MOAIRendererAsync.mm */, 63D01EB41A3864620097C3E8 /* main.mm */, 63D01EB51A3864620097C3E8 /* MOAIAppDelegate.h */, 63D01EB61A3864620097C3E8 /* MOAIAppDelegate.mm */, @@ -609,10 +502,14 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 63A2AD1C1D1BEF6D008D5D59 /* MOAIRendererAsync.mm in Sources */, 63D01EBC1A3864620097C3E8 /* MOAIAppDelegate.mm in Sources */, + 63A2AD1A1D1BEF6D008D5D59 /* MOAIContextMgr.mm in Sources */, + 63A2AD191D1BEF6D008D5D59 /* MOAICommandThread.mm in Sources */, 6396B95D1BD67CA20065A9E7 /* aku_plugins.cpp in Sources */, 63D01EBB1A3864620097C3E8 /* main.mm in Sources */, 63D01EBD1A3864620097C3E8 /* MOAIView.mm in Sources */, + 63A2AD1B1D1BEF6D008D5D59 /* MOAIRenderer.mm in Sources */, 63CF1AC21A06610600F731F1 /* aku_modules_util.cpp in Sources */, 63CF1AC11A06610600F731F1 /* aku_modules_ios.mm in Sources */, 63CF1AC01A06610600F731F1 /* aku_modules.cpp in Sources */, @@ -709,24 +606,25 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/libmoai/lib", + "$(SRCROOT)/lib", + "$(MOAI_SDK_HOME)/3rdparty/facebook-ios-sdk-4.5.1", ); GCC_PREPROCESSOR_DEFINITIONS = ( "AKU_WITH_IOS=1", "DEBUG=1", + "_DEBUG=1", ); HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/libmoai/include", + "$(MOAI_SDK_HOME)/src", "$(SRCROOT)", ); INFOPLIST_FILE = "$(SRCROOT)/res/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/libmoai/lib", - "$(PROJECT_DIR)/libmoai/lib", + "$(PROJECT_DIR)/lib", ); PRODUCT_NAME = "Moai Template"; }; @@ -741,21 +639,24 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/libmoai/lib", + "$(SRCROOT)/lib", + "$(MOAI_SDK_HOME)/3rdparty/facebook-ios-sdk-4.5.1", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "AKU_WITH_IOS=1", + "NDEBUG=1", ); - GCC_PREPROCESSOR_DEFINITIONS = "AKU_WITH_IOS=1"; HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/libmoai/include", + "$(MOAI_SDK_HOME)/src", "$(SRCROOT)", ); INFOPLIST_FILE = "$(SRCROOT)/res/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "$(SRCROOT)/libmoai/lib", - "$(PROJECT_DIR)/libmoai/lib", + "$(PROJECT_DIR)/lib", ); PRODUCT_NAME = "Moai Template"; }; diff --git a/host-templates/ios/Moai Template/build.sh b/host-templates/ios/Moai Template/build.sh index fdb8b1d..d6ddefe 100644 --- a/host-templates/ios/Moai Template/build.sh +++ b/host-templates/ios/Moai Template/build.sh @@ -1,2 +1,2 @@ #!/bin/bash -xcodebuild -configuration Debug -sdk iphonesimulator build \ No newline at end of file +xcodebuild -configuration Debug -sdk iphonesimulator PLATFORM_NAME=iphonesimulator build \ No newline at end of file diff --git a/host-templates/linux/build.sh b/host-templates/linux/build.sh index 51201ec..f671afc 100644 --- a/host-templates/linux/build.sh +++ b/host-templates/linux/build.sh @@ -2,7 +2,7 @@ pushd . cd `dirname $0` - +THIS_PATH=$(pwd) if [ x$1 == x ]; then libprefix=`dirname $0`/lib else @@ -26,10 +26,21 @@ cd .. mkdir debug cd debug cmake -DBUILD_LINUX=TRUE \ + -DMOAI_SDL=true \ -DLIB_PATH=$libprefix \ -DCMAKE_BUILD_TYPE=Debug \ $cmakedir cmake --build . --target moai --config Debug + +#now build app bundle +pushd $THIS_PATH +LUAPATH=$THIS_PATH/../../src +mkdir bundle +cd bundle +cp -a $LUAPATH/. . +cp ../build/debug/moai . +popd + popd diff --git a/host-templates/linux/cmake/CMakeLists.txt b/host-templates/linux/cmake/CMakeLists.txt index 2cde823..cd48309 100644 --- a/host-templates/linux/cmake/CMakeLists.txt +++ b/host-templates/linux/cmake/CMakeLists.txt @@ -16,8 +16,8 @@ endif(LIB_PATH) find_package ( OpenGL REQUIRED ) set ( VFS_INCLUDE "-I${LIB_PATH}/include -include ${LIB_PATH}/include/zl-vfs/zl_replace.h") -set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPOSIX -std=gnu99 -DNDEBUG -DHAVE_MEMMOVE ${VFS_INCLUDE}" ) -set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -DPOSIX2 ${VFS_INCLUDE}" ) +set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPOSIX -std=gnu99 -DNDEBUG -DHAVE_MEMMOVE ${VFS_INCLUDE} -DAKU_WITH_SDL=1" ) +set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -DPOSIX2 ${VFS_INCLUDE} -DAKU_WITH_SDL=1" ) #link lib moai include(${LIB_PATH}/cmake/libmoai.cmake) @@ -43,7 +43,7 @@ if (NOT (XCB_XCB_FOUND AND XCB_RANDR_FOUND AND XCB_UTIL_FOUND)) endif (NOT (XCB_XCB_FOUND AND XCB_RANDR_FOUND AND XCB_UTIL_FOUND)) find_package(X11) - + FIND_LIBRARY(X11_Xxf86vm_LIB Xxf86vm ${X11_LIB_SEARCH_PATH}) FIND_LIBRARY(XI_LIBRARY Xi ${X11_LIB_SEARCH_PATH}) MARK_AS_ADVANCED(X11_Xxf86vm_LIB XI_LIBRARY) @@ -60,14 +60,14 @@ file ( GLOB HOST_SDL_SRC "${HOST_ROOT}/host-sdl/*.cpp" "${HOST_ROOT}/host-sdl/*. add_executable ( moai ${HOST_SDL_SRC} ) -target_link_libraries ( moai +target_link_libraries ( moai host-modules moai-sim moai-util moai-core zlcore SDL2-static - pthread + pthread rt ${XI_LIBRARY} ${OPENGL_LIBRARIES} diff --git a/host-templates/linux/cmake/host-modules/CMakeLists.txt b/host-templates/linux/cmake/host-modules/CMakeLists.txt index e8b7d33..40f3edd 100644 --- a/host-templates/linux/cmake/host-modules/CMakeLists.txt +++ b/host-templates/linux/cmake/host-modules/CMakeLists.txt @@ -14,16 +14,16 @@ add_library ( host-modules STATIC ${HOST_MODULES_SRC} ) set_target_properties( host-modules PROPERTIES FOLDER Modules ) target_include_directories(host-modules PUBLIC ${HOST_ROOT}) - target_link_libraries ( host-modules - moai-box2d - moai-untz - moai-http-client + target_link_libraries ( host-modules + moai-box2d + moai-sdl + moai-untz + moai-http-client moai-image-pvr moai-image-png moai-image-jpg moai-image-webp - moai-luaext + moai-luaext moai-core moai-crypto ) - diff --git a/host-templates/linux/run.sh b/host-templates/linux/run.sh new file mode 100644 index 0000000..f9a0cce --- /dev/null +++ b/host-templates/linux/run.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +pushd `dirname $0` +cd bundle +./moai +popd diff --git a/host-templates/osx/Moai Template/Moai Template.xcodeproj/project.pbxproj b/host-templates/osx/Moai Template/Moai Template.xcodeproj/project.pbxproj index 24e1e30..bbade75 100644 --- a/host-templates/osx/Moai Template/Moai Template.xcodeproj/project.pbxproj +++ b/host-templates/osx/Moai Template/Moai Template.xcodeproj/project.pbxproj @@ -9,55 +9,35 @@ /* Begin PBXBuildFile section */ 63157D5C19FCB407009018A3 /* bootstrap.lua in Resources */ = {isa = PBXBuildFile; fileRef = 63157D5B19FCB407009018A3 /* bootstrap.lua */; }; 63157D5F19FCB4F0009018A3 /* src in Resources */ = {isa = PBXBuildFile; fileRef = 63157D5E19FCB4F0009018A3 /* src */; }; - 63157D6219FCB57D009018A3 /* libmoai-crypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63157D6019FCB57D009018A3 /* libmoai-crypto.a */; }; - 63157D6319FCB57D009018A3 /* libtess.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63157D6119FCB57D009018A3 /* libtess.a */; }; 63157D6619FCB5A1009018A3 /* aku_modules_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63157D6419FCB5A1009018A3 /* aku_modules_util.cpp */; }; 6350149A1A162880000E237F /* Icon-120.png in Resources */ = {isa = PBXBuildFile; fileRef = 635014991A162880000E237F /* Icon-120.png */; }; - 637AC50F1BD6743F004E3F10 /* libmoai-image-jpg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 637AC50B1BD6743F004E3F10 /* libmoai-image-jpg.a */; }; - 637AC5101BD6743F004E3F10 /* libmoai-image-png.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 637AC50C1BD6743F004E3F10 /* libmoai-image-png.a */; }; - 637AC5111BD6743F004E3F10 /* libmoai-image-pvr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 637AC50D1BD6743F004E3F10 /* libmoai-image-pvr.a */; }; - 637AC5121BD6743F004E3F10 /* libmoai-image-webp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 637AC50E1BD6743F004E3F10 /* libmoai-image-webp.a */; }; + 636B59431CA770AF00AAD4B0 /* libmoai-osx-3rdparty-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B592E1CA770AE00AAD4B0 /* libmoai-osx-3rdparty-core.a */; }; + 636B59441CA770AF00AAD4B0 /* libmoai-osx-3rdparty-crypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B592F1CA770AE00AAD4B0 /* libmoai-osx-3rdparty-crypto.a */; }; + 636B59451CA770AF00AAD4B0 /* libmoai-osx-3rdparty-sdl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59301CA770AE00AAD4B0 /* libmoai-osx-3rdparty-sdl.a */; }; + 636B59461CA770AF00AAD4B0 /* libmoai-osx-apple.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59311CA770AE00AAD4B0 /* libmoai-osx-apple.a */; }; + 636B59471CA770AF00AAD4B0 /* libmoai-osx-audio-sampler.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59321CA770AE00AAD4B0 /* libmoai-osx-audio-sampler.a */; }; + 636B59481CA770AF00AAD4B0 /* libmoai-osx-box2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59331CA770AE00AAD4B0 /* libmoai-osx-box2d.a */; }; + 636B59491CA770AF00AAD4B0 /* libmoai-osx-crypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59341CA770AE00AAD4B0 /* libmoai-osx-crypto.a */; }; + 636B594A1CA770AF00AAD4B0 /* libmoai-osx-http-client.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59351CA770AE00AAD4B0 /* libmoai-osx-http-client.a */; }; + 636B594B1CA770AF00AAD4B0 /* libmoai-osx-http-server.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59361CA770AE00AAD4B0 /* libmoai-osx-http-server.a */; }; + 636B594C1CA770AF00AAD4B0 /* libmoai-osx-image-jpg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59371CA770AE00AAD4B0 /* libmoai-osx-image-jpg.a */; }; + 636B594D1CA770AF00AAD4B0 /* libmoai-osx-image-png.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59381CA770AE00AAD4B0 /* libmoai-osx-image-png.a */; }; + 636B594E1CA770AF00AAD4B0 /* libmoai-osx-image-pvr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59391CA770AE00AAD4B0 /* libmoai-osx-image-pvr.a */; }; + 636B594F1CA770AF00AAD4B0 /* libmoai-osx-image-webp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B593A1CA770AE00AAD4B0 /* libmoai-osx-image-webp.a */; }; + 636B59501CA770AF00AAD4B0 /* libmoai-osx-luaext.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B593B1CA770AE00AAD4B0 /* libmoai-osx-luaext.a */; }; + 636B59511CA770AF00AAD4B0 /* libmoai-osx-sdl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B593C1CA770AE00AAD4B0 /* libmoai-osx-sdl.a */; }; + 636B59521CA770AF00AAD4B0 /* libmoai-osx-sim.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B593D1CA770AE00AAD4B0 /* libmoai-osx-sim.a */; }; + 636B59531CA770AF00AAD4B0 /* libmoai-osx-untz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B593E1CA770AE00AAD4B0 /* libmoai-osx-untz.a */; }; + 636B59541CA770AF00AAD4B0 /* libmoai-osx-zl-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B593F1CA770AE00AAD4B0 /* libmoai-osx-zl-core.a */; }; + 636B59551CA770AF00AAD4B0 /* libmoai-osx-zl-crypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59401CA770AE00AAD4B0 /* libmoai-osx-zl-crypto.a */; }; + 636B59561CA770AF00AAD4B0 /* libmoai-osx-zl-vfs.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59411CA770AE00AAD4B0 /* libmoai-osx-zl-vfs.a */; }; + 636B59571CA770AF00AAD4B0 /* libmoai-osx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 636B59421CA770AE00AAD4B0 /* libmoai-osx.a */; }; + 63A2ACD21D19478D008D5D59 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63A2ACD11D19478D008D5D59 /* CoreVideo.framework */; }; + 63A2ACD41D194824008D5D59 /* SDLHost-osx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 63A2ACD31D194824008D5D59 /* SDLHost-osx.mm */; }; 63E54A7919EE14DF00C7AC2F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 63E54A7719EE14DF00C7AC2F /* InfoPlist.strings */; }; 63E54A9619EE170700C7AC2F /* aku_modules.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63E54A8C19EE170700C7AC2F /* aku_modules.cpp */; }; 63E54A9819EE170700C7AC2F /* SDLHost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63E54A9319EE170700C7AC2F /* SDLHost.cpp */; }; 63E54A9919EE170700C7AC2F /* SDLHostMain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 63E54A9519EE170700C7AC2F /* SDLHostMain.cpp */; }; - 63E54AC119EE179700C7AC2F /* libbox2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54A9A19EE179600C7AC2F /* libbox2d.a */; }; - 63E54AC319EE179700C7AC2F /* libcontrib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54A9C19EE179600C7AC2F /* libcontrib.a */; }; - 63E54AC419EE179700C7AC2F /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54A9D19EE179600C7AC2F /* libcrypto.a */; }; - 63E54AC519EE179700C7AC2F /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54A9E19EE179600C7AC2F /* libcurl.a */; }; - 63E54AC619EE179700C7AC2F /* libexpat.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54A9F19EE179600C7AC2F /* libexpat.a */; }; - 63E54AC719EE179700C7AC2F /* libfreetype.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AA019EE179600C7AC2F /* libfreetype.a */; }; - 63E54AC819EE179700C7AC2F /* libglew.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AA119EE179600C7AC2F /* libglew.a */; }; - 63E54AC919EE179700C7AC2F /* libjansson.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AA219EE179600C7AC2F /* libjansson.a */; }; - 63E54ACA19EE179700C7AC2F /* libjpg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AA319EE179600C7AC2F /* libjpg.a */; }; - 63E54ACB19EE179700C7AC2F /* libluacrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AA419EE179600C7AC2F /* libluacrypto.a */; }; - 63E54ACC19EE179700C7AC2F /* libluacurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AA519EE179600C7AC2F /* libluacurl.a */; }; - 63E54ACD19EE179700C7AC2F /* libluafilesystem.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AA619EE179600C7AC2F /* libluafilesystem.a */; }; - 63E54ACE19EE179700C7AC2F /* libluajit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AA719EE179600C7AC2F /* libluajit.a */; }; - 63E54ACF19EE179700C7AC2F /* libluasocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AA819EE179600C7AC2F /* libluasocket.a */; }; - 63E54AD019EE179700C7AC2F /* libluasql.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AA919EE179600C7AC2F /* libluasql.a */; }; - 63E54AD119EE179700C7AC2F /* libmoai-box2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AAA19EE179600C7AC2F /* libmoai-box2d.a */; }; - 63E54AD319EE179700C7AC2F /* libmoai-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AAC19EE179600C7AC2F /* libmoai-core.a */; }; - 63E54AD419EE179700C7AC2F /* libmoai-http-client.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AAD19EE179600C7AC2F /* libmoai-http-client.a */; }; - 63E54AD519EE179700C7AC2F /* libmoai-luaext.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AAE19EE179600C7AC2F /* libmoai-luaext.a */; }; - 63E54AD619EE179700C7AC2F /* libmoai-sim.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AAF19EE179600C7AC2F /* libmoai-sim.a */; }; - 63E54AD719EE179700C7AC2F /* libmoai-untz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AB019EE179600C7AC2F /* libmoai-untz.a */; }; - 63E54AD819EE179700C7AC2F /* libmoai-util.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AB119EE179600C7AC2F /* libmoai-util.a */; }; - 63E54AD919EE179700C7AC2F /* libmongoose.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AB219EE179600C7AC2F /* libmongoose.a */; }; - 63E54ADA19EE179700C7AC2F /* libogg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AB319EE179600C7AC2F /* libogg.a */; }; - 63E54ADB19EE179700C7AC2F /* libpng.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AB419EE179600C7AC2F /* libpng.a */; }; - 63E54ADC19EE179700C7AC2F /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AB519EE179600C7AC2F /* libSDL2.a */; }; - 63E54ADD19EE179700C7AC2F /* libSDL2main.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AB619EE179600C7AC2F /* libSDL2main.a */; }; - 63E54ADE19EE179700C7AC2F /* libsfmt.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AB719EE179600C7AC2F /* libsfmt.a */; }; - 63E54ADF19EE179700C7AC2F /* libsqlite3.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AB819EE179600C7AC2F /* libsqlite3.a */; }; - 63E54AE019EE179700C7AC2F /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AB919EE179700C7AC2F /* libssl.a */; }; - 63E54AE119EE179700C7AC2F /* libtinyxml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54ABA19EE179700C7AC2F /* libtinyxml.a */; }; - 63E54AE219EE179700C7AC2F /* libtlsf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54ABB19EE179700C7AC2F /* libtlsf.a */; }; - 63E54AE319EE179700C7AC2F /* libuntz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54ABC19EE179700C7AC2F /* libuntz.a */; }; - 63E54AE419EE179700C7AC2F /* libvorbis.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54ABD19EE179700C7AC2F /* libvorbis.a */; }; - 63E54AE519EE179700C7AC2F /* libzlcore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54ABE19EE179700C7AC2F /* libzlcore.a */; }; - 63E54AE619EE179700C7AC2F /* libzlib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54ABF19EE179700C7AC2F /* libzlib.a */; }; - 63E54AE719EE179700C7AC2F /* libzlvfs.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AC019EE179700C7AC2F /* libzlvfs.a */; }; 63E54AE819EE1A1200C7AC2F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54A7319EE14DF00C7AC2F /* Foundation.framework */; }; 63E54AF219EE1A1300C7AC2F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AE919EE1A1200C7AC2F /* AudioToolbox.framework */; }; 63E54AF319EE1A1300C7AC2F /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54AEA19EE1A1200C7AC2F /* AudioUnit.framework */; }; @@ -75,30 +55,40 @@ 63E54B0419EE1B4D00C7AC2F /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54B0319EE1B4D00C7AC2F /* IOKit.framework */; }; 63E54B0519EE1B7000C7AC2F /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54A7119EE14DF00C7AC2F /* AppKit.framework */; }; 63E54B0719EE1C4B00C7AC2F /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E54B0619EE1C4B00C7AC2F /* Carbon.framework */; }; - 63F755911A3C370900EF9127 /* libzlcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 63F755901A3C370900EF9127 /* libzlcrypto.a */; }; BD02B41B1AB7B508006743DE /* SDLJoystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD02B4171AB7B508006743DE /* SDLJoystick.cpp */; }; BD02B41C1AB7B508006743DE /* SDLKeyCodeMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD02B4191AB7B508006743DE /* SDLKeyCodeMapping.cpp */; }; BD02B4201AB7B53F006743DE /* aku_plugins.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD02B41D1AB7B53F006743DE /* aku_plugins.cpp */; }; - BD02B4281AB7B5A7006743DE /* libmoai-apple.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BD02B4221AB7B5A7006743DE /* libmoai-apple.a */; }; - BD02B4291AB7B5A7006743DE /* libmoai-audiosampler.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BD02B4231AB7B5A7006743DE /* libmoai-audiosampler.a */; }; - BD02B42A1AB7B5A7006743DE /* libmoai-http-server.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BD02B4241AB7B5A7006743DE /* libmoai-http-server.a */; }; - BD02B42B1AB7B5A7006743DE /* libmoai-sdl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BD02B4251AB7B5A7006743DE /* libmoai-sdl.a */; }; - BD02B42C1AB7B5A7006743DE /* libpvr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BD02B4261AB7B5A7006743DE /* libpvr.a */; }; - BD02B42D1AB7B5A7006743DE /* libwebp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BD02B4271AB7B5A7006743DE /* libwebp.a */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 63157D5B19FCB407009018A3 /* bootstrap.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = bootstrap.lua; path = ../bootstrap.lua; sourceTree = ""; }; 63157D5E19FCB4F0009018A3 /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; name = src; path = ../../src; sourceTree = ""; }; - 63157D6019FCB57D009018A3 /* libmoai-crypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-crypto.a"; sourceTree = ""; }; - 63157D6119FCB57D009018A3 /* libtess.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libtess.a; sourceTree = ""; }; 63157D6419FCB5A1009018A3 /* aku_modules_util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = aku_modules_util.cpp; sourceTree = ""; }; 63157D6519FCB5A1009018A3 /* aku_modules_util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aku_modules_util.h; sourceTree = ""; }; 635014991A162880000E237F /* Icon-120.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-120.png"; sourceTree = ""; }; - 637AC50B1BD6743F004E3F10 /* libmoai-image-jpg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-image-jpg.a"; sourceTree = ""; }; - 637AC50C1BD6743F004E3F10 /* libmoai-image-png.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-image-png.a"; sourceTree = ""; }; - 637AC50D1BD6743F004E3F10 /* libmoai-image-pvr.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-image-pvr.a"; sourceTree = ""; }; - 637AC50E1BD6743F004E3F10 /* libmoai-image-webp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-image-webp.a"; sourceTree = ""; }; + 636B592E1CA770AE00AAD4B0 /* libmoai-osx-3rdparty-core.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-3rdparty-core.a"; sourceTree = ""; }; + 636B592F1CA770AE00AAD4B0 /* libmoai-osx-3rdparty-crypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-3rdparty-crypto.a"; sourceTree = ""; }; + 636B59301CA770AE00AAD4B0 /* libmoai-osx-3rdparty-sdl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-3rdparty-sdl.a"; sourceTree = ""; }; + 636B59311CA770AE00AAD4B0 /* libmoai-osx-apple.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-apple.a"; sourceTree = ""; }; + 636B59321CA770AE00AAD4B0 /* libmoai-osx-audio-sampler.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-audio-sampler.a"; sourceTree = ""; }; + 636B59331CA770AE00AAD4B0 /* libmoai-osx-box2d.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-box2d.a"; sourceTree = ""; }; + 636B59341CA770AE00AAD4B0 /* libmoai-osx-crypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-crypto.a"; sourceTree = ""; }; + 636B59351CA770AE00AAD4B0 /* libmoai-osx-http-client.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-http-client.a"; sourceTree = ""; }; + 636B59361CA770AE00AAD4B0 /* libmoai-osx-http-server.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-http-server.a"; sourceTree = ""; }; + 636B59371CA770AE00AAD4B0 /* libmoai-osx-image-jpg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-image-jpg.a"; sourceTree = ""; }; + 636B59381CA770AE00AAD4B0 /* libmoai-osx-image-png.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-image-png.a"; sourceTree = ""; }; + 636B59391CA770AE00AAD4B0 /* libmoai-osx-image-pvr.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-image-pvr.a"; sourceTree = ""; }; + 636B593A1CA770AE00AAD4B0 /* libmoai-osx-image-webp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-image-webp.a"; sourceTree = ""; }; + 636B593B1CA770AE00AAD4B0 /* libmoai-osx-luaext.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-luaext.a"; sourceTree = ""; }; + 636B593C1CA770AE00AAD4B0 /* libmoai-osx-sdl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-sdl.a"; sourceTree = ""; }; + 636B593D1CA770AE00AAD4B0 /* libmoai-osx-sim.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-sim.a"; sourceTree = ""; }; + 636B593E1CA770AE00AAD4B0 /* libmoai-osx-untz.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-untz.a"; sourceTree = ""; }; + 636B593F1CA770AE00AAD4B0 /* libmoai-osx-zl-core.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-zl-core.a"; sourceTree = ""; }; + 636B59401CA770AE00AAD4B0 /* libmoai-osx-zl-crypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-zl-crypto.a"; sourceTree = ""; }; + 636B59411CA770AE00AAD4B0 /* libmoai-osx-zl-vfs.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx-zl-vfs.a"; sourceTree = ""; }; + 636B59421CA770AE00AAD4B0 /* libmoai-osx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-osx.a"; sourceTree = ""; }; + 63A2ACD11D19478D008D5D59 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; + 63A2ACD31D194824008D5D59 /* SDLHost-osx.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "SDLHost-osx.mm"; sourceTree = ""; }; 63E54A6B19EE14DF00C7AC2F /* Moai Template.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Moai Template.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 63E54A6E19EE14DF00C7AC2F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 63E54A7119EE14DF00C7AC2F /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; @@ -112,43 +102,6 @@ 63E54A9319EE170700C7AC2F /* SDLHost.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SDLHost.cpp; sourceTree = ""; }; 63E54A9419EE170700C7AC2F /* SDLHost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLHost.h; sourceTree = ""; }; 63E54A9519EE170700C7AC2F /* SDLHostMain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SDLHostMain.cpp; sourceTree = ""; }; - 63E54A9A19EE179600C7AC2F /* libbox2d.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libbox2d.a; sourceTree = ""; }; - 63E54A9C19EE179600C7AC2F /* libcontrib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcontrib.a; sourceTree = ""; }; - 63E54A9D19EE179600C7AC2F /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcrypto.a; sourceTree = ""; }; - 63E54A9E19EE179600C7AC2F /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libcurl.a; sourceTree = ""; }; - 63E54A9F19EE179600C7AC2F /* libexpat.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libexpat.a; sourceTree = ""; }; - 63E54AA019EE179600C7AC2F /* libfreetype.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libfreetype.a; sourceTree = ""; }; - 63E54AA119EE179600C7AC2F /* libglew.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libglew.a; sourceTree = ""; }; - 63E54AA219EE179600C7AC2F /* libjansson.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libjansson.a; sourceTree = ""; }; - 63E54AA319EE179600C7AC2F /* libjpg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libjpg.a; sourceTree = ""; }; - 63E54AA419EE179600C7AC2F /* libluacrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libluacrypto.a; sourceTree = ""; }; - 63E54AA519EE179600C7AC2F /* libluacurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libluacurl.a; sourceTree = ""; }; - 63E54AA619EE179600C7AC2F /* libluafilesystem.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libluafilesystem.a; sourceTree = ""; }; - 63E54AA719EE179600C7AC2F /* libluajit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libluajit.a; sourceTree = ""; }; - 63E54AA819EE179600C7AC2F /* libluasocket.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libluasocket.a; sourceTree = ""; }; - 63E54AA919EE179600C7AC2F /* libluasql.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libluasql.a; sourceTree = ""; }; - 63E54AAA19EE179600C7AC2F /* libmoai-box2d.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-box2d.a"; sourceTree = ""; }; - 63E54AAC19EE179600C7AC2F /* libmoai-core.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-core.a"; sourceTree = ""; }; - 63E54AAD19EE179600C7AC2F /* libmoai-http-client.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-http-client.a"; sourceTree = ""; }; - 63E54AAE19EE179600C7AC2F /* libmoai-luaext.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-luaext.a"; sourceTree = ""; }; - 63E54AAF19EE179600C7AC2F /* libmoai-sim.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-sim.a"; sourceTree = ""; }; - 63E54AB019EE179600C7AC2F /* libmoai-untz.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-untz.a"; sourceTree = ""; }; - 63E54AB119EE179600C7AC2F /* libmoai-util.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-util.a"; sourceTree = ""; }; - 63E54AB219EE179600C7AC2F /* libmongoose.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libmongoose.a; sourceTree = ""; }; - 63E54AB319EE179600C7AC2F /* libogg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libogg.a; sourceTree = ""; }; - 63E54AB419EE179600C7AC2F /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libpng.a; sourceTree = ""; }; - 63E54AB519EE179600C7AC2F /* libSDL2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libSDL2.a; sourceTree = ""; }; - 63E54AB619EE179600C7AC2F /* libSDL2main.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libSDL2main.a; sourceTree = ""; }; - 63E54AB719EE179600C7AC2F /* libsfmt.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libsfmt.a; sourceTree = ""; }; - 63E54AB819EE179600C7AC2F /* libsqlite3.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libsqlite3.a; sourceTree = ""; }; - 63E54AB919EE179700C7AC2F /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libssl.a; sourceTree = ""; }; - 63E54ABA19EE179700C7AC2F /* libtinyxml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libtinyxml.a; sourceTree = ""; }; - 63E54ABB19EE179700C7AC2F /* libtlsf.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libtlsf.a; sourceTree = ""; }; - 63E54ABC19EE179700C7AC2F /* libuntz.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libuntz.a; sourceTree = ""; }; - 63E54ABD19EE179700C7AC2F /* libvorbis.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libvorbis.a; sourceTree = ""; }; - 63E54ABE19EE179700C7AC2F /* libzlcore.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libzlcore.a; sourceTree = ""; }; - 63E54ABF19EE179700C7AC2F /* libzlib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libzlib.a; sourceTree = ""; }; - 63E54AC019EE179700C7AC2F /* libzlvfs.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libzlvfs.a; sourceTree = ""; }; 63E54AE919EE1A1200C7AC2F /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 63E54AEA19EE1A1200C7AC2F /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; }; 63E54AEB19EE1A1200C7AC2F /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; @@ -164,19 +117,12 @@ 63E54B0119EE1B1F00C7AC2F /* ForceFeedback.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ForceFeedback.framework; path = System/Library/Frameworks/ForceFeedback.framework; sourceTree = SDKROOT; }; 63E54B0319EE1B4D00C7AC2F /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; 63E54B0619EE1C4B00C7AC2F /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; - 63F755901A3C370900EF9127 /* libzlcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libzlcrypto.a; sourceTree = ""; }; BD02B4171AB7B508006743DE /* SDLJoystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SDLJoystick.cpp; sourceTree = ""; }; BD02B4181AB7B508006743DE /* SDLJoystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLJoystick.h; sourceTree = ""; }; BD02B4191AB7B508006743DE /* SDLKeyCodeMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SDLKeyCodeMapping.cpp; sourceTree = ""; }; BD02B41A1AB7B508006743DE /* SDLKeyCodeMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLKeyCodeMapping.h; sourceTree = ""; }; BD02B41D1AB7B53F006743DE /* aku_plugins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = aku_plugins.cpp; sourceTree = ""; }; BD02B41F1AB7B53F006743DE /* aku_plugins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aku_plugins.h; sourceTree = ""; }; - BD02B4221AB7B5A7006743DE /* libmoai-apple.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-apple.a"; sourceTree = ""; }; - BD02B4231AB7B5A7006743DE /* libmoai-audiosampler.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-audiosampler.a"; sourceTree = ""; }; - BD02B4241AB7B5A7006743DE /* libmoai-http-server.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-http-server.a"; sourceTree = ""; }; - BD02B4251AB7B5A7006743DE /* libmoai-sdl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libmoai-sdl.a"; sourceTree = ""; }; - BD02B4261AB7B5A7006743DE /* libpvr.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libpvr.a; sourceTree = ""; }; - BD02B4271AB7B5A7006743DE /* libwebp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libwebp.a; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -184,9 +130,28 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 637AC5121BD6743F004E3F10 /* libmoai-image-webp.a in Frameworks */, - 63157D6219FCB57D009018A3 /* libmoai-crypto.a in Frameworks */, - 63157D6319FCB57D009018A3 /* libtess.a in Frameworks */, + 63A2ACD21D19478D008D5D59 /* CoreVideo.framework in Frameworks */, + 636B59431CA770AF00AAD4B0 /* libmoai-osx-3rdparty-core.a in Frameworks */, + 636B59441CA770AF00AAD4B0 /* libmoai-osx-3rdparty-crypto.a in Frameworks */, + 636B59451CA770AF00AAD4B0 /* libmoai-osx-3rdparty-sdl.a in Frameworks */, + 636B59461CA770AF00AAD4B0 /* libmoai-osx-apple.a in Frameworks */, + 636B59471CA770AF00AAD4B0 /* libmoai-osx-audio-sampler.a in Frameworks */, + 636B59481CA770AF00AAD4B0 /* libmoai-osx-box2d.a in Frameworks */, + 636B59491CA770AF00AAD4B0 /* libmoai-osx-crypto.a in Frameworks */, + 636B594A1CA770AF00AAD4B0 /* libmoai-osx-http-client.a in Frameworks */, + 636B594B1CA770AF00AAD4B0 /* libmoai-osx-http-server.a in Frameworks */, + 636B594C1CA770AF00AAD4B0 /* libmoai-osx-image-jpg.a in Frameworks */, + 636B594D1CA770AF00AAD4B0 /* libmoai-osx-image-png.a in Frameworks */, + 636B594E1CA770AF00AAD4B0 /* libmoai-osx-image-pvr.a in Frameworks */, + 636B594F1CA770AF00AAD4B0 /* libmoai-osx-image-webp.a in Frameworks */, + 636B59501CA770AF00AAD4B0 /* libmoai-osx-luaext.a in Frameworks */, + 636B59511CA770AF00AAD4B0 /* libmoai-osx-sdl.a in Frameworks */, + 636B59521CA770AF00AAD4B0 /* libmoai-osx-sim.a in Frameworks */, + 636B59531CA770AF00AAD4B0 /* libmoai-osx-untz.a in Frameworks */, + 636B59541CA770AF00AAD4B0 /* libmoai-osx-zl-core.a in Frameworks */, + 636B59551CA770AF00AAD4B0 /* libmoai-osx-zl-crypto.a in Frameworks */, + 636B59561CA770AF00AAD4B0 /* libmoai-osx-zl-vfs.a in Frameworks */, + 636B59571CA770AF00AAD4B0 /* libmoai-osx.a in Frameworks */, 63E54B0719EE1C4B00C7AC2F /* Carbon.framework in Frameworks */, 63E54B0519EE1B7000C7AC2F /* AppKit.framework in Frameworks */, 63E54B0419EE1B4D00C7AC2F /* IOKit.framework in Frameworks */, @@ -204,53 +169,6 @@ 63E54AF919EE1A1300C7AC2F /* StoreKit.framework in Frameworks */, 63E54AFA19EE1A1300C7AC2F /* SystemConfiguration.framework in Frameworks */, 63E54AE819EE1A1200C7AC2F /* Foundation.framework in Frameworks */, - 63E54AC119EE179700C7AC2F /* libbox2d.a in Frameworks */, - 63E54AC319EE179700C7AC2F /* libcontrib.a in Frameworks */, - 63E54AC419EE179700C7AC2F /* libcrypto.a in Frameworks */, - BD02B4281AB7B5A7006743DE /* libmoai-apple.a in Frameworks */, - 63E54AC519EE179700C7AC2F /* libcurl.a in Frameworks */, - 63E54AC619EE179700C7AC2F /* libexpat.a in Frameworks */, - 63E54AC719EE179700C7AC2F /* libfreetype.a in Frameworks */, - 63E54AC819EE179700C7AC2F /* libglew.a in Frameworks */, - 63E54AC919EE179700C7AC2F /* libjansson.a in Frameworks */, - BD02B4291AB7B5A7006743DE /* libmoai-audiosampler.a in Frameworks */, - 637AC50F1BD6743F004E3F10 /* libmoai-image-jpg.a in Frameworks */, - 637AC5111BD6743F004E3F10 /* libmoai-image-pvr.a in Frameworks */, - 63E54ACA19EE179700C7AC2F /* libjpg.a in Frameworks */, - 63E54ACB19EE179700C7AC2F /* libluacrypto.a in Frameworks */, - 63E54ACC19EE179700C7AC2F /* libluacurl.a in Frameworks */, - 63E54ACD19EE179700C7AC2F /* libluafilesystem.a in Frameworks */, - 63E54ACE19EE179700C7AC2F /* libluajit.a in Frameworks */, - BD02B42C1AB7B5A7006743DE /* libpvr.a in Frameworks */, - 63E54ACF19EE179700C7AC2F /* libluasocket.a in Frameworks */, - 63E54AD019EE179700C7AC2F /* libluasql.a in Frameworks */, - 63E54AD119EE179700C7AC2F /* libmoai-box2d.a in Frameworks */, - 63E54AD319EE179700C7AC2F /* libmoai-core.a in Frameworks */, - BD02B42B1AB7B5A7006743DE /* libmoai-sdl.a in Frameworks */, - 63E54AD419EE179700C7AC2F /* libmoai-http-client.a in Frameworks */, - 63E54AD519EE179700C7AC2F /* libmoai-luaext.a in Frameworks */, - 63E54AD619EE179700C7AC2F /* libmoai-sim.a in Frameworks */, - 63E54AD719EE179700C7AC2F /* libmoai-untz.a in Frameworks */, - BD02B42A1AB7B5A7006743DE /* libmoai-http-server.a in Frameworks */, - 63E54AD819EE179700C7AC2F /* libmoai-util.a in Frameworks */, - 63E54AD919EE179700C7AC2F /* libmongoose.a in Frameworks */, - 63E54ADA19EE179700C7AC2F /* libogg.a in Frameworks */, - 63F755911A3C370900EF9127 /* libzlcrypto.a in Frameworks */, - 63E54ADB19EE179700C7AC2F /* libpng.a in Frameworks */, - 63E54ADC19EE179700C7AC2F /* libSDL2.a in Frameworks */, - 63E54ADD19EE179700C7AC2F /* libSDL2main.a in Frameworks */, - 63E54ADE19EE179700C7AC2F /* libsfmt.a in Frameworks */, - 63E54ADF19EE179700C7AC2F /* libsqlite3.a in Frameworks */, - 637AC5101BD6743F004E3F10 /* libmoai-image-png.a in Frameworks */, - 63E54AE019EE179700C7AC2F /* libssl.a in Frameworks */, - 63E54AE119EE179700C7AC2F /* libtinyxml.a in Frameworks */, - BD02B42D1AB7B5A7006743DE /* libwebp.a in Frameworks */, - 63E54AE219EE179700C7AC2F /* libtlsf.a in Frameworks */, - 63E54AE319EE179700C7AC2F /* libuntz.a in Frameworks */, - 63E54AE419EE179700C7AC2F /* libvorbis.a in Frameworks */, - 63E54AE519EE179700C7AC2F /* libzlcore.a in Frameworks */, - 63E54AE619EE179700C7AC2F /* libzlib.a in Frameworks */, - 63E54AE719EE179700C7AC2F /* libzlvfs.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -260,59 +178,29 @@ 63157D5619FCAE84009018A3 /* lib */ = { isa = PBXGroup; children = ( - 637AC50B1BD6743F004E3F10 /* libmoai-image-jpg.a */, - 637AC50C1BD6743F004E3F10 /* libmoai-image-png.a */, - 637AC50D1BD6743F004E3F10 /* libmoai-image-pvr.a */, - 637AC50E1BD6743F004E3F10 /* libmoai-image-webp.a */, - BD02B4221AB7B5A7006743DE /* libmoai-apple.a */, - BD02B4231AB7B5A7006743DE /* libmoai-audiosampler.a */, - BD02B4241AB7B5A7006743DE /* libmoai-http-server.a */, - BD02B4251AB7B5A7006743DE /* libmoai-sdl.a */, - BD02B4261AB7B5A7006743DE /* libpvr.a */, - BD02B4271AB7B5A7006743DE /* libwebp.a */, - 63E54A9A19EE179600C7AC2F /* libbox2d.a */, - 63E54A9C19EE179600C7AC2F /* libcontrib.a */, - 63E54A9D19EE179600C7AC2F /* libcrypto.a */, - 63E54A9E19EE179600C7AC2F /* libcurl.a */, - 63E54A9F19EE179600C7AC2F /* libexpat.a */, - 63E54AA019EE179600C7AC2F /* libfreetype.a */, - 63E54AA119EE179600C7AC2F /* libglew.a */, - 63E54AA219EE179600C7AC2F /* libjansson.a */, - 63E54AA319EE179600C7AC2F /* libjpg.a */, - 63E54AA419EE179600C7AC2F /* libluacrypto.a */, - 63E54AA519EE179600C7AC2F /* libluacurl.a */, - 63E54AA619EE179600C7AC2F /* libluafilesystem.a */, - 63E54AA719EE179600C7AC2F /* libluajit.a */, - 63E54AA819EE179600C7AC2F /* libluasocket.a */, - 63E54AA919EE179600C7AC2F /* libluasql.a */, - 63E54AAA19EE179600C7AC2F /* libmoai-box2d.a */, - 63E54AAC19EE179600C7AC2F /* libmoai-core.a */, - 63E54AAD19EE179600C7AC2F /* libmoai-http-client.a */, - 63E54AAE19EE179600C7AC2F /* libmoai-luaext.a */, - 63E54AAF19EE179600C7AC2F /* libmoai-sim.a */, - 63E54AB019EE179600C7AC2F /* libmoai-untz.a */, - 63E54AB119EE179600C7AC2F /* libmoai-util.a */, - 63E54AB219EE179600C7AC2F /* libmongoose.a */, - 63E54AB319EE179600C7AC2F /* libogg.a */, - 63E54AB419EE179600C7AC2F /* libpng.a */, - 63E54AB519EE179600C7AC2F /* libSDL2.a */, - 63E54AB619EE179600C7AC2F /* libSDL2main.a */, - 63E54AB719EE179600C7AC2F /* libsfmt.a */, - 63E54AB819EE179600C7AC2F /* libsqlite3.a */, - 63E54AB919EE179700C7AC2F /* libssl.a */, - 63E54ABA19EE179700C7AC2F /* libtinyxml.a */, - 63E54ABB19EE179700C7AC2F /* libtlsf.a */, - 63E54ABC19EE179700C7AC2F /* libuntz.a */, - 63E54ABD19EE179700C7AC2F /* libvorbis.a */, - 63157D6019FCB57D009018A3 /* libmoai-crypto.a */, - 63157D6119FCB57D009018A3 /* libtess.a */, - 63E54ABE19EE179700C7AC2F /* libzlcore.a */, - 63F755901A3C370900EF9127 /* libzlcrypto.a */, - 63E54ABF19EE179700C7AC2F /* libzlib.a */, - 63E54AC019EE179700C7AC2F /* libzlvfs.a */, + 636B592E1CA770AE00AAD4B0 /* libmoai-osx-3rdparty-core.a */, + 636B592F1CA770AE00AAD4B0 /* libmoai-osx-3rdparty-crypto.a */, + 636B59301CA770AE00AAD4B0 /* libmoai-osx-3rdparty-sdl.a */, + 636B59311CA770AE00AAD4B0 /* libmoai-osx-apple.a */, + 636B59321CA770AE00AAD4B0 /* libmoai-osx-audio-sampler.a */, + 636B59331CA770AE00AAD4B0 /* libmoai-osx-box2d.a */, + 636B59341CA770AE00AAD4B0 /* libmoai-osx-crypto.a */, + 636B59351CA770AE00AAD4B0 /* libmoai-osx-http-client.a */, + 636B59361CA770AE00AAD4B0 /* libmoai-osx-http-server.a */, + 636B59371CA770AE00AAD4B0 /* libmoai-osx-image-jpg.a */, + 636B59381CA770AE00AAD4B0 /* libmoai-osx-image-png.a */, + 636B59391CA770AE00AAD4B0 /* libmoai-osx-image-pvr.a */, + 636B593A1CA770AE00AAD4B0 /* libmoai-osx-image-webp.a */, + 636B593B1CA770AE00AAD4B0 /* libmoai-osx-luaext.a */, + 636B593C1CA770AE00AAD4B0 /* libmoai-osx-sdl.a */, + 636B593D1CA770AE00AAD4B0 /* libmoai-osx-sim.a */, + 636B593E1CA770AE00AAD4B0 /* libmoai-osx-untz.a */, + 636B593F1CA770AE00AAD4B0 /* libmoai-osx-zl-core.a */, + 636B59401CA770AE00AAD4B0 /* libmoai-osx-zl-crypto.a */, + 636B59411CA770AE00AAD4B0 /* libmoai-osx-zl-vfs.a */, + 636B59421CA770AE00AAD4B0 /* libmoai-osx.a */, ); - name = lib; - path = lib/lib; + path = lib; sourceTree = ""; }; 63157D5D19FCB418009018A3 /* lua */ = { @@ -345,6 +233,7 @@ 63E54A6D19EE14DF00C7AC2F /* Frameworks */ = { isa = PBXGroup; children = ( + 63A2ACD11D19478D008D5D59 /* CoreVideo.framework */, 63E54B0619EE1C4B00C7AC2F /* Carbon.framework */, 63E54B0319EE1B4D00C7AC2F /* IOKit.framework */, 63E54B0119EE1B1F00C7AC2F /* ForceFeedback.framework */, @@ -414,6 +303,7 @@ 63E54A9219EE170700C7AC2F /* host-sdl */ = { isa = PBXGroup; children = ( + 63A2ACD31D194824008D5D59 /* SDLHost-osx.mm */, BD02B4171AB7B508006743DE /* SDLJoystick.cpp */, BD02B4181AB7B508006743DE /* SDLJoystick.h */, BD02B4191AB7B508006743DE /* SDLKeyCodeMapping.cpp */, @@ -496,6 +386,7 @@ 63E54A9619EE170700C7AC2F /* aku_modules.cpp in Sources */, 63E54A9819EE170700C7AC2F /* SDLHost.cpp in Sources */, 63E54A9919EE170700C7AC2F /* SDLHostMain.cpp in Sources */, + 63A2ACD41D194824008D5D59 /* SDLHost-osx.mm in Sources */, 63157D6619FCB5A1009018A3 /* aku_modules_util.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -583,15 +474,14 @@ "$(inherited)", ); HEADER_SEARCH_PATHS = ( - "\"$(SRCROOT)/lib/include\"", + "\"$(MOAI_SDK_HOME)/src\"", "\"$(SRCROOT)/app\"", - "\"$(SRCROOT)/lib/include/SDL2\"", + "\"$(MOAI_SDK_HOME)/3rdparty/sdl2-2.0.4/include\"", ); INFOPLIST_FILE = "$(SRCROOT)/app/Moai Template-Info.plist"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "\"$(SRCROOT)/lib/lib\"", - "$(PROJECT_DIR)/lib/lib", + "$(PROJECT_DIR)/lib", ); OTHER_CFLAGS = ( "-include", @@ -618,17 +508,17 @@ GCC_PREPROCESSOR_DEFINITIONS = ( "AKU_WITH_SDL=1", "$(inherited)", + "NDEBUG=1", ); HEADER_SEARCH_PATHS = ( - "\"$(SRCROOT)/lib/include\"", + "\"$(MOAI_SDK_HOME)/src\"", "\"$(SRCROOT)/app\"", - "\"$(SRCROOT)/lib/include/SDL2\"", + "\"$(MOAI_SDK_HOME)/3rdparty/sdl2-2.0.4/include\"", ); INFOPLIST_FILE = "$(SRCROOT)/app/Moai Template-Info.plist"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "\"$(SRCROOT)/lib/lib\"", - "$(PROJECT_DIR)/lib/lib", + "$(PROJECT_DIR)/lib", ); OTHER_CFLAGS = ( "-include", diff --git a/host-templates/osx/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/Moai Template.xccheckout b/host-templates/osx/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/Moai Template.xccheckout index 703f270..607c763 100644 --- a/host-templates/osx/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/Moai Template.xccheckout +++ b/host-templates/osx/Moai Template/Moai Template.xcodeproj/project.xcworkspace/xcshareddata/Moai Template.xccheckout @@ -10,31 +10,31 @@ Moai Template IDESourceControlProjectOriginsDictionary - 63C4897045D0EF88507AD257AEF500CB53038CE0 - https://github.com/moaiforge/moai-sdk + 15F99BFFB348FC7B6E0E65007825A838FF74AB03 + https://github.com/moaiforge/moai-community.git IDESourceControlProjectPath - hosts/osx/Moai Template.xcodeproj + host-templates/osx/Moai Template/Moai Template.xcodeproj IDESourceControlProjectRelativeInstallPathDictionary - 63C4897045D0EF88507AD257AEF500CB53038CE0 - ../../../.. + 15F99BFFB348FC7B6E0E65007825A838FF74AB03 + ../../../../.. IDESourceControlProjectURL - https://github.com/moaiforge/moai-sdk + https://github.com/moaiforge/moai-community.git IDESourceControlProjectVersion 111 IDESourceControlProjectWCCIdentifier - 63C4897045D0EF88507AD257AEF500CB53038CE0 + 15F99BFFB348FC7B6E0E65007825A838FF74AB03 IDESourceControlProjectWCConfigurations IDESourceControlRepositoryExtensionIdentifierKey public.vcs.git IDESourceControlWCCIdentifierKey - 63C4897045D0EF88507AD257AEF500CB53038CE0 + 15F99BFFB348FC7B6E0E65007825A838FF74AB03 IDESourceControlWCCName - moai-sdk + moai-community diff --git a/host-templates/windows/vs2012/Moai.vcxproj b/host-templates/windows/vs2012/Moai.vcxproj deleted file mode 100644 index b0b7880..0000000 --- a/host-templates/windows/vs2012/Moai.vcxproj +++ /dev/null @@ -1,105 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {0D6418DE-A02D-4F97-A191-3B19F7828818} - Win32Proj - Moai - - - - Application - true - v110 - Unicode - - - Application - false - v110 - true - Unicode - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - .\;.\lib\include;.\lib\include\SDL2 - MultiThreadedDebugDLL - OldStyle - false - - - Console - true - moai_d.lib;ws2_32.lib;user32.lib;gdi32.lib;winmm.lib;imm32.lib;ole32.lib;oleaut32.lib;version.lib;uuid.lib;glu32.lib;opengl32.lib;iphlpapi.lib;dxguid.lib;strmiids.lib;dsound.lib;psapi.lib;rpcrt4.lib;%(AdditionalDependencies) - .\lib\lib;%(AdditionalLibraryDirectories) - - - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - .\;.\lib\include;.\lib\include\SDL2 - - - Console - true - true - true - moai.lib;ws2_32.lib;user32.lib;gdi32.lib;winmm.lib;imm32.lib;ole32.lib;oleaut32.lib;version.lib;uuid.lib;glu32.lib;opengl32.lib;iphlpapi.lib;dxguid.lib;strmiids.lib;dsound.lib;psapi.lib;rpcrt4.lib;%(AdditionalDependencies) - .\lib\lib;%(AdditionalLibraryDirectories) - MSVCRTD - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/host-templates/windows/vs2012/Moai.vcxproj.filters b/host-templates/windows/vs2012/Moai.vcxproj.filters deleted file mode 100644 index 8c0553d..0000000 --- a/host-templates/windows/vs2012/Moai.vcxproj.filters +++ /dev/null @@ -1,39 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - \ No newline at end of file diff --git a/host-templates/windows/vs2012/build.bat b/host-templates/windows/vs2012/build.bat deleted file mode 100644 index d40a866..0000000 --- a/host-templates/windows/vs2012/build.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -msbuild \ No newline at end of file diff --git a/host-templates/windows/vs2013/Moai.sln b/host-templates/windows/vs2013/Moai.sln deleted file mode 100644 index 8e0c266..0000000 --- a/host-templates/windows/vs2013/Moai.sln +++ /dev/null @@ -1,26 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Express 2012 for Windows Desktop -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Moai", "Moai.vcxproj", "{0D6418DE-A02D-4F97-A191-3B19F7828818}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - MinSizeRel|Win32 = MinSizeRel|Win32 - Release|Win32 = Release|Win32 - RelWithDebInfo|Win32 = RelWithDebInfo|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0D6418DE-A02D-4F97-A191-3B19F7828818}.Debug|Win32.ActiveCfg = Debug|Win32 - {0D6418DE-A02D-4F97-A191-3B19F7828818}.Debug|Win32.Build.0 = Debug|Win32 - {0D6418DE-A02D-4F97-A191-3B19F7828818}.MinSizeRel|Win32.ActiveCfg = Release|Win32 - {0D6418DE-A02D-4F97-A191-3B19F7828818}.MinSizeRel|Win32.Build.0 = Release|Win32 - {0D6418DE-A02D-4F97-A191-3B19F7828818}.Release|Win32.ActiveCfg = Release|Win32 - {0D6418DE-A02D-4F97-A191-3B19F7828818}.Release|Win32.Build.0 = Release|Win32 - {0D6418DE-A02D-4F97-A191-3B19F7828818}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32 - {0D6418DE-A02D-4F97-A191-3B19F7828818}.RelWithDebInfo|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/host-templates/windows/vs2013/build.bat b/host-templates/windows/vs2013/build.bat deleted file mode 100644 index 0cda9a7..0000000 --- a/host-templates/windows/vs2013/build.bat +++ /dev/null @@ -1,20 +0,0 @@ -@echo off -set THISPATH=%~dp0 - -REM check for visual studio -if not "%VS120COMNTOOLS%"=="" goto :build -echo Build script could not find the VS120COMNTOOLS env var. Do you have vs2013 installed? -echo You can try to run the command again from a visual studio developer command prompt. -exit 1 - -:build -call "%VS120COMNTOOLS%\VsDevCmd.bat" -msbuild -pushd %THISPATH% -set LUAPATH=%cd%\..\..\src -echo LUAPATH equal %LUAPATH% -mkdir bundle -cd bundle -robocopy %LUAPATH% . /MIR /XO /XF Moai.exe -xcopy /Y /D ..\Debug\moai.exe . -popd \ No newline at end of file diff --git a/host-templates/windows/vs2013/Moai.rc b/host-templates/windows/vs2015/Moai.rc similarity index 100% rename from host-templates/windows/vs2013/Moai.rc rename to host-templates/windows/vs2015/Moai.rc diff --git a/host-templates/windows/vs2012/Moai.sln b/host-templates/windows/vs2015/Moai.sln similarity index 100% rename from host-templates/windows/vs2012/Moai.sln rename to host-templates/windows/vs2015/Moai.sln diff --git a/host-templates/windows/vs2013/Moai.vcxproj b/host-templates/windows/vs2015/Moai.vcxproj similarity index 64% rename from host-templates/windows/vs2013/Moai.vcxproj rename to host-templates/windows/vs2015/Moai.vcxproj index 204258a..ab0b433 100644 --- a/host-templates/windows/vs2013/Moai.vcxproj +++ b/host-templates/windows/vs2015/Moai.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -19,13 +19,13 @@ Application true - v120 + v140 Unicode Application false - v120 + v140 true Unicode @@ -51,8 +51,8 @@ Level3 Disabled - WIN32;_DEBUG;_CONSOLE;AKU_WITH_SDL=1;%(PreprocessorDefinitions) - .\;.\lib\include;.\lib\include\SDL2 + WIN32;_DEBUG;DEBUG;_CONSOLE;AKU_WITH_SDL=1;%(PreprocessorDefinitions) + .\;.\sdk\src;.\sdk\3rdparty\sdl2-2.0.4\include MultiThreadedDebugDLL OldStyle false @@ -60,10 +60,10 @@ Console true - moai_d.lib;ws2_32.lib;user32.lib;gdi32.lib;winmm.lib;imm32.lib;ole32.lib;oleaut32.lib;version.lib;uuid.lib;glu32.lib;opengl32.lib;iphlpapi.lib;dxguid.lib;strmiids.lib;dsound.lib;psapi.lib;rpcrt4.lib;%(AdditionalDependencies) - .\lib\lib;%(AdditionalLibraryDirectories) + .\lib\Debug;%(AdditionalLibraryDirectories) + box2d.lib;contrib.lib;expat.lib;freetype.lib;glew.lib;jansson.lib;kissfft.lib;libcrypto.lib;libcurl.lib;libjpg.lib;libogg.lib;libpng.lib;libpvr.lib;libssl.lib;libtess.lib;libvorbis.lib;libwebp.lib;lua-lib-5.1.lib;luaext.lib;moai-lib-box2d.lib;moai-lib-core.lib;moai-lib-crypto.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-image-jpg.lib;moai-lib-image-png.lib;moai-lib-image-pvr.lib;moai-lib-image-webp.lib;moai-lib-luaext.lib;moai-lib-sdl.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;mongoose.lib;sdl.lib;sfmt.lib;sqlite.lib;tinyxml.lib;tlsf.lib;untz.lib;zl-lib-core.lib;zl-lib-crypto.lib;zl-lib-gfx.lib;zl-lib-vfs.lib;zlib.lib;ws2_32.lib;user32.lib;gdi32.lib;winmm.lib;imm32.lib;ole32.lib;oleaut32.lib;version.lib;uuid.lib;glu32.lib;opengl32.lib;iphlpapi.lib;dxguid.lib;strmiids.lib;dsound.lib;psapi.lib;rpcrt4.lib;%(AdditionalDependencies) @@ -75,16 +75,16 @@ true true WIN32;NDEBUG;_CONSOLE;AKU_WITH_SDL=1;%(PreprocessorDefinitions) - .\;.\lib\include;.\lib\include\SDL2 + .\;.\sdk\src;.\sdk\3rdparty\sdl2-2.0.4\include Windows true true true - moai.lib;ws2_32.lib;user32.lib;gdi32.lib;winmm.lib;imm32.lib;ole32.lib;oleaut32.lib;version.lib;uuid.lib;glu32.lib;opengl32.lib;iphlpapi.lib;dxguid.lib;strmiids.lib;dsound.lib;psapi.lib;rpcrt4.lib;%(AdditionalDependencies) - .\lib\lib;%(AdditionalLibraryDirectories) + .\lib\Release;%(AdditionalLibraryDirectories) MSVCRTD + box2d.lib;contrib.lib;expat.lib;freetype.lib;glew.lib;jansson.lib;kissfft.lib;libcrypto.lib;libcurl.lib;libjpg.lib;libogg.lib;libpng.lib;libpvr.lib;libssl.lib;libtess.lib;libvorbis.lib;libwebp.lib;lua-lib-5.1.lib;luaext.lib;moai-lib-box2d.lib;moai-lib-core.lib;moai-lib-crypto.lib;moai-lib-http-client.lib;moai-lib-http-server.lib;moai-lib-image-jpg.lib;moai-lib-image-png.lib;moai-lib-image-pvr.lib;moai-lib-image-webp.lib;moai-lib-luaext.lib;moai-lib-sdl.lib;moai-lib-sim.lib;moai-lib-untz.lib;moai-lib-util.lib;mongoose.lib;sdl.lib;sfmt.lib;sqlite.lib;tinyxml.lib;tlsf.lib;untz.lib;zl-lib-core.lib;zl-lib-crypto.lib;zl-lib-gfx.lib;zl-lib-vfs.lib;zlib.lib;ws2_32.lib;user32.lib;gdi32.lib;winmm.lib;imm32.lib;ole32.lib;oleaut32.lib;version.lib;uuid.lib;glu32.lib;opengl32.lib;iphlpapi.lib;dxguid.lib;strmiids.lib;dsound.lib;psapi.lib;rpcrt4.lib;%(AdditionalDependencies) diff --git a/host-templates/windows/vs2013/Moai.vcxproj.filters b/host-templates/windows/vs2015/Moai.vcxproj.filters similarity index 100% rename from host-templates/windows/vs2013/Moai.vcxproj.filters rename to host-templates/windows/vs2015/Moai.vcxproj.filters diff --git a/host-templates/windows/vs2013/Readme.md b/host-templates/windows/vs2015/Readme.md similarity index 100% rename from host-templates/windows/vs2013/Readme.md rename to host-templates/windows/vs2015/Readme.md diff --git a/host-templates/windows/vs2013/appicon.ico b/host-templates/windows/vs2015/appicon.ico similarity index 100% rename from host-templates/windows/vs2013/appicon.ico rename to host-templates/windows/vs2015/appicon.ico diff --git a/host-templates/windows/vs2015/build.bat b/host-templates/windows/vs2015/build.bat new file mode 100644 index 0000000..51150d1 --- /dev/null +++ b/host-templates/windows/vs2015/build.bat @@ -0,0 +1,21 @@ +@echo off +setlocal +set "THISPATH=%~dp0" + +REM check for visual studio +if not "%VS140COMNTOOLS%"=="" goto :build +echo Build script could not find the VS140COMNTOOLS env var. Do you have vs2015 installed? +echo You can try to run the command again from a visual studio developer command prompt. +exit 1 + +:build +call "%VS140COMNTOOLS%\VsDevCmd.bat" +msbuild +pushd "%THISPATH%" +set "LUAPATH=%cd%\..\..\src" +echo LUAPATH equal %LUAPATH% +mkdir bundle +cd bundle +robocopy "%LUAPATH%" . /MIR /XO /XF Moai.exe +xcopy /Y /D ..\Debug\moai.exe . +popd \ No newline at end of file diff --git a/host-templates/windows/vs2013/resource.h b/host-templates/windows/vs2015/resource.h similarity index 100% rename from host-templates/windows/vs2013/resource.h rename to host-templates/windows/vs2015/resource.h diff --git a/host-templates/windows/vs2013/run.bat b/host-templates/windows/vs2015/run.bat similarity index 100% rename from host-templates/windows/vs2013/run.bat rename to host-templates/windows/vs2015/run.bat diff --git a/hosts/.gitignore b/hosts/.gitignore deleted file mode 100644 index 43be095..0000000 --- a/hosts/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -android/ -html/ -osx/ -ios/ -linux/ -windows/ \ No newline at end of file diff --git a/moai-dev b/moai-dev deleted file mode 160000 index 19388cd..0000000 --- a/moai-dev +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 19388cdc13c233f6e709fdb7efa1f06fe61aae18 diff --git a/bin/build-all-linux.sh b/scripts/build-all-linux.sh similarity index 100% rename from bin/build-all-linux.sh rename to scripts/build-all-linux.sh diff --git a/bin/build-all-osx.sh b/scripts/build-all-osx.sh old mode 100755 new mode 100644 similarity index 100% rename from bin/build-all-osx.sh rename to scripts/build-all-osx.sh diff --git a/scripts/build-all-windows.bat b/scripts/build-all-windows.bat new file mode 100644 index 0000000..5277ebf --- /dev/null +++ b/scripts/build-all-windows.bat @@ -0,0 +1,41 @@ +cd %~dp0%.. + +setlocal + +call scripts\env-win.bat + +rem Do we have a chance of success? + +if "%ANDROID_NDK%"=="" echo "You need to set ANDROID_NDK to your ndk path in your env-local.bat" && exit /b 1 +if "%ANDROID_NDK%"=="" echo "You need to set ANDROID_NDK to your ndk path" && exit /b 1 +if "%EMSCRIPTEN%"=="" echo "EMSCRIPTEN is not defined. Please set to the location of your emscripten install (path)" && exit /b 1 +where mingw32-make || echo "mingw32-make is required. Install TCC Mingw from http://tdm-gcc.tdragon.net/ and add to the path" && exit /b 1 +where cmake || echo "Cmake 2.8.11+ is required, download from cmake.org" && exit /b 1 + +echo "Building windows libs" + +call scripts\build-windows.bat vs2015 || goto :error + +echo "windows lib complete" + +echo "Building android libs" + +call scripts\build-android.bat --clean || goto :error + +echo "Android lib complete" + +echo "Building JS libs" + +call scripts\build-html.bat || goto :error + +echo "JS libs complete + +goto :end + +:error +endlocal +echo "error during build" +exit /b 1 + +:end +endlocal diff --git a/scripts/build-android.bat b/scripts/build-android.bat new file mode 100644 index 0000000..67a17df --- /dev/null +++ b/scripts/build-android.bat @@ -0,0 +1,24 @@ +@echo off +setlocal enableextensions + +rem ----- Requirements Check ----- +set "PITO_HOME=%~dp0..\" + +if "%ANDROID_NDK%"=="" echo "You need to set ANDROID_NDK to your ndk path" && exit /b 1 +if "%MOAI_SDK_HOME%"=="" echo "You need to set MOAI_SDK_HOME to your moai sdk folder" && exit /b 1 + +rem ----- Build libmoai using sdk methods ----- + +pushd "%MOAI_SDK_HOME%\ant" +if "%1"=="--clean" call libmoai-clean.bat +echo "Builing libmoai" +call libmoai-build.bat || echo "Android NDK build failed" && exit /b 1 + +mkdir "%PITO_HOME%\lib\android\libs" +mkdir "%PITO_HOME%\lib\android\obj" + +robocopy libmoai\libs "%PITO_HOME%\lib\android\libs" /mir /NDL /NJH /NJS +robocopy libmoai\obj "%PITO_HOME%\lib\android\obj" *.a /S /NDL /NJH /NJS + +rem robocopy has a derpy exit code +exit /b 0 \ No newline at end of file diff --git a/scripts/build-android.sh b/scripts/build-android.sh new file mode 100755 index 0000000..f19e0d7 --- /dev/null +++ b/scripts/build-android.sh @@ -0,0 +1,25 @@ + +PITO_ROOT=$(cd `dirname $0`/.. && pwd) +: "${MOAI_SDK_HOME:?Please set MOAI_SDK_HOME variable to point to your Moai SDK }" +: "${ANDROID_NDK:?You need to set ANDROID_NDK to point to your ndk path. Try using env-local.sh }" + +#----- Build libmoai using sdk methods ----- + +export PATH=$ANDROID_NDK:$PATH +echo $PATH +echo "Builing libmoai" + +pushd $MOAI_SDK_HOME/ant +if [ "$1" == "--clean" ]; then + ./libmoai-clean.sh +fi + +./libmoai-build.sh || ( echo "Android NDK build failed" && exit 1) + +mkdir -p $PITO_ROOT/lib/android/libs +mkdir -p $PITO_ROOT/lib/android/obj + +cp -a libmoai/libs/ $PITO_ROOT/lib/android/libs +(cd libmoai/obj && find . -type f -name \*.a -exec tar cf - {} +) | (cd $PITO_ROOT/lib/android/obj && tar xf -) + +popd diff --git a/bin/build-html.bat b/scripts/build-html.bat similarity index 74% rename from bin/build-html.bat rename to scripts/build-html.bat index 43ca9b4..f338635 100644 --- a/bin/build-html.bat +++ b/scripts/build-html.bat @@ -3,6 +3,8 @@ setlocal enableextensions rem Prerequisites +if "%MOAI_SDK_HOME%"=="" echo "Could not determine location of MOAI SDK, please set MOAI_SDK_HOME" && goto ERROR + if "%EMSCRIPTEN%"=="" echo "EMSCRIPTEN is not defined. Please set to the location of your emscripten install (path)" && goto ERROR where mingw32-make || echo "mingw32-make is required. Install TCC Mingw from http://tdm-gcc.tdragon.net/ and add to the path" && goto ERROR @@ -12,9 +14,9 @@ where cmake || echo "Cmake 2.8.11+ is required, download from cmake.org" && goto :COMPILE -cd %~dp0%/.. +cd "%~dp0%/.." -set MOAIROOT=%cd% +set "PITOROOT=%cd%" mkdir build cd build @@ -23,6 +25,7 @@ cd build-html cmake ^ -DEMSCRIPTEN_ROOT_PATH=%EMSCRIPTEN% ^ -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%\cmake\Modules\Platform\Emscripten.cmake ^ +-DMOAI_SDK_HOME="%MOAI_SDK_HOME%" ^ -DBUILD_HTML=TRUE ^ -DCMAKE_BUILD_TYPE=Release ^ -DMOAI_CHIPMUNK=FALSE ^ @@ -39,9 +42,9 @@ cmake ^ -DMOAI_WEBP=FALSE ^ -DMOAI_HTTP_CLIENT=FALSE ^ -DMOAI_LUAJIT=FALSE ^ --DCMAKE_INSTALL_PREFIX="%MOAIROOT%\lib\html" ^ +-DCMAKE_INSTALL_PREFIX="%PITOROOT%\lib\html" ^ -G "MinGW Makefiles" ^ -%MOAIROOT%\cmake\hosts\host-html || goto ERROR +%PITOROOT%\cmake\hosts\host-html || goto ERROR cmake --build . --target moaijs || goto ERROR @@ -49,8 +52,8 @@ cmake --build . --target moaijs || goto ERROR rem Install into lib -mkdir %MOAIROOT%\lib\html -copy /y moaijs.js %MOAIROOT%\lib\html\moaijs.js +mkdir "%PITOROOT%\lib\html" +copy /y moaijs.js "%PITOROOT%\lib\html\moaijs.js" goto END @@ -58,4 +61,4 @@ goto END exit /b 1 :END - +exit /b 0 diff --git a/bin/build-html.sh b/scripts/build-html.sh similarity index 80% rename from bin/build-html.sh rename to scripts/build-html.sh index bee3e06..570c12a 100755 --- a/bin/build-html.sh +++ b/scripts/build-html.sh @@ -17,8 +17,10 @@ : ${EMSCRIPTEN?"EMSCRIPTEN is not defined. Please set to the location of your emscripten install (path)"} +: ${MOAI_SDK_HOME?"MOAI_SDK_HOME is not defined. Please set to the location of your MOAI SDK install (path)"} + cd `dirname $0`/.. -MOAIROOT=$(pwd) +PITO_ROOT=$(pwd) mkdir -p build/build-html cd build/build-html @@ -27,6 +29,7 @@ cmake \ -DEMSCRIPTEN_ROOT_PATH=${EMSCRIPTEN} \ -DCMAKE_TOOLCHAIN_FILE=${EMSCRIPTEN}/cmake/Modules/Platform/Emscripten.cmake \ -DBUILD_HTML=TRUE \ +-DMOAI_SDK_HOME="${MOAI_SDK_HOME}" \ -DCMAKE_BUILD_TYPE=Release \ -DMOAI_CHIPMUNK=FALSE \ -DMOAI_CURL=FALSE \ @@ -42,7 +45,7 @@ cmake \ -DMOAI_WEBP=FALSE \ -DMOAI_HTTP_CLIENT=FALSE \ -DMOAI_LUAJIT=FALSE \ -$MOAIROOT/cmake/hosts/host-html +${PITO_ROOT}/cmake/hosts/host-html if [[ $? -ne 0 ]]; then exit 1 @@ -54,6 +57,6 @@ if [[ $? -ne 0 ]]; then exit 1 fi -mkdir -p $MOAIROOT/lib/html -cp moaijs.js $MOAIROOT/lib/html/moaijs.js +mkdir -p ${PITO_ROOT}/lib/html +cp moaijs.js ${PITO_ROOT}/lib/html/moaijs.js diff --git a/scripts/build-ios.sh b/scripts/build-ios.sh new file mode 100755 index 0000000..5b83cf0 --- /dev/null +++ b/scripts/build-ios.sh @@ -0,0 +1,7 @@ +: "${MOAI_SDK_HOME:?Please set MOAI_SDK_HOME variable to point to your MOAI Sdk }" + +pushd $MOAI_SDK_HOME/util/build/ +./build-ios.sh justlibs +popd + + diff --git a/bin/build-linux.sh b/scripts/build-linux.sh similarity index 76% rename from bin/build-linux.sh rename to scripts/build-linux.sh index 44dbf65..f9ac123 100755 --- a/bin/build-linux.sh +++ b/scripts/build-linux.sh @@ -23,9 +23,11 @@ mkdir -p $libprefix libprefix=$(cd $libprefix; pwd) cores=$(getconf _NPROCESSORS_ONLN) -cd `dirname $0`/.. +: ${MOAI_SDK_HOME?"MOAI_SDK_HOME is not defined. Please set to the location of your MOAI SDK install (path)"} + +pushd `dirname $0`/.. +PITO_ROOT=$(pwd) -moai_root=$(pwd) BUILD_DIR="build/build-linux" @@ -44,13 +46,15 @@ fi cmake \ -DBUILD_LINUX=TRUE \ -DMOAI_SDL=TRUE \ +-DMOAI_SDK_HOME=${MOAI_SDK_HOME} \ -DMOAI_HTTP_SERVER=TRUE \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$libprefix \ -$moai_root/cmake/hosts/host-linux-sdl +$PITO_ROOT/cmake/hosts/host-linux-sdl cmake --build . --target install -- -j$cores -cp $libprefix/bin/moai $moai_root/util/moai +cp $libprefix/bin/moai $PITO_ROOT/bin/moai +popd exit 0 diff --git a/scripts/build-osx.sh b/scripts/build-osx.sh new file mode 100755 index 0000000..fe75713 --- /dev/null +++ b/scripts/build-osx.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# +# Build script for Mac OSX +# Usage: Run from Moai SDK's root directory: +# +# build-osx.sh + +: "${MOAI_SDK_HOME:?Please set MOAI_SDK_HOME variable to point to your MOAI Sdk }" + +$MOAI_SDK_HOME/util/build/build-osx.sh + +PITO_ROOT=$(cd `dirname $0`/.. && pwd) + +if [ ! -e "$PITO_ROOT/bin/moai" ]; then + cp $MOAI_SDK_HOME/bin/osx/moai $PITO_ROOT/bin/moai +fi + diff --git a/scripts/build-windows.bat b/scripts/build-windows.bat new file mode 100644 index 0000000..4851af9 --- /dev/null +++ b/scripts/build-windows.bat @@ -0,0 +1,33 @@ +@echo off +rem :: Determine target directory and cmake generator +setlocal enableextensions + + +if "%MOAI_SDK_HOME%"=="" ( + echo Could not determine location of MOAI SDK, please set MOAI_SDK_HOME + exit /b 1 +) + + +where msbuild || echo "Could not find msbuild.exe (are you in your VS developer tools prompt?)" && exit /b 1 + + +cd "%~dp0.." +set "rootpath=%cd%" +set "libprefix=%rootpath%\lib\windows\vs2015" +set "projpath=%MOAI_SDK_HOME%\vs2015" + + +echo Creating Release Libs +msbuild %projpath%\moai.sln /verbosity:minimal /t:Moai\moai /p:Configuration=Release || echo "Error during build" && exit /b 1 + +robocopy "%projpath%\bin\win32\Release" "%libprefix%\Release" /MIR + +echo Creating Debug Libs +msbuild %projpath%\moai.sln /verbosity:minimal /t:Moai\moai /p:Configuration=Debug || echo "Error during build" && exit /b 1 + +robocopy "%projpath%\bin\win32\Debug" "%libprefix%\Debug" /MIR + + +echo "Build complete" +exit /b 0 \ No newline at end of file diff --git a/bin/create-projects-win.bat b/scripts/create-projects-win.bat similarity index 100% rename from bin/create-projects-win.bat rename to scripts/create-projects-win.bat diff --git a/scripts/env-linux.sh b/scripts/env-linux.sh new file mode 100644 index 0000000..0a8d870 --- /dev/null +++ b/scripts/env-linux.sh @@ -0,0 +1,42 @@ +#!/bin/bash + + + export MOAI_SDK_HOME=${MOAI_SDK_HOME-$(cd $(dirname "${BASH_SOURCE[0]}")/../; pwd)/sdk/moai} + #--User config + if [ -e "$(dirname ${BASH_SOURCE[0]})/env-local.sh" ]; then + source $(dirname "${BASH_SOURCE[0]}")/env-local.sh + fi + + + + +#--check for reqs +error=false + +which cmake || (echo "could not detect cmake. apt-get install cmake" && error = true) + + +#--install +if [ "$error" == "false" ]; then + +echo "MOAI_SDK_HOME = $MOAI_SDK_HOME" + +if [ ! -z "$NDK_PATH" ]; then + echo "Setting NDK path..." + export ANDROID_NDK=$NDK_PATH + else + echo "No NDK_PATH specified, Android will not be buildable" +fi + +if [ ! -z "$EMSDK_PATH" ]; then + echo "Setting Emscripten path..." + pushd $EMSDK_PATH > /dev/null + ls + source ./emsdk_env.sh + popd > /dev/null +else + echo "No EMSDK_PATH specified, JS libs will not be buildable" +fi + +echo "Environment setup complete" +fi diff --git a/bin/env-local.bat.template b/scripts/env-local.bat.template similarity index 74% rename from bin/env-local.bat.template rename to scripts/env-local.bat.template index 802355c..4646f87 100644 --- a/bin/env-local.bat.template +++ b/scripts/env-local.bat.template @@ -7,5 +7,7 @@ set NDK_PATH=K:\dev\mobile\moaiforge\android-ndk-r9d set MINGW_PATH=K:\dev\mobile\moaiforge\mingw64\bin set EMSDK_PATH=K:\dev\mobile\moaiforge\emsdk-1.25 set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_25 -set DOXYGEN_PATH=K:\dev\mobile\doxygen -set DOT_PATH=K:\dev\mobile\graphviz\bin \ No newline at end of file + +rem -- for building docs +rem set DOXYGEN_PATH=K:\dev\mobile\doxygen +rem set DOT_PATH=K:\dev\mobile\graphviz\bin \ No newline at end of file diff --git a/scripts/env-local.sh.template b/scripts/env-local.sh.template new file mode 100644 index 0000000..22a39f3 --- /dev/null +++ b/scripts/env-local.sh.template @@ -0,0 +1,11 @@ +#!/bin/bash + +echo "Importing local env" +## Path to your moai sdk if not in /sdk/moai +# MOAI_SDK_HOME=/Users/moaiuser/moai-dev + +## Path to the Android NDK +NDK_PATH=/home/david/Downloads/android-ndk-r11b + +## Path to Emscripten SDK +#EMSDK_PATH=/Users/moaiuser/Downloads/emsdk_portable diff --git a/scripts/env-osx.sh b/scripts/env-osx.sh new file mode 100644 index 0000000..52e2142 --- /dev/null +++ b/scripts/env-osx.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +if [ ! "$0" == "-bash" ]; then + ruby -e "exit '$0'.end_with? '.sh'" + if [ $? -ne 0 ]; then + echo ERROR: This file is meant to be be sourced by running with: source ./bin/env-osx.sh + echo was run with: $0 + exit 1 +fi +fi + + export MOAI_SDK_HOME=${MOAI_SDK_HOME-$(cd $(dirname "${BASH_SOURCE[0]}")/../; pwd)/sdk/moai} + #--User config + if [ -e "$(dirname ${BASH_SOURCE[0]})/env-local.sh" ]; then + source $(dirname "${BASH_SOURCE[0]}")/env-local.sh + fi + + +#--check for reqs +error=false + +#android sdk likes 1.7 of javac +javac -version 2>&1 | grep "javac 1\.[78]" > /dev/null || { echo "JDK was not at 1.7"; error=true; } + + +#--install +if [ "$error" == "false" ]; then + +echo "MOAI_SDK_HOME = $MOAI_SDK_HOME" + +if [ ! -z "$NDK_PATH" ]; then + echo "Setting NDK path..." + export ANDROID_NDK=$NDK_PATH + else + echo "No NDK_PATH specified, Android will not be buildable" +fi + +if [ ! -z "$EMSDK_PATH" ]; then + echo "Setting Emscripten path..." + pushd $EMSDK_PATH > /dev/null + ls + source ./emsdk_env.sh + popd > /dev/null +else + echo "No EMSDK_PATH specified, JS libs will not be buildable" +fi + +echo "Environment setup complete" +fi diff --git a/scripts/env-win.bat b/scripts/env-win.bat new file mode 100644 index 0000000..9e41a13 --- /dev/null +++ b/scripts/env-win.bat @@ -0,0 +1,99 @@ +@echo off + +rem ----- defaults ---- + +rem find sdk +if "%MOAI_SDK_HOME%" == "" set "MOAI_SDK_HOME=%~dp0..\sdk\moai" + + +where cmake +if ERRORLEVEL 1 ( + if EXIST "%ProgramFiles(x86)%\CMake\bin" set "CMAKE_PATH=%ProgramFiles(x86)%\CMake\bin" +) + +rem visual studio +where lib.exe +set VS_TOOLS= +if not ERRORLEVEL 1 goto :envlocal + +set "VS_TOOLS=%VS140COMNTOOLS%" +if NOT EXIST "%VS_TOOLS%\vsdevcmd.bat" set "VS_TOOLS=%VS120COMNTOOLS%" +if NOT EXIST "%VS_TOOLS%\vsdevcmd.bat" set "VS_TOOLS=" + +:envlocal +if exist "%~dp0%\env-local.bat" ( + call "%~dp0%\env-local.bat" +) + + +rem ---- cmake ------ + + +if "%CMAKE_PATH%"=="" goto :vstudio +echo "Setting CMAKE bin path..." +set "PATH=%PATH%;%CMAKE_PATH%" + + + +rem ---- visual studio ---- +:vstudio + +if "%VS_TOOLS%"=="" echo Visual Studio not found..SKIPPED && goto :ndk +echo "Setting Visual Studio path..." + +pushd . +call "%VS_TOOLS%\Vsvars32.bat" +popd + + + +rem ---- android NDK ------- +:ndk +if "%NDK_PATH%"=="" goto :mingw +echo "Setting Android NDK path..." + +set "ANDROID_NDK=%NDK_PATH%" + + + +rem ----- mingw ---------- +:mingw +if "%MINGW_PATH%"=="" goto :emsdk +echo "Setting MingW Gcc path..." + +set "PATH=%PATH%;%MINGW_PATH%" + +set "OLD_JAVA_HOME=%JAVA_HOME%" + +rem ---- emscripten SDK ------- +:emsdk +if "%EMSDK_PATH%"=="" goto :util +echo "Setting Emscripten path..." + +pushd . +cd "%EMSDK_PATH%" +call emsdk_env.bat +popd + +if NOT "%OLD_JAVA_HOME%"=="" set "JAVA_HOME=%OLD_JAVA_HOME%" + + + +rem ---- moai util path ----- +:util +echo "Setting Moai Util path..." + +pushd . +cd "%~dp0%/.." +set "UTIL_PATH=%cd%\bin" +popd + +set "PATH=%PATH%;%UTIL_PATH%" + +rem ---- Doxygen ----- +if "%DOXYGEN_PATH%"=="" goto :end +echo "Setting DOXYGEN path..." +set "PATH=%PATH%;%DOXYGEN_PATH%;%DOT_PATH%" + +:end +echo "Path setup complete" \ No newline at end of file diff --git a/scripts/package-sdk.bat b/scripts/package-sdk.bat new file mode 100644 index 0000000..50c6405 --- /dev/null +++ b/scripts/package-sdk.bat @@ -0,0 +1,47 @@ +@echo on +setlocal enableextensions + +set "PITO_HOME=%~dp0..\" + +if "%MOAI_SDK_HOME%"=="" echo "You need to set MOAI_SDK_HOME to your moai sdk folder" && exit /b 1 + +set "OUTPUT=%1" +if "%OUTPUT%"=="" set OUTPUT=dist + +rem ----- Build community sdk ----- +mkdir "%OUTPUT%" +pushd %OUTPUT% +set "OUTPUT=%CD%" +popd + + + +pushd "%PITO_HOME%" + +for %%G in (bin,cmake,host-templates,util,scripts) DO ( + robocopy %%G "%OUTPUT%\%%G" /mir /NDL /NJH /NJS +) +copy /y util\package-cmake-sdk\README.md "%OUTPUT%\README.md" + +mkdir "%OUTPUT%\sdk\moai" + +popd +pushd "%MOAI_SDK_HOME%" + +for %%G in (3rdparty-android,3rdparty,ant,docs,samples,src,util) DO ( + robocopy %%G "%OUTPUT%\sdk\moai\%%G" /mir /NDL /NJH /NJS +) + +popd + +pushd "%OUTPUT%\sdk\moai\3rdparty" + +rem unwanted 3rdparty libs +for %%G in (facebook-ios-sdk-4.5.1,libUAirship-3.0.1,civetweb,chartboost-4.2,flurry-ios-5.0.0,adcolony-2.2.4,vungle-2.0.1,TapjoySDK_iOS_v10.0.2,crittercism-4.3.3,playhaven-ios-1.13.1,kontagent_ios_v1.5.6,MobileAppTracking-ios-2.6,MobileAppTracking-ios,sdl2-2.0.0\test) DO ( + RMDIR /S/Q %%G +) + + + +erase /Q "%OUTPUT%\bin\env-local.bat" +popd \ No newline at end of file diff --git a/sdk/moai b/sdk/moai new file mode 160000 index 0000000..343441b --- /dev/null +++ b/sdk/moai @@ -0,0 +1 @@ +Subproject commit 343441b3308760e32e62d7b1029364c52d5096fa diff --git a/util/environment/main.lua b/util/environment/main.lua new file mode 100644 index 0000000..7614697 --- /dev/null +++ b/util/environment/main.lua @@ -0,0 +1,15 @@ +--============================================================== +-- setup environment for MOAI and pito +--============================================================== +local envFileName = MOAI_SDK_HOME .. "env.sh" +local envStr = string.format ( 'export MOAI_SDK_HOME=%s\n', MOAI_SDK_HOME ) .. + string.format ( 'export MOAI_SDK_BIN=$MOAI_SDK_HOME/util/moai\n') .. + string.format ( 'export PATH=$MOAI_SDK_HOME/util:$PATH\n' ) + +envFile = io.open(envFileName, "w+") +envFile:write(envStr) +envFile:close() + +print ( "\nA localized 'env.sh' script has been created for your environment.") +print ( "To set up your environment to use this MOAI_SDK, source the \n" .. envFileName .. " script in your shell.\ne.g.") +print (" \t\tsource " .. envFileName .. "\n") diff --git a/util/host-android-gradle/main.lua b/util/host-android-studio/main.lua similarity index 57% rename from util/host-android-gradle/main.lua rename to util/host-android-studio/main.lua index f196747..a59a6f7 100644 --- a/util/host-android-gradle/main.lua +++ b/util/host-android-studio/main.lua @@ -1,328 +1,297 @@ ---============================================================== --- setup ---============================================================== - - -function table.contains(table, element) - for _, value in pairs(table) do - if value == element then - return true - end - end - return false -end - - -function findAndroidSdk() - - local fromenv = os.getenv("ANDROID_SDK_ROOT") or os.getenv("ANDROID_HOME") or os.getenv("ANDROID_SDK_HOME") - if fromenv then return fromenv end - - local isWindows = MOAIEnvironment.osBrand == 'Windows' - if isWindows then - local appdata = os.getenv("LOCALAPPDATA") - if (appdata and MOAIFileSystem.checkPathExists(appdata.."\\android\\sdk")) then - return appdata.."\\android\\sdk" - end - end - - if MOAIEnvironment.osBrand == "OSX" then - local home = os.getenv("HOME") - if (home and MOAIFileSystem.checkPathExists(home.."/Library/Android/sdk")) then - return home.."/Library/Android/sdk" - end - end - - if MOAIEnvironment.osBrand == "linux" then - local home = os.getenv("HOME") - local sdkpath = home.."/android-sdk-linux" - if (home and MOAIFileSystem.checkPathExists(sdkpath)) then - return sdkpath - end - end - - return false -end - - ---============================================================== --- args ---============================================================== -local hostconfig = { - AppName = "Moai Template", - CompanyName = "Zipline Games", - ApplicationId = "com.getmoai.MoaiTemplate", - Modules = {}, - LuaSrc = MOAI_SDK_HOME..'samples/hello-moai', - FBAppId = 0, - GMSAppId = 0, - SchemeName ="moaischeme" -} - - -MOAIFileSystem.setWorkingDirectory(INVOKE_DIR) -local config = {} -local configFile = false -config.OUTPUT_DIR = INVOKE_DIR..'hosts/android-studio/' -config.LIB_SOURCE = MOAI_SDK_HOME..'lib/android/' -config.USE_SYMLINK = false - -for i, escape, param, iter in util.iterateCommandLine ( arg or {}) do - - if escape == 's' or escape == 'use-symlink' then - config.USE_SYMLINK = true - end - if (param) then - if escape == 'o' or escape == 'output-dir' then - config.OUTPUT_DIR = MOAIFileSystem.getAbsoluteDirectoryPath(param) - end - - if escape == 'l' or escape == 'lib-source' then - config.LIB_SOURCE = MOAIFileSystem.getAbsoluteDirectoryPath(param) - end - - if escape == 'c' or escape == 'config' then - configFile = MOAIFileSystem.getAbsoluteFilePath(param) - end - end -end - ---============================================================== --- actions ---============================================================== - -local copyhostfiles -local validateConfig -local copylib -local linklib -local applyConfigFile -local configureHost - -copyhostfiles = function() - local output = config.OUTPUT_DIR - print("Creating ",output) - MOAIFileSystem.affirmPath(output) - - for entry in util.iterateFiles(MOAI_SDK_HOME..'host-templates/android/studio/MoaiTemplate', false, true) do - local fullpath = string.format ( '%s/%s',MOAI_SDK_HOME..'host-templates/android/studio/MoaiTemplate' , entry ) - print( string.format( '%s -> %s', fullpath, output..entry )) - MOAIFileSystem.copy(fullpath, output..entry) - end - - MOAIFileSystem.copy(MOAI_SDK_HOME..'host-templates/android/studio/MoaiTemplate/local.properties.template', output..'local.properties') - local hostmodules = MOAI_SDK_HOME..'src/host-modules' - MOAIFileSystem.copy(MOAI_SDK_HOME..'src/moai-android/moai.cpp', output..'app/src/main/jni/moai.cpp') - - MOAIFileSystem.copy(hostmodules, output..'/app/src/main/jni/host-modules') - - --don't want these ones - MOAIFileSystem.deleteFile(output..'app/src/main/jni/host-modules/aku_modules_ios.h') - MOAIFileSystem.deleteFile(output..'app/src/main/jni/host-modules/aku_modules_ios_config.h') - MOAIFileSystem.deleteFile(output..'app/src/main/jni/host-modules/aku_modules_ios.mm') - -end - -getAbsoluteLuaRoot = function() - local oldworkingdir = MOAIFileSystem.getWorkingDirectory() - --get lua path relative to config file as absolute - MOAIFileSystem.setWorkingDirectory(INVOKE_DIR) - - local luasrc = MOAIFileSystem.getAbsoluteDirectoryPath(hostconfig['LuaSrc']) - - MOAIFileSystem.setWorkingDirectory(oldworkingdir) - - return luasrc -end - - - -applyConfigFile = function(configFile) - print("reading config from "..configFile) - util.dofileWithEnvironment(configFile, hostconfig) - - --copy host specific settings to main config - if (hostconfig["HostSettings"] and hostconfig["HostSettings"]["android-gradle"]) then - for k,v in pairs(hostconfig["HostSettings"]["android-gradle"]) do - hostconfig[k] = v - end - end - - hostconfig["HostSettings"] = nil - -end - -validateConfig = function() - --validation - - --validate lua path - local luapath = getAbsoluteLuaRoot() - if not MOAIFileSystem.checkFileExists(luapath.."main.lua") then - print ("Your configured lua path does not contain a main.lua") - print ("configured path (absolute): ", luapath) - os.exit(1) - end - - --valid sdk and ndk dirs - - -- check it - if (not hostconfig['SdkDir']) or not MOAIFileSystem.checkPathExists(MOAIFileSystem.getAbsoluteDirectoryPath(hostconfig['SdkDir']).."platforms") then - print ("Error locating the defined sdk path (HostSettings.android-gradle.SdkDir).") - print ("ensure it contains platforms subfolder. This setting is required") - print ("you can usually find it in your ~/.android folder or in %userprofile%/appdata/local/android/sdk") - print ("configured sdk path was: ", hostconfig['SdkDir']) - os.exit(1) - end - - - if not hostconfig['NdkDir'] or not MOAIFileSystem.checkPathExists(MOAIFileSystem.getAbsoluteDirectoryPath(hostconfig['NdkDir']).."platforms") then - print ("Error locating the defined ndk path (HostSettings.android-gradle.NdkDir).") - print ("ensure it contains platforms subfolder. Android NDK r10e is required") - - print ("configured Ndk path was: ", hostconfig['NdkDir']) - os.exit(1) - end - -end - - - -configureHost = function() - local output = config.OUTPUT_DIR - if configFile then - print("\n\nApplying config from "..configFile..":") - else - print("\n\nUsing default config ") - end - - for k,v in pairs(hostconfig) do - print (k..": ", v) - end - - local modules = hostconfig['Modules'] or {} - - local modulestr = "" - - for _,v in pairs(modules) do - if modulestr == "" then - modulestr = v - else - modulestr = modulestr..','..v - end - end - - print("configuring lua source root") - local oldworkingdir = MOAIFileSystem.getWorkingDirectory() - - - local luasrc = getAbsoluteLuaRoot() - - --now get lua path (currently absolute) as relative to gradle.properties - luasrc = MOAIFileSystem.getRelativePath(luasrc, output ) - - if (not luasrc) then - error("Error configuring lua source folder as relative "..hostconfig['LuaSrc']) - end - - local patternFor = function(name) - return '()(.-)()' - end - - --gradle windows paths need to be double escaped - local escGradlePath = function(dir) - return dir:gsub("\\","\\\\"):gsub(":","\\:") - end - - - sdkdir = escGradlePath(hostconfig['SdkDir']) - ndkdir = escGradlePath(hostconfig['NdkDir']) - - - - print("updating template values") - --libroot - util.replaceInFiles ({ - [ output .. 'gradle.properties' ] = { - [ 'moaiLibRoot=[^\n]*' ]= "moaiLibRoot=./lib", - [ 'moaiSrcRoot=[^\n]*' ]= "moaiSrcRoot="..MOAI_SDK_HOME.."src", - [ 'moaiLuaRoot=[^\n]*' ]= "moaiLuaRoot="..luasrc, - [ 'moaiModules=[^\n]*' ]= "moaiModules="..modulestr - }, - [ output .. 'app/build.gradle'] = { - [ 'applicationId "[^"]+"']= 'applicationId "'..hostconfig['ApplicationId']..'"' - }, - [ output .. 'app/src/main/res/values/strings.xml'] = { - [patternFor("app_name")] = '%1'..hostconfig['AppName']..'%3', - [patternFor("scheme_name")] = '%1'..hostconfig['SchemeName']..'%3', - [patternFor("fb_app_id")] = '%1'..hostconfig['FBAppId']..'%3', - [patternFor("gms_app_id")] = '%1'..hostconfig['GMSAppId']..'%3' - }, - [ output .. 'local.properties' ] = { - [ 'sdk.dir=[^\n]+' ]= "sdk.dir="..sdkdir, - [ 'ndk.dir=[^\n]+' ]= "ndk.dir="..ndkdir - }, - -- TODO: Set up ApplicationId - -- [ output..'app/build.gradle' ] = { - -- ['com.getmoai'] = hostconfig['ApplicationId'], - -- }, - }) - - print("copying icons") - --icons - MOAIFileSystem.setWorkingDirectory(INVOKE_DIR) - - if (hostconfig['Icons']) then - for k,v in pairs(hostconfig['Icons']) do - if v == "" then - print("Removing default icon ",k) - MOAIFileSystem.deleteDirectory(config.OUTPUT_DIR.."app/src/main/res/drawable-"..k, true) - else - if MOAIFileSystem.checkFileExists(v) then - MOAIFileSystem.copy(v, config.OUTPUT_DIR.."app/src/main/res/drawable-"..k.."/icon.png") - else - error("Icon specified in config not found : "..k.."="..v) - end - end - end - end -end - - - -copylib = function() - MOAIFileSystem.copy(config.LIB_SOURCE, config.OUTPUT_DIR..'lib' ) -end - -linklib = function() - local isWindows = MOAIEnvironment.osBrand == 'Windows' - local cmd = isWindows and 'mklink /D "'..config.OUTPUT_DIR..'lib" "'..config.LIB_SOURCE..'"' - or 'ln -s "'..config.LIB_SOURCE..'" "'..config.OUTPUT_DIR..'lib"' - if os.execute(cmd) > 0 then - print ("Error creating link, try running as administrator") - end - -end - -if configFile then - applyConfigFile(configFile) -end - - -if not hostconfig['NdkDir'] or hostconfig['NdkDir'] == "" then - hostconfig['NdkDir'] = os.getenv("ANDROID_NDK") -end - ---try a default -if (not hostconfig['SdkDir']) or (hostconfig['SdkDir'] == "") then - hostconfig['SdkDir'] = findAndroidSdk() -end - -validateConfig() -copyhostfiles() -configureHost() - - -if (config.USE_SYMLINK) then - linklib() -else - copylib() -end +--============================================================== +-- setup +--============================================================== + + +--============================================================== +-- args +--============================================================== +local hostconfig = { + AppName = "Moai Template", + CompanyName = "Zipline Games", + ApplicationId = "com.getmoai.MoaiTemplate", + Modules = {}, + LuaSrc = MOAI_SDK_HOME..'samples/hello-moai', + FBAppId = 0, + GMSAppId = 0, + SchemeName ="moaischeme" +} + + +function findAndroidSdk() + + local fromenv = os.getenv("ANDROID_SDK_ROOT") or os.getenv("ANDROID_HOME") or os.getenv("ANDROID_SDK_HOME") + if fromenv then return fromenv end + + local isWindows = MOAIEnvironment.osBrand == 'Windows' + if isWindows then + local appdata = os.getenv("LOCALAPPDATA") + if (appdata and MOAIFileSystem.checkPathExists(appdata.."\\android\\sdk")) then + return appdata.."\\android\\sdk" + end + end + + if MOAIEnvironment.osBrand == "OSX" then + local home = os.getenv("HOME") + if (home and MOAIFileSystem.checkPathExists(home.."/Library/Android/sdk")) then + return home.."/Library/Android/sdk" + end + end + + if MOAIEnvironment.osBrand == "linux" then + local home = os.getenv("HOME") + local sdkpath = home.."/android-sdk-linux" + if (home and MOAIFileSystem.checkPathExists(sdkpath)) then + return sdkpath + end + end + + return false +end + + +MOAIFileSystem.setWorkingDirectory(INVOKE_DIR) +local config = {} +local configFile = false +config.OUTPUT_DIR = INVOKE_DIR..'hosts/android-studio/' +config.LIB_SOURCE = PITO_HOME..'lib/android' +config.USE_SYMLINK = false + +for i, escape, param, iter in util.iterateCommandLine ( arg or {}) do + + if escape == 's' or escape == 'use-symlink' then + config.USE_SYMLINK = true + end + if (param) then + if escape == 'o' or escape == 'output-dir' then + config.OUTPUT_DIR = MOAIFileSystem.getAbsoluteDirectoryPath(param) + end + + if escape == 'l' or escape == 'lib-source' then + config.LIB_SOURCE = MOAIFileSystem.getAbsoluteDirectoryPath(param) + end + + if escape == 'c' or escape == 'config' then + configFile = MOAIFileSystem.getAbsoluteFilePath(param) + end + end +end + +--============================================================== +-- actions +--============================================================== + +local copyhostfiles +local validateConfig +local copylib +local linklib +local applyConfigFile +local configureHost + +copyhostfiles = function() + local output = config.OUTPUT_DIR + print("Creating ",output) + MOAIFileSystem.affirmPath(output) + local ANDROID_LIBS = config.LIB_SOURCE + + print("Copying from ", PITO_HOME..'host-templates/android/', "to", output) + MOAIFileSystem.copy ( PITO_HOME..'host-templates/android/', output ) + + MOAIFileSystem.deleteFile ( output.."moai/src/main/jni/Android.mk") + MOAIFileSystem.copy ( PITO_HOME..'host-templates/android/Android-prebuilt.mk', output.."moai/src/main/jni/Android.mk" ) + MOAIFileSystem.copy ( PITO_HOME..'host-templates/android/gradle/local.properties', output.."local.properties") +end + +getAbsoluteLuaRoot = function() + local oldworkingdir = MOAIFileSystem.getWorkingDirectory() + --get lua path relative to config file as absolute + MOAIFileSystem.setWorkingDirectory(INVOKE_DIR) + + local luasrc = MOAIFileSystem.getAbsoluteDirectoryPath(hostconfig['LuaSrc']) + + MOAIFileSystem.setWorkingDirectory(oldworkingdir) + + return luasrc +end + + + +applyConfigFile = function(configFile) + print("reading config from "..configFile) + util.dofileWithEnvironment(configFile, hostconfig) + + --copy host specific settings to main config + if (hostconfig["HostSettings"] and hostconfig["HostSettings"]["android"]) then + for k,v in pairs(hostconfig["HostSettings"]["android"]) do + hostconfig[k] = v + end + end + + hostconfig["HostSettings"] = nil + +end + +validateConfig = function() + --validation + + --validate lua path + local luapath = getAbsoluteLuaRoot() + if not MOAIFileSystem.checkFileExists(luapath.."main.lua") then + print ("Your configured lua path does not contain a main.lua") + print ("configured path (absolute): ", luapath) + os.exit(1) + end +end + + + +configureHost = function() + local output = config.OUTPUT_DIR + if configFile then + print("\n\nApplying config from "..configFile..":") + else + print("\n\nUsing default config ") + end + + for k,v in pairs(hostconfig) do + print (k..": ", v) + end + + local modules = hostconfig['Modules'] or {} + + local modulestr = "" + + for _,v in pairs(modules) do + if modulestr == "" then + modulestr = v + else + modulestr = modulestr..','..v + end + end + + print("configuring lua source root") + + local luasrc = getAbsoluteLuaRoot() + + --now get lua path (currently absolute) as relative to gradle.properties + luasrc = MOAIFileSystem.getRelativePath(luasrc, output..'moai/' ) + + if (not luasrc) then + error("Error configuring lua source folder as relative "..hostconfig['LuaSrc']) + end + + local patternFor = function(name) + return '()(.-)()' + end + + --gradle windows paths need to be double escaped + local escGradlePath = function(dir) + return dir:gsub("\\","\\\\"):gsub(":","\\:") + end + + + local sdkdir = "" + if (hostconfig['SdkDir']) then + sdkdir = escGradlePath(hostconfig['SdkDir']) + end + print("updating template values") + + + --libroot + util.replaceInFiles ({ + + [ output .. 'moai/build.gradle'] = { + [ 'applicationId "[^"]+"']= 'applicationId "'..hostconfig['ApplicationId']..'"', + [ '//assets.srcDirs' ] = 'assets.srcDirs', + [ '@MOAI_LUA_ROOT@' ] = luasrc + }, + [ output .. 'build.gradle'] = { + [ '@MOAI_SDK_HOME@' ] = MOAI_SDK_HOME + }, + [ output .. 'moai/src/main/res/values/strings.xml'] = { + [patternFor("app_name")] = '%1'..hostconfig['AppName']..'%3', + [patternFor("scheme_name")] = '%1'..hostconfig['SchemeName']..'%3', + [patternFor("fb_app_id")] = '%1'..hostconfig['FBAppId']..'%3', + [patternFor("gms_app_id")] = '%1'..hostconfig['GMSAppId']..'%3' + }, + + [ output .. 'local.properties' ] = { + [ 'sdk.dir=[^\n]+' ]= "sdk.dir="..sdkdir, + } + }) + + --enable modules + for _,v in pairs(modules) do + if modulestr == "" then + modulestr = v + else + modulestr = modulestr..','..v + end + end + + + print("copying icons") + --icons + MOAIFileSystem.setWorkingDirectory(INVOKE_DIR) + + if (hostconfig['Icons']) then + for k,v in pairs(hostconfig['Icons']) do + if v == "" then + print("Removing default icon ",k) + MOAIFileSystem.deleteDirectory(config.OUTPUT_DIR.."moai/src/main/res/drawable-"..k, true) + else + if MOAIFileSystem.checkFileExists(v) then + MOAIFileSystem.copy(v, config.OUTPUT_DIR.."moai/src/main/res/drawable-"..k.."/icon.png") + else + error("Icon specified in config not found : "..k.."="..v) + end + end + end + end +end + + + +copylib = function() + local output = config.OUTPUT_DIR + local ANDROID_LIBS = config.LIB_SOURCE + MOAIFileSystem.copy ( MOAI_SDK_HOME.."ant/libmoai/jni", output.."moai/src/main/jni" ) + MOAIFileSystem.copy ( ANDROID_LIBS.."/libs", output.."moai/src/main/libs" ) +end + +linklib = function() + local isWindows = MOAIEnvironment.osBrand == 'Windows' + local cmd = isWindows and 'mklink /D "'..config.OUTPUT_DIR..'moai/src/main/libs" "'..config.LIB_SOURCE..'/libs"' + or 'ln -s "'..config.LIB_SOURCE..'/libs" "'..config.OUTPUT_DIR..'moai/src/main/libs"' + if os.execute(cmd) > 0 then + print ("Error creating link, try running as administrator") + end + + local isWindows = MOAIEnvironment.osBrand == 'Windows' + local cmd = isWindows and 'mklink /D "'..config.OUTPUT_DIR..'moai/src/main/jni" "'..MOAISDK_HOME..'ant/libmoai/jni"' + or 'ln -s "'..MOAI_SDK_HOME..'ant/libmoai/jni" "'..config.OUTPUT_DIR..'moai/src/main/jni"' + if os.execute(cmd) > 0 then + print ("Error creating link, try running as administrator") + end + +end + +if configFile then + applyConfigFile(configFile) +end + +if (not hostconfig['SdkDir']) or (hostconfig['SdkDir'] == "") then + hostconfig['SdkDir'] = findAndroidSdk() +end + + +validateConfig() +copyhostfiles() +configureHost() + + +if (config.USE_SYMLINK) then + linklib() +else + copylib() +end diff --git a/util/host-html/main.lua b/util/host-html/main.lua index 4e08213..4800f60 100644 --- a/util/host-html/main.lua +++ b/util/host-html/main.lua @@ -24,7 +24,7 @@ local configFile = false local config = {} config.OUTPUT_DIR = INVOKE_DIR..'hosts/html/' -config.LIB_SOURCE = MOAI_SDK_HOME..'lib/html' +config.LIB_SOURCE = PITO_HOME..'lib/html' config.USE_SYMLINK = false MOAIFileSystem.setWorkingDirectory(INVOKE_DIR) @@ -67,8 +67,8 @@ copyhostfiles = function() local output = config.OUTPUT_DIR print("Creating ",output) MOAIFileSystem.affirmPath(output) - for entry in util.iterateFiles(MOAI_SDK_HOME..'host-templates/html', false, true) do - local fullpath = string.format ( '%s/%s',MOAI_SDK_HOME..'host-templates/html' , entry ) + for entry in util.iterateFiles(PITO_HOME..'host-templates/html', false, true) do + local fullpath = string.format ( '%s/%s',PITO_HOME..'host-templates/html' , entry ) print( string.format( '%s -> %s', fullpath, output..entry )) MOAIFileSystem.copy(fullpath, output..entry) end diff --git a/util/host-ios/main.lua b/util/host-ios/main.lua index 698b937..b06c003 100644 --- a/util/host-ios/main.lua +++ b/util/host-ios/main.lua @@ -67,9 +67,9 @@ copyhostfiles = function() - for entry in util.iterateFiles(MOAI_SDK_HOME..'host-templates/ios/Moai Template', false, true) do - local fullpath = string.format ( '%s/%s',MOAI_SDK_HOME..'host-templates/ios/Moai Template' , entry ) - if not config.USE_SYMLINK or entry ~= "libmoai" then + for entry in util.iterateFiles(PITO_HOME..'host-templates/ios/Moai Template', false, true) do + local fullpath = string.format ( '%s/%s',PITO_HOME..'host-templates/ios/Moai Template' , entry ) + if not config.USE_SYMLINK or entry ~= "lib" then print( string.format( '%s -> %s', fullpath, output..entry )) MOAIFileSystem.copy(fullpath, output..entry) end @@ -96,13 +96,13 @@ copyhostfiles = function() end copylib = function() - MOAIFileSystem.copy(config.LIB_SOURCE, config.OUTPUT_DIR..'libmoai' ) + MOAIFileSystem.copy(config.LIB_SOURCE, config.OUTPUT_DIR..'lib' ) end linklib = function() local isWindows = MOAIEnvironment.osBrand == 'Windows' - local cmd = isWindows and 'mklink /D "'..config.OUTPUT_DIR..'libmoai" "'..config.LIB_SOURCE..'"' - or 'ln -s "'..config.LIB_SOURCE..'" "'..config.OUTPUT_DIR..'libmoai"' + local cmd = isWindows and 'mklink /D "'..config.OUTPUT_DIR..'lib" "'..config.LIB_SOURCE..'"' + or 'ln -s "'..config.LIB_SOURCE..'" "'..config.OUTPUT_DIR..'lib"' if os.execute(cmd) > 0 then print ("Error creating link, try running as administrator") end @@ -150,13 +150,18 @@ configureHost = function() ['(63D01EC01A38659C0097C3E8%C-name = )([^;]-)(;.-path = )([^;]-)(;.*)'] = "%1"..'"'..luafolder..'"'.."%3"..'"'..relativeLua..'"'.."%5", --our app name ['Moai Template'] = hostconfig['AppName'], + + ['%$%(MOAI_SDK_HOME%)'] = MOAIFileSystem.getAbsoluteDirectoryPath(MOAI_SDK_HOME), + ['%.%./%.%./%.%./sdk/moai'] = MOAIFileSystem.getAbsoluteDirectoryPath(MOAI_SDK_HOME) + + }, - [ util.wrap(pairs, projectfiles) ] = { + [ util.wrap(pairs, projectfiles) ] = { ['Moai Template'] = hostconfig['AppName'], }, [ output..'main.lua'] = { ['setWorkingDirectory%(.-%)'] = 'setWorkingDirectory("'..luafolder..'")' - }, + }, [ output..'run.sh' ] = { ['SCHEME_NAME'] = hostconfig['AppName'], }, diff --git a/util/host-linux/main.lua b/util/host-linux/main.lua index 88f28ca..aeb3d6b 100644 --- a/util/host-linux/main.lua +++ b/util/host-linux/main.lua @@ -18,7 +18,7 @@ end local config = {} config.OUTPUT_DIR = INVOKE_DIR..'hosts/linux/' -config.LIB_SOURCE = MOAI_SDK_HOME..'lib/linux' +config.LIB_SOURCE = PITO_HOME..'lib/linux' config.USE_SYMLINK = false MOAIFileSystem.setWorkingDirectory(INVOKE_DIR) @@ -43,19 +43,19 @@ end -- actions --============================================================== -local copyhostfiles +local copyhostfiles local copylib local linklib -copyhostfiles = function() +copyhostfiles = function() local output = config.OUTPUT_DIR print("Creating ",output) MOAIFileSystem.affirmPath(output) - - for entry in util.iterateFiles(MOAI_SDK_HOME..'host-templates/linux', false, true) do - local fullpath = string.format ( '%s/%s',MOAI_SDK_HOME..'host-templates/linux' , entry ) + + for entry in util.iterateFiles(PITO_HOME..'host-templates/linux', false, true) do + local fullpath = string.format ( '%s/%s',PITO_HOME..'host-templates/linux' , entry ) print( string.format( '%s -> %s', fullpath, output..entry )) MOAIFileSystem.copy(fullpath, output..entry) end @@ -72,20 +72,20 @@ copyhostfiles = function() MOAIFileSystem.deleteFile(output..'host-modules/aku_modules_ios.h') MOAIFileSystem.deleteFile(output..'host-modules/aku_modules_ios_config.h') MOAIFileSystem.deleteFile(output..'host-modules/aku_modules_ios.mm') - + MOAIFileSystem.deleteFile(output..'host-modules/aku_modules_android.h') MOAIFileSystem.deleteFile(output..'host-modules/aku_modules_android_config.h') MOAIFileSystem.deleteFile(output..'host-modules/aku_modules_android.cpp') end -copylib = function() +copylib = function() MOAIFileSystem.copy(config.LIB_SOURCE, config.OUTPUT_DIR..'lib' ) end -linklib = function() +linklib = function() local isWindows = MOAIEnvironment.osBrand == 'Windows' - local cmd = isWindows and 'mklink /D "'..config.OUTPUT_DIR..'lib" "'..config.LIB_SOURCE..'"' + local cmd = isWindows and 'mklink /D "'..config.OUTPUT_DIR..'lib" "'..config.LIB_SOURCE..'"' or 'ln -s "'..config.LIB_SOURCE..'" "'..config.OUTPUT_DIR..'lib"' if os.execute(cmd) > 0 then print ("Error creating link, try running as administrator") diff --git a/util/host-osx-app/main.lua b/util/host-osx-app/main.lua index dc11ae2..1cdd844 100644 --- a/util/host-osx-app/main.lua +++ b/util/host-osx-app/main.lua @@ -69,8 +69,8 @@ copyhostfiles = function() - for entry in util.iterateFiles(MOAI_SDK_HOME..'host-templates/osx/Moai Template', false, true) do - local fullpath = string.format ( '%s/%s',MOAI_SDK_HOME..'host-templates/osx/Moai Template' , entry ) + for entry in util.iterateFiles(PITO_HOME..'host-templates/osx/Moai Template', false, true) do + local fullpath = string.format ( '%s/%s',PITO_HOME..'host-templates/osx/Moai Template' , entry ) if not config.USE_SYMLINK or entry ~= "lib" then print( string.format( '%s -> %s', fullpath, output..entry )) MOAIFileSystem.copy(fullpath, output..entry) @@ -146,7 +146,9 @@ configureHost = function() --our lua path ['(63157D5E19FCB4F0009018A3%C-name = )([^;]-)(;.-path = )([^;]-)(;.*)'] = "%1"..luafolder.."%3"..relativeLua.."%5", --our app name - ['Moai Template'] = hostconfig['AppName'] + ['Moai Template'] = hostconfig['AppName'], + ['%$%(MOAI_SDK_HOME%)'] = MOAIFileSystem.getAbsoluteDirectoryPath(MOAI_SDK_HOME) + }, [ util.wrap(pairs, projectfiles) ] = { ['Moai Template'] = hostconfig['AppName'] diff --git a/util/host-windows-vs2012/main.lua b/util/host-windows-vs2012/main.lua deleted file mode 100644 index c538349..0000000 --- a/util/host-windows-vs2012/main.lua +++ /dev/null @@ -1,96 +0,0 @@ ---============================================================== --- setup ---============================================================== - - - -function table.contains(table, element) - for _, value in pairs(table) do - if value == element then - return true - end - end - return false -end - ---============================================================== --- args ---============================================================== - -local config = {} - -config.OUTPUT_DIR = INVOKE_DIR..'hosts/vs2012/' -config.LIB_SOURCE = MOAI_SDK_HOME..'lib/windows/vs2012/Distribute/' -config.USE_SYMLINK = false - -MOAIFileSystem.setWorkingDirectory(INVOKE_DIR) - -for i, escape, param, iter in util.iterateCommandLine ( arg or {}) do - - if escape == 's' or escape == 'use-symlink' then - config.USE_SYMLINK = true - end - if (param) then - if escape == 'o' or escape == 'output-dir' then - config.OUTPUT_DIR = MOAIFileSystem.getAbsoluteDirectoryPath(param) - end - - if escape == 'l' or escape == 'lib-source' then - config.LIB_SOURCE = MOAIFileSystem.getAbsoluteDirectoryPath(param) - end - end -end - ---============================================================== --- actions ---============================================================== - -local copyhostfiles -local copylib -local linklib - -copyhostfiles = function() - local output = config.OUTPUT_DIR - print("Creating ",output) - MOAIFileSystem.affirmPath(output) - - - local files = MOAIFileSystem.listFiles( MOAI_SDK_HOME..'host-templates/windows/vs2012') - for k, entry in pairs ( files ) do - local fullpath = string.format ( '%s/%s',MOAI_SDK_HOME..'host-templates/windows/vs2012' , entry ) - print( string.format( '%s -> %s', fullpath, output..entry )) - MOAIFileSystem.copy(fullpath, output..entry) - end - - local sdlhost = MOAI_SDK_HOME..'src/host-sdl' - local hostmodules = MOAI_SDK_HOME..'src/host-modules' - MOAIFileSystem.copy(sdlhost, output..'host-sdl') - MOAIFileSystem.copy(hostmodules, output..'host-modules') - - --don't want these ones - MOAIFileSystem.deleteFile(output..'host-modules/aku_modules_ios.h') - MOAIFileSystem.deleteFile(output..'host-modules/aku_modules_ios_config.h') - MOAIFileSystem.deleteFile(output..'host-modules/aku_modules_ios.mm') - -end - -copylib = function() - MOAIFileSystem.copy(config.LIB_SOURCE, config.OUTPUT_DIR..'lib' ) -end - -linklib = function() - local isWindows = MOAIEnvironment.osBrand == 'Windows' - local cmd = isWindows and 'mklink /D "'..config.OUTPUT_DIR..'lib" "'..config.LIB_SOURCE..'"' - or 'ln -s "'..config.LIB_SOURCE..'" "'..config.OUTPUT_DIR..'lib"' - if os.execute(cmd) > 0 then - print ("Error creating link, try running as administrator") - end - -end - -copyhostfiles() -if (config.USE_SYMLINK) then - linklib() -else - copylib() -end diff --git a/util/host-windows-vs2015/main.lua b/util/host-windows-vs2015/main.lua new file mode 100644 index 0000000..7e063dd --- /dev/null +++ b/util/host-windows-vs2015/main.lua @@ -0,0 +1,223 @@ +--============================================================== +-- setup +--============================================================== + + +function table.contains(table, element) + for _, value in pairs(table) do + if value == element then + return true + end + end + return false +end + +--============================================================== +-- args +--============================================================== +local hostconfig = { + AppName = "Moai Template", + CompanyName = "Zipline Games", + ExeDescription = "" +} + + +local config = {} + +config.OUTPUT_DIR = INVOKE_DIR..'hosts/vs2015/' +config.LIB_SOURCE = PITO_HOME..'lib/windows/vs2015/' +config.USE_SYMLINK = false + +MOAIFileSystem.setWorkingDirectory(INVOKE_DIR) + +local configFile = false +for i, escape, param, iter in util.iterateCommandLine ( arg or {}) do + + if escape == 's' or escape == 'use-symlink' then + config.USE_SYMLINK = true + end + if (param) then + if escape == 'o' or escape == 'output-dir' then + config.OUTPUT_DIR = MOAIFileSystem.getAbsoluteDirectoryPath(param) + end + + if escape == 'l' or escape == 'lib-source' then + config.LIB_SOURCE = MOAIFileSystem.getAbsoluteDirectoryPath(param) + end + + if escape == 'c' or escape == 'config' then + configFile = MOAIFileSystem.getAbsoluteFilePath(param) + end + + end +end + +--============================================================== +-- actions +--============================================================== + +local copyhostfiles +local copylib +local linklib +local applyConfigFile +local configureHost + +copyhostfiles = function() + local output = config.OUTPUT_DIR + print("Creating ",output) + MOAIFileSystem.affirmPath(output) + + + local files = MOAIFileSystem.listFiles( PITO_HOME..'host-templates/windows/vs2015') + for k, entry in pairs ( files ) do + local fullpath = string.format ( '%s/%s',PITO_HOME..'host-templates/windows/vs2015' , entry ) + print( string.format( '%s -> %s', fullpath, output..entry )) + MOAIFileSystem.copy(fullpath, output..entry) + end + + local sdlhost = MOAI_SDK_HOME..'src/host-sdl' + local hostmodules = MOAI_SDK_HOME..'src/host-modules' + MOAIFileSystem.copy(sdlhost, output..'host-sdl') + MOAIFileSystem.copy(hostmodules, output..'host-modules') + + --includes + for f in util.iterateFiles(MOAI_SDK_HOME..'src', "host.h") do + --filepath = util.getFolderFromPath(f) + --MOAIFileSystem.affirmPath(output..'sdk/src/'..filepath) + MOAIFileSystem.copy(MOAI_SDK_HOME..'src/'..f, output..'sdk/src/'..f) + end + + + for f in util.iterateFiles(MOAI_SDK_HOME..'src/zl-util', '.*%.h') do + MOAIFileSystem.copy(MOAI_SDK_HOME..'src/zl-util/'..f, output..'sdk/src/zl-util/'..f) + end + + for f in util.iterateFiles(MOAI_SDK_HOME..'src/zl-vfs', '.*%.h') do + MOAIFileSystem.copy(MOAI_SDK_HOME..'src/zl-vfs/'..f, output..'sdk/src/zl-vfs/'..f) + end + + local extras = { 'moai-sim/MOAIKeyCodeEnum.h', 'lua-headers', 'zl-common'} + for _ , f in pairs(extras) do + MOAIFileSystem.copy(MOAI_SDK_HOME..'src/'..f, output..'sdk/src/'..f) + end + + + + --sdl + MOAIFileSystem.copy(MOAI_SDK_HOME..'3rdparty/sdl2-2.0.4/include', output..'sdk/3rdparty/sdl2-2.0.4/include') + MOAIFileSystem.copy(MOAI_SDK_HOME..'3rdparty/sdl2-2.0.4/include-moai', output..'sdk/3rdparty/sdl2-2.0.4/include-moai') + + + --don't want these ones + MOAIFileSystem.deleteFile(output..'host-modules/aku_modules_ios.h') + MOAIFileSystem.deleteFile(output..'host-modules/aku_modules_ios_config.h') + MOAIFileSystem.deleteFile(output..'host-modules/aku_modules_ios.mm') + MOAIFileSystem.deleteFile(output..'host-modules/aku_modules_android.h') + MOAIFileSystem.deleteFile(output..'host-modules/aku_modules_android_config.h') + MOAIFileSystem.deleteFile(output..'host-modules/aku_modules_android.cpp') + +end + +configureHost = function() + print("\n\nApplying config from "..(configFile or "defaults")..":") + for k,v in pairs(hostconfig) do + print (k..": ", v) + end + + local asUTF16Pattern = function(str) + local newstr = "" + for i = 1, #str do + local c = str:sub(i,i) + newstr = newstr.."."..c + end + return newstr + end + + local asUTF16 = function(str) + local newstr = "" + for i = 1, #str do + local c = str:sub(i,i) + newstr = newstr.."\0"..c + end + return newstr + end + + local utfReplace = function(source, target, replace) + return source:gsub(asUTF16Pattern(target),asUTF16(replace)) + end + + + --get our resource file contents + local rcfile = io.open(config.OUTPUT_DIR.."moai.rc","rb") + if (not rcfile) then error("failed to open moai.rc") end + local contents = rcfile:read("*all") + rcfile:close() + + --apply substitutions + contents = utfReplace(contents, '', hostconfig.AppName) + contents = utfReplace(contents, '', hostconfig.CompanyName) + contents = utfReplace(contents, '', hostconfig.ExeDescription) + + --dump back to file + rcfile = io.open(config.OUTPUT_DIR.."moai.rc","wb") + rcfile:write(contents) + io.close(rcfile) + + + --app icon + if (hostconfig.Icon) then + local icon = MOAIFileSystem.getAbsoluteFilePath(hostconfig.Icon) + if (MOAIFileSystem.checkFileExists(icon)) then + MOAIFileSystem.copy(icon, config.OUTPUT_DIR.."appicon.ico") + else + error("Could not find specified icon :"..icon.." - skipping") + end + end + +end + + + +copylib = function() + MOAIFileSystem.copy(config.LIB_SOURCE, config.OUTPUT_DIR..'lib' ) +end + +linklib = function() + local isWindows = MOAIEnvironment.osBrand == 'Windows' + local cmd = isWindows and 'mklink /D "'..config.OUTPUT_DIR..'lib" "'..config.LIB_SOURCE..'"' + or 'ln -s "'..config.LIB_SOURCE..'" "'..config.OUTPUT_DIR..'lib"' + if os.execute(cmd) > 0 then + print ("Error creating link, try running as administrator") + end + +end + +applyConfigFile = function(configFile) + util.dofileWithEnvironment(configFile, hostconfig) + + + --copy host specific settings to main config + if (hostconfig["HostSettings"] and hostconfig["HostSettings"]["windows"]) then + for k,v in pairs(hostconfig["HostSettings"]["windows"]) do + hostconfig[k] = v + end + end + + hostconfig["HostSettings"] = nil + +end + +if configFile then + applyConfigFile(configFile) +end + +copyhostfiles() + +configureHost() + + +if (config.USE_SYMLINK) then + linklib() +else + copylib() +end diff --git a/util/host/create.lua b/util/host/create.lua index 6efae50..f27c09f 100644 --- a/util/host/create.lua +++ b/util/host/create.lua @@ -17,7 +17,7 @@ end --we get here if we don't exist and we are a valid host print("creating host: "..hostname) -os.execute("pito "..hosts[hostname].." -c hostconfig.lua -o "..hostsFolder..hostname) +os.execute("pito "..hosts[hostname].." -c hostconfig.lua -o \""..hostsFolder..hostname.."\"") print("\n Host created ") diff --git a/util/host/defaultconfig.lua b/util/host/defaultconfig.lua index 89d82ee..375ffb6 100644 --- a/util/host/defaultconfig.lua +++ b/util/host/defaultconfig.lua @@ -3,28 +3,18 @@ CompanyName = "" LuaSrc = "src" HostSettings = { - ["android-gradle"] = { - SdkDir = "", - NdkDir = "", - --valid values are moai-android-adcolony, moai-android-amazon-billing, moai-android-chartboost, moai-android-crittercism, - -- moai-android-facebook, moai-android-flurry, moai-android-fortumo, moai-android-google-billing, - -- moai-android-google-play-services, moai-android-google-push, moai-android-tapjoy, - -- moai-android-twitter, moai-android-vungle - Modules = { - "moai-android-twitter" - }, + ["android"] = { -- Facebook app ID for use with moai-android-facebook FBAppId = 0, -- google app id for use with Google Play Services GMSAppId = 0, -- scheme name , url scheme name for launching app SchemeName ="moaischeme" - --icons, valid keys are: hdpi,mdpi,xhdpi,xxhdpi, paths can be relative to this config file --Icons = { -- hdpi = "hostconfig/android/icons/hdpi/icon.png', - -- mdpi = "hostconfig/android/icons/mdpi/icon.png , - -- xxhdpi = "" --leave blank to remove the default moai icon for this resolution + -- mdpi = "hostconfig/android/icons/mdpi/icon.png , + -- xxhdpi = "" --leave blank to remove the default moai icon for this resolution -- } }, diff --git a/util/host/main.lua b/util/host/main.lua index 0445707..6d1c475 100644 --- a/util/host/main.lua +++ b/util/host/main.lua @@ -2,18 +2,24 @@ hostsFolder = INVOKE_DIR..'/hosts/' --TODO probably should iterate over folders and extract this information so we don't need to keep it up to date hosts = { - ["android-gradle"] = "host-android-gradle", + ["android"] = "host-android-studio", ["html"] = "host-html", ["ios"] = "host-ios", ["linux"] = "host-linux", ["osx"] = "host-osx-app", - ["windows"] = "host-windows-vs2013" + ["vs2013"] = "host-windows-vs2013", + ["vs2015"] = "host-windows-vs2015" } function printValidHosts() print("Available Hosts:") + local allHosts = {} for k,v in pairs(hosts) do - print(" "..k) + table.insert(allHosts, k) + end + table.sort(allHosts) + for _,v in pairs(allHosts) do + print(" "..v) end end diff --git a/util/http.lua b/util/http.lua new file mode 100644 index 0000000..1a47fb6 --- /dev/null +++ b/util/http.lua @@ -0,0 +1,144 @@ +module ( 'http', package.seeall ) + +require ( 'util' ) + +local HTTP_TIMEOUT = 15 +local HTTP_USER_AGENT = 'Plumzi' + +local DELETE = MOAIHttpTask.HTTP_DELETE +local GET = MOAIHttpTask.HTTP_GET +local HEAD = MOAIHttpTask.HTTP_HEAD +local POST = MOAIHttpTask.HTTP_POST +local PUT = MOAIHttpTask.HTTP_PUT + +--============================================================== +-- implementation +--============================================================== + + delete = nil +local escapeUrl = nil +local encodeParams = nil + get = nil + getVerbName = nil + is200 = nil + is400 = nil + is500 = nil + perform = nil + post = nil + put = nil + +---------------------------------------------------- +delete = function ( url, params, headers, timeout ) + return perform ( DELETE, url, params, nil, headers, timeout ) +end + +---------------------------------------------------------------- +escapeUrl = function ( str ) + + if str then + + -- convert line endings + str = string.gsub ( str, "\n", "\r\n" ) + + -- escape all special characters + str = string.gsub ( str, "([^%w ])", + function ( c ) + return "%" .. string.format ( "%02X", string.byte ( c )) + end + ) + + -- convert spaces to "+" symbols + str = string.gsub ( str, " ", "+" ) + end + + return str +end + +---------------------------------------------------------------- +encodeParams = function ( t ) + + if not t then return '' end + + local s = '' + for k, v in pairs ( t ) do + s = s .. '&' .. escapeUrl ( k ) .. '=' .. escapeUrl ( v ) + end + + if #s > 0 then + return '?' .. string.sub ( s, 2 ) -- remove first '&' + end + + return '' +end + +---------------------------------------------------------------- +get = function ( url, params, headers, timeout ) + return perform ( GET, url, params, nil, headers, timeout ) +end + +---------------------------------------------------------------- +getVerbName = function ( verb ) + + if verb == DELETE then return 'DELETE' end + if verb == GET then return 'GET' end + if verb == HEAD then return 'HEAD' end + if verb == POST then return 'POST' end + if verb == PUT then return 'PUT' end + + return 'UNKNOWN' +end + +---------------------------------------------------------------- +is200 = function ( status ) + return status and ( 200 <= status ) and ( status < 300 ) or false +end + +---------------------------------------------------------------- +is400 = function ( status ) + return status and ( 400 <= status ) and ( status < 500 ) or false +end + +---------------------------------------------------------------- +is500 = function ( status ) + return status and 500 <= status or false +end + +---------------------------------------------------------------- +perform = function ( verb, url, params, body, headers, timeout ) + + url = params and url .. encodeParams ( params ) or url + + + local httptask = MOAIHttpTask.new () + httptask:setUrl ( url ) + httptask:setVerb ( verb ) + httptask:setBody ( body ) + httptask:setTimeout ( timeout or HTTP_TIMEOUT ) + httptask:setFollowRedirects ( true ) + + httptask:setHeader ( 'user-agent', HTTP_USER_AGENT ) + + if headers then + for k, v in pairs ( headers ) do + httptask:setHeader ( k, v ) + end + else + httptask:setHeader ( 'accept', 'application/json' ) + httptask:setHeader ( 'content-type', 'application/json' ) + end + + httptask:performSync () + + return httptask:getResponseCode (), httptask:getString () +end + +---------------------------------------------------------------- +post = function ( url, params, json, headers, timeout ) + return perform ( POST, url, params, json, headers, timeout ) +end + +---------------------------------------------------------------- +put = function ( url, params, json, headers, timeout ) + return perform ( PUT, url, params, json, headers, timeout ) +end + diff --git a/util/new-project/main.lua b/util/new-project/main.lua new file mode 100644 index 0000000..76c1df8 --- /dev/null +++ b/util/new-project/main.lua @@ -0,0 +1,57 @@ + +MOAIFileSystem.setWorkingDirectory(INVOKE_DIR) + +local projectName = arg[4] + +--sanity check (no spaces in path or name) +if string.find(projectName, " ") then + print("\nERROR: Project name can't contain spaces. It breaks NDK\n") + os.exit(1) +end + +if string.find(INVOKE_DIR, " ") then + print("\nERROR: Project directory name can't contain spaces. It breaks NDK\n") + os.exit(1) +end + +if not projectName or (projectName == "") then + print("\nERROR: You must provide a project name (no spaces)\n") + os.exit(1) +end + +local fullProjectPath = MOAIFileSystem.getAbsoluteDirectoryPath(projectName) +if MOAIFileSystem.checkPathExists(fullProjectPath) then + print("\nERROR: A folder with that name already exists\n") + os.exit(1) +end + +print("\nCreating project : "..projectName.."\n\n") + +MOAIFileSystem.affirmPath(fullProjectPath) +MOAIFileSystem.affirmPath(fullProjectPath..'/src') + +--copy some sample + +if not MOAIFileSystem.copy(MOAI_SDK_HOME.."/samples/hello-moai", fullProjectPath..'/src') then + print("\nERROR: could not copy sample files. Is the sdk installed properly?\n") + os.exit(1) +end + + + + +MOAIFileSystem.setWorkingDirectory(MOAIFileSystem.getAbsoluteDirectoryPath(projectName)); +local cmd = string.format('"%sbin/pito" host init',MOAIFileSystem.getAbsoluteDirectoryPath(PITO_HOME)) +os.execute(cmd) + +util.replaceInFiles ({ + + [ 'hostconfig.lua'] = { + [ 'AppName = "[^"]+"']= 'AppName = "'..projectName..'"', + [ 'ApplicationId = "[^"]+"']= 'ApplicationId = "com.example.anonymousmoaidev.'..projectName..'"', + } + }) + +print("\n\nProject created and initialized.\n\n Run moai from src directory, or create hosts with pito host create ...\n\n") + + diff --git a/util/package-cmake-sdk/config.lua b/util/package-cmake-sdk/config.lua deleted file mode 100644 index 6c9042f..0000000 --- a/util/package-cmake-sdk/config.lua +++ /dev/null @@ -1,43 +0,0 @@ -COMMON = { - ['lib'] = true, - ['util'] = true, - ['samples'] = true, - ['src/host-modules'] = true, - - - --android host files are common to all - - ['host-templates/android'] = true, - ['host-templates/html'] = true, - ['src/moai-android/moai.cpp'] = true, - ['src/moai-android/MoaiActivity.java'] = true, - ['src/moai-android/MoaiView.java'] = true, - - - --sdl host files are common to all - ['src/host-sdl'] = true, -} - - -MAC = { - --ios - ['src/host-ios'] = true, - ['host-templates/ios'] = true, - ['host-templates/osx'] = true, - ['lib/osx/bin/moai'] = 'util/moai' -} - -WINDOWS = { - ['host-templates/windows/vs2013'] = true, - ['lib/windows/vs2013/Distribute/bin/moai.exe'] = 'util/moai.exe' -} - -LINUX = { - ['host-templates/linux'] = true, - ['lib/linux/bin/moai'] = 'util/moai' -} - - -CLEAN_DIRS = { - -} diff --git a/util/package-cmake-sdk/moai-sdk/Readme.md b/util/package-cmake-sdk/moai-sdk/Readme.md deleted file mode 100644 index c274868..0000000 --- a/util/package-cmake-sdk/moai-sdk/Readme.md +++ /dev/null @@ -1,104 +0,0 @@ - -## Getting Started ## - -The moai binary sdk is shipped as a set of precompiled libraries, a moai desktop binary and a set of project templates for each platform. - -The provided moai desktop binary `/util/moai` will allow you to run many of the provided samples in the samples folder, just set a `MOAI_BIN` environment variable to point to `\util` folder where the run.bat|sh file in each sample folder can find your desktop binary. - - -You should try to structure your moai projects so that there is a source directory that contains your lua src and assets that are to be deployed. This would be a subfolder under your project directory which might contain other things such as templates, build scripts, config etc. e.g For a test project called TestProj, I would create a folder called `TestProj`, then under that another folder `TestProj/src` where I would keep all my lua and assets. - -## Building Hosts ## - -While you can use the moai desktop binary provided to run your moai lua code, you will eventually want to build your own host. Building your own host is required to run and deploy your project on other platforms (android, ios, html) or to customize the desktop version with your own icon and customisations or in preparation for submission to an app store. - -Managing and building these per platform hosts can be a headache and repeating the process for each project can get annoying. Thankfully this sdk provides a set of utility scripts to help with building and creating moai projects called `pito`. - - pito: https://en.wiktionary.org/wiki/pito - -To use pito you should first add `\util` to your `PATH` environment variable (if you haven't already done so). - -You should also ensure you have the requirements installed for the platforms you wish to support. See [Requirements](Requirements) section below. - -### Creating Host Config ### - -pito uses a lua based config file `hostconfig.lua` to create host projects with the correct settings and correct lua src location. To create this config file for the first time on a project, ensure you are one level up from your lua src and run -```bash -pito host init -``` -This will create the hostconfig.lua which contains default settings for each platform, and can be edited to setup the name, source location, icon etc for the project you wish to build. - -### Creating a host project for a platform ### - -Once there is a hostconfig.lua, you can create (or recreate) a host project for a particular platform by running -```bash -pito host create -``` - -where `host-name` is the name of the host you want to create (normally named after the target plaform). For a list of supported host-names run -```bash -pito host list -``` - -The created host will be in a subfolder called `hosts\` in your current project. - -### Customising the created host project ### - -To customize the created host, you can just edit the files in `hosts\` using either the ide (xcode, visual studio, android studio) for the project, or just with a text editor. - -A better option (when applicable) is to just update the `hostconfig.lua` with new values and run `pito host create ` again. This will remove your old `hosts/` folder and create a new host with new settings. The advantage of this method is that you can recreate your host projects after updating the moai sdk to get all the latest fixes or customisations you have made to the sdk. - -### Building the created host projects ### - -To build the created hosts you can launch the created project in the relevant ide (xcode, visual studio, android studio) or you can run -```bash -pito host build -``` -or -```bash -pito host run -``` - -These scripts will create the host if it doesn't exist, then build it using the build.sh|bat script in the host directory. The run command will also call the run.bat|sh script in the host directory (if available) to launch the build application. - -## Requirements ## - -### Android - - * Oracle JDK 1.7 - * http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html - * set a `JAVA_HOME` environment variable that points to the jdk - - - * Android Studio 1.0+ - * http://developer.android.com/tools/studio/index.html - - - * Android NDK r9d - * Windows - http://dl.google.com/android/ndk/android-ndk-r9d-windows-x86.zip) - * Mac - http://dl.google.com/android/ndk/android-ndk-r9d-darwin-x86_64.tar.bz2) - * Linux - http://dl.google.com/android/ndk/android-ndk-r9d-linux-x86_64.tar.bz2) - * Set an `ANDROID_NDK` environment variable that points to the unzipped path. - * Don't try to use a later one, it may be incompatible with the pre-built binaries. - - -### Windows - - * Visual Studio 2013 (community edition or higher) - * http://www.visualstudio.com/products/visual-studio-community-vs - - -### Linux - - * CMake 3.0.0+ - - -### iOS and OSX - - * XCode 6+ - - - - - - diff --git a/util/package-cmake-sdk/prepare-sdk-windows.bat b/util/package-cmake-sdk/prepare-sdk-windows.bat deleted file mode 100644 index d08acc8..0000000 --- a/util/package-cmake-sdk/prepare-sdk-windows.bat +++ /dev/null @@ -1,17 +0,0 @@ - -pushd -cd %~dp0%..\..\ -setlocal - -call bin\env-win.bat || goto :error -call bin\build-all-windows.bat || goto :error - -popd - -:error -endlocal -echo "error during build" -exit /b 1 - -:end -endlocal \ No newline at end of file diff --git a/util/package-community-sdk/README.md b/util/package-community-sdk/README.md new file mode 100644 index 0000000..be2a554 --- /dev/null +++ b/util/package-community-sdk/README.md @@ -0,0 +1,152 @@ +##Moai Community SDK 1.7 + +The community SDK bundles a tested version of libmoai and a suite of tools to allow you to quickly create moai projects and export to multiple platforms. + +##Building Moai + +The community releases for windows and osx include a precompiled moai desktop binary in the bin folder to help you get started quickly. +You can add the bin folder to your path and you will be able to run any Moai script from any folder. + +While you can use the moai desktop binary provided to run your moai lua code, you will eventually want to build your own host. Building your own host is required to run and deploy your project on other platforms (android, ios, html) or to customize the desktop version with your own icon and customisations or in preparation for submission to an app store. + +###Install prerequisites + +To build/rebuild the moai libraries ensure you have the prequisites for your target operating system installed: + +####Windows Requirements +* [Visual Studio 2015 (Community edition is free)](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx) +* [CMake 3.1+](https://cmake.org/download) + +####OSX and iOS Requirements +* Xcode 7+ + +####Linux Requirements +* [CMake 3.1+](https://cmake.org/download) +* `apt-get install cmake git-core build-essential libglu1-mesa-dev libxmu-dev libxi-dev libxxf86vm-dev` + +####Android Requirements +* [Oracle Java JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html) +* [Android Studio and SDK](http://developer.android.com/sdk/index.html) +* [Android NDK r10e+](http://developer.android.com/ndk/downloads/index.html) + +####HTML/JS Requirements +* [Emscripten SDK 1.25+](http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html) +* [CMake 3.1+](https://cmake.org/download) +* _(windows only)_ [mingw32-make](http://tdm-gcc.tdragon.net/download) + +###Configure the SDK + +Once the prerequisites are installed, you will need to tell the SDK where to find all the pieces. +In the `scripts` folder of the SDK, there is a `env-local.(bat|sh).template` file which contains the +environment variables that the SDK uses to find its prerequisites. Create a copy the file and remove the `.template` suffix. +Edit the values in there to point to the required locations. Note that not all of the variables are mandatory. + + +###Build Libmoai for your platform + +The first step is to compile libmoai for your desired platforms. +From the SDK/scripts directory run `env-win.bat` or `source env-osx.sh` or +`source env-linux.sh` to setup your environment. + +To build the library for each platform run the corresponding `build-xxxxx` file in the script folder: + +* For Windows: `build-windows`, `build-android`, `build-html` +* For Linux: `build-linux`, `build-android`, `build-html` +* For OSX: `build-osx`, `build-ios`, `build-android`, `build-html` + +`build-windows`, `build-osx`, `build-linux` also build the basic SDL host for the platform as well as the libraries + +###Create A Project + +You now should have a Moai binary for your current host and a libmoai built for each platform. +We can use the `pito` command to manage our projects and hosts going forward. + +To create a project with pito: + +* Ensure that the `sdk\bin` folder is on your path. +* Find or create a folder (with no spaces in the path) to place your moai project +* Create a new project using `pito new-project ` +* cd into `` folder to see the new project. + +###Write and Run your game code + +With the project setup, you can write your lua game code. Put a main.lua file in the `src` subfolder. +```lua +print("Hello World") +``` + +You can run this now by typing `moai` from the src folder. You should see the Moai version followed by `Hello World`. + +###Create project specific hosts + +Although you can just use the moai binary from the sdk to ship your product, the odds are you will want to create a custom host. + +Managing and building these per platform hosts can be a headache and repeating the process for each project can get annoying. +Thankfully this sdk provides a set of utility scripts to help with building and creating moai projects called `pito`. + + pito: https://en.wiktionary.org/wiki/pito + + +####Edit hostconfig.lua + +`pito` uses a lua based config file `hostconfig.lua` to create host projects with the correct settings and correct lua src location. +The `hostconfig.lua` file in your project directory contains default settings for each platform, and should be edited to setup the name, source location, icon etc for the project you wish to build. + + +####Creating a host project for a platform + +You can create (or recreate) a host project for a particular platform by running + +```bash +pito host create +``` + +where `host-name` is the name of the host you want to create (normally named after the target plaform). For a list of supported host-names run + +```bash +pito host list +``` + +The created host will be in a subfolder called `hosts\` in your current project. + + +#### Customising the created host project + +To customize the created host, you can just edit the files in `hosts\` using either the ide (xcode, visual studio, android studio) for the project, or just with a text editor. + +A better option (when applicable) is to just update the `hostconfig.lua` with new values and run `pito host create ` again. +This will remove your old `hosts/` folder and create a new host with new settings. +The advantage of this method is that you can recreate your host projects after updating the moai sdk to get all the latest fixes or customisations you have made to the sdk. + + +#### Building the created host projects + +To build the created hosts you can launch the created project in the relevant ide (xcode, visual studio, android studio) or you can run + +```bash +pito host build +``` + +or + +```bash +pito host run +``` + +These scripts will create the host if it doesn't exist, then build it using the build.sh|bat script in the host directory. +The run command will also call the run.bat|sh script in the host directory (if available) to launch the build application. +_NB You may need to ensure you environment is configured via the `env-xxxx` script again)_ + + +###Done + +You can now build moai from source and create games. You have full control over your build. +Time to grab your favourite editor, IDE and produce that next/first title. + +Brush up on how the Moai SDK works from a lua perspective by reading [the basics](http://moaiforge.com/community-docs/docs/basics/moai-sdk-basics-part-one.html) + +Or + +Update your hello world application you just made into a real game by following +the [Rocket Lobster](http://moaiforge.com/community-docs/docs/tutorial/your-first-game-rocket-lobster.html) tutorial + diff --git a/util/package-community-sdk/build-android-apk.bat b/util/package-community-sdk/build-android-apk.bat new file mode 100644 index 0000000..f9cc712 --- /dev/null +++ b/util/package-community-sdk/build-android-apk.bat @@ -0,0 +1,24 @@ +@echo off + +pushd %~dp0%\moai-debugger + + +rem create moai-debugger apk +echo y| call pito host create android || goto :error +call pito host build android || goto :error + +mkdir ..\..\..\lib\android\apk +erase /q ..\..\..\lib\android\apk\moai-debug.apk +copy hosts\android\moai\build\outputs\apk\moai-debug.apk ..\..\..\lib\android\apk\moai-debug.apk || goto :error +rmdir /s/q hosts\android +popd +goto :end + +:error +popd +endlocal +echo "error during build" +exit /b 1 + +:end +endlocal \ No newline at end of file diff --git a/util/package-community-sdk/config.lua b/util/package-community-sdk/config.lua new file mode 100644 index 0000000..561b1c9 --- /dev/null +++ b/util/package-community-sdk/config.lua @@ -0,0 +1,62 @@ +PITO_FILES = { + ['bin'] = true, + ['cmake'] = true, + ['host-templates'] = true, + ['util'] = true, + ['scripts'] = true, + ['lib/html'] = true, + ['lib/android/libs'] = true, + ['lib/android/apk'] = true, +} + +COMMON = { + ['3rdparty-android'] = true, + ['3rdparty'] = true, + ['ant'] = true, + ['docs'] = true, + ['samples'] = true, + ['src'] = true, + ['util'] = true +} + + +OSX = { + ['xcode'] = true +} + +WINDOWS = { + ['vs2015'] = true +} + +LINUX = { +} + + +CLEAN_DIRS = { + ['3rdparty/civetweb'] = true, + ['3rdparty/sdl2-2.0.4/test'] = true, + ['ant/libmoai/libs'] = true, + ['ant/libmoai/obj'] = true, +} + +CLEAN_DIRS_OSX = { + +} + +CLEAN_DIRS_WINDOWS = { + ['3rdparty/facebook-ios-sdk-4.5.1'] = true, + ['3rdparty/facebook-ios-sdk-4.5.1'] = true, + ['3rdparty/libUAirship-3.0.1'] = true, + ['3rdparty/chartboost-4.2'] = true, + ['3rdparty/flurry-ios-5.0.0'] = true, + ['3rdparty/adcolony-2.2.4'] = true, + ['3rdparty/vungle-2.0.1'] = true, + ['3rdparty/TapjoySDK_iOS_v10.0.2'] = true, + ['3rdparty/crittercism-4.3.3'] = true, + ['3rdparty/playhaven-ios-1.13.1'] = true, + ['3rdparty/kontagent_ios_v1.5.6'] = true, + ['3rdparty/MobileAppTracking-ios-2.6'] = true, + ['3rdparty/MobileAppTracking-ios'] = true, +} + +CLEAN_DIRS_LINUX = CLEAN_DIRS_WINDOWS \ No newline at end of file diff --git a/util/package-cmake-sdk/main.lua b/util/package-community-sdk/main.lua similarity index 65% rename from util/package-cmake-sdk/main.lua rename to util/package-community-sdk/main.lua index bd4d5c1..1ace20e 100644 --- a/util/package-cmake-sdk/main.lua +++ b/util/package-community-sdk/main.lua @@ -1,23 +1,31 @@ --============================================================== -- args --============================================================== +VERSION = dofile ( MOAI_SDK_HOME..'/util/sdk-version/version.lua' ) -OUTPUT_DIR = INVOKE_DIR .. 'moai-sdk/' - -COPY_FILES = {} -CLEAN_DIRS = {} DEV_PLATFORM = nil if (MOAIEnvironment.osBrand == 'Windows') then DEV_PLATFORM = 'WINDOWS' +elseif (MOAIEnvironment.osBrand == 'Linux') then + DEV_PLATFORM = 'LINUX' else - DEV_PLATFORM = 'MAC' + DEV_PLATFORM = 'OSX' end +OUTPUT_DIR = INVOKE_DIR .. 'moaisdk-'..string.lower(DEV_PLATFORM).."-"..string.format ( '%d.%d.%d', VERSION.MAJOR, VERSION.MINOR, VERSION.REVISION or -1 )..'/' + +COPY_FILES = {} +PITO_FILES = {} +CLEAN_DIRS = {} + + + + ---------------------------------------------------------------- for i, escape, param, iter in util.iterateCommandLine ( arg or {}) do - + if param then if escape == 'p' or escape == 'platform' then @@ -27,8 +35,8 @@ for i, escape, param, iter in util.iterateCommandLine ( arg or {}) do if escape == 'o' or escape == 'out' then if not util.isAbsPath ( param ) then param = INVOKE_DIR .. param - end - + end + OUTPUT_DIR = MOAIFileSystem.getAbsoluteDirectoryPath ( param ) end end @@ -49,12 +57,13 @@ processConfigFile = function ( filename ) local config = {} util.dofileWithEnvironment ( filename, config ) + util.mergeTables ( PITO_FILES, config.PITO_FILES) + util.mergeTables ( COPY_FILES, config.COMMON ) - - util.mergeTables ( COPY_FILES, config[DEV_PLATFORM] ) - + util.mergeTables ( CLEAN_DIRS, config.CLEAN_DIRS ) + util.mergeTables ( CLEAN_DIRS, config['CLEAN_DIRS_'..DEV_PLATFORM]) end --============================================================== @@ -78,15 +87,25 @@ else moaiexec ( './prepare-sdk-osx.sh' ) end +for k, v in pairs ( PITO_FILES ) do + v = v == true and k or v + print ( 'COPYING:', k, v ) + MOAIFileSystem.copy ( PITO_HOME .. k, OUTPUT_DIR .. v ) +end + + + for k, v in pairs ( COPY_FILES ) do v = v == true and k or v print ( 'COPYING:', k, v ) - MOAIFileSystem.copy ( MOAI_SDK_HOME .. k, OUTPUT_DIR .. v ) + MOAIFileSystem.copy ( MOAI_SDK_HOME .. k, OUTPUT_DIR..'/sdk/moai/' .. v ) end -for i, v in ipairs ( CLEAN_DIRS ) do - print ( 'CLEANING:', v ) - MOAIFileSystem.deleteDirectory ( OUTPUT_DIR .. v, true ) +for k, v in pairs ( CLEAN_DIRS ) do + print ( 'CLEANING:', k ) + MOAIFileSystem.deleteDirectory ( OUTPUT_DIR..'/sdk/moai/'.. k, true ) end -moaiexec ( 'pito make-lua-docs -o "%sdocs/sdk-lua-reference"', OUTPUT_DIR ) +MOAIFileSystem.deleteFile( OUTPUT_DIR..'scripts/env-local.sh') +MOAIFileSystem.deleteFile( OUTPUT_DIR..'scripts/env-local.bat') +--moaiexec ( 'pito make-lua-docs -o "%sdocs/sdk-lua-reference"', OUTPUT_DIR ) diff --git a/util/package-community-sdk/moai-debugger/hostconfig.lua b/util/package-community-sdk/moai-debugger/hostconfig.lua new file mode 100644 index 0000000..9620c02 --- /dev/null +++ b/util/package-community-sdk/moai-debugger/hostconfig.lua @@ -0,0 +1,43 @@ + ApplicationId = "com.moaiforge.MoaiDebugger" --be sure to change this! + AppName = "Moai Debugger" + CompanyName = "" + LuaSrc = "src" + HostSettings = { + ["android"] = { + -- Facebook app ID for use with moai-android-facebook + FBAppId = 0, + -- google app id for use with Google Play Services + GMSAppId = 0, + -- scheme name , url scheme name for launching app + SchemeName ="moaidebug" + --icons, valid keys are: hdpi,mdpi,xhdpi,xxhdpi, paths can be relative to this config file + --Icons = { + -- hdpi = "hostconfig/android/icons/hdpi/icon.png', + -- mdpi = "hostconfig/android/icons/mdpi/icon.png , + -- xxhdpi = "" --leave blank to remove the default moai icon for this resolution + -- } + }, + + ["windows"] = { + ----you can configure a custom icon. path is relative to this config file + --Icon = "hostconfig/windows/dp.ico" + + ----The executable file description + --ExeDescription = "Another Great Moai Game" + + }, + + ["html"] = { + --you can configure a background image for the player, a splash or title screen like those seen on youtube + --Background = "hostconfig/html/background.png" + + --you can also set the ram in MB to be allocated + --Ram = 256 + }, + + ["osx"] = { + --configure custom icon with path relative to this config file + --Icon = "hostconfig/osx/app.png" + } + + } diff --git a/util/package-community-sdk/moai-debugger/src/main.lua b/util/package-community-sdk/moai-debugger/src/main.lua new file mode 100644 index 0000000..a393132 --- /dev/null +++ b/util/package-community-sdk/moai-debugger/src/main.lua @@ -0,0 +1 @@ +puts("error: this should have been replaced with your code.") \ No newline at end of file diff --git a/util/package-community-sdk/moai-sdk/README.md b/util/package-community-sdk/moai-sdk/README.md new file mode 100644 index 0000000..89bc1f9 --- /dev/null +++ b/util/package-community-sdk/moai-sdk/README.md @@ -0,0 +1,151 @@ +##Moai Community SDK 1.7 + +The community SDK bundles a tested version of libmoai and a suite of tools to allow you to quickly create moai projects and export to multiple platforms. + +##Building Moai + +The community releases for windows and osx include a precompiled moai desktop binary in the bin folder to help you get started quickly. +You can add the bin folder to your path and you will be able to run any Moai script from any folder. + +While you can use the moai desktop binary provided to run your moai lua code, you will eventually want to build your own host. Building your own host is required to run and deploy your project on other platforms (android, ios, html) or to customize the desktop version with your own icon and customisations or in preparation for submission to an app store. + +###Install prerequisites + +To build/rebuild the moai libraries ensure you have the prequisites for your target operating system installed: + +####Windows Requirements +* [Visual Studio 2015 (Community edition is free)](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx) +* [CMake 3.1+](https://cmake.org/download) + +####OSX and iOS Requirements +* Xcode 7+ + +####Linux Requirements +* [CMake 3.1+](https://cmake.org/download) +* `apt-get install cmake git-core build-essential libglu1-mesa-dev libxmu-dev libxi-dev libxxf86vm-dev libxcb-util0-dev` + +####Android Requirements +* [Oracle Java JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html) +* [Android Studio and SDK](http://developer.android.com/sdk/index.html) +* [Android NDK r10e+](http://developer.android.com/ndk/downloads/index.html) + +####HTML/JS Requirements +* [Emscripten SDK 1.25+](http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html) +* [CMake 3.1+](https://cmake.org/download) +* _(windows only)_ [mingw32-make](http://tdm-gcc.tdragon.net/download) + +###Configure the SDK + +Once the prerequisites are installed, you will need to tell the SDK where to find all the pieces. +In the `scripts` folder of the SDK, there is a `env-local.(bat|sh).template` file which contains the +environment variables that the SDK uses to find its prerequisites. Create a copy the file and remove the `.template` suffix. +Edit the values in there to point to the required locations. Note that not all of the variables are mandatory. + + +###Build Libmoai for your platform + +The first step is to compile libmoai for your desired platforms. +From the SDK/scripts directory run `env-win.bat` or `source env-osx.sh` or +`source env-linux.sh` to setup your environment. + +To build the library for each platform run the corresponding `build-xxxxx` file in the script folder: + +* For Windows: `build-windows`, `build-android`, `build-html` +* For Linux: `build-linux`, `build-android`, `build-html` +* For OSX: `build-osx`, `build-ios`, `build-android`, `build-html` + +`build-windows`, `build-osx`, `build-linux` also build the basic SDL host for the platform as well as the libraries + +###Create A Project + +You now should have a Moai binary for your current host and a libmoai built for each platform. +We can use the `pito` command to manage our projects and hosts going forward. + +To create a project with pito: + +* Ensure that the `sdk\bin` folder is on your path. +* Find or create a folder (with no spaces in the path) to place your moai project +* Create a new project using `pito new-project ` +* cd into `` folder to see the new project. + +###Write and Run your game code + +With the project setup, you can write your lua game code. Put a main.lua file in the `src` subfolder. +```lua +print("Hello World") +``` + +You can run this now by typing `moai` from the src folder. You should see the Moai version followed by `Hello World`. + +###Create project specific hosts + +Although you can just use the moai binary from the sdk to ship your product, the odds are you will want to create a custom host. + +Managing and building these per platform hosts can be a headache and repeating the process for each project can get annoying. +Thankfully this sdk provides a set of utility scripts to help with building and creating moai projects called `pito`. + + pito: https://en.wiktionary.org/wiki/pito + + +####Edit hostconfig.lua + +`pito` uses a lua based config file `hostconfig.lua` to create host projects with the correct settings and correct lua src location. +The `hostconfig.lua` file in your project directory contains default settings for each platform, and should be edited to setup the name, source location, icon etc for the project you wish to build. + + +####Creating a host project for a platform + +You can create (or recreate) a host project for a particular platform by running + +```bash +pito host create +``` + +where `host-name` is the name of the host you want to create (normally named after the target plaform). For a list of supported host-names run + +```bash +pito host list +``` + +The created host will be in a subfolder called `hosts\` in your current project. + + +#### Customising the created host project + +To customize the created host, you can just edit the files in `hosts\` using either the ide (xcode, visual studio, android studio) for the project, or just with a text editor. + +A better option (when applicable) is to just update the `hostconfig.lua` with new values and run `pito host create ` again. +This will remove your old `hosts/` folder and create a new host with new settings. +The advantage of this method is that you can recreate your host projects after updating the moai sdk to get all the latest fixes or customisations you have made to the sdk. + + +#### Building the created host projects + +To build the created hosts you can launch the created project in the relevant ide (xcode, visual studio, android studio) or you can run + +```bash +pito host build +``` + +or + +```bash +pito host run +``` + +These scripts will create the host if it doesn't exist, then build it using the build.sh|bat script in the host directory. +The run command will also call the run.bat|sh script in the host directory (if available) to launch the build application. +_NB You may need to ensure you environment is configured via the `env-xxxx` script again)_ + + +###Done + +You can now build moai from source and create games. You have full control over your build. +Time to grab your favourite editor, IDE and produce that next/first title. + +Brush up on how the Moai SDK works from a lua perspective by reading [the basics](http://moaiforge.com/community-docs/docs/basics/moai-sdk-basics-part-one.html) + +Or + +Update your hello world application you just made into a real game by following +the [Rocket Lobster](http://moaiforge.com/community-docs/docs/tutorial/your-first-game-rocket-lobster.html) tutorial diff --git a/util/package-cmake-sdk/moai-sdk/docs/Moai Coding Style Guide.pdf b/util/package-community-sdk/moai-sdk/docs/Moai Coding Style Guide.pdf similarity index 100% rename from util/package-cmake-sdk/moai-sdk/docs/Moai Coding Style Guide.pdf rename to util/package-community-sdk/moai-sdk/docs/Moai Coding Style Guide.pdf diff --git a/util/package-cmake-sdk/moai-sdk/legal/attribution images/moaiattribution_horiz_black.png b/util/package-community-sdk/moai-sdk/legal/attribution images/moaiattribution_horiz_black.png similarity index 100% rename from util/package-cmake-sdk/moai-sdk/legal/attribution images/moaiattribution_horiz_black.png rename to util/package-community-sdk/moai-sdk/legal/attribution images/moaiattribution_horiz_black.png diff --git a/util/package-cmake-sdk/moai-sdk/legal/attribution images/moaiattribution_horiz_white.png b/util/package-community-sdk/moai-sdk/legal/attribution images/moaiattribution_horiz_white.png similarity index 100% rename from util/package-cmake-sdk/moai-sdk/legal/attribution images/moaiattribution_horiz_white.png rename to util/package-community-sdk/moai-sdk/legal/attribution images/moaiattribution_horiz_white.png diff --git a/util/package-cmake-sdk/moai-sdk/legal/attribution images/moaiattribution_vert_black.png b/util/package-community-sdk/moai-sdk/legal/attribution images/moaiattribution_vert_black.png similarity index 100% rename from util/package-cmake-sdk/moai-sdk/legal/attribution images/moaiattribution_vert_black.png rename to util/package-community-sdk/moai-sdk/legal/attribution images/moaiattribution_vert_black.png diff --git a/util/package-cmake-sdk/moai-sdk/legal/attribution images/moaiattribution_vert_white.png b/util/package-community-sdk/moai-sdk/legal/attribution images/moaiattribution_vert_white.png similarity index 100% rename from util/package-cmake-sdk/moai-sdk/legal/attribution images/moaiattribution_vert_white.png rename to util/package-community-sdk/moai-sdk/legal/attribution images/moaiattribution_vert_white.png diff --git a/util/package-cmake-sdk/moai-sdk/legal/legal.txt b/util/package-community-sdk/moai-sdk/legal/legal.txt similarity index 100% rename from util/package-cmake-sdk/moai-sdk/legal/legal.txt rename to util/package-community-sdk/moai-sdk/legal/legal.txt diff --git a/util/package-cmake-sdk/moai-sdk/legal/license.txt b/util/package-community-sdk/moai-sdk/legal/license.txt similarity index 100% rename from util/package-cmake-sdk/moai-sdk/legal/license.txt rename to util/package-community-sdk/moai-sdk/legal/license.txt diff --git a/util/package-cmake-sdk/prepare-sdk-osx.sh b/util/package-community-sdk/prepare-sdk-osx.sh old mode 100755 new mode 100644 similarity index 100% rename from util/package-cmake-sdk/prepare-sdk-osx.sh rename to util/package-community-sdk/prepare-sdk-osx.sh diff --git a/util/package-community-sdk/prepare-sdk-windows.bat b/util/package-community-sdk/prepare-sdk-windows.bat new file mode 100644 index 0000000..19d5f93 --- /dev/null +++ b/util/package-community-sdk/prepare-sdk-windows.bat @@ -0,0 +1,23 @@ + +pushd +cd %~dp0%..\..\ +setlocal + +call scripts\env-win.bat || goto :error +call scripts\build-all-windows.bat || goto :error + +call %~dp0%\build-android-apk.bat || goto :error + +cd sdk\moai\vs2015 || goto :error +git clean -d -f -x + +popd +goto :end + +:error +endlocal +echo "error during build" +exit /b 1 + +:end +endlocal \ No newline at end of file diff --git a/util/pito.bat b/util/pito.bat deleted file mode 100644 index a73c460..0000000 --- a/util/pito.bat +++ /dev/null @@ -1,25 +0,0 @@ -@echo off -setlocal -set SCRIPT_DIR=%~dp0% -set INVOKE_DIR=%CD% -set SDK_HOME=%SCRIPT_DIR%\..\ -set MOAI_CMD=%1 - -rem pito scripts assume pito is on the path -set PATH=%PATH%;%SCRIPT_DIR% - -set args=%INVOKE_DIR% %SDK_HOME% %MOAI_CMD% - -shift - -:parse -if "%~1" neq "" ( - set args=%args% %1 - shift - goto :parse -) -pushd %SCRIPT_DIR% -moai pito.lua %args% -popd - -endlocal diff --git a/util/pito.lua b/util/pito.lua index f3231db..d932d71 100644 --- a/util/pito.lua +++ b/util/pito.lua @@ -8,7 +8,8 @@ require ( 'http' ) INVOKE_DIR = MOAIFileSystem.getAbsoluteDirectoryPath ( arg [ 1 ]) MOAI_SDK_HOME = MOAIFileSystem.getAbsoluteDirectoryPath ( arg [ 2 ]) MOAI_CMD = arg [ 3 ] -SCRIPT_DIR = string.format ( '%sutil/%s/', MOAI_SDK_HOME, MOAI_CMD or "help" ) +SCRIPT_DIR = string.format ( '%s/%s/', MOAIFileSystem.getWorkingDirectory (), MOAI_CMD or "help" ) +PITO_HOME = MOAIFileSystem.getAbsoluteDirectoryPath (MOAIFileSystem.getWorkingDirectory ()..'../') local usageText={} usageText["wut"] = [[ @@ -24,14 +25,11 @@ usageText["environment"] = [[ (Follow instructions) ]] -usageText["init"] = [[ - pito init - Run from your project folder to initialize a pito-managed set of host projects. - Creates a hostconfig.lua file, which you must edit to describe your MOAI project. - Example: - mkdir newMOAIProject && cd newMOAIProject # use the toolbelt in a new project - pito init - vi hostconfig.lua #&etc. +usageText["new-project"] = [[ + pito new-project + Creates a folder called in the current directory and sets it up for moai development. + Currently this means a src subfolder with simple sample and a hostconfig.lua file + **Project name cannot have spaces** ]] usageText["host"] = [[ @@ -51,40 +49,10 @@ usageText["host"] = [[ pito host create host osx-app && #etc. ]] -usageText["make-lua-docs"] = [[ - pito make-lua-docs - Creates compact documentation for the Lua-side of the MOAI API. -]] - -usageText["make-cpp-docs"] = [[ - pito make-cpp-docs - Creates compact documentation from the MOAI C/C++ codebase. - Example: - cd newMOAIProject && pito make-cpp-docs - find moai-sdk/ #&etc. -]] - -usageText["package-cmake-sdk"] = [[ - pito package-cmake-sdk - Creates a distributable SDK based on cmake-driven MOAI build. - Example: - cd newMOAIProject && pito package-cmake-sdk - find moai-sdk/ #&etc. -]] - -usageText["package-sdk"] = [[ - pito package-sdk - Create the standard release of the MOAI SDK. -]] - -usageText["run-samples"] = [[ - pito run-samples - Run the MOAI samples. -]] - -usageText["run-tests"] = [[ - pito run-tests - Run the Test suite. +usageText["build-sample-browser"] = [[ + pito build-sample-browser + Builds a local copy of the samples that can be viewed by modern browser + -o : defaults to ./sample-browser ]] usageText["sdk-version"] = [[ diff --git a/util/run/lib/android-helper.lua b/util/run/lib/android-helper.lua new file mode 100644 index 0000000..1fd0a6b --- /dev/null +++ b/util/run/lib/android-helper.lua @@ -0,0 +1,341 @@ +local M = {} +local M_mt = { __index = M } + + + +function M:findJava() + + local fromenv = os.getenv("JAVA_HOME") + if fromenv then return MOAIFileSystem.getAbsoluteDirectoryPath(fromenv.."/bin") end + + --it is just on the path on osx + if MOAIEnvironment.osBrand == MOAIEnvironment.OS_BRAND_OSX then return "" end + + + return false +end +function M:findAndroidSdk() + local fromenv = os.getenv("ANDROID_SDK_ROOT") or os.getenv("ANDROID_HOME") or os.getenv("ANDROID_SDK_HOME") + if fromenv then return fromenv end + + + if MOAIEnvironment.osBrand == 'Windows' then + local appdata = os.getenv("LOCALAPPDATA") + if (appdata and MOAIFileSystem.checkPathExists(appdata.."\\android\\sdk")) then + return MOAIFileSystem.getAbsoluteDirectoryPath(appdata.."\\android\\sdk") + end + elseif MOAIEnvironment.osBrand == 'Linux' then + local home = os.getenv("HOME") + local sdkpath = home.."/android-sdk-linux" + if (home and MOAIFileSystem.checkPathExists(sdkpath)) then + return sdkpath + end + else + local home = os.getenv("HOME") + if (home and MOAIFileSystem.checkPathExists(home.."/Library/Android/sdk")) then + return home.."/Library/Android/sdk" + end + end + + return false +end + + +function M:latestBuildToolsPath() + local buildToolsRoot = MOAIFileSystem.getAbsoluteDirectoryPath(self.sdkPath.."/build-tools") + local files = MOAIFileSystem.listDirectories(buildToolsRoot) + if #files > 0 then + local currentBest = "" + local currentVersion = 0 + for _,v in ipairs(files) do + local major,minor,build = v:match("(%d-)%.(%d-)%.(%d+)") + if major then + local thisversion = major*1000000+minor*1000+build + if thisversion > currentVersion then + currentVersion = thisversion + currentBest = v + end + end + end + if currentVersion > 0 then + return MOAIFileSystem.getAbsoluteDirectoryPath(buildToolsRoot.."/"..currentBest) + end + return false + else + return false + end +end + +function M:adbBin() + local adbExecutable = "adb"..self.exeExt + return MOAIFileSystem.getAbsoluteFilePath(self.sdkPath.."/platform-tools/"..adbExecutable) +end + +function M:jarCommand(args) + local jar = self.javaPath.."jar"..self.exeExt + local cmd = string.format('"%s" %s', jar, args); + + if (MOAIEnvironment.osBrand == 'Windows') then cmd = '"'..cmd..'"' end + + return os.execute(cmd) +end + + +function M:jarsignerCommand(args) + local jar = self.javaPath.."jarsigner"..self.exeExt + local cmd = string.format('"%s" %s', jar, args); + + if (MOAIEnvironment.osBrand == 'Windows') then cmd = '"'..cmd..'"' end + + return os.execute(cmd) +end + +function M:adbCommand(args) + local adb = self:adbBin() + local cmd = string.format('"%s" %s', adb, args); + + if (MOAIEnvironment.osBrand == 'Windows') then cmd = '"'..cmd..'"' end + + return os.execute(cmd) +end + + + +function M:extractApk(apk, dest) + local oldworkdir = MOAIFileSystem.getWorkingDirectory() + MOAIFileSystem.setWorkingDirectory(dest) + local result = self:jarCommand('xf "'..apk..'"') + MOAIFileSystem.setWorkingDirectory(oldworkdir) + return result +end + +function M:createApk(apksrc, destApk) + local oldworkdir = MOAIFileSystem.getWorkingDirectory() + MOAIFileSystem.setWorkingDirectory(apksrc) + local result = self:jarCommand('cf "'..destApk..'" .') + MOAIFileSystem.setWorkingDirectory(oldworkdir) + return result +end + +function M:signApk(apk, keystore, storepass, alias) + + + if not keystore then + local home = false + if MOAIEnvironment.osBrand == 'Windows' then + home = os.getenv("USERPROFILE") + else + home = os.getenv("HOME") + end + if not home then + print("No keystore found. Could not find $HOME path") + return false + end + home = MOAIFileSystem.getAbsoluteDirectoryPath(home) + keystore = MOAIFileSystem.getAbsoluteFilePath(home..".android/debug.keystore") + storepass = "android" + alias = "androiddebugkey" + end + + + print("Signing apk with debug key from "..keystore) + if not MOAIFileSystem.checkFileExists(keystore) then + print("no key found at "..keystore) + return false + end + + local cmd = string.format('--verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore "%s" -storepass "%s" "%s" "%s"', keystore, storepass, apk, alias) + return self:jarsignerCommand(cmd) +end + +function M:verifyApk(apk) + return self:jarsignerCommand(string.format("-verify %s",apk)) +end + +function M:zipAlign(apk,dstapk) + local buildtoolpath = self:latestBuildToolsPath() + if not buildtoolpath then + print("Could not find build tools do you have build tools installed") + return false + end + + local zipalign = MOAIFileSystem.getAbsoluteFilePath(string.format("%s/%s",buildtoolpath,"zipalign"..self.exeExt)) + if not (MOAIFileSystem.checkFileExists(zipalign)) then + print("Could not find zipalign binary in build tools: ",zipalign) + return false + end + + local cmd = string.format('"%s" -v 4 "%s" "%s"',zipalign,apk,dstapk) + + if (MOAIEnvironment.osBrand == 'Windows') then cmd = '"'..cmd..'"' end + + return os.execute(cmd) + +end + +function M:installApk(apk,device) + local devicearg = device and string.format("-s %s",device) or "" + local args = string.format('%s install -r "%s"',devicearg, apk) + return self:adbCommand(args) +end + + +local function os_capture(cmd) + local f = io.popen(cmd, 'r') + if not f then return "" end + local s = f:read('*a') + f:close() + return s +end + +function M:dumpManifest(apk) + local buildtoolpath = self:latestBuildToolsPath() + if not buildtoolpath then + print("Could not find build tools do you have build tools installed") + return false + end + local aapt = MOAIFileSystem.getAbsoluteFilePath(string.format("%s/%s",buildtoolpath,"aapt"..self.exeExt)) + if not (MOAIFileSystem.checkFileExists(aapt)) then + print("Could not find aapt binary in build tools: ",aapt) + return false + end + + local cmd = string.format('"%s" d xmltree "%s" AndroidManifest.xml',aapt, apk) + if (MOAIEnvironment.osBrand == 'Windows') then cmd = '"'..cmd..'"' end + --get contents of file and return + return os_capture(cmd) +end + +function M:parseManifest(apk) + + local man = self:dumpManifest(apk) + if not man then + return false + end + + local oldDepth = "" + local rootNode = { name="ROOT", attributes = {}, children = {} } + local depthNodes = {[" "] = rootNode} + local currentNode = rootNode + + for line in man:gmatch("[^\r\n]+") do + local depth, nodeType, value = line:match("( -)([AEN]+): (.+)") + if depth ~= oldDepth then + currentNode = depthNodes[depth] + assert(currentNode, "Could not find parent for xml output line") + oldDepth = depth + end + + if nodeType == "A" or nodeType == "N" then + local name,avalue = value:match("(.-)=(.+)") + name = name:match("(.-)%(.-%)") or name + currentNode.attributes[name] = avalue:match('"(.+)" %(Raw: .-%)') or avalue + end + if nodeType == "E" then + --make new node + local newNode = { name=value:match("(.-) %(.-%)") , attributes = {}, children = {} } + depthNodes[depth.." "] = newNode + table.insert(currentNode.children,newNode) + end + end + + return rootNode + +end + + +function M:getApkMainActivity(apk) + local man = self:parseManifest(apk) + if not man then return false end + + local function where(tab, func) + local res = {} + for k,v in ipairs(tab) do + if func(v) then table.insert(res,v) end + end + return res + end + + local function childrenByName(node, name) + local res = {} + if not node then return res end + return where(node.children, function(c) return c.name == name end) + end + + local function childByName(node, name) + return childrenByName(node, name)[1] + end + + local manifest = childByName(man,'manifest') + if not manifest then return false end + + local package = manifest.attributes['package'] + + local application = childByName(manifest, 'application') + + local mainactivity = where(childrenByName(application,'activity'), function(act) + local intentfilters = childrenByName(act,'intent-filter') + local mainIntents = where(intentfilters, function(int) + local action = childrenByName(int,"action")[1] + return action and action.attributes['android:name'] == 'android.intent.action.MAIN' + end) + return #mainIntents > 0 + end)[1] + + if package and mainactivity and mainactivity.attributes['android:name'] then + return string.format("%s/%s",package, mainactivity.attributes['android:name']) + else + return false + end + + +end + +--[[ +C:\Users\David\AppData\Local\Temp\pitoApkRun-794207\apkSrc>C:\Users\David\AppData\Local\Android\sdk\build-tools\23.0.1\aapt.exe d xmltree ..\pito-run.apk AndroidManifest.xml +N: android=http://schemas.android.com/apk/res/android + E: manifest (line=2) + A: android:versionCode(0x0101021b)=(type 0x10)0x1 + A: android:versionName(0x0101021c)="1.0" (Raw: "1.0") + A: package="com.moaiforge.moaidebugger" (Raw: "com.moaiforge.moaidebugger") + A: platformBuildVersionCode=(type 0x10)0x16 (Raw: "22") + A: platformBuildVersionName="5.1.1-1819727" (Raw: "5.1.1-1819727") + E: uses-sdk (line=7) + A: android:minSdkVersion(0x0101020c)=(type 0x10)0x11 + A: android:targetSdkVersion(0x01010270)=(type 0x10)0x16 + E: uses-permission (line=11) + A: android:name(0x01010003)="android.permission.ACCESS_NETWORK_STATE" (Raw: "android.permission.ACCESS_NETWORK_STATE") + E: application (line=13) + A: android:theme(0x01010000)=@0x7f0b0004 + A: android:label(0x01010001)=@0x7f0a0012 + A: android:icon(0x01010002)=@0x7f02004d + A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff + A: android:allowBackup(0x01010280)=(type 0x12)0xffffffff + E: activity (line=18) + A: android:label(0x01010001)=@0x7f0a0012 + A: android:name(0x01010003)="com.moaisdk.moai.MainActivity" (Raw: "com.moaisdk.moai.MainActivity") + E: intent-filter (line=21) + E: action (line=22) + A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN") + E: category (line=24) + A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER") + ]]-- + +function M:runActivity(activity,device) + --TODO parse that crap above and get package name, and MainActivity. + --Maybe for now we just use package, since mainactivity is kept the same for pito + local devicearg = device and string.format("-s %s",device) or "" + local args = string.format('%s shell am start -a android.intent.action.MAIN -n %s',devicearg, activity) + return self:adbCommand(args) +end + + + +return function() + local obj = {} + setmetatable(obj,M_mt) + obj.sdkPath = obj:findAndroidSdk() + obj.javaPath = obj:findJava() + obj.exeExt = MOAIEnvironment.osBrand == 'Windows' and '.exe' or '' + return obj +end diff --git a/util/run/main.lua b/util/run/main.lua new file mode 100644 index 0000000..431f3af --- /dev/null +++ b/util/run/main.lua @@ -0,0 +1,214 @@ +package.path = package.path..';'..SCRIPT_DIR..'?.lua' +MOAIFileSystem.setWorkingDirectory(INVOKE_DIR) + +HOSTS_FOLDER = INVOKE_DIR..'/hosts' +io.stdout:setvbuf('no') + + +function command_error(message) + print() + print("ERROR: "..message) + print() + os.exit(1) +end + +local START_FILE = MOAIFileSystem.getAbsoluteFilePath("src/main.lua") +local runtype = 'desktop' +local activity = false +local package = false +for i, escape, param, iter in util.iterateCommandLine ( arg or {}) do + + if (param) then + if escape == 's' or escape == 'start' then + START_FILE = MOAIFileSystem.getAbsoluteFilePath(param) + end + if escape == 'p' or escape == 'package' then + package = MOAIFileSystem.getAbsoluteDirectoryPath(param) + end + if escape == 'activity' then + activity = param + end + + end + if escape == 'a' or escape == 'android' then + runtype = 'android' + end +end +--sanity check +assert(MOAIFileSystem.checkFileExists(START_FILE), "Could not find specified start file: "..tostring(START_FILE)) + + + + +-- default is to run desktop version +local srcdir = util.getFolderFromPath(START_FILE) +local srcFile = util.getFilenameFromPath(START_FILE) + + +function getTempDir() + local tempdir = false + if MOAIEnvironment.osBrand == 'Windows' then + tempdir = os.getenv("TEMP") or os.getenv("TMP") + else + tempdir = "/tmp" + end + assert(tempdir, "Could not file temp directory") + + tempdir = MOAIFileSystem.getAbsoluteDirectoryPath(tempdir) + math.randomseed( os.time() ) + --now append some random stuff + tempdir = tempdir.."pitoApkRun-"..tostring(math.random(1000000)) + + MOAIFileSystem.affirmPath(tempdir) + assert(MOAIFileSystem.checkPathExists(tempdir),"Could not create temp dir at "..tostring(tempdir)) + return MOAIFileSystem.getAbsoluteDirectoryPath(tempdir) +end + + + +if (runtype == 'android') then + --run android + if package and not MOAIFileSystem.checkFileExists(package) then + error("Apk specified was not found") + end + + if not package then + -- find host package + package = HOSTS_FOLDER..'/android/moai/build/outputs/apk/moai-debug.apk' + if not MOAIFileSystem.checkFileExists(package) then + package = PITO_HOME..'/lib/android/apk/moai-debug.apk' + if not MOAIFileSystem.checkFileExists(package) then + error("Could not find a suitable apk to launch, either it needs to be built or you need -p") + end + end + end + + local android = require('lib.android-helper')() + assert(android.sdkPath, "Could not determine path to android SDK, try setting ANDROID_SDK_HOME") + assert(android.javaPath, "Could not determine path to Java, try setting JAVA_HOME") + assert(android:adbBin(), "Could not determine location of adb binary") + assert(android:latestBuildToolsPath(), "Could not determine the latest build tools path in the android sdk") + print("Building new apk using",package,"as a base") + + local tempdir = getTempDir() + local apktmp = MOAIFileSystem.getAbsoluteDirectoryPath(tempdir.."/apkSrc") + MOAIFileSystem.affirmPath(apktmp) + + --extract + print("Extracting apk") + assert(android:extractApk(package, apktmp), "Could not extract src apk:"..tostring(package)) + --unsign + print("Unsigning apk") + local signDir = MOAIFileSystem.getAbsoluteDirectoryPath(apktmp.."META-INF") + if MOAIFileSystem.checkPathExists(signDir) then + assert(MOAIFileSystem.deleteDirectory(apktmp.."META-INF", true), "Could not delete signing information from src apk:"..tostring(signDir)) + end + print("Copying assets") + --overwrite assets (keep in mind that this doesn't remove unused assets) + local srcOut = apktmp..'assets/' + MOAIFileSystem.affirmPath(srcOut) + assert(MOAIFileSystem.copy(srcdir, srcOut),"could not copy assets into apk dir: "..tostring(srcDir).."->"..tostring(srcOut)) + + if (string.lower(srcFile) ~= "main.lua") then + print("Patching start file") + assert(MOAIFileSystem.checkFileExists(srcOut.."bootstrap.lua"), "Unable to set custom start file "..tostring(srcFile).." could not find bootstrap.lua in"..tostring(srcOut)) + util.replaceInFiles ({ + [ srcOut.."bootstrap.lua"] = { + ['main%.lua'] = srcFile, + } + }) + end + + print ("Compressing apk") + local unalignedApk = MOAIFileSystem.getAbsoluteFilePath(tempdir.."pito-unaligned.apk") + local alignedApk = MOAIFileSystem.getAbsoluteFilePath(tempdir.."pito-run.apk") + assert(android:createApk(apktmp, unalignedApk), "could not create apk from src: "..tostring(apktmp).."->"..tostring(unalignedApk)) + + print ("signing apk") + assert(android:signApk(unalignedApk),"could not sign apk") + + print ("verify apk") +-- assert(android:verifyApk(unalignedApk),"verification of apk failed") + + print ("zipalign apk") + MOAIFileSystem.deleteFile(alignedApk) + assert(android:zipAlign(unalignedApk, alignedApk),"zip align failed") + + print ("installing apk") + assert(android:installApk(alignedApk), "failed to install apk") + + print ("running apk") + local mainActivity = activity or android:getApkMainActivity(alignedApk) + assert(mainActivity, "failed to determine the main activity from parsing the manifest in the apk, please provide one with --activity") + android:runActivity(mainActivity) + + return +elseif (runtype ~= 'desktop') then + command_error("unsupported run type "..tostring(runtype)) +end + + + +if not MOAIFileSystem.setWorkingDirectory(srcdir) then + command_error("Could not change into src dir:"..srcdir) +end + +print ("Launching "..srcdir..srcFile) + +function runWindows() + local moai = 'moai' + local vs2015moai = HOSTS_FOLDER..'/vs2015/Debug/Moai.exe' + local vs2013moai = HOSTS_FOLDER..'/vs2013/Debug/Moai.exe' + + if MOAIFileSystem.checkFileExists(vs2015moai) then + moai = vs2015moai + print("Running custom host: "..vs2015moai) + elseif MOAIFileSystem.checkFileExists(vs2013moai) then + moai = vs2013moai + print("Running custom host: "..vs2013moai) + else + print("Running bundled Moai") + end + print("\nOutput:\n") + print(moai..' "'..srcFile..'"') + os.execute(moai..' "'..srcFile..'"') +end + +function runLinux() + -- TODO execute custom host if found + local moai = 'moai' + local custommoai = HOSTS_FOLDER..'/linux/build/debug/moai' + if MOAIFileSystem.checkFileExists(custommoai) then + print("Running custom host: "..custommoai) + moai = custommoai + else + print("Running bundled Moai") + end + print("\nOutput:\n") + os.execute(moai..' "'..srcFile..'"') +end + +function runOsx() + local moai = MOAIFileSystem.getAbsoluteFilePath(PITO_HOME)..'/bin/moai' + print("Running bundled Moai") + print("\nOutput:\n") + os.execute(moai..' "'..srcFile..'"') +end + + + +--which host +if (MOAIEnvironment.osBrand == 'Windows') then + runWindows() +elseif (MOAIEnvironment.osBrand == 'Linux') then + runLinux() +else + runOsx() +end + +MOAIFileSystem.setWorkingDirectory(INVOKE_DIR) + + + + + diff --git a/util/sdk-version/main.lua b/util/sdk-version/main.lua new file mode 100644 index 0000000..95b0e79 --- /dev/null +++ b/util/sdk-version/main.lua @@ -0,0 +1,8 @@ +--============================================================== +-- args +--============================================================== + +VERSION = dofile ( MOAI_SDK_HOME..'/util/sdk-version/version.lua' ) + + +print ( string.format ( 'MOAI SDK VERSION IS %d.%d.%d', VERSION.MAJOR, VERSION.MINOR, VERSION.REVISION or -1 )) diff --git a/util/serve/main.lua b/util/serve/main.lua new file mode 100644 index 0000000..2f3d15e --- /dev/null +++ b/util/serve/main.lua @@ -0,0 +1,12 @@ +server = MOAIHttpServer.new () +MOAIFileSystem.setWorkingDirectory(INVOKE_DIR) + + + +server:start ({ + listening_ports = '8080', + document_root = INVOKE_DIR +}) +print("Listening on http://localhost:8080") +print("Press any key to exit") +io.read() \ No newline at end of file diff --git a/util/util.lua b/util/util.lua new file mode 100644 index 0000000..10251f9 --- /dev/null +++ b/util/util.lua @@ -0,0 +1,912 @@ +module ( 'util', package.seeall ) + +require ( 'os' ) +require ( 'string' ) + +local osx = MOAIEnvironment.osBrand == 'OSX' + + arrayToSet = nil + compile = nil + copy = nil + copyFiles = nil + dofileWithEnvironment = nil + escape = nil +local exec = nil + getAbsoluteDirPath = nil + getFilenameFromPath = nil + getFilenameExt = nil + getFolderFromPath = nil + hash = nil + hashDirectory = nil + hashFile = nil + isAbsPath = nil + isMember = nil + isSysPath = nil + iterateCommandLine = nil + iterateFiles = nil + iterateFilesAbsPath = nil +local iterateFilesImplementation = nil + iterateSingleOrArray = nil + joinTables = nil + listDirectories = nil + listFiles = nil + loadFileAsString = nil +local makeDlcResourceSig = nil + makeExecutable = nil + makeStoreEntryFunc = nil + mergeTables = nil + moaiexec = nil + move = nil + onEntryCompile = nil + onEntryCopy = nil + onEntryStore = nil + os = nil + pack = nil + package = nil + pairsByKeys = nil + powerIter = nil + printTable = nil + pruneEmptyDirs = nil + quantize = nil + readFileAll = nil + replaceInFile = nil + replaceInFiles = nil + saveTable = nil + scanFiles = nil + timestamp = nil + tokens = nil + tokenize = nil + trim = nil + wrap = nil + zip = nil + +-- osx needs special treatment +local moaiCopy = MOAIFileSystem.copy +if osx then + MOAIFileSystem.copy = function ( srcpath, dstpath ) return copy ( dstpath, srcpath ) end +end + +---------------------------------------------------------------- +arrayToSet = function ( array ) + + local set = {} + for i, entry in ipairs ( array or {}) do + set [ entry ] = true + end + + return set +end + +---------------------------------------------------------------- +compile = function ( dstpath, srcpath ) + + local should = COMPILE + + if should then + should = not isMember ( DONT_COMPILE, srcpath ) + end + + if should then + + local dstDir = getFolderFromPath ( dstpath ) + MOAIFileSystem.affirmPath ( dstDir ); + + local cmd = osx and 'luac -s -o %s %s' or '..\\util\\luac\\win\\luac -s -o %s %s' + exec ( cmd, dstpath, srcpath ) + else + copy ( dstpath, srcpath ) + end +end + +---------------------------------------------------------------- +copy = function ( dstpath, srcpath ) + + if osx then + --print("COPY: \"" .. srcpath .. "\" -> \"" .. dstpath .. "\"") + -- awful, but until there's a better way... + --moaiCopy( srcpath, dstpath ) + + -- so awful + if (false) then + print( "Warning! removal operation: " .. string.format ( 'rm -fr \"%s\"', dstpath )) + os.execute ( string.format ( 'rm -fr \"%s\"', dstpath )) + end + + -- less awful: ditto + --local cmd = string.format ( 'cp -rp \"%s\" \"%s\"', srcpath, dstpath ) + local cmd = string.format ( 'ditto \"%s\" \"%s\"', srcpath, dstpath ) + --print("COPY COMMAND: " .. cmd) + + local res = os.execute ( cmd ) + return res == 0 + else + return moaiCopy ( srcpath, dstpath ) + end +end + +---------------------------------------------------------------- +copyFiles = function ( srcRoot, dstRoot, paths, process ) + + for dest, source in pairs ( paths ) do + local srcpath = srcRoot .. ( type ( source ) == 'string' and source or dest ) + local dstpath = dstRoot .. dest + process ( dstpath, srcpath ) + end +end + +---------------------------------------------------------------- +dofileWithEnvironment = function ( filename, env, ... ) + + if MOAIFileSystem.checkFileExists ( filename ) then + local chunk = assert ( loadfile ( filename )) + setfenv ( chunk, env or getfenv ( 2 )) + return chunk ( ... ) + end +end + +---------------------------------------------------------------- +escape = function ( path ) + return osx and path or string.gsub ( path, '/', '\\' ) +end + +---------------------------------------------------------------- +exec = function ( cmd, path1, path2 ) + + path1 = path1 and escape ( path1 ) + path2 = path2 and escape ( path2 ) + + path1 = MOAIFileSystem.getAbsoluteFilePath ( path1 ) + path2 = MOAIFileSystem.getAbsoluteFilePath ( path2 ) + + cmd = string.format ( cmd, path1, path2 ) + print ( cmd ) + os.execute ( cmd ) +end + +---------------------------------------------------------------- +getAbsoluteDirPath = function ( path, base ) + + if base and not ( string.match ( path, '^/' ) or string.match ( path, '^\\' )) then + path = base .. path + end + + return MOAIFileSystem.getAbsoluteDirectoryPath ( path ) +end + +---------------------------------------------------------------- +getFilenameFromPath = function ( path ) + + return string.match ( path, "[/]?([^/]+)$" ) +end + +---------------------------------------------------------------- +getFilenameExt = function ( path ) + return string.match ( path, '.([^%.\\/]*)$' ) or '' +end + +---------------------------------------------------------------- +getFolderFromPath = function ( path ) + + return string.sub ( path, 1, string.len ( path ) - string.len ( getFilenameFromPath ( path ))) +end + +---------------------------------------------------------------- +hash = function ( path ) + + if MOAIFileSystem.checkPathExists ( path ) then return hashDirectory ( path ) end + if MOAIFileSystem.checkFileExists ( path ) then return hashFile ( path ) end +end + +---------------------------------------------------------------- +hashDirectory = function ( path ) + + path = MOAIFileSystem.getAbsoluteDirectoryPath ( path ) + + local allFiles = {} + + local scanRecurse + scanRecurse = function ( localPath ) + + local files = MOAIFileSystem.listFiles ( localPath ) or {} + for k, entry in pairs ( files ) do + local fullpath = string.format ( '%s/%s', localPath, entry ) + if not isMember ( FILTER, fullpath ) then + table.insert ( allFiles, fullpath ) + end + end + + local dirs = MOAIFileSystem.listDirectories ( localPath ) or {} + for k, entry in pairs ( dirs ) do + local fullpath = string.format ( '%s%s/', localPath, entry ) + if not ( isMember ( FILTER, fullpath ) or isSysPath ( fullpath )) then + scanRecurse ( fullpath ) + end + end + end + + scanRecurse ( path ) + table.sort ( allFiles ) + + local writer = MOAIHashWriter.new () + writer:openMD5 () + + for i, filename in ipairs ( allFiles ) do + local file = MOAIFileStream.new () + file:open ( filename ) + writer:write ( file:read ()) + file:close () + end + + writer:close () + + return writer:getHashHex () +end + +---------------------------------------------------------------- +hashFile = function ( filename ) + + local file = MOAIFileStream.new () + file:open ( filename ) + local data = file:read () + file:close () + + local writer = MOAIHashWriter.new () + writer:openMD5 () + writer:write ( data ) + writer:close () + + return writer:getHashHex () +end + +---------------------------------------------------------------- +isAbsPath = function ( path ) + + local c = string.byte ( path ) + return ( c == 0x5C ) or ( c == 0x2F ) -- hex codes for '/' and '\' +end + +---------------------------------------------------------------- +isMember = function ( array, str ) + + if array then + for i, entry in ipairs ( array ) do + if string.find ( str, entry, 1, true ) then + return true + end + end + end + + return false +end + +---------------------------------------------------------------- +isSysPath = function ( str ) + + if str == '.' then return true end + if str == '..' then return true end + + return false +end + +---------------------------------------------------------------- +iterateCommandLine = function ( arg ) + + local commands = function () + + local currentEscape + local iter = powerIter ( ipairs ( arg )) + + iter.next = function () + local i, v = iter () + return v + end + + for i, v in iter do + + local escape = string.match ( v, '^%-%-([%w-]+)' ) + + if escape then + currentEscape = escape + coroutine.yield ( currentEscape, nil, iter ) + else + local escapeStr = string.match ( v, '^%-(%a+)' ) + + if escapeStr then + for j = 1, #escapeStr do + currentEscape = string.sub ( escapeStr, j, j ) + coroutine.yield ( currentEscape, nil, iter ) + end + else + coroutine.yield ( currentEscape, v, iter ) + end + end + end + end + + local co = coroutine.wrap ( commands ) + + local c = 0 + + return function () + local escape, param, iter = co () + if escape or param then + c = c + 1 + return c, escape, param, iter + end + end +end + +---------------------------------------------------------------- +iterateFiles = function ( path, fileFilter, recurse ) + + return iterateFilesImplementation ( path, fileFilter, false, recurse ) +end + +---------------------------------------------------------------- +iterateFilesAbsPath = function ( path, fileFilter ) + + return iterateFilesImplementation ( path, fileFilter, true, recurse ) +end + +---------------------------------------------------------------- +iterateFilesImplementation = function ( path, fileFilter, absPath, recurse ) + + recurse = recurse or true + + path = MOAIFileSystem.getAbsoluteDirectoryPath ( path ) + local prefix = absPath and path or '' + + local match = function () return true end + + if type ( fileFilter ) == 'function' then + match = fileFilter + end + + + if type ( fileFilter ) == 'string' then + match = function ( filename ) return string.find ( filename, fileFilter ) end + end + + if type ( fileFilter ) == 'table' then + match = function ( filename ) + for i, p in ipairs ( fileFilter ) do + if string.find ( filename, p ) then return true end + end + end + end + + local doRecurse + doRecurse = function ( dirname ) + + local files = MOAIFileSystem.listFiles ( path .. dirname ) or {} + for i, filename in ipairs ( files ) do + if match ( filename ) then + coroutine.yield ( string.format ( '%s%s%s', prefix, dirname, filename )) + end + end + + if recurse then + local dirs = MOAIFileSystem.listDirectories ( path .. dirname ) or {} + for i, subdir in ipairs ( dirs ) do + doRecurse ( string.format ( '%s%s/', dirname, subdir )) + end + end + end + + local co = coroutine.create ( function () + doRecurse ( '' ) + end ) + + return function () + local status, result = coroutine.resume ( co ) + return status and result or nil + end +end + +---------------------------------------------------------------- +iterateSingleOrArray = function ( item ) + + if type ( item ) == 'table' then + return ipairs ( item ) + end + + return function () + if item then + local temp = item + item = nil + return 1, temp + end + end +end + +---------------------------------------------------------------- +joinTables = function ( t1, t2 ) + + local t = {} + + for i, v in ipairs ( t1 or {}) do + table.insert ( t, v ) + end + + for i, v in ipairs ( t2 or {}) do + table.insert ( t, v ) + end + + return t +end + +---------------------------------------------------------------- +listDirectories = function ( path ) + + return MOAIFileSystem.listDirectories ( path ) +end + +---------------------------------------------------------------- +listFiles = function ( path, ... ) + + local extensions = { ... } + + local files = MOAIFileSystem.listFiles ( path ) + assert ( files, string.format ( 'listFiles (): NO SUCH PATH %s', path )) + + if #extensions > 0 then + + for i, extension in ipairs ( extensions ) do + extensions [ i ] = string.format ( '.%s$', extension ) + end + + local filtered = {} + for i, filename in ipairs ( files ) do + for j, extension in ipairs ( extensions ) do + if string.find ( filename, extension ) then + table.insert ( filtered, filename ) + end + end + end + return filtered + end + + return files +end + +---------------------------------------------------------------- +loadFileAsString = function ( filename ) + + local str + + local fp = io.open ( filename, 'r' ) + if fp then + str = fp:read ( "*all" ) + fp:close () + end + + return str +end + +---------------------------------------------------------------- +makeExecutable = function ( path ) + if MOAIEnvironment.osBrand ~= 'Windows' then + os.execute ( "chmod a+x "..path ) + end +end + +---------------------------------------------------------------- +makeDlcResourceSig = function ( path, md5 ) + + local path = string.gsub ( path, '[\\/]', '.' ) + return string.lower ( string.format ( '%s~%s', path, md5 )) +end + +---------------------------------------------------------------- +makeEnvironment = function ( env ) + + env = env or {} + setmetatable ( env, { __index = getfenv ( 2 ), __newindex = rawset }) + return env +end + +---------------------------------------------------------------- +makeStoreEntryFunc = function ( packingList ) + + local func = function ( indir, outdir, entry ) + return onEntryStore ( packingList, indir, outdir, entry ) + end + + return func +end + +---------------------------------------------------------------- +mergeTables = function ( t1, t2 ) + + t1 = t1 or {} + if t2 then + for k, v in pairs ( t2 ) do + t1 [ k ] = v + end + end + return t1 +end + +---------------------------------------------------------------- +moaiexec = function ( cmd, ... ) + local result = os.execute ( string.format ( cmd, ... )) + if not result == 0 then os.exit ( result ) end + return result +end + +---------------------------------------------------------------- +move = function ( dstpath, srcpath ) + + local cmd = osx and 'mv -f %s %s' or 'move /y %s %s' + exec ( cmd, srcpath, dstpath ) +end + +---------------------------------------------------------------- +osname = function () + + return osx and 'osx' or 'win' +end + +---------------------------------------------------------------- +pack = function ( ... ) + return { ... } +end + +---------------------------------------------------------------- +package = function ( dstpath, srcpath ) + + if string.match ( srcpath, '%.lua' ) then + util.compile ( dstpath, srcpath ) + elseif string.match ( srcpath, '%.png' ) then + util.quantize ( dstpath, srcpath ) + else + util.copy ( dstpath, srcpath ) + end +end + +---------------------------------------------------------------- +pairsByKeys = function ( t, f ) + + local a = {} + for n in pairs ( t ) do table.insert ( a, n ) end + table.sort ( a, f ) + + local i = 0 -- iterator variable + local iter = function () -- iterator function + i = i + 1 + if a [ i ] == nil then + return nil + else + return a [ i ], t [ a [ i ]] + end + end + + return iter +end + +---------------------------------------------------------------- +powerIter = function ( iter, state, var ) + + local c = 0 + local step = 1 + local entries = {} + local done = false + + local cursor + local next + local set + + cursor = function () + return c + end + + next = function () + set ( c + step ) + local entry = entries [ c ] + if entry then return unpack ( entry ) end + end + + set = function ( j, s ) + + step = s or step + + if j > #entries and not done then + for k = #entries + 1, j do + + local entry = pack ( iter ( state, var )) + var = entry [ 1 ] + + if var then + entries [ k ] = entry + else + done = true + break + end + end + end + + c = j + end + + local wrapper = { + cursor = cursor, + next = next, + set = set, + } + + setmetatable ( wrapper, { __call = next }) + return wrapper +end + +---------------------------------------------------------------- +printTable = function ( t, d ) + + local depth = d or 0 + local indent = "" + for i = 1, depth do indent = indent .. "> " end + for i, item in pairs ( t ) do + + io.write ( indent ) + print ( i, item ) + if type ( item ) == "table" then + printTable ( item, depth + 1 ) + end + end +end + +---------------------------------------------------------------- +pruneEmptyDirectories = function ( dir ) + + local totalFiles = 0 + + local files = MOAIFileSystem.listFiles ( dir ) or {} + local totalFiles = #files + + local dirs = MOAIFileSystem.listDirectories ( dir ) or {} + for k, entry in pairs ( dirs ) do + totalFiles = totalFiles + pruneEmptyDirectories ( dir .. entry .. '/' ) + end + + if totalFiles == 0 then + MOAIFileSystem.deleteDirectory ( dir ) + end + + return totalFiles +end + +---------------------------------------------------------------- +quantize = function ( dstpath, srcpath ) + + local should = COMPILE + + if should then + should = not isMember ( DONT_COMPILE, srcpath ) + end + + if should then + + local tmp = dstpath .. '.tmp' + copy ( tmp, srcpath ) + + local cmd = osx and '../util/pngnq/mac/pngnq -vf -Qf -s1 -e.png %s' or '..\\util\\pngnq\\win\\pngnqi -vf -Qf -s1 -e.png %s' + exec ( cmd, tmp ) + + MOAIFileSystem.deleteFile ( tmp ) + MOAIFileSystem.rename ( tmp .. '.png', dstpath ) + else + copy ( dstpath, srcpath ) + end +end + +---------------------------------------------------------------- +readFileAll = function ( filename ) + + if MOAIFileSystem.checkFileExists ( filename ) then + local fp = io.open ( filename, "r" ) + local str = fp:read ( "*all" ) + fp:close () + return str + end +end + +---------------------------------------------------------------- +replaceInFile = function ( filename, commands ) + + local fp = io.open ( filename, "r" ) + local str = fp:read ( "*all" ) + fp:close () + + local dirty = false + + for find, replace in pairs ( commands ) do + local n + str, n = string.gsub ( str, find, replace ) + dirty = dirty or n > 0 + end + + if dirty == true then + fp = io.open ( filename, "w+" ) + fp:write ( str ) + fp:close () + end +end + +---------------------------------------------------------------- +replaceInFiles = function ( files ) + + for key, commands in pairs ( files ) do + + local iter + + if type ( key ) == 'string' then + iter = function () + return pairs ({[ key ] = key }) + end + end + + if type ( key ) == 'function' then + iter = key + end + + if iter then + for filename in iter () do + replaceInFile ( filename, commands ) + end + end + end +end + +---------------------------------------------------------------- +saveTable = function ( filename, table, raw ) + + local bytes = MOAISerializer.serializeToString ( table ) + + if not raw then + bytes = string.dump ( loadstring ( bytes, '' )) -- compile to lua bytecode + end + + local fileStream = MOAIFileStream.new () + + fileStream:open ( filename, MOAIFileStream.READ_WRITE_NEW ) + fileStream:write ( bytes ) + fileStream:close () +end + +---------------------------------------------------------------- +scanFiles = function ( srcRoot, dstRoot, exclude, process, localPath ) + + localPath = localPath or '' + + local indir = srcRoot .. localPath + local outdir = dstRoot .. localPath + + local files = MOAIFileSystem.listFiles ( indir ) or {} + for k, entry in pairs ( files ) do + local fullpath = localPath .. entry + if not ( isMember ( FILTER, fullpath ) or isMember ( exclude, fullpath )) then + process ( outdir .. entry, indir .. entry ) + end + end + + local dirs = MOAIFileSystem.listDirectories ( indir ) or {} + for k, entry in pairs ( dirs ) do + local fullpath = localPath .. entry .. '/' + if not ( isMember ( FILTER, fullpath ) or isSysPath ( fullpath )) then + scanFiles ( srcRoot, dstRoot, exclude, process, localPath .. entry .. '/' ) + end + end +end + +--------------------------------------------------------------- +timestamp = function () + return os.date ( '%y_%m_%d_%H.%M.%S', os.time ()) +end + +--------------------------------------------------------------- +tokenize = function ( str, sep ) + + local sep, fields = sep or ' ', {} + local pattern = str.format ( "([^%s]+)", sep ) + str:gsub ( pattern, function ( c ) fields [ #fields + 1 ] = c end ) + return fields +end + +---------------------------------------------------------------- +tokens = function ( s, patterns ) + + if type ( patterns ) == 'string' then + patterns = { patterns } + end + + local start, finish, id + + local nextCapture = function () + + if s and start == nil then + + for i, pattern in ipairs ( patterns ) do + + local ts, tf = string.find ( s, pattern ) + if ts and (( start == nil ) or ( ts < start )) then + start, finish = ts, tf + id = i + end + + if start == 1 then break end + end + end + + if start then + if start > 1 then + local result = string.sub ( s, 1, start - 1 ) + s = string.sub ( s, start ) + + finish = finish - start + 1 + start = 1 + + return result + end + + local result = string.sub ( s, 1, finish ) + s = string.sub ( s, finish + 1 ) + start, finish = nil, nil + return result, id + end + + local result = s + s = nil + return result + end + + return nextCapture +end + +---------------------------------------------------------------- +function trim ( str, p1, p2 ) + + local wsp = '[%s]*' + + p1 = p1 or wsp + p2 = p2 or wsp + + local s, f + + if p1 ~= '' then + s, f = string.find ( str, '^' .. p1 ) + if s then str = string.sub ( str, f + 1 ) end + end + + if p2 ~= '' then + s, f = string.find ( str, p2 .. '$' ) + if s then str = string.sub ( str, 1, s - 1 ) end + end + + return str +end + +---------------------------------------------------------------- +wrap = function ( f, ... ) + + local params = { ... } + + return function () + return f ( unpack ( params )) + end +end + +---------------------------------------------------------------- +zip = function ( dstpath, srcpath ) + + if not MOAIFileSystem.checkPathExists ( srcpath ) then return end + + srcpath = escape ( srcpath ) + + local fullpath = escape ( MOAIFileSystem.getAbsoluteFilePath ( dstpath )) + local cwd = escape ( MOAIFileSystem.getWorkingDirectory ()) + MOAIFileSystem.setWorkingDirectory ( srcpath ) + + local cmd = osx and 'zip -r %s *' or '7z a -tzip -r %s .\\*' + exec ( cmd, fullpath ) + + MOAIFileSystem.setWorkingDirectory ( cwd ) +end