Adding initial commit

This commit is contained in:
underscorediscovery
2013-06-23 00:24:09 -02:30
parent 182dbbe66b
commit 7ce604c914
174 changed files with 144817 additions and 3 deletions

View File

@@ -0,0 +1,41 @@
/*
* Main.mm
*
* Boot code for NME.
*
*/
#include <stdio.h>
extern "C" const char *hxRunLibrary();
extern "C" void hxcpp_set_top_of_stack();
::foreach ndlls::
::if (registerStatics)::
extern "C" int ::name::_register_prims();
::end::
::end::
extern "C" int main(int argc, char *argv[])
{
//printf("Starting ...\n" );
hxcpp_set_top_of_stack();
::foreach ndlls::
::if (registerStatics)::
::name::_register_prims();
::end::
::end::
//printf("Running\n");
const char *err = NULL;
err = hxRunLibrary();
if (err) {
printf(" Error %s\n", err );
return -1;
}
//printf("Done!\n");
return 0;
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>get-task-allow</key>
<true/>
</dict>
</plist>

View File

@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>Icon.png</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
::if (HAS_ICON)::
<string>Icon.png</string>
<string>Icon@2x.png</string>
<string>Icon-72.png</string>
<string>Icon-72@2x.png</string>
::end::
::if (HAS_LAUNCH_IMAGE)::
<string>Default.png</string>
<string>Default@2x.png</string>
<string>Default-Portrait~ipad.png</string>
<string>Default-Portrait@2x~ipad.png</string>
<string>Default-Landscape~ipad.png</string>
<string>Default-Landscape@2x~ipad.png</string>
::end::
</array>
<key>UIPrerenderedIcon</key>
<::PRERENDERED_ICON::/>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>::APP_PACKAGE::</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>::APP_BUILD_NUMBER::</string>
<key>CFBundleShortVersionString</key>
<string>::APP_VERSION::</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIStatusBarHidden</key>
<::WIN_FULLSCREEN::/>
::if (IOS_APP_ORIENTATION != null)::
<key>UISupportedInterfaceOrientations</key>
::IOS_APP_ORIENTATION::::end::
<key>UIRequiredDeviceCapabilities</key>
<dict>
::foreach REQUIRED_CAPABILITY::
<key>::name::</key>
::if value::<true/>::else::<false/>::end::
::end::
</dict>
</dict>
</plist>

View File

@@ -0,0 +1,14 @@
//
// Prefix header for all source files of the '::APP_FILE::' target in the '::APP_FILE::' project
//
#import <Availability.h>
#ifndef __IPHONE_3_0
#warning "This project uses features only available in iOS SDK 3.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif

View File

@@ -0,0 +1,4 @@
-main ApplicationMain ::HAXE_FLAGS::
-D iphone
-D ios
--macro allowPackage("flash")

View File

@@ -0,0 +1,67 @@
ifeq ("$(ARCHS)","normal")
ARCHS = armv6 armv7 i386
endif
HAXE_BUILDS := $(ARCHS:%=build-haxe-%)
ifeq ("$(ACTION)","clean")
default: clean
else
default: $(HAXE_BUILDS)
endif
ifeq ("$(CONFIGURATION)","Debug")
BUILD_STYLE := Debug
endif
default: debug_print
ifeq ("$(BUILD_STYLE)","Debug")
DEBUG := -debug
CONFIG := Debug
else
DEBUG :=
CONFIG := Release
endif
ifeq ("$(CLANG_ENABLE_OBJC_ARC)", "YES")
HXCPP_CLANG := -D HXCPP_CLANG -D OBJC_ARC
else
HXCPP_CLANG :=
endif
HAXE_OS := $(PLATFORM_NAME)
ifeq ("$(HAXE_OS)","iphonesimulator")
HAXE_OS := iphonesim
endif
CONFIG := $(CONFIG)-$(HAXE_OS)
debug_print:
@echo "Make $(HAXE_BUILDS)"
LIB_BASE := build/$(CONFIG)/ApplicationMain$(DEBUG)
LIB_DEST := $(DEBUG)/libApplicationMain.a
export HXCPP_COMPILE_THREADS := 2
build-haxe-i386:
@echo "Haxe simulator build CONFIG : $(CONFIG)"
haxe Build.hxml -D simulator -cpp build/$(CONFIG) $(DEBUG) $(HXCPP_CLANG)
cp $(LIB_BASE).iphonesim.a ../lib/i386$(LIB_DEST)
touch ../Classes/Main.mm
build-haxe-armv6:
@echo "Haxe armv6 build CONFIG : $(CONFIG)"
haxe Build.hxml -D HXCPP_ARMV6 -cpp build/$(CONFIG) $(DEBUG) $(HXCPP_CLANG)
cp $(LIB_BASE).iphoneos.a ../lib/armv6$(LIB_DEST)
touch ../Classes/Main.mm
build-haxe-armv7:
@echo "Haxe armv7 build CONFIG : $(CONFIG)"
haxe Build.hxml -D HXCPP_ARMV7 -cpp build/$(CONFIG) $(DEBUG) $(HXCPP_CLANG)
cp $(LIB_BASE).iphoneos-v7.a ../lib/armv7$(LIB_DEST)
touch ../Classes/Main.mm
clean:
rm -rf build