Recent

Author Topic: LAMW alternative?  (Read 2612 times)

ArmanHayots

  • New member
  • *
  • Posts: 7
LAMW alternative?
« on: January 01, 2024, 05:55:02 pm »
Any way to integrate fresh Android SDK/NDK (Level 23 as example) into Lazarus without things like LAMW, which limited to the last versions of Windows?
Can I manually configure all what I need?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: LAMW alternative?
« Reply #1 on: January 02, 2024, 05:54:30 am »
Any way to integrate fresh Android SDK/NDK (Level 23 as example) into Lazarus without things like LAMW, which limited to the last versions of Windows?
Can I manually configure all what I need?
Be like LAMW author, invest time and effort in researching the how to. You can do anything, you are the limit.

ArmanHayots

  • New member
  • *
  • Posts: 7
Re: LAMW alternative?
« Reply #2 on: January 02, 2024, 06:14:55 am »
Invest time and effort in researching the how to. You can do anything, you are the limit.

Of course I will, thank you. My research started from this topic as you can see.

af0815

  • Hero Member
  • *****
  • Posts: 1409
Re: LAMW alternative?
« Reply #3 on: January 02, 2024, 06:54:47 am »
BTW, in LAMW and Lazarus you can get and read the sourcecode, both projects are opensource. This can be a second starting point, and LAMW is not limited to the last windows version. But be aware the tools and toolchain are often limited or maintained in the last version of windows only, but this a problem outside of LAMW. LAMW is only the glue for using android.
regards
Andreas

ArmanHayots

  • New member
  • *
  • Posts: 7
Re: LAMW alternative?
« Reply #4 on: January 02, 2024, 09:43:20 am »
I want to do it according to https://fpcwiki.coderetro.net/Android_tutorial, but with more modern versions of API and in case of success update that tutorial.
I have installed latest (r26b) SDK and NDK, built aarch64-linux-android toolchain using build\tools\make_standalone_toolchain.py and do almost all by tutorial except copying of arm-linux-androideabi-*.exe to laz4android folder, 'cause there's no such file.
Tried to build empty test project and it fails with errors like
Code: Text  [Select][+][-]
  1. "C:\Android\laz4android\fpc\3.2.2\bin\i386-win32\aarch64-linux-android-ld.bfd.exe: skipping incompatible C:\Android\android-ndk-r26b\toolchains\llvm\prebuilt\aarch64-linux-android\sysroot\usr\lib\arm-linux-androideabi\23\/libjnigraphics.so when searching for -ljnigraphics"
and that's strange.

If I'm understanding correct, the pipeline of building android apps must not differ much from any other: the fpc must provide object files and ld.bfd tie them within NDK into executable.

UPD: copied ld.bfd.exe from NDK and now got errors like this too

Code: Text  [Select][+][-]
  1. C:\Android\laz4android\fpc\3.2.2\bin\i386-win32\aarch64-linux-android-ld.bfd.exe: cannot find C:\Android\laz4android\fpc\3.2.2\units\aarch64-android\rtl\unixtype.o


UPD2: Looks like I must rebuild fpc with LLVM first.
« Last Edit: January 02, 2024, 12:39:20 pm by ArmanHayots »

Seenkao

  • Hero Member
  • *****
  • Posts: 761
    • New ZenGL.
Re: LAMW alternative?
« Reply #5 on: January 02, 2024, 12:34:57 pm »
Да, можно.
Здесь я выкладывал видео по разработке под Android.
Здесь видео по работе с Android Studio.
к сожаленью видео только на русском.

Вы должны определиться какие приложения вы хотите создавать: нативные, на основе байт-кода или смешанные (java-код + нативный код). LAWM использует смешанные метод. В этом видео я запускаю полностью нативное приложение, которое создано более 10 лет назад.

Для того чтоб самому создавать приложения под Android, надо изучать разработку под Android и желательно на java (kotlin). Когда будет понимание как всё работает, можно будет делать внедрение необходимой версии NDK самому.  Без этих этих знаний, к сожаленью, практически невозможно это сделать.

-------------------------------------------------
Google translate:
Yes, you can.
Here I posted a video on Android development.
Here is a video on working with Android Studio.
Unfortunately the video is only in Russian.

You must decide what kind of applications you want to create: native, bytecode-based or mixed (java code + native code). LAWM uses mixed methods. In this video I launch a completely native application that was created more than 10 years ago.

In order to create applications for Android yourself, you need to study development for Android and preferably in java (kotlin). Once you understand how everything works, you can implement the required version of NDK yourself. Without this knowledge, unfortunately, it is almost impossible to do this.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

ArmanHayots

  • New member
  • *
  • Posts: 7
Re: LAMW alternative?
« Reply #6 on: January 02, 2024, 12:43:57 pm »
Спасибо, изучу. Я ваши видео видел.
Thank you.

Seenkao

  • Hero Member
  • *****
  • Posts: 761
    • New ZenGL.
