Recent

Author Topic: Virtual Machine + Lazarus + Android  (Read 67055 times)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Virtual Machine + Lazarus + Android
« Reply #15 on: December 28, 2011, 11:44:22 pm »
Good point, i have checked that the NDK toolchains directory consist that utilities.
So Have you ever checked out with these toolchains to compile fpc? Or I will control it out later.

My Windows instructions already use the binutils from the NDK for the RTL / FCL cross-compilation and also building the LCL example app. The only thing missing was to build the APK, but I had trouble in this part.

irfanbagus

  • Jr. Member
  • **
  • Posts: 73
Re: Virtual Machine + Lazarus + Android
« Reply #16 on: December 29, 2011, 03:15:32 am »
Good point, i have checked that the NDK toolchains directory consist that utilities.
So Have you ever checked out with these toolchains to compile fpc? Or I will control it out later.

My Windows instructions already use the binutils from the NDK for the RTL / FCL cross-compilation and also building the LCL example app. The only thing missing was to build the APK, but I had trouble in this part.

felipe, could you try this step

1. change "sdk.dir" in file "examples\opengltest\android\local.properties". use slash as path separator
ex :

sdk.dir=D:/Portable/android-sdk-windows

2. run this command in windows command line (cmd.exe)

set Path=D:\Portable\Ant;%Path%
set ANT_HOME=D:\Portable\Ant
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_01

cd D:\android-ndk\examples\opengltest\android
ant debug

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Virtual Machine + Lazarus + Android
« Reply #17 on: December 29, 2011, 07:02:13 pm »
felipe, could you try this step

Thanks, but my major problem was not actually configuring in Windows. I don't use Windows at work and also not at home ...

My problem was the need to build a snapshot for Windows users which fits into a DVD so that Pascal Magazine readers can use Lazarus to build Android applications. But it is not convenient if it requires a complex set of configurations, because the current DVD comes with a Lazarus which requires only 1 click to start up. But the VM seams an ok solution. But of course one approach doesn't exclude the other, so thanks for informing how to setup ant =)

I have already finished the VM, and it also comes with basic accelerometer, GPS and SMS sending support in the example. The only problem now is where to upload it to. It is pretty massive =D 5,2GB

BlueIcaro

  • Hero Member
  • *****
  • Posts: 793
    • Blog personal
Re: Virtual Machine + Lazarus + Android
« Reply #18 on: December 29, 2011, 08:11:50 pm »
felipe, could you try this step

Thanks, but my major problem was not actually configuring in Windows. I don't use Windows at work and also not at home ...

My problem was the need to build a snapshot for Windows users which fits into a DVD so that Pascal Magazine readers can use Lazarus to build Android applications. But it is not convenient if it requires a complex set of configurations, because the current DVD comes with a Lazarus which requires only 1 click to start up. But the VM seams an ok solution. But of course one approach doesn't exclude the other, so thanks for informing how to setup ant =)

I have already finished the VM, and it also comes with basic accelerometer, GPS and SMS sending support in the example. The only problem now is where to upload it to. It is pretty massive =D 5,2GB

I have 24 Gb free on my SkyDrive public folder. I can host it. But How can you send me that big file?

/BlueIcaro

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Virtual Machine + Lazarus + Android
« Reply #19 on: December 29, 2011, 08:46:33 pm »
thanks, but for now I am trying sourceforge. But it will take aprox. 24h to finish the upload =D

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Virtual Machine + Lazarus + Android
« Reply #20 on: December 30, 2011, 08:05:13 pm »
Good point, i have checked that the NDK toolchains directory consist that utilities.
So Have you ever checked out with these toolchains to compile fpc? Or I will control it out later.

My Windows instructions already use the binutils from the NDK for the RTL / FCL cross-compilation and also building the LCL example app. The only thing missing was to build the APK, but I had trouble in this part.

Today I did a full build cycle with the Android binutils and yes, they work fine and generate a working APK in the end.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Virtual Machine + Lazarus + Android
« Reply #21 on: December 31, 2011, 01:49:25 pm »
Ok, it is uploaded:

https://sourceforge.net/projects/p-tools/files/Lazarus_for_Android_VM_Image/snapshot_30_dez_2011/

Instructions here: http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Use_the_ready_Virtual_Box_Image_with_FPC_and_Lazarus

But note that it won't be possible to download now, because sourceforge is still copying it to the mirrors. Tomorrow for sure it should be ready for download tomorrow (or maybe later today).

Updating svn for lazarus inside the VM might be a good idea, because I added some features since it was created. But it also has some risk, like trunk always has.

fredycc

  • Sr. Member
  • ****
  • Posts: 264
Re: Virtual Machine + Lazarus + Android
« Reply #22 on: December 31, 2011, 11:33:10 pm »
Wow thanks felipemdc, I'm downloading files now.  :D

