Just create two empty text files and rename + move them like that :
C:\android-ndk-r18b\platforms\android-9\arch-x86\usr\lib\crtbegin_so.o
C:\android-ndk-r18b\toolchains\mipsel-linux-android-4.9\prebuilt\windows\bin\mipsel-linux-android-as.exe
Then install Free Pascal fpc-3.0.4.i386-win32.exe and fpc-3.0.4.i386-win32.cross.android.exe
It works perfectly. And just with that, I'm better than anyone that had that problem on the internet
In the C:\zgameeditor-master\Build\android I had to create lib\arm-linux folders manually because the compiler doesn't seem to be able to create directories:
Code: Select all
jni.pas(539) Error: Can't create assembler file: lib\arm-linux\jni.s
Fatal: I/O error: File not open
Code: Select all
C:\zgameeditor-master\Build\android>C:\fpc\3.0.4\bin\i386-win32\ppcrossarm -B -MDelphi -Sghi -O3 -Tandroid -Parm -XXis -vw -Filib\arm-linux -FlC:\android\android-ndk-r18b\platforms\android-28\arch-arm\usr\lib -Fu. -Fu..\.. -FUlib\arm-linux\ -FEjava\libs\armeabi\ -olibzgeandroid.so -dANDROID -dMINIMAL -Xd -CpARMV6 zgeandroid.pas
Free Pascal Compiler version 3.0.4 [2017/10/07] for arm
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Android for ARMEL
Compiling zgeandroid.pas
Compiling jni.pas
Assembling jni
Compiling C:\zgameeditor-master\ZOpenGL.pas
Compiling C:\zgameeditor-master\ZMath.pas
Compiling C:\zgameeditor-master\ZClasses.pas
ZClasses.pas(585,5) Warning: Constructor should be public
Compiling C:\zgameeditor-master\ZMath.pas
Assembling zmath
Compiling C:\zgameeditor-master\ZLog.pas
Compiling C:\zgameeditor-master\ZPlatform.pas
Compiling C:\zgameeditor-master\AudioPlayer.pas
Compiling C:\zgameeditor-master\AudioComponents.pas
Compiling C:\zgameeditor-master\ZApplication.pas
Compiling C:\zgameeditor-master\Meshes.pas
Compiling C:\zgameeditor-master\ZBitmap.pas
Compiling C:\zgameeditor-master\Renderer.pas
Compiling C:\zgameeditor-master\Meshes.pas
Compiling C:\zgameeditor-master\ZExpressions.pas
Compiling C:\zgameeditor-master\ZApplication.pas
Compiling C:\zgameeditor-master\Meshes.pas
Compiling C:\zgameeditor-master\ZApplication.pas
Compiling C:\zgameeditor-master\Collision.pas
Compiling C:\zgameeditor-master\ZApplication.pas
Compiling C:\zgameeditor-master\Commands.pas
Compiling C:\zgameeditor-master\ZApplication.pas
Compiling C:\zgameeditor-master\GLDrivers.pas
Compiling C:\zgameeditor-master\Renderer.pas
Compiling C:\zgameeditor-master\ZApplication.pas
Compiling C:\zgameeditor-master\GLDrivers.pas
Assembling gldrivers
ZApplication.pas(318,3) Note: Local variable "I" not used
ZApplication.pas(684,10) Note: Local variable "TmpM" not used
Assembling zapplication
Renderer.pas(805,17) Warning: Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.
Renderer.pas(972,23) Warning: Local variable "TextBuf" does not seem to be initialized
Renderer.pas(1465,20) Warning: Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.
Renderer.pas(1466,20) Warning: Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.
Renderer.pas(1606,66) Warning: Local variable "ScaledGravity" does not seem to be initialized
Renderer.pas(1731,5) Note: Local variable "S" is assigned but never used
Renderer.pas(2153,3) Note: Local variable "FilterTypes" not used
Assembling renderer
Assembling commands
Assembling collision
Assembling meshes
ZExpressions.pas(649,5) Warning: Function result variable does not seem to initialized
ZExpressions.pas(1901,28) Warning: Local variable "Dest" does not seem to be initialized
ZExpressions.pas(2039,15) Warning: Arithmetic "+" on untyped pointer is unportable to {$T+}, suggest typecast
ZExpressions.pas(2597,36) Warning: Local variable "V" does not seem to be initialized
Assembling zexpressions
ZBitmap.pas(289,24) Warning: Local variable "NewMemory" does not seem to be initialized
Assembling zbitmap
Compiling C:\zgameeditor-master\BeRoAudioOGGVorbisTremor.pas
Assembling beroaudiooggvorbistremor
Assembling audiocomponents
Assembling audioplayer
Assembling zplatform
Assembling zlog
ZClasses.pas(731,5) Warning: Constructor should be public
ZClasses.pas(802,6) Warning: Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.
ZClasses.pas(803,14) Warning: Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.
ZClasses.pas(1223,1) Warning: Function result variable does not seem to initialized
ZClasses.pas(1347,23) Warning: Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.
ZClasses.pas(2154,15) Warning: Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.
ZClasses.pas(3992,19) Warning: Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.
ZClasses.pas(3992,38) Warning: Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.
Assembling zclasses
Assembling zopengl
Compiling C:\zgameeditor-master\BitmapProducers.pas
Compiling C:\zgameeditor-master\NanoJpeg.pas
Assembling nanojpeg
BitmapProducers.pas(342,18) Warning: Local variable "Y" does not seem to be initialized
BitmapProducers.pas(341,18) Warning: Local variable "X" does not seem to be initialized
BitmapProducers.pas(983,34) Warning: Local variable "CP" does not seem to be initialized
Assembling bitmapproducers
Compiling C:\zgameeditor-master\Animators.pas
Assembling animators
Compiling C:\zgameeditor-master\Steering.pas
Steering.pas(493,37) Warning: Local variable "ClosestPoint" does not seem to be initialized
Assembling steering
Compiling C:\zgameeditor-master\ImplicitMeshes.pas
ImplicitMeshes.pas(196,5) Warning: Constructor should be public
Assembling implicitmeshes
Compiling C:\zgameeditor-master\ZFile.pas
ZFile.pas(236,23) Warning: Local variable "NameBuf" does not seem to be initialized
Assembling zfile
Assembling zgeandroid
Linking java\libs\armeabi\libzgeandroid.so
39211 lines compiled, 6.3 sec
25 warning(s) issued
4 note(s) issued
From C:\zgameeditor-master\Build\android\java\m.bat it should be in a bin folder somewhere:
Code: Select all
copy bin\ZGEAndroid-debug.apk C:\Data\Delphi32\ZzDC_Public\tools\ZDesigner\exe\Android
copy libs\armeabi\libzgeandroid.so C:\Data\Delphi32\ZzDC_Public\tools\ZDesigner\exe\Android\Template\base\libs\armeabi
copy src\org\zgameeditor\*.java C:\Data\Delphi32\ZzDC_Public\tools\ZDesigner\exe\Android\Template\base\src\org\zgameeditor
Edit:
I've started preparing a "8" folder in ZGameEditor\Android\Template\ with the new libs\armeabi\libzgeandroid.so inside and I'm setting up the AndroidManifest.xml
But what about src\org\zgameeditor\Zge.java ? Do I need to do something with that or should I copy the one from the 4.1 folder?
(By the way, shouldn't it be better to name those folders after the API number instead of the Android number?
And I've added '8.0 (API Level 26)' to the export dialogue box of ZApplication.pas
But I'm not sure how it calls the correct android template folder afterward...
Edit 2:
In my '8' folder, I have:
- A default.properties with target=android-26
- A modified AndroidManifest.xml
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="$package$"
android:versionCode="$versionnumber$"
android:versionName="$versionname$" >
<uses-sdk android:minSdkVersion="26"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.gamepad" />
<application
android:icon="@drawable/icon"
android:label="$title$" >
<meta-data android:name="isGame" android:value="true" />
<activity
android:label="$title$"
android:name="org.zgameeditor.ZgeActivity"
android:configChanges="screenLayout|orientation|keyboardHidden|fontScale"
android:screenOrientation="sensorLandscape" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
The apk is generated correctly, but when I try to install it to the phone, it says that "There was a problem parsing the package"...
Edit 3:
My bad, I forgot that my phone is a bit old.
So I changed the AndroidManifest.xml to that:
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26"/>
Now the install is working but the game crashes at launch. Back to debug mode.