Recent

Author Topic: Linux + Wine + Lazarus1.2 + FPC  (Read 2877 times)

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Linux + Wine + Lazarus1.2 + FPC
« on: March 22, 2014, 10:49:48 am »
Hello, I'll only share one experience here.

I needed to test one package yesterday. I run on Linux+Qt 64-bit, so I can test Qt and GTK2 but I wanted to test on Win32 too. I decided to try Wine.
I have installed Wine 1.7.14-1 and I downloaded new Lazarus 1.2 (file lazarus-1.2.0-fpc-2.6.2-win32.exe).
I executed the file - Wine automatically started and downloaded something so installation ran successfully (BTW it installs to /home/{$USERNAME}/.wine/drive_c/lazarus).
I executed Lazarus - works fine - and I installed my *.lpk package. It's well known that Lazarus needs rebuild and restart due to static linking. Here is the issue: during recompilation it freezes on file "main.pp" (I tried twice).
The solution is easy: FPC 2.6.4. I installed fpc-2.6.4.i386-win32.exe and sources(!) from fpc-2.6.4.source.zip.
Now it works fine.
Lazarus 2.1.0 r59757M FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.11.2, Plasma 5.14.2
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: Linux + Wine + Lazarus1.2 + FPC
« Reply #1 on: March 22, 2014, 12:49:46 pm »
Thanks! Good to know. I use wine for a few app with embedded Firebird2.5(test on XUbuntu and openSuSe), everything works well.
Best regards!

devEric69

  • Jr. Member
  • **
  • Posts: 64
Re: Linux + Wine + Lazarus1.2 + FPC
« Reply #2 on: May 22, 2019, 05:23:24 pm »
Hello,

For those who are under Ubuntu, I also post a feedback, on the recent successful installation of Lazarus under Linux\Wine (being under Ubuntu 18.04, this should allow me to test code written under Lazarus\debian\Ubuntu, not working properly, once cross-compiled for Win64 and copied in the /home/.wine/drive_c/test_appli directory), like this:
- download of the latest version for Win64 (currently lazarus-2.0.2.2-fpc-3.0.0.4-win64.exe).
- installation of PlayOnLinux from Ubuntu's software library for GNOME: globally, this program creates Wine containers by copying a .Wine directory specifically for each application that is asked to be installed. It allows you to partition each installation into a virtual Wine, each with its registry, dlls, etc (AFAIK): it looks like multiplexed installations of couples of [Wine + an application], a bit like Snap, but for Wine.
- then, you have to tell PlayOnLinux that you are installing a custom program; you tell how the drive_c subdirectory will be called (I answered "Lazarus"); then, you have to go and choose where the installer's location is; the installation starts; finally, we can create shortcuts (towards Lazarus.exe , uninstalxxxx.exe, etc).
- Lazarus launches well under Wine, and compiles :) .

--
use: Ubuntu 18.04 + Laz. 1.8.5 + FPC 3.0.5.

justnewbie

  • Full Member
  • ***
  • Posts: 199
Re: Linux + Wine + Lazarus1.2 + FPC
« Reply #3 on: May 22, 2019, 06:29:37 pm »
Thanks for the info.
Is it only possible via PlayOnLinux? What if you only used Wine for the install? Did you try it?

lucamar

  • Hero Member
  • *****
  • Posts: 1546
Re: Linux + Wine + Lazarus1.2 + FPC
« Reply #4 on: May 22, 2019, 06:31:59 pm »
Thanks for the info.
Is it only possible via PlayOnLinux? What if you only used Wine for the install? Did you try it?

I did, and it works mostly OK. There may be some problems with some of the more esoteric API calls, but nothing to be worried about.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 1.8.4 & 2.0.2 w/FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

justnewbie

  • Full Member
  • ***
  • Posts: 199
Re: Linux + Wine + Lazarus1.2 + FPC
« Reply #5 on: May 22, 2019, 06:34:12 pm »
Thanks for the info.
Is it only possible via PlayOnLinux? What if you only used Wine for the install? Did you try it?

I did, and it works mostly OK. There may be some problems with some of the more esoteric API calls, but nothing to be worried about.
Great, thanks for the info!

devEric69

  • Jr. Member
  • **
  • Posts: 64
Re: Linux + Wine + Lazarus1.2 + FPC
« Reply #6 on: May 23, 2019, 12:19:01 pm »
Whether installed directly in Wine or in a PlayOnLinux container, the advantage is that it's convenient to be able to debug on the same machine with a Lazarus under Linux and another Lazarus of the same version under Wine: the 10, 15% to specifically develop \ customize \ adapt some code pieces due to behaviors that differ according to the widgets and display (gtk versus GDI), access to files under Linux or Windows,...., can be done by loading \ debuging the same project in one Lazarus then in the other, using conditional compilation directives such as:
Code: Pascal  [Select]
  1. ...(common code)...
  2. {$if defined(Win64)}
  3. .../...
  4. {$ElseIf defined(UNIX)}
  5. .../...
  6. {$endif}
  7. ...(common code)...
  8.  


It's pretty amazing :o .
--
use: Ubuntu 18.04 + Laz. 1.8.5 + FPC 3.0.5.