Sfoglia il codice sorgente

Updated mx2cc_windows.

Mark Sibly 9 anni fa
parent
commit
f8a2fac590

+ 4 - 0
VERSIONS.TXT

@@ -1,4 +1,8 @@
 
 
+Tidied up chipmunk module.
+
+Added List.RemoveIf and Stack.RemoveIf.
+
 Added Edit->Goto line AT LAST!
 Added Edit->Goto line AT LAST!
 
 
 Fixed TextView.CharRect bug returning bad width.
 Fixed TextView.CharRect bug returning bad width.

BIN
bin/mx2cc_windows.exe


+ 1 - 1
src/mx2cc/builder.monkey2

@@ -576,7 +576,7 @@ Class BuilderInstance
 			ImportSystemFile( path.Slice( 1,-1 ) )
 			ImportSystemFile( path.Slice( 1,-1 ) )
 		Else
 		Else
 			If currentDir path=currentDir+path
 			If currentDir path=currentDir+path
-			ImportLocalFile( path )
+			ImportLocalFile( RealPath( path ) )
 		Endif
 		Endif
 		
 		
 	End
 	End

+ 1 - 1
src/mx2cc/mx2cc.monkey2

@@ -21,7 +21,7 @@ Using mx2..
 
 
 Global StartDir:String
 Global StartDir:String
 
 
-Const TestArgs:="mx2cc makedocs"'mods -clean -target=android"' -config=release monkey lua"
+Const TestArgs:="mx2cc makemods"' monkey libc miniz stb-image stb-image-write stb-vorbis std"
 
 
 'Const TestArgs:="mx2cc makeapp -apptype=console src/mx2cc/test.monkey2"
 'Const TestArgs:="mx2cc makeapp -apptype=console src/mx2cc/test.monkey2"
 
 

+ 4 - 4
src/mx2cc/translator.monkey2

@@ -409,12 +409,12 @@ Class Translator
 		Refs( func.ftype )
 		Refs( func.ftype )
 	End
 	End
 	
 	
-	Method Refs( type:Type )
+	Method Refs( type:Type,ext:Bool=False )
 	
 	
 		Local ctype:=TCast<ClassType>( type )
 		Local ctype:=TCast<ClassType>( type )
 		If ctype
 		If ctype
 			If ctype.cdecl.IsExtern Uses( ctype.transFile ) ; return
 			If ctype.cdecl.IsExtern Uses( ctype.transFile ) ; return
-			If ctype.IsStruct Uses( ctype ) ; Return
+			If Not ext And ctype.IsStruct Uses( ctype ) ; Return
 			If AddRef( ctype ) Return
 			If AddRef( ctype ) Return
 			_deps.refsTypes.Push( ctype )
 			_deps.refsTypes.Push( ctype )
 			Return
 			Return
@@ -429,9 +429,9 @@ Class Translator
 		
 		
 		Local ftype:=TCast<FuncType>( type )
 		Local ftype:=TCast<FuncType>( type )
 		If ftype
 		If ftype
-			Refs( ftype.retType )
+			Refs( ftype.retType,ext )
 			For Local type:=Eachin ftype.argTypes
 			For Local type:=Eachin ftype.argTypes
-				Refs( type )
+				Refs( type,ext )
 			Next
 			Next
 			Return
 			Return
 		Endif
 		Endif

+ 4 - 4
src/mx2cc/translator_cpp.monkey2

@@ -145,13 +145,13 @@ Class Translator_CPP Extends Translator
 
 
 		EmitBr()
 		EmitBr()
 		For Local vvar:=Eachin fdecl.globals
 		For Local vvar:=Eachin fdecl.globals
-			Refs( vvar.type )
+			Refs( vvar.type,True )
 			Emit( "extern "+VarProto( vvar )+";" )
 			Emit( "extern "+VarProto( vvar )+";" )
 		Next
 		Next
 		
 		
 		EmitBr()
 		EmitBr()
 		For Local func:=Eachin fdecl.functions
 		For Local func:=Eachin fdecl.functions
-			Refs( func.ftype )
+			Refs( func.ftype,True )
 			Emit( "extern "+FuncProto( func,True )+";" )
 			Emit( "extern "+FuncProto( func,True )+";" )
 		Next
 		Next
 		
 		
@@ -489,7 +489,7 @@ Class Translator_CPP Extends Translator
 			hasCtor=True
 			hasCtor=True
 			If Not func.ftype.argTypes hasDefaultCtor=True
 			If Not func.ftype.argTypes hasDefaultCtor=True
 			
 			
-			Refs( func.ftype )
+			Refs( func.ftype,True )
 			Emit( FuncProto( func,true )+";" )
 			Emit( FuncProto( func,true )+";" )
 
 
 		Next
 		Next
@@ -507,7 +507,7 @@ Class Translator_CPP Extends Translator
 			
 			
 			If func.fdecl.ident="<=>" hasCmp=True
 			If func.fdecl.ident="<=>" hasCmp=True
 			
 			
-			Refs( func.ftype )
+			Refs( func.ftype,True )
 			Emit( FuncProto( func,True )+";" )
 			Emit( FuncProto( func,True )+";" )
 
 
 		Next
 		Next