New user and a little bug

If you are developing Gestinux or if you want to join the developers, write your questions and remarks here.
Locked
xinyiman
Posts: 2
Joined: 31 Jan 2016, 17:21

New user and a little bug

Post by xinyiman »

Hello, I am a new user Italian. I am the coordinator of the Italian community of Lazarus. I tried to install your software and I must say it is very nice.

I installed version ready. Then I took a copy of the database and I downloaded the source. It seems to work well, but has a small bug (at least on ubuntu linux). Your code was

if Application.HasOption('u', 'gestinux_util') then
DIR_LANG_UTIL := Application.GetOptionValue('u', 'gestinux_util')+DirectorySeparator+'languages' + DirectorySeparator
else
DIR_LANG_UTIL := DIR_LANGUAGES;

after my change. Now translate it's ok

if Application.HasOption('u', 'gestinux_util') then
DIR_LANG_UTIL := Application.GetOptionValue('u', 'gestinux_util')+{DirectorySeparator+}'languages' + DirectorySeparator
else
DIR_LANG_UTIL := DIR_LANGUAGES;
tintinux
Site Admin
Posts: 173
Joined: 21 Jun 2012, 19:07
Location: Blois (France)
Contact:

Re: New user and a little bug

Post by tintinux »

Hi

Thanks for reporting this issue.

I think that the code is working fine for Lazarus 1.2.6, but Gestinux was not tested with more recent versions.

Which version of Lazarus are you using ?
I suspect a change in the Pkg.DirectoryExpanded function, called in Gestinux/util/gtranslations.pas
Can you check if there is not a DirectorySeparator added at the end of the function result in a recent version, and if possible in which version ?

Depending on your investigation, the code might have to be changed in order to remain compatible at least with the last stable version.

Regards
Tintinux
xinyiman
Posts: 2
Joined: 31 Jan 2016, 17:21

Re: New user and a little bug

Post by xinyiman »

What is the name of the unit where should I look?


My lazarus version: 1.4.0+dfsg-5
Ver FPC: 2.6.4
i386-linux-gtk 2
tintinux
Site Admin
Posts: 173
Joined: 21 Jun 2012, 19:07
Location: Blois (France)
Contact:

Re: New user and a little bug

Post by tintinux »

Hi

What do you want to look at ?

To check if there were a change between 1.2.6 and 1.4, you can try read the relase notes (I didn't noticed it), and/or check the svn history of the Lazarus source MacroDefIntf in components/ ideintf/packageintf.pas.

If the change is confirmed, I suggest to modify procedure Register of Gestinux/util/gtranslations.pas where DirectoryExpanded is called to define an EDI macro used by projects using gestiux_util.
I suggest to wrap the result in ExcludeTrailingPathDelimiter

This way, no need to change gestinux.lpr and other projects using gestinux_util... and they will hopefully work with versions from 1.2.6 to 1.6.*

Let me know if you want a developer profile in Gestinux svn.

Best regards
tintinux
Site Admin
Posts: 173
Joined: 21 Jun 2012, 19:07
Location: Blois (France)
Contact:

Re: New user and a little bug

Post by tintinux »

Hi
Did you find something ?
I can't install 1.4 or 1.6 currently.

Regards
Troxel
Posts: 1
Joined: 18 May 2018, 11:26

Re: New user and a little bug

Post by Troxel »

Was this issue resolved, Tintinux? I'm a new user as well and I'm just curious to know what to expect.
I think D-Bal Max is the real deal and I love it.
tintinux
Site Admin
Posts: 173
Joined: 21 Jun 2012, 19:07
Location: Blois (France)
Contact:

Re: New user and a little bug

Post by tintinux »

Welcome !

I was not able to reproduce this issue with any Lazarus version with any environment. Did you ?

If you did, can you first check that in the Parameters there is really :

Code: Select all

-u ${GESTINUX_UTIL}
and not

Code: Select all

-u ${GESTINUX_UTIL}/
If it is right, may be for some reason, a directory separator is appended to the result of the macro GESTINUX_UTIL, which comes from the result of TIDEPackage.DirectoryExpanded
Possibily the result is depending on the way the package is installed, but never occured for me, so I can't help...

If this is confirmed the fix proposed by xinyman will not work for me. Instead we should change in util \GTranslations :

Code: Select all

IDEMacros.Add(TTransferMacro.Create('GESTINUX_UTIL',Pkg.DirectoryExpanded,'',nil,[])); 
by

Code: Select all

IDEMacros.Add(TTransferMacro.Create('GESTINUX_UTIL',ExcludeTrailingPathDelimiter(Pkg.DirectoryExpanded),'',nil,[])); 
Let me know what you found.

Best regards

Tintinux
Locked