Re: [fpc-pascal] fpc code for Java class and Android.
Hello Paul. > How simple can we make this? I have some videos showing ideU/polydev features, maybe it can be useful ? Huh, maybe we could open a new topic in fpc-other ? Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/fpc-code-for-Java-class-and-Android-tp5728166p5728922.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 05/26/2017 10:25 PM, Paul Breneman wrote: On 05/26/2017 06:25 AM, fredvs wrote: Paul Breneman wrote I'll try to figure out how to do things (using ideU) first on my 64-bit Xubuntu 16.04. After that is clear it should be easier to try the same thing on Android? Are there any wiki pages for this? If not I'd like to help create one. Hello Paul. Are you taking about a wiki for MSEide-ideU ? Yes, that is where I would like to start. The wiki page that you linked below looks like a good start. I'll try to help do something similar for console and fpGUI programs using ideU. I got a little started: http://wiki.freepascal.org/ideU Probably should add additional pages for: A) Example of use (polYdev, translating fpc applications into Java applications with text that started this message thread) B) How to start (for beginners per www.controlpascal.com/tutorial.htm *after* start with mini distributions) - first step (install complete fpc, compile & run a console program like *Hello World*, introduce debugging?) - second step (install fpGUI, compile & run Control Terminal) How simple can we make this? Thanks to all of the FPC developers, fredvs, Graeme! If so, shame on me. I promised to Martin to make one but I did not find time to do it. I did this one : http://wiki.lazarus.freepascal.org/MSEide_MSEgui_first_step But, of ourse, it is not enough. Huh, or maybe you are talking about something else... ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 2017-05-27 12:00, fredvs wrote: Ho, that will be highly appreciated. +1 :) Regards, Graeme ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
Paul Breneman wrote > I'll try to help do something similar for console and fpGUI programs > using ideU. Ho, that will be highly appreciated. Many thanks Paul. Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/fpc-code-for-Java-class-and-Android-tp5728166p5728901.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 05/26/2017 06:25 AM, fredvs wrote: Paul Breneman wrote I'll try to figure out how to do things (using ideU) first on my 64-bit Xubuntu 16.04. After that is clear it should be easier to try the same thing on Android? Are there any wiki pages for this? If not I'd like to help create one. Hello Paul. Are you taking about a wiki for MSEide-ideU ? Yes, that is where I would like to start. The wiki page that you linked below looks like a good start. I'll try to help do something similar for console and fpGUI programs using ideU. If so, shame on me. I promised to Martin to make one but I did not find time to do it. I did this one : http://wiki.lazarus.freepascal.org/MSEide_MSEgui_first_step But, of ourse, it is not enough. Huh, or maybe you are talking about something else... ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
Paul Breneman wrote > I'll try to figure out how to do things (using ideU) first on my 64-bit > Xubuntu 16.04. After that is clear it should be easier to try the same > thing on Android? Are there any wiki pages for this? If not I'd like > to help create one. Hello Paul. Are you taking about a wiki for MSEide-ideU ? If so, shame on me. I promised to Martin to make one but I did not find time to do it. I did this one : http://wiki.lazarus.freepascal.org/MSEide_MSEgui_first_step But, of ourse, it is not enough. Huh, or maybe you are talking about something else... Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/fpc-code-for-Java-class-and-Android-tp5728166p5728874.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/09/2017 11:32 AM, fredvs wrote: For this, Xorg must be installed. Huh, of course only for gui applications (fpGUI or MSEgui). For no gui console application, compile your fpc java native library for the same cpu than the one of Android. For example RPi (but I am not sure it is the same cpu as android-devices). It seems that I need to give up on using GNUroot on Android: http://forum.lazarus.freepascal.org/index.php?topic=23927.new#new I'll try to study the video you linked on 4/8 when you started this thread. Me (and Jon) apparently *messed up* this thread (by discussing GNUroot) so hopefully we can start over? I'll try to figure out how to do things (using ideU) first on my 64-bit Xubuntu 16.04. After that is clear it should be easier to try the same thing on Android? Are there any wiki pages for this? If not I'd like to help create one. Thanks, Paul www.ControlPascal.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/20/2017 08:17 AM, Paul Breneman wrote: On 04/19/2017 10:49 PM, Paul Breneman wrote: I'm using a Nexus 7 tablet with Android 6.0.1. GNURoot provides a chroot with Debian? It has been *three* years since I did this before and things worked then so I don't know what might have changed so ppcarm doesn't even run now. Android? GNURoot? ppcarm? I'm trying the *most simple* thing, so no x11 or VNC needed. Actually, the FPC 2.6.0 *ppcarm* worked three years ago but not now. What can cause it to have an *Illegal instruction* error? There is a *simple* procedure near the bottom of this page: http://turbocontrol.com/gnuroot.htm I've been posting about this problem on the Lazarus forum: http://forum.lazarus.freepascal.org/index.php?topic=23927.new#new A good friend of mine (who uses Debian) looked things up and found this: https://lists.debian.org/debian-arm/2007/03/msg00097.html Is that maybe why the *standard* 2.6.0 ppcarm is getting SIGILL when it shouldn't? If so, does 2.6.4 or 3.0.0 or 3.0.2 correct this problem? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/20/2017 05:17 AM, Paul Breneman wrote: On 04/19/2017 10:49 PM, Paul Breneman wrote: I'm using a Nexus 7 tablet with Android 6.0.1. GNURoot provides a chroot with Debian? It has been *three* years since I did this before and things worked then so I don't know what might have changed so ppcarm doesn't even run now. Android? GNURoot? ppcarm? I'm trying the *most simple* thing, so no x11 or VNC needed. Actually, the FPC 2.6.0 *ppcarm* worked three years ago but not now. What can cause it to have an *Illegal instruction* error? There is a *simple* procedure near the bottom of this page: http://turbocontrol.com/gnuroot.htm So what changed in those three years? 1. Pretty sure Android 6 wasn't out three years ago? Yeah, I see it was released 10/2015. 2. New device? 3. Did you use the same ppcarm you downloaded three years ago or did you download it again? 4. Do you have your older device you could try your ppcarm on? You will have to address the PIC/PIE issue but you could be looking at the compiler using machine language instructions that aren't supported by your hardware (as previously described). If my guess about the tablet being newer is correct, I doubt it. Still it looks like my ppcarm supports over a dozen different instruction sets. And their is always the chance some other form of crash is causing that message. Android 6 *definitely* requires PIC binaries, that *definitely* changed in the past three years. A three year old version of FPC would not have been compiled that way. FYI: a PIE binary won't load on a non-PIE enabled OS. I had been reading about ways Google devs were trying to work around that. Of course Google wouldn't want that to happen... so I imagine their efforts were squashed. - On 11/16/2015 Yuri Sidorov wrote: -- Subject: Re: [fpc-devel] PIE compatible output? Hi, The 3.0 release for android is not able to produce correct PIC executables and libraries. You need build an svn trunk version of FPC to produce PIC/PIE binaries for android. [...] - If you look in the archives of this mail list you should be able to view our exchange. So my money is on you needing to build your own version of ppcarm with PIC enabled. And you may need to fiddle with the instruction set used. You can either do this by cross compiling on another FPC supported platform, which typically means building your own "binutils". Or, depending on what you have available, the needed prebuilt binaries to cross compile may already be available through the usual FPC channels (I think I saw windoze zips). Or you can leverage a *real* Linux based ARM platform such as Rpi or CHIP. That was actually one of my motivating factors to get involved with CHIP. A native ARM platform to build binaries, specifically units, for Android for only $9 USD! I still want to cluster a bunch of these things in a stock PC tower case to use as compiling nodes. Too many cool projects and so little time! :-( -- Jon Foster JF Possibilities, Inc. j...@jfpossibilities.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/19/2017 10:49 PM, Paul Breneman wrote: I'm using a Nexus 7 tablet with Android 6.0.1. GNURoot provides a chroot with Debian? It has been *three* years since I did this before and things worked then so I don't know what might have changed so ppcarm doesn't even run now. Android? GNURoot? ppcarm? I'm trying the *most simple* thing, so no x11 or VNC needed. Actually, the FPC 2.6.0 *ppcarm* worked three years ago but not now. What can cause it to have an *Illegal instruction* error? There is a *simple* procedure near the bottom of this page: http://turbocontrol.com/gnuroot.htm ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/19/2017 09:48 PM, Jon Foster wrote: On 04/19/2017 06:01 AM, Paul Breneman wrote: On 04/18/2017 07:38 AM, Paul Breneman wrote: On 04/17/2017 08:42 PM, Jon Foster wrote: ... You have to copy the app to "/data/tmp" as that is usually the only place on Android with a Linux file system that all users have access to. You can't look in there so you kind of have to fly blind. :-) "Terminal IDE" makes this easier, assuming you have a compatible Android version, since it provides the Linux file system space, term emulator and easy access. This was what I thought Paul was looking to do. FreeVision might work depending on a number of variables... but I'm not familiar with it. Most Android terminal apps would provide some kind of VT100 like emulation so you may have to force FreeVision to output for that emulation. If it tries to use a "termcap" through normal means it probably will crash. Thanks Jon *very* much for the details that you shared! I hope to get time to get back into this soon and I'm sure that your notes will help. Well, I tried a bit this morning but have failed so far. With GNURoot Debian it comes up as Debian version 8.1 but I upgraded to 8.7 using the instructions near the bottom of this page: http://turbocontrol.com/gnuroot.htm The 2.6.0 ppcarm itself fails to run with: Illegal instruction I also posted a new zip (not yet on web page) and tried that: HelloWorld-fpc-3.0.2.arm-linux-041917.zip The 3.0.2 ppcarm itself fails with: Segmentation fault Thanks in advance for *any* suggestions. As soon as I get this working I hope to create a new wiki page so it is easier for others to share. :) Thanks, Paul Breneman www.ControlPascal.com I don't know anything about your environment but a few possibilities spring to mind: 1. Newer version of Android which requires a PIC/PIE binary and you aren't running one or maybe even the inverse. Although I think this normally gives an error about "PIE" being needed, at least in the Android 5+ case. 2. An ABI mismatch. 3. Running on an FPU-less device with a compiler that wasn't built with emulation. I can't imagine what the compiler would need with an FPU though. 4. The ppcarm binary was built with a set of ARM instructions your device doesn't support. They've added many extensions to the core ARM instruction set over the years and different chip foundries can choose which they want to include or not. 5. Bad RAM? Since FPC is completely self contained I can't imagine anything in the actual Linux install would be a problem. I'm certain they are using the Android kernel and not doing something like UML, but I don't know anything about the GNUroot project. I used someone else's Linux installer once, originally titled "Lil' Debbie". They had to change their name for obvious reasons. I couldn't find a VNC client that worked well enough to use it though, even though my Iconia tablet sports a standard USB A connector and it had no trouble with a stock keyboard and mouse. I don't think the VNC clients I tried were expecting real input hardware. :-) I'm using a Nexus 7 tablet with Android 6.0.1. GNURoot provides a chroot with Debian? It has been *three* years since I did this before and things worked then so I don't know what might have changed so ppcarm doesn't even run now. Android? GNURoot? ppcarm? I'm trying the *most simple* thing, so no x11 or VNC needed. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/19/2017 06:48 PM, Jon Foster wrote: On 04/19/2017 06:01 AM, Paul Breneman wrote: On 04/18/2017 07:38 AM, Paul Breneman wrote: On 04/17/2017 08:42 PM, Jon Foster wrote: ... You have to copy the app to "/data/tmp" as that is usually the only place on Android with a Linux file system that all users have access to. You can't look in there so you kind of have to fly blind. :-) "Terminal IDE" makes this easier, assuming you have a compatible Android version, since it provides the Linux file system space, term emulator and easy access. This was what I thought Paul was looking to do. FreeVision might work depending on a number of variables... but I'm not familiar with it. Most Android terminal apps would provide some kind of VT100 like emulation so you may have to force FreeVision to output for that emulation. If it tries to use a "termcap" through normal means it probably will crash. Thanks Jon *very* much for the details that you shared! I hope to get time to get back into this soon and I'm sure that your notes will help. Well, I tried a bit this morning but have failed so far. With GNURoot Debian it comes up as Debian version 8.1 but I upgraded to 8.7 using the instructions near the bottom of this page: http://turbocontrol.com/gnuroot.htm The 2.6.0 ppcarm itself fails to run with: Illegal instruction I also posted a new zip (not yet on web page) and tried that: HelloWorld-fpc-3.0.2.arm-linux-041917.zip The 3.0.2 ppcarm itself fails with: Segmentation fault Thanks in advance for *any* suggestions. As soon as I get this working I hope to create a new wiki page so it is easier for others to share. :) Thanks, Paul Breneman www.ControlPascal.com I don't know anything about your environment but a few possibilities spring to mind: 1. Newer version of Android which requires a PIC/PIE binary and you aren't running one or maybe even the inverse. Although I think this normally gives an error about "PIE" being needed, at least in the Android 5+ case. 2. An ABI mismatch. 3. Running on an FPU-less device with a compiler that wasn't built with emulation. I can't imagine what the compiler would need with an FPU though. 4. The ppcarm binary was built with a set of ARM instructions your device doesn't support. They've added many extensions to the core ARM instruction set over the years and different chip foundries can choose which they want to include or not. 5. Bad RAM? Since FPC is completely self contained I can't imagine anything in the actual Linux install would be a problem. I'm certain they are using the Android kernel and not doing something like UML, but I don't know anything about the GNUroot project. I used someone else's Linux installer once, originally titled "Lil' Debbie". They had to change their name for obvious reasons. I couldn't find a VNC client that worked well enough to use it though, even though my Iconia tablet sports a standard USB A connector and it had no trouble with a stock keyboard and mouse. I don't think the VNC clients I tried were expecting real input hardware. :-) One other thing to try is: If you install PascalGUI or Pascal Develop do their compilers run? Might reveal some clue. -- Jon Foster JF Possibilities, Inc. j...@jfpossibilities.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/19/2017 06:01 AM, Paul Breneman wrote: On 04/18/2017 07:38 AM, Paul Breneman wrote: On 04/17/2017 08:42 PM, Jon Foster wrote: ... You have to copy the app to "/data/tmp" as that is usually the only place on Android with a Linux file system that all users have access to. You can't look in there so you kind of have to fly blind. :-) "Terminal IDE" makes this easier, assuming you have a compatible Android version, since it provides the Linux file system space, term emulator and easy access. This was what I thought Paul was looking to do. FreeVision might work depending on a number of variables... but I'm not familiar with it. Most Android terminal apps would provide some kind of VT100 like emulation so you may have to force FreeVision to output for that emulation. If it tries to use a "termcap" through normal means it probably will crash. Thanks Jon *very* much for the details that you shared! I hope to get time to get back into this soon and I'm sure that your notes will help. Well, I tried a bit this morning but have failed so far. With GNURoot Debian it comes up as Debian version 8.1 but I upgraded to 8.7 using the instructions near the bottom of this page: http://turbocontrol.com/gnuroot.htm The 2.6.0 ppcarm itself fails to run with: Illegal instruction I also posted a new zip (not yet on web page) and tried that: HelloWorld-fpc-3.0.2.arm-linux-041917.zip The 3.0.2 ppcarm itself fails with: Segmentation fault Thanks in advance for *any* suggestions. As soon as I get this working I hope to create a new wiki page so it is easier for others to share. :) Thanks, Paul Breneman www.ControlPascal.com I don't know anything about your environment but a few possibilities spring to mind: 1. Newer version of Android which requires a PIC/PIE binary and you aren't running one or maybe even the inverse. Although I think this normally gives an error about "PIE" being needed, at least in the Android 5+ case. 2. An ABI mismatch. 3. Running on an FPU-less device with a compiler that wasn't built with emulation. I can't imagine what the compiler would need with an FPU though. 4. The ppcarm binary was built with a set of ARM instructions your device doesn't support. They've added many extensions to the core ARM instruction set over the years and different chip foundries can choose which they want to include or not. 5. Bad RAM? Since FPC is completely self contained I can't imagine anything in the actual Linux install would be a problem. I'm certain they are using the Android kernel and not doing something like UML, but I don't know anything about the GNUroot project. I used someone else's Linux installer once, originally titled "Lil' Debbie". They had to change their name for obvious reasons. I couldn't find a VNC client that worked well enough to use it though, even though my Iconia tablet sports a standard USB A connector and it had no trouble with a stock keyboard and mouse. I don't think the VNC clients I tried were expecting real input hardware. :-) -- Jon Foster JF Possibilities, Inc. j...@jfpossibilities.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/18/2017 07:38 AM, Paul Breneman wrote: On 04/17/2017 08:42 PM, Jon Foster wrote: ... You have to copy the app to "/data/tmp" as that is usually the only place on Android with a Linux file system that all users have access to. You can't look in there so you kind of have to fly blind. :-) "Terminal IDE" makes this easier, assuming you have a compatible Android version, since it provides the Linux file system space, term emulator and easy access. This was what I thought Paul was looking to do. FreeVision might work depending on a number of variables... but I'm not familiar with it. Most Android terminal apps would provide some kind of VT100 like emulation so you may have to force FreeVision to output for that emulation. If it tries to use a "termcap" through normal means it probably will crash. Thanks Jon *very* much for the details that you shared! I hope to get time to get back into this soon and I'm sure that your notes will help. Well, I tried a bit this morning but have failed so far. With GNURoot Debian it comes up as Debian version 8.1 but I upgraded to 8.7 using the instructions near the bottom of this page: http://turbocontrol.com/gnuroot.htm The 2.6.0 ppcarm itself fails to run with: Illegal instruction I also posted a new zip (not yet on web page) and tried that: HelloWorld-fpc-3.0.2.arm-linux-041917.zip The 3.0.2 ppcarm itself fails with: Segmentation fault Thanks in advance for *any* suggestions. As soon as I get this working I hope to create a new wiki page so it is easier for others to share. :) Thanks, Paul Breneman www.ControlPascal.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 2017-04-18 18:13, Jon Foster wrote: > I can't think of any terminal based programs I use > that offer mouse support. No idea what this thread is about really, but as for the above statement. I use plenty terminal apps that have mouse support. Midnight Commander (2 panel file manager), Free Pascal Text IDE (in a pinch), htop (*nix process manager), many text installers etc. Regards, Graeme ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
In our previous episode, Paul Breneman said: > > they've added some nice touches. I had been using "Pascal Develop" since > > I could download the source and alter its compile target. But it doesn't > > provide proper terminal emulation and came packaged with FPC 2.6 pre v3 > > beta, which was good at the time since 3 hadn't been out yet. :-D I > > patched and added many FPC units to his original set, which I think he > > released. > > > > I'm pretty sure that the Turbo Pascal text mode IDE offered mouse > support (under MS-DOS), and also the Free Pascal IDE (which you can try > under Linux). > > Thanks again Jon for your notes. I've know about PascalGUI for a while > and have a little doc about it near the bottom of this page: >http://turbocontrol.com/helloworld.htm Sure, I used mouse support in the IDE running in a putty to a linux machine for years to do minor FPC development in an environment where I didn't have a fixed PC. Requires some minor tweaking of putty properties though. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/18/2017 01:27 PM, Jon Foster wrote: On 04/18/2017 10:13 AM, Jon Foster wrote: On 04/18/2017 04:38 AM, Paul Breneman wrote: On 04/17/2017 08:42 PM, Jon Foster wrote: ... You have to copy the app to "/data/tmp" as that is usually the only place on Android with a Linux file system that all users have access to. You can't look in there so you kind of have to fly blind. :-) "Terminal IDE" makes this easier, assuming you have a compatible Android version, since it provides the Linux file system space, term emulator and easy access. This was what I thought Paul was looking to do. FreeVision might work depending on a number of variables... but I'm not familiar with it. Most Android terminal apps would provide some kind of VT100 like emulation so you may have to force FreeVision to output for that emulation. If it tries to use a "termcap" through normal means it probably will crash. Thanks Jon *very* much for the details that you shared! I hope to get time to get back into this soon and I'm sure that your notes will help. The last problem that I had *three years* ago was that I failed to get the mouse to work in the text mode IDE (I did have a keyboard and mouse that worked in Android). The mouse is not absolutely required for the simple programs I'd like to do. Regards, Paul The "mouse" will more than likely be unavailable. Most people don't think "terminal" and "mouse". Still if you can find an Android terminal app with "gpm" or xterm style mouse support it could work. I've never used a "text mode" mouse in Linux. I can't think of any terminal based programs I use that offer mouse support. :-) And then you could always download an OpenSource terminal app and hack it to provide that support. The "xterm" man page documents its mouse protocol, which is probably the defacto standard. THX - Jon I should also mention that PascalGUI is probably the most mature FPC+term+editor app that I know of. Its been a while but it seems they've added some nice touches. I had been using "Pascal Develop" since I could download the source and alter its compile target. But it doesn't provide proper terminal emulation and came packaged with FPC 2.6 pre v3 beta, which was good at the time since 3 hadn't been out yet. :-D I patched and added many FPC units to his original set, which I think he released. I'm pretty sure that the Turbo Pascal text mode IDE offered mouse support (under MS-DOS), and also the Free Pascal IDE (which you can try under Linux). Thanks again Jon for your notes. I've know about PascalGUI for a while and have a little doc about it near the bottom of this page: http://turbocontrol.com/helloworld.htm ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/18/2017 10:13 AM, Jon Foster wrote: On 04/18/2017 04:38 AM, Paul Breneman wrote: On 04/17/2017 08:42 PM, Jon Foster wrote: ... You have to copy the app to "/data/tmp" as that is usually the only place on Android with a Linux file system that all users have access to. You can't look in there so you kind of have to fly blind. :-) "Terminal IDE" makes this easier, assuming you have a compatible Android version, since it provides the Linux file system space, term emulator and easy access. This was what I thought Paul was looking to do. FreeVision might work depending on a number of variables... but I'm not familiar with it. Most Android terminal apps would provide some kind of VT100 like emulation so you may have to force FreeVision to output for that emulation. If it tries to use a "termcap" through normal means it probably will crash. Thanks Jon *very* much for the details that you shared! I hope to get time to get back into this soon and I'm sure that your notes will help. The last problem that I had *three years* ago was that I failed to get the mouse to work in the text mode IDE (I did have a keyboard and mouse that worked in Android). The mouse is not absolutely required for the simple programs I'd like to do. Regards, Paul The "mouse" will more than likely be unavailable. Most people don't think "terminal" and "mouse". Still if you can find an Android terminal app with "gpm" or xterm style mouse support it could work. I've never used a "text mode" mouse in Linux. I can't think of any terminal based programs I use that offer mouse support. :-) And then you could always download an OpenSource terminal app and hack it to provide that support. The "xterm" man page documents its mouse protocol, which is probably the defacto standard. THX - Jon I should also mention that PascalGUI is probably the most mature FPC+term+editor app that I know of. Its been a while but it seems they've added some nice touches. I had been using "Pascal Develop" since I could download the source and alter its compile target. But it doesn't provide proper terminal emulation and came packaged with FPC 2.6 pre v3 beta, which was good at the time since 3 hadn't been out yet. :-D I patched and added many FPC units to his original set, which I think he released. -- Jon Foster JF Possibilities, Inc. j...@jfpossibilities.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/18/2017 04:38 AM, Paul Breneman wrote: On 04/17/2017 08:42 PM, Jon Foster wrote: ... You have to copy the app to "/data/tmp" as that is usually the only place on Android with a Linux file system that all users have access to. You can't look in there so you kind of have to fly blind. :-) "Terminal IDE" makes this easier, assuming you have a compatible Android version, since it provides the Linux file system space, term emulator and easy access. This was what I thought Paul was looking to do. FreeVision might work depending on a number of variables... but I'm not familiar with it. Most Android terminal apps would provide some kind of VT100 like emulation so you may have to force FreeVision to output for that emulation. If it tries to use a "termcap" through normal means it probably will crash. Thanks Jon *very* much for the details that you shared! I hope to get time to get back into this soon and I'm sure that your notes will help. The last problem that I had *three years* ago was that I failed to get the mouse to work in the text mode IDE (I did have a keyboard and mouse that worked in Android). The mouse is not absolutely required for the simple programs I'd like to do. Regards, Paul The "mouse" will more than likely be unavailable. Most people don't think "terminal" and "mouse". Still if you can find an Android terminal app with "gpm" or xterm style mouse support it could work. I've never used a "text mode" mouse in Linux. I can't think of any terminal based programs I use that offer mouse support. :-) And then you could always download an OpenSource terminal app and hack it to provide that support. The "xterm" man page documents its mouse protocol, which is probably the defacto standard. THX - Jon -- Jon Foster JF Possibilities, Inc. j...@jfpossibilities.com -- Sent from my Debian Linux workstation -- http://www.debian.org/intro/about Jon Foster JF Possibilities, Inc. j...@jfpossibilities.com 541-410-2760 Making computers work for you! ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/17/2017 08:42 PM, Jon Foster wrote: ... You have to copy the app to "/data/tmp" as that is usually the only place on Android with a Linux file system that all users have access to. You can't look in there so you kind of have to fly blind. :-) "Terminal IDE" makes this easier, assuming you have a compatible Android version, since it provides the Linux file system space, term emulator and easy access. This was what I thought Paul was looking to do. FreeVision might work depending on a number of variables... but I'm not familiar with it. Most Android terminal apps would provide some kind of VT100 like emulation so you may have to force FreeVision to output for that emulation. If it tries to use a "termcap" through normal means it probably will crash. Thanks Jon *very* much for the details that you shared! I hope to get time to get back into this soon and I'm sure that your notes will help. The last problem that I had *three years* ago was that I failed to get the mouse to work in the text mode IDE (I did have a keyboard and mouse that worked in Android). The mouse is not absolutely required for the simple programs I'd like to do. Regards, Paul www.ControlPascal.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/15/2017 12:14 PM, fredvs wrote: Jon Foster wrote The only thing that console apps need is a terminal emulator. Huh, yes, when I re-read my mail, I see directly that this will be the problem. The "One only library-method used by the Java Class" needs of course a terminal to show his output. Jon Foster wrote Linux (Android kernel) only runs executables from a file system that allows you to set the "execute" permission For Java-native libraries too ? If I understand your question correctly: No, since the library isn't "executed" (in the traditional *nix sense) its "loaded" and used. As you stated you need an Android Java (Dalvik) app, which gets executed, and then it loads the library and calls the functions in it. But never forget you need someway to display stuff... and the normal Pascal methods of providing user interaction are not available on Android. Take this simple program: program hello; uses SysUtils; var s: string; begin write('Enter your name: '); ReadLn(s); WriteLn('Hello ', s); end. Assuming you made it into a library and write a Dalvik wrapper you still need some place for the input to come from and the output to go to. On Linux this would be "standard in" and "standard out", attached to a terminal somewhere/somehow (VGA adapter, xterm, pipes, ...). Technically all you need to do this with Android is a compiler for the architecture of the Android device (usually ARM) and a terminal app. Once compiled you can place the app on an SD card (typically available) then launch your terminal app, copy the app from the SD card into "/data/tmp", "chmod a+x /data/tmp/myapp" (change "myapp" to the name of yours) and then launch it and interact with it via the terminal app. You have to copy the app to "/data/tmp" as that is usually the only place on Android with a Linux file system that all users have access to. You can't look in there so you kind of have to fly blind. :-) "Terminal IDE" makes this easier, assuming you have a compatible Android version, since it provides the Linux file system space, term emulator and easy access. This was what I thought Paul was looking to do. FreeVision might work depending on a number of variables... but I'm not familiar with it. Most Android terminal apps would provide some kind of VT100 like emulation so you may have to force FreeVision to output for that emulation. If it tries to use a "termcap" through normal means it probably will crash. -- Jon Foster JF Possibilities, Inc. j...@jfpossibilities.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
Jon Foster wrote > The only thing that console apps need is a terminal emulator. Huh, yes, when I re-read my mail, I see directly that this will be the problem. The "One only library-method used by the Java Class" needs of course a terminal to show his output. Jon Foster wrote > Linux (Android kernel) only runs executables from a file system that > allows you to set the "execute" permission For Java-native libraries too ? Jon Foster wrote > Android *only* launches Dalvik (Java) based apps so if packaging you > have to provide some kind of Java based wrapper anyways. Yes, of course the trick needs a Java main class app that will execute only one main-method from the fpc-Java_Native library. Jon Foster wrote > Right now I'm looking over fpGUI with an eye to porting it to Android to > make a > more sane environment. Of course this is the solution who will make all others obsolete (even those using Jni.pas). Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/fpc-code-for-Java-class-and-Android-tp5728166p5728276.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/09/2017 11:30 AM, Paul Breneman wrote: On 04/09/2017 11:32 AM, fredvs wrote: For this, Xorg must be installed. Huh, of course only for gui applications (fpGUI or MSEgui). For no gui console application, compile your fpc java native library for the same cpu than the one of Android. For example RPi (but I am not sure it is the same cpu as android-devices). I'd like to try console apps (also with Free Vision) first in conjunction with this: http://turbocontrol.com/gnuroot.htm The only thing that console apps need is a terminal emulator. A bunch of ways that can happen and it depends on whether this is to be provided through the Android market or not. If not things are much easier. Terminal emulators abound you can pretty much just pick one. Now for the obstacles: 1. Linux (Android kernel) only runs executables from a file system that allows you to set the "execute" permission, which means that you can't just put your stuff on an SD card and run it, since FAT and descendants don't have that permission. So you have to get your exes into the internal non-FAT App storage and Android permissions throw up plenty of barriers. 2. Compiling for ARM. This can be done with cross build tools, with an ARM Linux computer or some other *nix variant available on ARM, or with several of the Android apps that provide pre-built versions of the compiler and a term environment. I actually built the compiler and tools with a CHIP / PocketCHIP (http://getchip.com/). Very inexpensive full blown Debian 8 install. But I think I had to build a bootstrap compiler with my Intel based Linux box first. Which meant building a cross "binutils" for ARM, which was fairly simple. I can probably post some scripts if desired. My final solution for compiling and running things was "Terminal IDE" Its setup for Java, C & C++ but it provides the terminal, assembler, linker, some Android packaging tools and it provides full access to the packages "home" folder which allows the executable permission. If there is an ARM bootstrap compiler, and I haven't looked in a while, you should be able to build FPC and units all from within Terminal IDE. You will want to use the automated installer for the C compiler and stuff, since that contains "binutils" (assembler, linker, ...). *NOTE* Last I looked this won't work on Android 5+, explained below (#3). My problem with it is "vi" for editing. And since other apps don't have access to its "sandbox" you have to do some juggling for a complete on device dev environment. It would technically be possible to keep source on the FAT storage (SD or internal) and just build into the sandbox, which has permissions. You will need a ".fpc.cfg" in the IDE's home folder and you won't be able to install one to "/etc". You can find the correct location by typing "echo $HOME" (case is significant) in the terminal window. I should also mention that the "hacker's keyboard" is very desirable for this. But you will probably want a larger screen size. Those buttons can get pretty small! 3. Android 5+ introduced *mandatory* address space randomization. This means that binaries compiled for <5 won't run on 5+ and visa-versa. It also means you need address independent output from FPC for 5+. I believe this is now an option in FPC 3. But I don't believe the Terminal IDE guy ever produced a build that will work on Android 5+. If distributing you will probably want to build both an address independent and non-independent version and then selectively launch the correct one. But that ties in with 4 & 5 below. 4. Google does not allow one package to require another package. So your package has to be self contained, meaning that if you need an X server or Terminal emulator it has to be combined into one package with your fpc binaries and data. This has licensing implications that may not be acceptable. Depending on your situation you may be able to take someone else's OpenSource package and hack your stuff into it. ie. Get an open source term app, "rebrand" it, inject your FPC app, and patch it to auto-start your app and shutdown when your app finishes. 5. Android *only* launches Dalvik (Java) based apps so if packaging you have to provide some kind of Java based wrapper anyways. Making #4 mandatory anyways. 6. App lifespan. Terminal apps expect that they will start and run until either their task has finished or the user signals it to stop. Android expects it can terminate and restart apps as it sees fit. This can cause problems when your app unexpectedly gets terminated. I should also mention that the JVM target for FPC seems to work quite well. So its possible to use FPC to write the mandatory Dalvik wrapper for your native FPC code. I have an App that I kept the same core code and wrote a new Dalvik front end in FPC, using the JVM target. But its very time consuming and fraught with peril. The Android UI does many unexpected things and
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/09/2017 11:32 AM, fredvs wrote: For this, Xorg must be installed. Huh, of course only for gui applications (fpGUI or MSEgui). For no gui console application, compile your fpc java native library for the same cpu than the one of Android. For example RPi (but I am not sure it is the same cpu as android-devices). I'd like to try console apps (also with Free Vision) first in conjunction with this: http://turbocontrol.com/gnuroot.htm ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
> For this, Xorg must be installed. Huh, of course only for gui applications (fpGUI or MSEgui). For no gui console application, compile your fpc java native library for the same cpu than the one of Android. For example RPi (but I am not sure it is the same cpu as android-devices). Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/fpc-code-for-Java-class-and-Android-tp5728166p5728181.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
> Thank you *very* much for that nice 3:24 6.2 MB video. Thanks for the thanks ;-). > Now I need to figure out the most *simple* way to do that on an Android > phone or tablet. For this, Xorg must be installed. Take a look here: https://blog.hamal.in/?p=15 or here: https://github.com/csulmone/X11/tree/master/xorg-server-android Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/fpc-code-for-Java-class-and-Android-tp5728166p5728179.html Sent from the Free Pascal - General mailing list archive at Nabble.com. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc code for Java class and Android.
On 04/08/2017 09:21 AM, fredvs wrote: ... Here video that shows all the process: https://sites.google.com/site/designerext/fpc_java.mp4 Thank you *very* much for that nice 3:24 6.2 MB video. Now I need to figure out the most *simple* way to do that on an Android phone or tablet. Thanks, Paul www.ControlPascal.com ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal