Re: [Geany-Devel] Setting Windows working directory

2013-03-13 Thread Lex Trotman
On 13 March 2013 17:01, Enrico Tröger enrico.troe...@uvena.de wrote:
 Hey,

 We have had a report on IRC that running geany on the windows command
 line will only open files in the Geany install directory unless you
 use the full path.

 eg C:\somepath geany somefile.txt

 will open installpath\somefile.txt not somepath\somefile.txt.

 And with the Open new documents from the command line option set it
 creates somefile.txt in the install dir since it doesn't exist there.

 Oops.
 Dammit, I broke this with the mentioned commit. After you said it, it is
 totally obvious.
 Well that change was a workaround at all but now we need another
 workaround. The problem is that some code, I don't remember exactly
 whether it were only plugins or also Geany code, read resource files
 from a relative path like \data\foo.bar.

Shouldn't plugins use geany-app-configdir as the base directory as
per http://www.geany.org/manual/reference/structGeanyApp.html

and if its Geany it can use GeanyApp.datadir as the system data directory.


 For this to work, the working
 directory must be set correctly. The reason for the mentioned change was
 this in some plugin, so I've moved the code to change the working
 directory to perform it earlier in the init process, before loading plugins.
 For a quick'n'dirty fix we could either move the working directory
 change code move after command line parsing code but before plugin
 loading or we remember the working directory at early stage to use this
 when llater handling command line arguments.
 Both are not nice and the real solution is to get rid of relative paths
 for resources in the installation directory.
 I'm going to work on this.

Yes it would be better to keep the working dir, ... well ... the working dir :)



 As the most experienced windowser (and the committer of that change)
 could you look at it please?

 most experienced windowser?
 Really not. Using Windows once or twice a year, depending of the amount
 of Geany releases :).

Well, thats approaching infinitely more often than me (as my use
approaches asymptotically zero), Matthew is on holidays, and Colomban
denies knowledge of what Windows means :)


Cheers
Lex


 Regards,
 Enrico

 --
 Get my GPG key from http://www.uvena.de/pub.asc


 ___
 Devel mailing list
 Devel@lists.geany.org
 https://lists.geany.org/cgi-bin/mailman/listinfo/devel

___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Setting Windows working directory

2013-03-13 Thread Dimitar Zhekov
On Wed, 13 Mar 2013 11:26:19 +1100
Lex Trotman ele...@gmail.com wrote:

 We have had a report on IRC that running geany on the windows command
 line will only open files in the Geany install directory unless you
 use the full path.
 
 Suspicion is falling on
 https://github.com/geany/geany/commit/775ef628688c69de34640e12666aed5762a80dff
 
 As the most experienced windowser (and the committer of that change)
 could you look at it please?

git 775ef628688c69de34640e12666aed5762a80dff: [...] see bug #2626124

I work with Win~1 daily, and can assure you that it's pretty normal for
an NT based system to lock a directory from which a file was open,
until the program which opened the file is exited. Hell, even Explorer
can lock a directory, for example by reading the pictures in it to show
previews - you can delete all files, but have to kill Explorer and
start it again via Task Manager to remove the directory.

--

On Wed, 13 Mar 2013 07:01:11 +0100
Enrico Tröger enrico.troe...@uvena.de wrote:

 The problem is that some code, I don't remember exactly
 whether it were only plugins or also Geany code, read resource files
 from a relative path like \data\foo.bar.

s/buggy_code/g_build_filename(GEANY_DATADIR|PLUGINDATADIR, ...)/g

I use good file manager and never specify files to open from the
command line (cmd is a lame shell), so I never noticed this bug...

-- 
E-gards: Jimmy
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


[Geany-Devel] Setting Windows working directory

2013-03-12 Thread Lex Trotman
Hi Enrico,

We have had a report on IRC that running geany on the windows command
line will only open files in the Geany install directory unless you
use the full path.

eg C:\somepath geany somefile.txt

will open installpath\somefile.txt not somepath\somefile.txt.

And with the Open new documents from the command line option set it
creates somefile.txt in the install dir since it doesn't exist there.

Suspicion is falling on
https://github.com/geany/geany/commit/775ef628688c69de34640e12666aed5762a80dff

As the most experienced windowser (and the committer of that change)
could you look at it please?

Cheers
Lex
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel