Recent

Author Topic: Synchronizing Lazarus projects  (Read 2394 times)

stem

  • Full Member
  • ***
  • Posts: 101
Synchronizing Lazarus projects
« on: March 10, 2026, 01:58:45 pm »
Hi,

I work on different PCs with different operating systems (Windows, Linux, macOS). What's the best way to work on the same Lazarus project? (not simultaneously)

a) Zip the project folder and transfer the ZIP file back and forth.
b) The project is in the cloud, and the directory is mounted as a network drive, etc.
c) CVS

I'm specifically looking for the entire directory, including all the files within it.

Which options would you recommend? Does anyone have experience with option b)? Is it suitable in terms of performance/latency?

Thanks.

Stefan

cdbc

  • Hero Member
  • *****
  • Posts: 2716
    • http://www.cdbc.dk
Re: Synchronizing Lazarus projects
« Reply #1 on: March 10, 2026, 02:24:05 pm »
Hi
a) Bothersome :(
b) Fragile, especially if laz/fpc & 'cloud-mapper-software' manipulates files /
    dirs at the same time...
c) Best solution ever = Gitlab + git  8-)
I use Gitlab/git everyday on different computers and it never fails.  ...Ofc. there is a learning curve with Git, but it is worth it!!!
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12764
  • FPC developer.
Re: Synchronizing Lazarus projects
« Reply #2 on: March 10, 2026, 02:25:18 pm »
I use Subversion on a RPI4 based server, with a tortoisesvn client on the Windows machines.  The PI runs plain raspbian but has an old SSD in a external USB3 cabinet. This avoids trouble with the repeated access wearing out SD cards.

I avoid committing binaries to the repository, and keep a folder that I rsync for binary assets (mostly images and opengl font maps). Both SVN and rsync work remotely via a SSH(putty) tunnel, so basically from any place with a telephone hotspot.

The backup of my 10 year repository (full time work!) is 30MB, and I rsync that backup from the PI weekly.

IMHO the learning curve of GIT is NOT worth it :-)
« Last Edit: March 11, 2026, 01:07:53 pm by marcov »

stem

  • Full Member
  • ***
  • Posts: 101
Re: Synchronizing Lazarus projects
« Reply #3 on: March 10, 2026, 02:34:35 pm »
Thanks for the answers.

Does this work via an IDE plugin from Lazarus or at the operating system's file system level?

What kind of cloud storage is supported? Can I use my existing ownCloud storage?

What's the process?

  • I synchronize my local directory with the cloud using a command/click.
  • I work with Lazarus.
  • Once I'm finished, I synchronize again using a command/click?
?

Thanks. :)

Stefan

LeP

  • Full Member
  • ***
  • Posts: 224
Re: Synchronizing Lazarus projects
« Reply #4 on: March 10, 2026, 02:37:37 pm »
b) The project is in the cloud, and the directory is mounted as a network drive, etc.
Which options would you recommend? Does anyone have experience with option b)? Is it suitable in terms of performance/latency?

In my opinion, option (b) is NOT the best. Working with a network drive can be very risky.
This is especially true if the environment you're working with isn't specifically designed for such use.
It's not just latency that's the problem; it's also the synchronization of individual writes (EDIT, for example), which, if unsuccessful, can cause parts of the source code to be lost.

I use GitHub as a container. Everyone has their own copy that can sync to and from the central container.
Even if there's no connection (as happens to me, working on remote construction sites from time to time), the local copy still allows you to do everything (and it's true that you work always with the local copy and commit the changes).

I don't know if Lazarus/FPC have a synchronization mechanism integrated with systems like GitHub, but Delphi has integration with GitHub git ... and so github ..., and I find it convenient to use.

I don't recommend moving zip files for a variety of reasons, such as the custom configurations for each individual workstation, which must not be overwritten by the contents of the zip file, etc.
« Last Edit: March 10, 2026, 03:09:12 pm by LeP »
Un Sistema per domarli, un IDE per trovarli, un codice per ghermirli e nel framework incatenarli.
An operating system to tame them, an IDE to find them, a code to catch them and in the framework chain them.

PierceNg

  • Sr. Member
  • ****
  • Posts: 434
    • SamadhiWeb
Re: Synchronizing Lazarus projects
« Reply #5 on: March 10, 2026, 02:41:29 pm »
You need version control. Without it the code bases on your different computers will soon diverge and become unmanageable.

I use Fossil, built by the creator of SQLite as the version control system for SQLite. I also have an RPi running Gitea, a Github look-alike. But I prefer Fossil because it is more easily used in a fully distributed style compared to the centralized Github/Gitea model.


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12288
  • Debugger - SynEdit - and more
    • wiki
Re: Synchronizing Lazarus projects
« Reply #6 on: March 10, 2026, 03:18:18 pm »
I join the previous replies in that I would say: Some revision control system. (svn, git, ...). CVS, only if you are an expert on it, and hence want to use it. I am not sure it is even still maintained...

Of course syncing can be done by other means, even a plain network drive. But eventually some file will be synced erroneously. And without revision control, you will loose some of your work.




While I am myself a big fan of git (and you only need git, you do not need github/gitlab/... for what you want to do), I am with MarcoV.

The initial git learning curve is massive. (it may be ok, if you have team mates around locally who have experience, but just from the internet is going to be a lot).

So if you have a small hobby project with moderate amount of changes per time => then git is overkill.



That said, if you anyway look into learning about tools to help you manage your code and its changes... Git has a lot of stuff to offer.
- partial commit (amend) so you can save progress often (and from that later restore any lines of a file that you at some point deleted because you thought you do it differently)
- temporary storage while you try another approach for a feature
- easy branching, you can store any give up attempt... just in case you want to look at it again
- synchronisation in all kind of ways (including with other folders on your filesystem for backup)
- ....

dbannon

  • Hero Member
  • *****
  • Posts: 3775
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Synchronizing Lazarus projects
« Reply #7 on: March 11, 2026, 12:13:01 pm »
I believe, unless the project is very small and moves between different computers very infrequent, you do need something like git AND github/gitlab etc.

git and github do have a learning threshold you must get over but if your needs are modest and you are willing to learn the more arcane arts only when necessary, its not that bad. If, for example, you stick with one branch you really only need to know a very small number of commands, five or six ? That will let you add something to git, commit it, push up to a remote repo and pull down (possibly on another machine). Thats all stem really requested.

Next, there is massive amounts of git documentation on line for that next stage when necessary.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12288
  • Debugger - SynEdit - and more
    • wiki
Re: Synchronizing Lazarus projects
« Reply #8 on: March 11, 2026, 12:20:33 pm »
I believe, unless the project is very small and moves between different computers very infrequent, you do need something like git AND github/gitlab etc.

This is the 2nd post that suggests github/lab would be needed to sync between different computers.

It is not (that much about the learning curve?)

You can have 2 or more computers, that long as they can see each other in a network (home network, office vpn, ....) all you need is git (and from what I hear, svn can do too).

git can talk to another git directly. without any need for gitlab/hub.


That said an account with any of those platforms can make for a nice backup, but that wasn't the question here.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12288
  • Debugger - SynEdit - and more
    • wiki
Re: Synchronizing Lazarus projects
« Reply #9 on: March 11, 2026, 12:26:09 pm »
Also its not about the amount of command you need.

Eventually you will maybe mistype something. You end up detached, or in some state you didn't expect. And then you need to know more...

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12764
  • FPC developer.
Re: Synchronizing Lazarus projects
« Reply #10 on: March 11, 2026, 01:09:21 pm »
(I expanded my post a bit, basically this is an own cloud, but that is a bit much for what is essentially a near vanilla install of a RPI4)


dbannon

  • Hero Member
  • *****
  • Posts: 3775
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Synchronizing Lazarus projects
« Reply #11 on: March 12, 2026, 08:02:08 am »
This is the 2nd post that suggests github/lab would be needed to sync between different computers.
...
git can talk to another git directly. without any need for gitlab/hub.
Yes, I believe it can but I have not tried it. And, with all due respect, I don't intend to. Creating and managing a github account is easy, its safe and its free. The peer to peer model may be too, I don't know. (I guess the initial account is getting harder as they force more security stuff on us. Might be an argument for peer to peer.)

