Recent

Author Topic: Suggestion: Uninstall script for Mac Os X  (Read 21309 times)

Stefano

  • New Member
  • *
  • Posts: 39
Suggestion: Uninstall script for Mac Os X
« on: September 24, 2012, 07:57:56 am »
Hello, is there a script to uninstall Lazarus and FPC on Mac Os X, in order to make easy the upgrade to another / next versions of Lazarus?

I think that it would be very useful and might be a good idea to include it in the official packages of the next releases of Lazarus.

For example, for Firebird there is the very good uninstall script of Paul Beach, that semplifies that und make sure to uninstall all, before installing a different version.

I believe that a similar script for FPC/Lazarus would be apprecieted.

On Mac Os 10.7 Lion and Lazarus 0.9.28.2 it seems that the directories used by Lazarus/fpc are:

Code: [Select]
/Developer/lazarus/*
/private/etc/lazarus
/private/var/db/receipts/org.freepascal..........
/Users/myuser/.lazarus
/Users/myuser/Library/Preferences/lazarus.plist
/Users/myuser/Library/Prefernces/lazarus.plist.lockfile
/Users/myuser/Library/Application Support/CrashReporter/Lazarus_D2C.......plist
/usr/local/share/fpcsrc/packages/gtk2/gtk2forlazarus.lpk
/Applications/Lazarus.app

/usr/local/share/src/fpc-2.2.4/*
/usr/local/share/src/fpcsrc/*
/usr/local/share/examples/fpc-2.2.4/*
/usr/local/share/fpc-2.2.4
/usr/local/bin/fpc/*
/Library/Application Support Apple/Developer Tools/Project Templates/Pascal/*
/private/etc/fpc.cfg
/private/var/db/receipts/org.freepascal..........
/usr/local/lib/fpc
/usr/local/bin/fpc....

/usr/local/man/man1/fpc........
/usr/local/man/man5/fpc........
/usr/share/man/man3/fpcöassofy.3
/usr/share/vim/vim73/compiler/fpc.vim

But I'm note sure that is all.

Sorry for my bad English.

Best regards,

Stefano
« Last Edit: September 24, 2012, 08:42:56 am by Stefano »
Stefano Cortelli
Studio Rag. Cortelli
(Preferred languages: Italiano / Deutsch / Français)

jwdietrich

  • Hero Member
  • *****
  • Posts: 1278
    • formatio reticularis
Re: Suggestion: Uninstall script for Mac Os X
« Reply #1 on: October 16, 2012, 01:20:41 am »
I agree, an uninstaller is highly needed.

E.g. Lazarus 1.0.2 doesn't work on Mac OS X 10.4 Tiger, therefore a fast and reliable option for uninstalling Lazarus 1.0.2 and reinstalling 1.0 would be very useful.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 4.2.0 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

kamischi

  • Full Member
  • ***
  • Posts: 177
Re: Suggestion: Uninstall script for Mac Os X
« Reply #2 on: October 18, 2012, 08:15:35 pm »
May I throw in a pointer to fink. Clean uninstall through package management is on of its strong points.

Mischi.
fpc 2.6.4, lazarus 1.4.0, Mac OS X, fink

Hansaplast

  • Hero Member
  • *****
  • Posts: 783
  • Tweaking4All.com
    • Tweaking4All
Re: Suggestion: Uninstall script for Mac Os X
« Reply #3 on: November 05, 2012, 01:56:05 am »
+1 for a clean uninstaller :)

retrostatic

  • Newbie
  • Posts: 1
Re: Suggestion: Uninstall script for Mac Os X
« Reply #4 on: November 12, 2012, 11:55:41 am »
if you look in
Code: [Select]
/Developer/lazarus you will see
Code: [Select]
uninstall.sh . open terminal and type
Code: [Select]
cd / hit enter, then type
Code: [Select]
cd Developer/lazarus. then follow with
Code: [Select]
./uninstall.sh (you might need to put in your admin password.) Pow, application uninstalled. Just hunt down the pref files that linger or leave them there to be overwritten or used should you need them again.

Hope i helped (excuse me if i missed the topic properly, i just skimmed over it)

If you are uber clever, you could write something in automator to do this and remove prefs too.

 8-)

Stefano

  • New Member
  • *
  • Posts: 39
Re: Suggestion: Uninstall script for Mac Os X
« Reply #5 on: November 12, 2012, 11:57:20 pm »
Thanks for your reply, I have found the uninstall.sh file in /Developer/lazarus, but it concerns only a few directories:

/Developer/lazarus
/Application/Lazarus.app
/etc/lazarus
/usr/local/bin/lazbuilds

Unfortunatelly those directories are only a part of the directories that I've found and posted in my message.

So not all files and directories affected with the installation of Lazarus are uninstalled by the uninstall.sh script.

Moreover, it is necessary to uninstall also FPC, in any case the upgrading (or downgrading) of the version of Lazarus requires a different version of FPC.

On the Wiki of Lazarus I've found this interessant page with a more complet example of the uninstall script:

http://wiki.freepascal.org/OS_X_Programming_Tips#Uninstalling_Lazarus_and_Free_Pascal

but of course it is necessary to addapt it for the different versions of Lazarus.

So I think that it would be better, if each version of Lazarus would have its own uninstall (complete) script for Lazarus and FPC: so the same files und directories that are installed can be all uninstalled.

Sorry for my bad English.

Best regards,

Stefano
Stefano Cortelli
Studio Rag. Cortelli
(Preferred languages: Italiano / Deutsch / Français)

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Suggestion: Uninstall script for Mac Os X
« Reply #6 on: November 13, 2012, 04:53:55 am »
So I think that it would be better, if each version of Lazarus would have its own uninstall (complete) script for Lazarus and FPC: so the same files und directories that are installed can be all uninstalled.

I would suggest thinking about Lazarus and FPC separately. For Lazarus the solution is pretty clear: Make the entire Lazarus installation into a normal OS X app bundle the way Xcode does. Simple to install and uninstall. Simple to have multiple versions installed.

FPC is a bit different. Even though Xcode includes all of the command line tools within the Xcode.app bundle, Apple also makes available an optional installer for the command line tools to be placed in their traditional Unix-y locations. FPC is similar in that it likes to be distributed to Unix-y places. However, unlike the Apple tools, you can have multiple installations of FPC.

Bottom line: No need for an uninstaller script that removes both Lazarus and FPC, despite what the author of the wiki script and page you reference (me, 6.5 years ago) suggests.

Solution: Lazarus just needs to get with it.

Also note that in your file list, you've included at least one file that I don't believe is even installed as part of Lazarus or FPC.

Thanks.

-Phil
« Last Edit: November 13, 2012, 05:04:03 am by Phil »

Stefano

  • New Member
  • *
  • Posts: 39
Re: Suggestion: Uninstall script for Mac Os X
« Reply #7 on: November 14, 2012, 06:26:34 pm »
I agree, the best solution would be to have Lazarus as an application bundle, with FPC in the bundle. I believe, that would be similar to the Windows environnement, where there is a Lazarus directory that contains either Lazarus or FPC.

That schould allow to execute also command line tools of Lazarus, e.g. lazres (it would be great, if Lazarus might have a function for regenerate the lrs files from the lfm files of a project).

I don't know if the staff of Lazarus is interested to do so at the time. The Mac version of Lazarus would necessitate of some features that at the moment felt, e.g. the build of the entire application bundle, even with the version 1.0.2 the application is out the bundle and it is necessary to copy it into the bundle.

So I thought that, until Lazarus is not yet a complet app bundle, also an uninstaller script for FPC, and an uninstaller script for Lazarus would be easy to do and very appreciated, in order to can uninstall, what the DMG has installed.

Quote
Also note that in your file list, you've included at least one file that I don't believe is even installed as part of Lazarus or FPC.

This is the problem, I'm not sure which files I must delete for uninstall Lazarus and FPC, in order to upgrade Lazarus 0.9.28.2 to the next version of Lazarus.

At the moment I've installed Lazarus 1.0.2 on a virtual machine with Parallels, but when the next release of Lazarus will be released, I wolud uninstall the 0.9.28.2 version on the main machine and install it (1.0.4 or 1.2).

I don't know if these files are von Lazarus:

Code: [Select]
/Library/Application Support Apple/Developer Tools/Project Templates/Pascal/*
/private/etc/fpc.cfg
/usr/local/man/man1/fpc........
/usr/local/man/man5/fpc........
/usr/share/man/man3/fpcöassofy.3
/usr/share/vim/vim73/compiler/fpc.vim


or if there are Lazarus or FPC files, that I've not wrote in the list.

Best regards,

Stefano
Stefano Cortelli
Studio Rag. Cortelli
(Preferred languages: Italiano / Deutsch / Français)

 

TinyPortal © 2005-2018