MatPlus.Net

 Website founded by
Milan Velimirović
in 2006

11:15 UTC
ISC 2024
 
  Forum*
 
 
 
 

Username:

Password:

Remember me

 
Forgot your
password?
Click here!
SIGN IN
to create your account if you don't already have one.
CHESS
SOLVING

Tournaments
Rating lists
1-Jan-2024

B P C F





 
 
MatPlus.Net Forum Internet and Computing Building Popeye natively under Android
 
You can only view this page!
(1) Posted by shankar ram [Thursday, Jul 6, 2017 12:14]

Building Popeye natively under Android


Readers may be aware of Dmitri Turevski's browser based Popeye port and front end for Android.

There is one more way to build a Popeye image under Android which can run natively.

There is also no need for rooting or cross-compiling. The Popeye image can be built directly ON the mobile!

The trick is to create a minimal linux root file system under the private data area of a terminal emulator on Android. This area has both write and execute permissions for any process running under the terminal emulator.

Kevin Boone has created Kbox, which does all of this in a simple way. See: http://kevinboone.net/kbox_index.html for detailed explanation and instructions.

You need a "reasonably" modern mobile phone. Mine has Android Nougat with 3 GB RAM and 32 GB internal storage. But lesser configurations may also work.

The following steps should be followed:
1. Install Jack Palevich's Android Terminal Emulator, which can be got from Google Playstore: https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
2. Download and install Kbox from here: http://kevinboone.net/kbox4-install-base-arm. Current version is Kbox4. Follow the instructions from here: http://kevinboone.net/kbox_installation.html
3. Download and install the kbox4 versions of the following utilities from here: http://kevinboone.net/kbox_packages.html
----1. Make
----2. Coreutils
----3. Gcc
4. Download the latest Popeye build(v4.77 as of date) from GitHub: https://github.com/thomas-maeder/popeye/releases/download/v4.77/popeye-4.77-sources.zip
5. Unzip the sources zip file into the kbox folder. The files will be extracted into a folder called 4.77
6. From within the folder 4.77, enter command: "make -f makefile.unx"
7. The linux executable "py" will be created in the same folder. Make it executable by the command "chmod 777 py"
8. Move the executable to /usr/bin folder. Now it will be in the path and can be called from anywhere in Kbox

I had initially got a compiled image directly from Kevin for version 4.75. For version 4.77, I decided to try my hand using the above steps and was surprised when everything compiled cleanly without any errors, especially since I didn't do any modification to suit the Android and Kbox environment.

This could also be potentially used as a backend in Android for apps like Olive and Chess Composer.

On Kevin's site you can also find other packages like Gnuchess and frotz - an interpreter for interactive fiction games.
 
(Read Only)pid=15688
(2) Posted by Sarah Hornecker [Thursday, Jul 6, 2017 19:33]

No, don't lead me to try Pick Up The Phone Booth And Aisle again!
Stop mentioning Interactive Fiction!
Hauke Reddmann will get a nerdgasm!

[2 weeks later]

Back to topic: There are so many different Operating Systems now, why is it so much more difficult for some systems to compile code than for others? For example, some have native support while Windows makes it a nightmare with needing several programs etc.
 
 
(Read Only)pid=15695
(3) Posted by shankar ram [Tuesday, Jul 18, 2017 19:19]; edited by shankar ram [17-07-18]

Can't leave well enough alone, I suppose..
But.. there's one more, more user friendly and also more interesting way to build and run popeye on your android mobile!
This comes with a "fuller" linux file system, several pre-installed utilities like midnight commander, taskwarrior.. and the option to install many more using the built-in APT package management system.
Steps:
1. Download and install the (free!)android app termux: https://play.google.com/store/apps/details?id=com.termux&hl=en
2. Run the termux app
3. From the command line interface, run the following commands:
-1. dpkg install coreutils
-2. dpkg install make
-3. dpkg install clang
-4. dpkg install nano (optional, for editing popeye input files. Can also use the midnight commander editor)
4. Download and extract current popeye source(4.77 https://github.com/thomas-maeder/popeye/releases/download/v4.77/popeye-4.77-sources.zip) into home folder. The files will be extracted into a sub-folder called 4.77
6. From within the folder 4.77, enter command: "make -f makefile.unx"
7. The file "py" will be created in the same folder. Make it executable by the command "chmod 777 py"
8. Move the executable to ~/../usr/bin folder. Now it will be in the path and can be called from anywhere in termux

Notes:
1. The linux file system in termux does not have gcc. This is replaced by clang with a soft link to gcc. I was wondering whether this change would affect the popeye compile process. It didn't! Popeye compiled quickly without any errors. There were only a few warnings - due to the few cases of differing syntax between gcc and clang.
2. One of the packages that can be installed is GnuChess. This shows the board in command line mode with Chess piece fonts!
3. The author of termux, Fredrik Fornwall is to be congratulated for developing this wonderful app and offering it free!
 
   
(Read Only)pid=15707
(4) Posted by seetharaman kalyan [Wednesday, Jul 19, 2017 11:35]

If Olive can be somehow adapted for Android phones I will be first to take it !!
 
 
(Read Only)pid=15708

No more posts


MatPlus.Net Forum Internet and Computing Building Popeye natively under Android