Regards

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Virtual Machine + Lazarus + Android
« Reply #23 on: January 01, 2012, 10:02:30 am »
Great Felipe, thanks, I'm downloading it now (hope I can adapt it for my Nokia N9 Maemo/Meego/Debian ARM machine - at least beats having to start from scratch)!

A question: the Sourceforge ptools site mentions there are tools for remote administration. I saw OpenSSL for Windows CE. Is that what you meant?
I'm planning to build a Lazarus tool to manage my router via SSH, that's why I'm asking.

Thanks again & feliz ano novo/szczesliwego nowego roku  :)

(Don't understand Polish well enough to be sure my copy/paste action is right - hope so ;) )
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Virtual Machine + Lazarus + Android
« Reply #24 on: January 01, 2012, 10:58:04 am »
A question: the Sourceforge ptools site mentions there are tools for remote administration. I saw OpenSSL for Windows CE. Is that what you meant?

I have no idea what I was thinking when I wrote that, but I don't think I have ever worked on developing remote administration tools. But if you want to host anything there, sure, no problem, although the lazarus-ccr is also an idea.

I use p-tools as a repository for all my stuff which don't fit in other places. Like these Android snapshots, but also some experimental code that I write and stuff like that.

Quote
Thanks again & feliz ano novo/szczesliwego nowego roku  :)

(Don't understand Polish well enough to be sure my copy/paste action is right - hope so ;) )

No, it was pretty good, just missing some accents: szczęśliwego nowego roku

Happy new year =)

The forum says you are from netherlands, so you might want to come in the Lazarus Day organized by the Blaise Pascal magazine, it is usually in April.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Virtual Machine + Lazarus + Android
« Reply #25 on: January 01, 2012, 11:08:57 am »
I have no idea what I was thinking when I wrote that, but I don't think I have ever worked on developing remote administration tools. But if you want to host anything there, sure, no problem, although the lazarus-ccr is also an idea.
Thanks. When I have something nice, I'll definitely try to get it into Lazarus CCR. Too many repositories can be a bad thing  :D

No, it was pretty good, just missing some accents: szczęśliwego nowego roku

Happy new year =)

The forum says you are from netherlands, so you might want to come in the Lazarus Day organized by the Blaise Pascal magazine, it is usually in April.
Oh yes, those accents.... brrr. I can't understand the difference between the various r's but well as I only know a couple of words I guess it doesn't matter  :D
Thx for the heads up on the Lazarus Day, appreciate it.

Gelukkig nieuwjaar  :)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

DelphiFreak

  • Sr. Member
  • ****
  • Posts: 255
    • Fresh sound.
Re: Virtual Machine + Lazarus + Android
« Reply #26 on: January 01, 2012, 07:13:30 pm »
Thank you.

I have downloaded it twice and got both time the same error:


7-Zip 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=de_DE.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)

Processing archive: /home/sam/Downloads/Android Devel VM.hdd.zip

Extracting  Android Devel VM.hdd     CRC Failed

Sub items Errors: 1

Did someone successfully download the virtualBox?

I am runing Mint Linux Version 12.
Linux Mint 20.3, Lazarus 2.3, Windows 10, Delphi 10.3 Rio, Delphi 11.1 Alexandria

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Virtual Machine + Lazarus + Android
« Reply #27 on: January 01, 2012, 07:43:51 pm »
Check the MD5. Source forge has a MD5 for the file there. I checked and it is the same as for my local file. Try another uncompresser, something more normal like just "unzip" from the command line.

And yes, the Blaise Pascal editor managed to download, so it must work. He was using Windows.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Virtual Machine + Lazarus + Android
« Reply #28 on: January 01, 2012, 09:07:08 pm »
MD5 sum (a5efbc5c07fecec7f462d05c9408b4f0) matched with what was on Sourceforge. 7zip GUI and 7za.exe on Windows x64 both failed (CRC error).

Using infozip's unzip.exe 6.00 seemed to work - probably a bug in 7zip !?!?
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

DelphiFreak

  • Sr. Member
  • ****
  • Posts: 255
    • Fresh sound.
Re: Virtual Machine + Lazarus + Android
« Reply #29 on: January 02, 2012, 09:39:04 am »
Ok, I unzipped the file on a windows machine and it worked. No idea why it's not possible to unzip on linux.(tried also with peazip, claims also crc-failure)

Anyway, I could start the virtual-machine now. But when I start lazarus, I get immediately the error message "Compiler "usr/bin/fpc" does not support target arm-linux.
Linux Mint 20.3, Lazarus 2.3, Windows 10, Delphi 10.3 Rio, Delphi 11.1 Alexandria

 

TinyPortal © 2005-2018