[Lazarus] The default Lazarus profile directory location
Graeme Geldenhuys
graemeg.lists at gmail.com
Thu Jun 4 14:39:09 CEST 2009
2009/6/4 Vincent Snijders <vsnijders at vodafonevast.nl>:
>
> How can I extract the patch with diff that I can apply to create snapshots
> for people to test and find bugs? After all I think this code is too
> dangerous to keep it in trunk. A patch must be reverted quickly if it turns
> out to break too many things.
To save you the trouble of treating custom snapshots, they can simply
use git to pull in the lazarus repository - instead of using SVN.
They way they can switch in seconds between my custom branch or the
clean upstream branch (which is exactly the same as SubVersion trunk).
Alternatively one can rut the following against the git repository
$ git format-patch remotes/origin/upstream
This will generate patch files for all custom changes. The patch files
will start with a four digit number, which is the order in which they
need to be applied.
Anything I change and that I think is remotely useful to others, I
normally submit to Mantis anyway. So extracting those patches is
probably not that useful to others.
> Lazarus yes, the win32 RTL unfortunately not so easily.
But isn't that what the FileUtil.pas unit and all the xxxxUTF8()
functions and procedures are for? Wrappers for the non-unicode RTL.
> No, the poor programmer replaces ExtractFilePath(ParamStr(0)) with
> GetAppConfigDir(false) and then found out, that that doesn't work correctly.
Considering that most OS's do not allow write access in the
application install directory, there first attempt was flawed anyway.
Using the GetAppConfigDir(false) is a step in the write direction for
them.
> LazConf is used by Lazarus and LazBuild and StartLazarus, so GetAppConfigDir
> doesn't really work out of the box. I bet you didn't think about that when
> you just proposed to make things easier.
I did not claim that I know the internals of the IDE, but as a
developer I do tend to test things before I make claims. I can always
look into the "potential" issues, but so far I have not found any.
With the small patch I showed earlier (which uses GetAppConfigDir()
under unix environments), 'lazarus' and 'startlazarus' works just like
they did before - passing in parameters on not.
BTW:
Did you know that startlazarus already contains exceptions to the rule
and a potential bug. For OS X, it uses an ifdef to launch a different
executable. That code looks flawed though. It checks for 'LCLCarbon',
but what about 'LCLCocoa', which as far as I understand also uses
application bundles (a mac thing). Shouldn't that ifdef change to
'darwin' instead which is then generic to OS X and not to a specific
GUI toolkit?
> Anyway, I rather work on something more useful than reducing the code in
> lazbaseconf.inc and debugging it.
The word you are looking for is called "refactoring", and it is
actually a vital part in software development. ;-) The alternative in
a few years (if that long) would be bloated and unmanageable spaghetti
code.
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the Lazarus
mailing list