Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lets try to build Pandroid projects #29

Closed
JanuszChmiel opened this issue Oct 23, 2021 · 18 comments
Closed

lets try to build Pandroid projects #29

JanuszChmiel opened this issue Oct 23, 2021 · 18 comments

Comments

@JanuszChmiel
Copy link

Pandroid is special Pascal language bundle available for Linux and Windows. The advanced programmer uses it to make special database application for his professional working. He has brought The possibility to code in Pascal programming language with no need to work with A separate .xml files to create GUI on The screen. I will upload A sample project, which will only create empty window. But it is A good Pandroid project template. My plan is very realistic. I would like to combine Bash script with special GTK based dialog system to create helper script which would combine yours apk builder with Pandroid.
The following experiment will begin on my flat now.
I will download Pandroid bundle for Linux not for Windows, since bitecode of SDK build tools is very probably different between SDK for Windows and Linux.
Issues are as follows.
Apache ant used to create .apk packages from Pandroid project do not support newer Java than version 7. It is known limitation of The Apache ant and can not be simply solved, because even core developers of Apache Ant do not try to solve this issue.
Unfortunately, it is very unlikely, that someone will obtain Openjdk 7.0 source and would try to make it so stable and reliable from Termux without Proot like todays Open jdk 11.0 is available. It seems to Me, that someone has made it very stable and that someone had to modify its source code.

So what about triing to replace Apache Ant by using APk builder script to build .dex and apk package?

Project is available here.
https://github.com/zeljkoc/Pandroid
git clone https://github.com/zeljkoc/pandroid.git
And I will upload shell script to build .apk as soon as possible. We need to find out how to replace Apache ant by routine used by MR Rausty build apk routines if it will be possible to achieve this goal.

I will be able to use standard Android text editors and I would build .apk by using build apk from Termux.

I Am attaching build.sh and .xml files related to Apache Ant. Author has used Java version 1.6.
build_debug_apk.sh.txt

Sure, remove .txt from The file extension. I need to bypass Github routines.
build.xml.txt

All example projects can be found in The Examples folder. Project as Scrollview is ideal for testing.

@SDRausty
Copy link
Owner

lets try to build Pandroid projects

This sounds fantastic @JanuszChmiel; Please keep us updated of progress!

@SDRausty
Copy link
Owner

SDRausty commented Oct 24, 2021

Facinating!

Languages
Pascal
77.5%

C++
8.4%

Makefile
8.3%

PHP
2.3%

HTML
0.9%

C
0.8%

Other
1.8%

SDRausty referenced this issue in shlibs/shlibs.sh Oct 24, 2021
SDRausty referenced this issue in shlibs/shlibs.bash Oct 24, 2021
SDRausty referenced this issue in shlibs/shlibs.sh Oct 24, 2021
SDRausty referenced this issue in shlibs/shlibs.bash Oct 24, 2021
@SDRausty
Copy link
Owner

download Pandroid bundle for Linux not for Windows, since bitecode of SDK build tools is very probably different between SDK for Windows and Linux.

build.repo.bash https://github.com/zeljkoc/Pandroid/
.
.
.

d ~/buildAPKs/sources/github.com/zeljkoc/Pandroid/
3.5G
find ~/buildAPKs/sources/github.com/zeljkoc/Pandroid/ -type f -name AndroidManifest.xml | wc -l
68
find ~/buildAPKs/sources/github.com/zeljkoc/Pandroid/ -type f -name *pp | wc -l
9237

These extra steps can save gigabites of data:

gcl https://github.com/zeljkoc/Pandroid/
tar zcf Pandroid.tar.gz Pandroid/
mkdir ~/buildAPKs/sources/github.com/zeljkoc/
cp -r Pararoid/ ~/buildAPKs/sources/github.com/zeljkoc/
find ~/buildAPKs/sources/github.com/zeljkoc/Pandroid/ -type f -name build.xml -execdir ant {} \;

@JanuszChmiel
Copy link
Author

JanuszChmiel commented Oct 24, 2021 via email

@SDRausty
Copy link
Owner

These commands want a lib.jar file:
find $RDR/sources/github.com/zeljkoc/ -type f -name build.xml > $RDR/tmp/bfile.file && grep -v '^ *#' < "$RDR"/tmp/bfile.file | while IFS= read -r bfile ; do cd ${bfile%/*} ; ant ; done

These commands want the lib.jar file too:
find $RDR/sources/github.com/zeljkoc/Pandroid/ -type f -name compile.sh > $RDR/tmp/comp.files && grep -v '^ *#' < $RDR/tmp/comp.files | while IFS= read -r CFILES; do $CFILES ; done

Do you know where the lib.jar file is?

@SDRausty
Copy link
Owner

Have you tried these commands?
find $RDR/sources/github.com/zeljkoc/Pandroid/ -type f -name compile.sh > $RDR/tmp/compile.sh.files && grep -v '^ *#' < $RDR/tmp/compile.sh.files | while IFS= read -r CFILES; do cd ${CFILES%/*} ; pwd ; $CFILES ; done

SDRausty referenced this issue in shlibs/shlibs.bash Oct 24, 2021
SDRausty referenced this issue in shlibs/shlibs.bash Oct 24, 2021
SDRausty referenced this issue in shlibs/shlibs.bash Oct 24, 2021
@SDRausty
Copy link
Owner

Please try cp -r ~/github/zeljkoc/Pandroid/* ~/buildAPKs/sources/github.com/zeljkoc/Pandroid/

build.repo.bash https://github.com/zeljkoc/Pandroid/

After using ~/buildAPKs/update.buildAPKs.sh as these commits incorperate our latest work.

SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
@SDRausty
Copy link
Owner

~/.../zeljkoc/Pandroid $ find -type f -name *apk | wc -l 33

@SDRausty
Copy link
Owner

*Do you know where the lib.jar file is located?

SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
@JanuszChmiel
Copy link
Author

JanuszChmiel commented Oct 24, 2021 via email

@JanuszChmiel
Copy link
Author

Here is template.zip. It is from Pandroid for Windows. But never mind, because Pandroid package master, Windows variant is easily to understand how are .pas sources compiled to .class and to .dex format.
I Am sending Template.zip with build.xml file.
And I will finally send long command which generate .class file by compiling .pas sources and some other units. Really, we need to incorporate to yours project, because for now, it is The fastest possible way to build .apk packages on Android device. No chaos, no instability, no need to even enable storage permission by typing termux-setup-storage.
template.zip

SDRausty referenced this issue in shlibs/shlibs.bash Oct 24, 2021
SDRausty referenced this issue in BuildAPKs/buildAPKs.github Oct 24, 2021
@JanuszChmiel
Copy link
Author

Sure. Normal users uses this package by using Lazarus. Some advanced would had to reprogram FPC latest stable to be compatible with Termux. Because to build sources it would be necessary to use FPC compatible with Termux. I will try to kindly ask MR Pliush for help. Deep libraries and C language knowledge is required for this task.

@SDRausty
Copy link
Owner

easier to understand the compilation process

These newly created scripts attempt to automate the build process:

~/buildAPKs $ ls scripts/bash/github/build.repo
build.repo+.bash            
build.repo.build.sh.bash
build.repo.ant.bash         
build.repo.compile.sh.bash
build.repo.bash

Feedback regarding these newly created scripts is requested.

@JanuszChmiel
Copy link
Author

It is interesting. It do not work. I AM doing something wrong. I have installed apk builds. Very interesting. I have typed
apt install curl

curl -O https://raw.githubusercontent.com/SDRausty/buildAPKs/master/setup.buildAPKs.bash

bash setup.buildAPKs.bash

So what should I type now to continue please? I Am not so professional like you are, so thank you for your patience dear MR Rausty.

@JanuszChmiel
Copy link
Author

JanuszChmiel commented Oct 25, 2021 via email

SDRausty referenced this issue in BuildAPKs/docsBuildAPKs Oct 26, 2021
SDRausty referenced this issue in BuildAPKs/docsBuildAPKs Oct 26, 2021
SDRausty referenced this issue in BuildAPKs/docsBuildAPKs Oct 26, 2021
@SDRausty
Copy link
Owner

~/.../zeljkoc/Pandroid $ find -type f -name *apk | wc -l 33

I cannot get more than one of these APKs to build; How about you?

@JanuszChmiel
Copy link
Author

JanuszChmiel commented Oct 27, 2021 via email

@github-actions
Copy link

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants