Mark Sibly 7 лет назад
Родитель
Сommit
8e7cc6714d
4 измененных файлов с 29 добавлено и 33 удалено
  1. 12 8
      src/mx2cc/builder.monkey2
  2. 10 1
      src/mx2cc/buildproduct.monkey2
  3. 1 1
      src/mx2cc/mx2cc.monkey2
  4. 6 23
      src/mx2cc/test.monkey2

+ 12 - 8
src/mx2cc/builder.monkey2

@@ -780,17 +780,21 @@ Class BuilderInstance
 				Return
 			Endif
 			
-		Else If GetFileType( path )=FileType.Directory
+		Else If Not path.Contains( "$(TARGET_ARCH" )
 			
-			product.ASSET_FILES.Push( path )
-			Return
+			If GetFileType( path )=FileType.Directory
+				
+				product.ASSET_FILES.Push( path )
+				Return
+				
+			Else If GetFileType( path )<>FileType.File
+				
+				If Not opts.geninfo New BuildEx( "File not found "+qpath )
+					
+				Return
 			
-		Else If GetFileType( path )<>FileType.File
+			Endif
 			
-			If Not opts.geninfo New BuildEx( "File not found "+qpath )
-				
-			Return
-		
 		Endif
 		
 		Select ext

+ 10 - 1
src/mx2cc/buildproduct.monkey2

@@ -726,8 +726,15 @@ Class AndroidBuildProduct Extends BuildProduct
 		
 		buf.Push( "APP_ABI := "+GetEnv( "MX2_ANDROID_APP_ABI","armeabi-v7a" ) )
 		
-		buf.Push( "APP_PLATFORM := "+GetEnv( "MX2_ANDROID_APP_PLATFORM","10" ) )
+		buf.Push( "APP_PLATFORM := "+GetEnv( "MX2_ANDROID_APP_PLATFORM","android-14" ) )
 		
+		buf.Push( "APP_CFLAGS := "+GetEnv( "MX2_ANDROID_APP_CFLAGS","-std=gnu99 -fno-stack-protector" ) )
+		
+		buf.Push( "APP_CPPFLAGS := "+GetEnv( "MX2_ANDROID_APP_CPPFLAGS","-std=c++11 -fno-stack-protector -frtti -fexceptions" ) )
+		
+		buf.Push( "APP_STL := "+GetEnv( "MX2_ANDROID_APP_STL","c++_static" ) )
+		
+		#rem
 		buf.Push( "APP_CFLAGS += -std=gnu99" )
 		buf.Push( "APP_CFLAGS += -fno-stack-protector" )
 		
@@ -738,6 +745,8 @@ Class AndroidBuildProduct Extends BuildProduct
 		
 		buf.Push( "APP_STL := c++_static" )
 		
+		#end
+		
 		CSaveString( buf.Join( "~n" ),jniDir+"Application.mk" )
 		
 		buf.Clear()

+ 1 - 1
src/mx2cc/mx2cc.monkey2

@@ -24,7 +24,7 @@ Global opts_time:Bool
 
 Global StartDir:String
 
-Const TestArgs:="mx2cc makemods"	' -clean gles20"
+Const TestArgs:="mx2cc makemods -target=android"
 
 'Const TestArgs:="mx2cc makedocs mojo"
 'Const TestArgs:="pyro-framework pyro-gui pyro-scenegraph pyro-tiled"

+ 6 - 23
src/mx2cc/test.monkey2

@@ -1,29 +1,12 @@
-Namespace myapp
-
-#Import "<std>"
-#Import "<mojo>"
-
-Using std..
-
-Class C
-	
-	Field x:Int
-	
-	Property X:Int()
-		
-		Return x
-		
-	Setter( x:Int )
-		
-		Self.x=x
-	End
-End
 
 Function Main()
 	
-	Local c:=New C
+	Local test:="Привет Мир!"
+	
+	Print test
 	
-	c.X=10
+	For Local i:=0 until test.Length
+		Print test[i]
+	Next
 	
-	Print c.X
 End