Recent

Author Topic: Change packages folder and recompile Lazarus IDE  (Read 1017 times)

daniel_sap

  • Jr. Member
  • **
  • Posts: 94
Change packages folder and recompile Lazarus IDE
« on: April 01, 2025, 08:57:01 am »
Hi
I keep most of the loaded packages in a specific folder 'packages1'.
Now I want to move them in different folder 'packages2'

I imagine this to happen by executing the following steps:
1. Close Lazarus IDE
2. Open packages configuration file and Replace All packages1 with packages2 occurrences
3. Open Lazarus IDE
4. Build Lazarus with Profile

But not sure if this approach is possible and if there is better solution.

dsiders

  • Hero Member
  • *****
  • Posts: 1430
Re: Change packages folder and recompile Lazarus IDE
« Reply #1 on: April 01, 2025, 08:31:04 pm »
Hi
I keep most of the loaded packages in a specific folder 'packages1'.
Now I want to move them in different folder 'packages2'

I imagine this to happen by executing the following steps:
1. Close Lazarus IDE
2. Open packages configuration file and Replace All packages1 with packages2 occurrences
3. Open Lazarus IDE
4. Build Lazarus with Profile

But not sure if this approach is possible and if there is better solution.

Why don't you just use the IDE the way it was intended to be used? Remove the packages, move them to the new directory, and reinstall them from the new directory.
Preview the next Lazarus documentation release at: https://dsiders.gitlab.io/lazdocsnext

wp

  • Hero Member
  • *****
  • Posts: 12859
Re: Change packages folder and recompile Lazarus IDE
« Reply #2 on: April 01, 2025, 09:25:02 pm »
But not sure if this approach is possible and if there is better solution.
Not sure either, but I guess it should work. Make a backup copy of you user profile directory before trying. (The user profile is in the directory listed as "Primary config directory" in "View" > "IDE Internals" > "About IDE")

daniel_sap

  • Jr. Member
  • **
  • Posts: 94
Re: Change packages folder and recompile Lazarus IDE
« Reply #3 on: April 03, 2025, 12:19:21 am »
I just moved one of the packages to a different folder and everything works fine

1. Get "Primary config directory" from "View" > "IDE Internals" > "About IDE"
2. Close Lazarus IDE
3. Move whole package folder to different folder (or just rename folder)
4. Open packagefiles.xml for editing, find the moved package by name and change the Filename to point to the new folder
5. Open Lazarus IDE - opens normally, projects compile normally, Build Lazarus with Profile: Normal IDE also builds normally



- - -
Hi
I keep most of the loaded packages in a specific folder 'packages1'.
Now I want to move them in different folder 'packages2'

I imagine this to happen by executing the following steps:
1. Close Lazarus IDE
2. Open packages configuration file and Replace All packages1 with packages2 occurrences
3. Open Lazarus IDE
4. Build Lazarus with Profile

But not sure if this approach is possible and if there is better solution.

Why don't you just use the IDE the way it was intended to be used? Remove the packages, move them to the new directory, and reinstall them from the new directory.
There are a lot of packages
« Last Edit: April 03, 2025, 12:44:46 am by daniel_sap »

 

TinyPortal © 2005-2018