Recent

Author Topic: .cfg problems when installing Lazarus 3.4  (Read 867 times)

AgriMensor

  • New Member
  • *
  • Posts: 41
.cfg problems when installing Lazarus 3.4
« on: September 28, 2024, 07:04:56 pm »
I have, seemingly successfully, installed Lazarus 3.4 on my Win 10 computer other than it did not place the link on the Windows Desktop which I requested it to do by ticking the relevant box. There were no error messages during the install process. I was previously using Lazarus 2.2.6 and, before that, 2.2.4 without any problems. I have now uninstalled 2.2.6.

When I try to start Lazarus 3.4, it gives me the normal splash screen which is then immediately replaced by an error message which starts as follows:
"Upgrade configuration
There is already a configuration from version prior 3.4 in
C:|Users\steph\AppData\local\Lazarus
The old configuration will be upgraded."

It then goes on to say what to do if I want two different Lazarus versions, which I don't.

There are two buttons, "Upgrade" and "Abort". If I press "Abort", it does just that. If I press "Upgrade", the same thing happens.

In the directory folder named above, there are two .cfg files:
"idemake.cfg" and "jcfsettings.cfg". The content of the first of these seems to accurately reflect the 3rd-party components that had been installed in the old 2.2.6 version as well as a lot of other stuff. I have tried removing both files to a temporary folder, but it makes no difference - I still get the same error message although there are now no .cfg files in the AppData\local folder. I have also tried uninstalling Lazarus 3.4 and then a fresh install. Still no difference! No difference on rebooting the computer either  >:( so I am completely unable to use any version of Lazarus on this computer!

Can anyone help, please?

Many thx in advance!

wp

  • Hero Member
  • *****
  • Posts: 12524
Re: .cfg problems when installing Lazarus 3.4
« Reply #1 on: September 28, 2024, 07:19:49 pm »
There are two buttons, "Upgrade" and "Abort". If I press "Abort", it does just that. If I press "Upgrade", the same thing happens.
"The same thing happens" - what do you want to say? That the installation aborts? This should not happen.

Normally "Upgrade" is the correct answer. The installer found somewhere that there was previous installation, and now changes that version information to v3.4. And then the IDE should start.

BUT: This will be the IDE binary contained in the installer. If you had installed 3rd-party components they are not yet active. Because in Lazarus components are compiled into the IDE itself. What you must do is to rebuild the IDE. Sounds scary? No, there is a menu button for this task: "Tools" > "Build Lazarus" (or "Tools" > "Configure Build Lazarus" where you can change compilation settings or enforce a clean compilation which is sometimes necessary when errors occur in the normal compilation). After a while the IDE restarts, and you'll have your components on the palette.

A second BUT: Sometimes the configuration files of a new feature release are not compatible with those of older versions. Be warned that issues may occur in general when you keep the old configuration settings.

AgriMensor

  • New Member
  • *
  • Posts: 41
Re: .cfg problems when installing Lazarus 3.4
« Reply #2 on: September 28, 2024, 07:28:23 pm »
Hi wp!
Thanks for the prompt reply :-)
When I say "the same thing happens", what I mean is that the error message disappears but when I look in the Windows Task Manager, no applications are listed as running, so I assume it has Aborted.
Unfortunately, I can't do as you suggest as Lazarus never starts :-(

wp

  • Hero Member
  • *****
  • Posts: 12524
Re: .cfg problems when installing Lazarus 3.4
« Reply #3 on: September 28, 2024, 07:36:03 pm »
Unfortunately, I can't do as you suggest as Lazarus never starts :-(
Then, I guess that the "2nd BUT" has happened: something in your old configuration is incompatible with v3.4. Delete (or rename) your old configuration directory (C:\Users\steph\AppData\local\Lazarus), and restart the IDE (its installation should have been completed already). However, as a consequence of the new config you'll have to repeat all your user settings and the installation of 3rd-party packages.

Similar things can happen with your projects because Laz 3.0 contains some breaking changes. Read the release notes (https://wiki.freepascal.org/Lazarus_3.0_release_notes) to be prepared and to get an idea what to do.
« Last Edit: September 28, 2024, 07:43:19 pm by wp »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10670
  • Debugger - SynEdit - and more
    • wiki
Re: .cfg problems when installing Lazarus 3.4
« Reply #4 on: September 28, 2024, 08:17:45 pm »
If the "2 versions"... dialog is a rather big dialog, then that happens if your lazarus exe has a new name or folder.
I don't know for sure how that is handled on Linux, because afaik the verison number is part of the foldername...


You may have a different underlying issue. Are you using "startlazarus"? Probably.

If you install any package, then the IDE gets rebuild. But the new executable will not be written to the protected global /usr/...... wherever path.  It will be put somewhere in ~/.lazarus

Now you have a new Lazarus (in /usr/...), but it does not have your installed packages. And an old exe with installed packages. (And if not deleted the old exe without packages in /usr/....

If you started the IDE in any way or form...
- Check in Tools > Options that the path to the lazarus dir points to the new version
- Tools > Build lazarus with profile ....
- Restart

See if that helps.

AgriMensor

  • New Member
  • *
  • Posts: 41
Re: .cfg problems when installing Lazarus 3.4
« Reply #5 on: September 28, 2024, 08:59:47 pm »
Hi again, wp, and thanks!

I have read the Release Notes that you suggested but couldn't find anything relevant that I was using in there.

I then (partly) followed your suggestion to move the whole of the old configuration directory (not just the .cfg files) to a temporary location (in this case, the Windows Desktop) followed by trying to start Lazarus 3.4 again. It loaded, but with a 'default' configuration. I then closed Lazarus and copied the "idemake.cfg" file from the moved directory on the Desktop into the newly created AppData\local\Lazarus directory.

All is now up and running OK (I think) without having to repeat all the User settings and to re-install the several 3rd-party component packages!

I'm extremely grateful for your time and expertise. If you'd like to PM me with your name, I'll include you in the app's "Credits" screen.

AgriMensor

  • New Member
  • *
  • Posts: 41
Re: .cfg problems when installing Lazarus 3.4
« Reply #6 on: September 28, 2024, 09:05:18 pm »
Hi Martin_fr!

Thank you very much for your help an suggestions, but as you will see from my latest reply to wp, I have now managed to cure the problem (I think!).

 

TinyPortal © 2005-2018