Re: LAMW alternative?
« Reply #7 on: January 02, 2024, 01:15:51 pm »
Чтоб не заниматься лишним делом (но на самом деле не лишним), не вдаваясь в подробности, можно взять готовые решения и делать всё поверх них.

Основные проблемы, это:
- нативно мы не можем всё исполнить и нам надо всё равно вызывать java код из Паскаля (из любого компилируемого ЯП подходящего для данной платформы).
- надо поддерживать кучу настроек для Android приложения. Обычно это прописано в AndroidManifest, но могут быть ещё дополнительные настройки, в том числе и программные.
- нам надо поддерживать несколько разных архитектур. На данное время основные: ARM32, ARM64, x86, x86_64.

Третья проблема исчезает, если использовать байт-код.

Сейчас проще это сделать используя FPC/Lazarus + Android Studio, но это не точно. FPC сейчас умеет в JVM, потому может и другой способ есть, я в том направлении не изучал ни чего.

-----------------------------------------------
Google translate:
In order not to do unnecessary things (but actually not unnecessary), without going into details, you can take ready-made solutions and do everything on top of them.

The main problems are:
- we cannot execute everything natively and we still need to call java code from Pascal (from any compiled language suitable for a given platform).
- you need to maintain a bunch of settings for the Android application. This is usually specified in the AndroidManifest, but there may be additional settings, including software ones.
- we need to support several different architectures. Currently the main ones are: ARM32, ARM64, x86, x86_64.

The third problem disappears if you use bytecode.

Now it is easier to do this using FPC/Lazarus + Android Studio, but this is not certain. FPC can now be done in the JVM, so maybe there is another way, I haven’t studied anything in that direction.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

ArmanHayots

  • New member
  • *
  • Posts: 7
Re: LAMW alternative?
« Reply #8 on: January 02, 2024, 02:04:58 pm »
For my purposes simple 2D/3D within input handling is more than enough. I'm just looking alternative to JS Canvas/WebGL on a a language more friendly to me and my students.
___________________________________
Мне за глаза хватит простых 2D/3D и обработки ввода. Мы с учениками делали всякое на JS через тот же Canvas (и хотели WebGL), но хотелось бы более производительное и дружелюбное решение.

Seenkao

  • Hero Member
  • *****
  • Posts: 761
    • New ZenGL.
Re: LAMW alternative?
« Reply #9 on: January 02, 2024, 02:22:09 pm »
Какие приложения вы хотите делать?

Google translate:
What kind of applications do you want to make?
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

ArmanHayots

  • New member
  • *
  • Posts: 7
Re: LAMW alternative?
« Reply #10 on: January 02, 2024, 02:25:50 pm »
Простые игры.
_________________
Simple games.

Seenkao

  • Hero Member
  • *****
  • Posts: 761
    • New ZenGL.
Re: LAMW alternative?
« Reply #11 on: January 02, 2024, 02:48:11 pm »
Если простые игры, то можешь взглянуть в сторону ZenGL. По сути там нет проблем с созданием 2D игры. Для 3D придётся руками многое делать. Демки есть. Всё что нужно сделать, это настроить FPC/Lazarus на кросс-компиляцию под нужные платформы, это: arm-android, aarch64-android, i386-android, x86_64-android (либо все, либо какие-то необходимые). Сборка есть как через Eclipse, так и через Android Studio. Для обеих IDE разные демки. Для последних версий Android надо будет использовать только Android Studio, из-за чего и сделал её поддержку.

Да, функционал не блещет, но люди которые знают java спокойно могут добавить необходимый функционал (нет не спокойно, ну можно ко мне обратиться, подскажу как делать, если не разберёшься. Там ест свои проблемы, если вдруг надо будет добавлять именно функционал через java-код).

Так же можно протестировать на ПК демки.

Можно конечно ещё попробовать SDL, но я не видел связки SDL+Pascal+Android.

------------------------------------------------------
Google translate:
If it’s simple games, then you can look towards ZenGL. In fact, there are no problems with creating a 2D game. For 3D you have to do a lot with your hands. There are demos. All you need to do is configure FPC/Lazarus to cross-compile for the required platforms, these are: arm-android, aarch64-android, i386-android, x86_64-android (either all or some required ones). The assembly is available both through Eclipse and through Android Studio. There are different demos for both IDEs. For the latest versions of Android, you will only need to use Android Studio, which is why it is supported.

Yes, the functionality is not brilliant, but people who know java can easily add the necessary functionality (no, not calmly, well, you can contact me, I’ll tell you how to do it if you don’t figure it out. There are problems there, if you suddenly need to add functionality via java- code).

You can also test demos on PC.

You can, of course, also try SDL, but I haven’t seen the SDL+Pascal+Android combination.
Rus: Стремлюсь к созданию минимальных и достаточно быстрых приложений.

Eng: I strive to create applications that are minimal and reasonably fast.
Working on ZenGL

ArmanHayots

  • New member
  • *
  • Posts: 7
Re: LAMW alternative?
« Reply #12 on: January 02, 2024, 02:54:56 pm »
Thank you, will check.

 

TinyPortal © 2005-2018