@stem, I don't think anyone answered your question about a Lazarus plugin, no, as far as I know, there is not one. If you are primarily a Linux user, just think of it as a command line thing but there are GUIs.  I suggest you always get in the habit of closing the Lazarus project before doing git stuff.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1225
Re: Synchronizing Lazarus projects
« Reply #12 on: March 12, 2026, 05:46:58 pm »
Hi,

I work on different PCs with different operating systems (Windows, Linux, macOS). What's the best way to work on the same Lazarus project? (not simultaneously)

a) Zip the project folder and transfer the ZIP file back and forth.
b) The project is in the cloud, and the directory is mounted as a network drive, etc.
c) CVS

I'm specifically looking for the entire directory, including all the files within it.

Which options would you recommend? Does anyone have experience with option b)? Is it suitable in terms of performance/latency?

Thanks.

Stefan


This is the 2nd post that suggests github/lab would be needed to sync between different computers.
...
git can talk to another git directly. without any need for gitlab/hub.
Yes, I believe it can but I have not tried it. And, with all due respect, I don't intend to. Creating and managing a github account is easy, its safe and its free. The peer to peer model may be too, I don't know. (I guess the initial account is getting harder as they force more security stuff on us. Might be an argument for peer to peer.)

@stem, I don't think anyone answered your question about a Lazarus plugin, no, as far as I know, there is not one. If you are primarily a Linux user, just think of it as a command line thing but there are GUIs.  I suggest you always get in the habit of closing the Lazarus project before doing git stuff.

Davo

LazGitGui is a standalone Git tool for Lazarus, developed by Jesús Reyes A. (@jesusr, @jesusrmx, @jramx) [better known as LazReport maintainer].

Quote
LazGitGui is a git tool resembling the popular 'git gui' program, with some additional features.
If you don't know what git gui is, it is a graphical representation of the git status, where one can do basic git operations like watch what files under the work space have been modified and see the differences with respect to the original files. It also allow move files between the unstaged and the staged area and make commits from it.
Git Gui has some cool features not yet available in this program, for example the selective apply or revert of hunk and line changes from the diff viewer.
Contrary to Git Gui which relies on gitk for that feature, LazGitGui has a log feature that allows you to see the history of the repository and do some operation on branches and commits.

https://gitlab.com/jramx/lazgitgui


--------------------
CCRDude Lazarus VCS Helper Package is a plugin for the Lazarus IDE that provides version control support for Git and Subversion, leveraging existing installations of TortoiseGit or TortoiseSVN.  It integrates VCS functionality directly into the IDE, allowing users to perform common Git operations without leaving the development environment.

https://www.ccrdude.net/lazarus-ide-addons/

https://gitlab.com/ccrdude-lazarus-ide/lazvcshelper


--------------------
Another project is LazGit, developed by Marcus Fernstrom, which aims to bring Git integration directly into the Lazarus IDE with features like commits, pull requests, and branch management—similar to tools in VSCode or Eclipse.  While not yet officially released, it was actively being developed and available ONLY to Patreon supporters.

https://www.patreon.com/posts/git-integration-47353869

https://github.com/MFernstrom


--------------------
And running on the outside, we have LazyGit - a simple terminal UI for git commands, written in the Go programming language, for use in the terminal:

Lazygit is a terminal-based user interface (TUI) for Git commands, created in 2018 by Australian developer Jesse Duffield. It simplifies common Git operations—such as commit, push, pull, branch creation and deletion, interactive rebase, and stash—through keyboard shortcuts, eliminating the need to memorize long command lines. Ideal for developers of all levels, especially beginners, Lazygit makes Git more intuitive and less error-prone, with clear visualizations of commits, branches, modified files, and differences (diffs).

https://github.com/jesseduffield/lazygit

https://www.freecodecamp.org/news/how-to-use-lazygit-to-improve-your-git-workflow/

 

TinyPortal © 2005-2018