Recent

Author Topic: Batch "publish" of all projects at once  (Read 1084 times)

Ten_Mile_Hike

  • Jr. Member
  • **
  • Posts: 91
Batch "publish" of all projects at once
« on: January 10, 2025, 09:47:39 pm »
Using <Project> <Publish Project> Lazarus allows the creation of a folder that contains a "sanitized" version of the project currently open in the Lazarus IDE. My question is... Is there a way via command line or Windows batch file or any other way that I can publish all 50 projects in my "Laz_Projects" folder to say (for instance) a "Laz_Published_projects" folder so that I don't have to do all 50 projects individually?

TIA 
When any government, or any church for that matter, undertakes to say to its subjects, This you may not read, this you
must not see, this you are forbidden to know, the end result is tyranny and oppression no matter how holy the motives.

Robert A. Heinlein

nouzi

  • Sr. Member
  • ****
  • Posts: 311
Re: Batch "publish" of all projects at once
« Reply #1 on: January 11, 2025, 02:29:03 am »
Write script or see this link
https://wiki.freepascal.org/Project_Groups
My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

n7800

  • Full Member
  • ***
  • Posts: 200
Re: Batch "publish" of all projects at once
« Reply #2 on: January 14, 2025, 09:39:08 pm »
The IDE doesn't provide this in the command line interface. You can call it with "-h" and see for yourself. I don't see such a feature in Project Groups either (not in the article, not in the IDE).

I think it's worth creating such a feature request on the bug tracker. In general, Project Groups currently lacks a lot of functionality... Maybe I'll even try to write a patch.

But in the best case, all this will be in a new version of Lazarus. If you need a solution right now, you can write a small package for this purpose (which will add such a command line parameter). I tried writing a draft, and it seems to work. If you really need it, I can share.

EDIT: Creating a project group from a specified folder (recursively) is already possible.
« Last Edit: January 14, 2025, 09:42:10 pm by n7800 »

dbannon

  • Hero Member
  • *****
  • Posts: 3196
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Batch "publish" of all projects at once
« Reply #3 on: January 15, 2025, 07:59:53 am »
All publish does is (possibly clean the directory and) make a list of necessary files and zip them up You need a list of necessary file types, might need a bit of thinking I suppose -
pas, pp, lfm, inc, ico, lpi, lpr, res, ....

Pretty simple script, but a bash script would not help you, that is all I could contribute.

Bonus marks if it did not not need the previous zip removed, instead, date stamp the zip file. Make sure the date stamp is sort-able.

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

n7800

  • Full Member
  • ***
  • Posts: 200
Re: Batch "publish" of all projects at once
« Reply #4 on: January 15, 2025, 04:50:57 pm »
The "publish" feature also clears debug info, bookmarks, jump history, etc. Most of this is stored in LPS, but it may also be stored in LPI, depending on the settings.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8133
Re: Batch "publish" of all projects at once
« Reply #5 on: January 15, 2025, 05:42:45 pm »
In any event, the more I use the projects group facility the more I like it.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018