Commit df95668bb56b02516b5ec3d79a9dd721ffe34056

Authored by Arthur Bikmullin
1 parent 44640dc0

Fixed some android builder issues

... ... @@ -49,9 +49,9 @@ Class AndroidBuilder Extends Builder
49 49
50 50 SetEnv "ANDROID_SDK_DIR",tcc.ANDROID_PATH.Replace( "\","\\" )
51 51
52   - SetConfigVar "ANDROID_MAINFEST_MAIN",GetConfigVar( "ANDROID_MANIFEST_MAIN" ).Replace( ";","~n" )+"~n"
53   - SetConfigVar "ANDROID_MAINFEST_APPLICATION",GetConfigVar("ANDROID_MANIFEST_APPLICATION").Replace(";", "~n")+"~n"
54   - SetConfigVar "ANDROID_MAINFEST_ACTIVITY",GetConfigVar("ANDROID_MAINFEST_ACTIVITY").Replace(";", "~n")+"~n"
  52 + SetConfigVar "ANDROID_MANIFEST_MAIN",GetConfigVar( "ANDROID_MANIFEST_MAIN" ).Replace( ";","~n" )+"~n"
  53 + SetConfigVar "ANDROID_MANIFEST_APPLICATION",GetConfigVar( "ANDROID_MANIFEST_APPLICATION" ).Replace( ";","~n" )+"~n"
  54 + SetConfigVar "ANDROID_MANIFEST_ACTIVITY",GetConfigVar( "ANDROID_MAINFEST_ACTIVITY" ).Replace( ";","~n" )+"~n"
55 55
56 56 'create package
57 57 Local jpath:="src"
... ... @@ -124,7 +124,19 @@ Class AndroidBuilder Extends Builder
124 124 For Local lib:=Eachin GetConfigVar( "LIBS" ).Split( ";" )
125 125 Select ExtractExt( lib )
126 126 Case "jar","so"
127   - CopyFile lib,"libs/"+StripDir( lib )
  127 + Local tdir:=""
  128 + If lib.Contains( "/" )
  129 + tdir=ExtractDir( lib )
  130 + If tdir.Contains( "/" ) tdir=StripDir( tdir )
  131 + Select tdir
  132 + Case "x86","mips","armeabi","armeabi-v7a"
  133 + CreateDir "libs/"+tdir
  134 + tdir+="/"
  135 + Default
  136 + tdir=""
  137 + End
  138 + Endif
  139 + CopyFile lib,"libs/"+tdir+StripDir( lib )
128 140 End
129 141 Next
130 142
... ...
... ... @@ -42,9 +42,9 @@ Class AndroidNdkBuilder Extends Builder
42 42 Method MakeTarget:Void()
43 43
44 44 SetConfigVar "ANDROID_SDK_DIR",tcc.ANDROID_PATH.Replace( "\","\\" )
45   - SetConfigVar "ANDROID_MAINFEST_MAIN",GetConfigVar( "ANDROID_MANIFEST_MAIN" ).Replace( ";","~n" )+"~n"
46   - SetConfigVar "ANDROID_MAINFEST_APPLICATION",GetConfigVar("ANDROID_MANIFEST_APPLICATION").Replace(";", "~n")+"~n"
47   - SetConfigVar "ANDROID_MAINFEST_ACTIVITY",GetConfigVar("ANDROID_MAINFEST_ACTIVITY").Replace(";", "~n")+"~n"
  45 + SetConfigVar "ANDROID_MANIFEST_MAIN",GetConfigVar( "ANDROID_MANIFEST_MAIN" ).Replace( ";","~n" )+"~n"
  46 + SetConfigVar "ANDROID_MANIFEST_APPLICATION",GetConfigVar( "ANDROID_MANIFEST_APPLICATION" ).Replace( ";","~n" )+"~n"
  47 + SetConfigVar "ANDROID_MANIFEST_ACTIVITY",GetConfigVar( "ANDROID_MAINFEST_ACTIVITY" ).Replace( ";","~n" )+"~n"
48 48
49 49 'create data dir
50 50 CreateDataDir "assets/monkey"
... ... @@ -67,7 +67,27 @@ Class AndroidNdkBuilder Extends Builder
67 67 If Not CreateDirRecursive( dir ) Error "Failed to create dir:"+dir
68 68 SaveString jmain,dir+"/MonkeyGame.java"
69 69
70   - 'SRCS...
  70 + 'create 'libs' dir
  71 + For Local lib:=Eachin GetConfigVar( "LIBS" ).Split( ";" )
  72 + Select ExtractExt( lib )
  73 + Case "jar","so"
  74 + Local tdir:=""
  75 + If lib.Contains( "/" )
  76 + tdir=ExtractDir( lib )
  77 + If tdir.Contains( "/" ) tdir=StripDir( tdir )
  78 + Select tdir
  79 + Case "x86","mips","armeabi","armeabi-v7a"
  80 + CreateDir "libs/"+tdir
  81 + tdir+="/"
  82 + Default
  83 + tdir=""
  84 + End
  85 + Endif
  86 + CopyFile lib,"libs/"+tdir+StripDir( lib )
  87 + End
  88 + Next
  89 +
  90 + 'copy src files
71 91 For Local src:=Eachin GetConfigVar( "SRCS" ).Split( ";" )
72 92 Select ExtractExt( src )
73 93 Case "java","aidl"
... ... @@ -80,14 +100,6 @@ Class AndroidNdkBuilder Extends Builder
80 100 End
81 101 Next
82 102
83   - 'LIBS...
84   - For Local lib:=Eachin GetConfigVar( "LIBS" ).Split( ";" )
85   - Select ExtractExt( lib )
86   - Case "jar","so"
87   - CopyFile lib,"libs/"+StripDir( lib )
88   - End
89   - Next
90   -
91 103 'templates/
92 104 For Local file:=Eachin LoadDir( "templates",True )
93 105
... ...