Recent

Author Topic: Win to Linux application transfer  (Read 2214 times)

Ruptor

  • Full Member
  • ***
  • Posts: 191
Win to Linux application transfer
« on: February 08, 2016, 03:14:15 pm »
I have a GUI in win XP that I want to transfer and compile on Linux Suse. I wrote it and compiled it on Linux then took the FRM and PAS files to the win XP computer and made it work but when I brought the two files back to the Linux box to compile them the project complains that the unit .pas file doesn't appear to be a test file. I am using Lazarus 1.6CR2 on both machines because I want to use the serial port in FPC 3. I don't remember having this problem with a couple of other programs on previous versions of Lazarus like 1.4 but I did have issues with directory structures where I tried to use the Linux project files that ended creating complex Linux file system under the project directory but all I had to do was set up new paths to fix it. Does the new problem above mean I should transfer the project files as well as the FRM & PAS or is it something to do with version 1.6RC2?

Ruptor

  • Full Member
  • ***
  • Posts: 191
Re: Win to Linux application transfer
« Reply #1 on: February 08, 2016, 03:35:17 pm »
I have tried opening the PAS file using KWrite but it didn't like the file so at this point it looks like the file is corrupted but I will have to check the file on the WinXP computer tonight to see if it still OK. I would still like a pointer to the best way to transfer a project from one operating system to another.

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
Re: Win to Linux application transfer
« Reply #2 on: February 08, 2016, 03:39:50 pm »
I would think you need *.lpr, *.lpi, *.pas and *.lfm (AKA "the source") if you want to transfer teh project to another machine.
Apply the same directory layout on both machines, this will make things a lot easier.

E.g. I have:
Code: [Select]
SomePath
|_LazarusProjecten
  |_MijnLib
  |_SomeProject
  |_AnotherProject

on all my machines (actually under svn control).
And only use relative paths, not absolute ones, in your project options.
I can "transfer" each and every project form one machine to another, then build without problems.

Bart

Ruptor

  • Full Member
  • ***
  • Posts: 191
Re: Win to Linux application transfer
« Reply #3 on: February 08, 2016, 03:45:53 pm »
Ok Thanks Bart. It turns out both the FRM & PAS files are corrupted so I don't know what has happened to them. Maybe the flash drive is defective  :(

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
Re: Win to Linux application transfer
« Reply #4 on: February 08, 2016, 04:11:34 pm »
If you do your development on different machines, you would do yourself a favour by using a version control system (git, svn).
There are plenty free possibilities out there.

Bart

 

TinyPortal © 2005-2018