Hi all
I hoped to be able to dig into it myself, but I can't figure out why it is behaving different on Windows compared to Linux.
[declare -stdpath osc] has no effect on Windows. I have 'osc' installed in <pd-path>\extra\osc and when I create [routeOSC /bla], the Pd output looks like this:
tried Z:/home/roman/routeOSC.m_i386 and failed tried C:/Program Files/Common Files/Pd/routeOSC.m_i386 and failed tried C:/users/roman/Application Data/Pd/routeOSC.m_i386 and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC.m_i386 and failed tried Z:/home/roman/routeOSC.dll and failed tried C:/Program Files/Common Files/Pd/routeOSC.dll and failed tried C:/users/roman/Application Data/Pd/routeOSC.dll and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC.dll and failed tried Z:/home/roman/routeOSC/routeOSC.m_i386 and failed tried C:/Program Files/Common Files/Pd/routeOSC/routeOSC.m_i386 and failed tried C:/users/roman/Application Data/Pd/routeOSC/routeOSC.m_i386 and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC/routeOSC.m_i386 and failed tried Z:/home/roman/routeOSC/routeOSC.dll and failed tried C:/Program Files/Common Files/Pd/routeOSC/routeOSC.dll and failed tried C:/users/roman/Application Data/Pd/routeOSC/routeOSC.dll and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC/routeOSC.dll and failed tried Z:/home/roman/routeOSC.pd and failed tried C:/Program Files/Common Files/Pd/routeOSC.pd and failed tried C:/users/roman/Application Data/Pd/routeOSC.pd and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC.pd and failed tried Z:/home/roman/routeOSC.pat and failed tried C:/Program Files/Common Files/Pd/routeOSC.pat and failed tried C:/users/roman/Application Data/Pd/routeOSC.pat and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC.pat and failed tried Z:/home/roman/routeOSC/routeOSC.pd and failed tried C:/Program Files/Common Files/Pd/routeOSC/routeOSC.pd and failed tried C:/users/roman/Application Data/Pd/routeOSC/routeOSC.pd and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC/routeOSC.pd and failed routeOSC /bla error: ... couldn't create
(The output is actually from Wine, but it really behaves the same on Windows)
There is no mention of 'osc' whatsoever.
On the other hand, [declare -stdlib zexy] works the same on Linux and on Windows.
[declare -stdpath] used to work on Windows in older version of Pd, but I can't tell exactly since when it isn't working anymore.
Roman
Interesting... I can't get -stdpath to work either on wine or in linux.
But I noticed that -stdpath cecks if each directory exists before adding it... therefore perhaps it found 'zexy' and didn't find 'osc' - in that case it wouldn't print anything out aboutosc - it just silently ignores the non-existent directories.
cheers Miller
On Wed, Sep 02, 2015 at 12:00:32PM +0200, Roman Haefeli wrote:
Hi all
I hoped to be able to dig into it myself, but I can't figure out why it is behaving different on Windows compared to Linux.
[declare -stdpath osc] has no effect on Windows. I have 'osc' installed in <pd-path>\extra\osc and when I create [routeOSC /bla], the Pd output looks like this:
tried Z:/home/roman/routeOSC.m_i386 and failed tried C:/Program Files/Common Files/Pd/routeOSC.m_i386 and failed tried C:/users/roman/Application Data/Pd/routeOSC.m_i386 and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC.m_i386 and failed tried Z:/home/roman/routeOSC.dll and failed tried C:/Program Files/Common Files/Pd/routeOSC.dll and failed tried C:/users/roman/Application Data/Pd/routeOSC.dll and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC.dll and failed tried Z:/home/roman/routeOSC/routeOSC.m_i386 and failed tried C:/Program Files/Common Files/Pd/routeOSC/routeOSC.m_i386 and failed tried C:/users/roman/Application Data/Pd/routeOSC/routeOSC.m_i386 and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC/routeOSC.m_i386 and failed tried Z:/home/roman/routeOSC/routeOSC.dll and failed tried C:/Program Files/Common Files/Pd/routeOSC/routeOSC.dll and failed tried C:/users/roman/Application Data/Pd/routeOSC/routeOSC.dll and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC/routeOSC.dll and failed tried Z:/home/roman/routeOSC.pd and failed tried C:/Program Files/Common Files/Pd/routeOSC.pd and failed tried C:/users/roman/Application Data/Pd/routeOSC.pd and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC.pd and failed tried Z:/home/roman/routeOSC.pat and failed tried C:/Program Files/Common Files/Pd/routeOSC.pat and failed tried C:/users/roman/Application Data/Pd/routeOSC.pat and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC.pat and failed tried Z:/home/roman/routeOSC/routeOSC.pd and failed tried C:/Program Files/Common Files/Pd/routeOSC/routeOSC.pd and failed tried C:/users/roman/Application Data/Pd/routeOSC/routeOSC.pd and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC/routeOSC.pd and failed routeOSC /bla error: ... couldn't create
(The output is actually from Wine, but it really behaves the same on Windows)
There is no mention of 'osc' whatsoever.
On the other hand, [declare -stdlib zexy] works the same on Linux and on Windows.
[declare -stdpath] used to work on Windows in older version of Pd, but I can't tell exactly since when it isn't working anymore.
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Fre, 2015-09-04 at 17:20 -0700, Miller Puckette wrote:
Interesting... I can't get -stdpath to work either on wine or in linux.
What is your test setup? It works for me in Linux.
But I noticed that -stdpath cecks if each directory exists before adding it...
How can I see that?
therefore perhaps it found 'zexy' and didn't find 'osc' - in that case it wouldn't print anything out aboutosc - it just silently ignores the non-existent directories.
I see. You mean when I specify a non-existing directory like [declare -stdpath notthere], it becomes not part of the search path list? Ok, this would mean 'osc' was not added in Windows, because Pd thinks it doesn't exist. But why does it think it doesn't exist when it is actually there? I tried putting 'osc' in the standard search paths like:
What exact setup did you try that didn't work under Linux? '/home/roman/pd-externals/osc' and [declare -stdpath osc] works for me with most recent git checkout.
Roman
Hey Miller
I got it working on Windows by removing the check you mentioned:
diff --git a/src/g_canvas.c b/src/g_canvas.c index fbeef3d..de38e56 100644 --- a/src/g_canvas.c +++ b/src/g_canvas.c @@ -1337,11 +1337,8 @@ static void canvas_stdpath(t_canvasenvironment *e, char *stdpath) { snprintf(strbuf, MAXPDSTRING-1, "%s/%s/", nl->nl_string, stdpath); strbuf[MAXPDSTRING-1]=0;
if (check_exists(strbuf))
{
e->ce_path = namelist_append(e->ce_path, strbuf, 0);
return;
}
}} static void canvas_stdlib(t_canvasenvironment *e, char *stdlib)
Now, the argument to -stdpath is appended unconditionally to the search paths. There is probably good reason why there is a check, I'm not proposing to remove it. But maybe this is gives you a hint at where things go wrong. Somehow the check always fails on Windows, even if the directory exists, while it works fine on Linux.
Roman
On Fre, 2015-09-04 at 17:20 -0700, Miller Puckette wrote:
Interesting... I can't get -stdpath to work either on wine or in linux.
But I noticed that -stdpath cecks if each directory exists before adding it... therefore perhaps it found 'zexy' and didn't find 'osc' - in that case it wouldn't print anything out aboutosc - it just silently ignores the non-existent directories.
cheers Miller
On Wed, Sep 02, 2015 at 12:00:32PM +0200, Roman Haefeli wrote:
Hi all
I hoped to be able to dig into it myself, but I can't figure out why it is behaving different on Windows compared to Linux.
[declare -stdpath osc] has no effect on Windows. I have 'osc' installed in <pd-path>\extra\osc and when I create [routeOSC /bla], the Pd output looks like this:
tried Z:/home/roman/routeOSC.m_i386 and failed tried C:/Program Files/Common Files/Pd/routeOSC.m_i386 and failed tried C:/users/roman/Application Data/Pd/routeOSC.m_i386 and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC.m_i386 and failed tried Z:/home/roman/routeOSC.dll and failed tried C:/Program Files/Common Files/Pd/routeOSC.dll and failed tried C:/users/roman/Application Data/Pd/routeOSC.dll and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC.dll and failed tried Z:/home/roman/routeOSC/routeOSC.m_i386 and failed tried C:/Program Files/Common Files/Pd/routeOSC/routeOSC.m_i386 and failed tried C:/users/roman/Application Data/Pd/routeOSC/routeOSC.m_i386 and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC/routeOSC.m_i386 and failed tried Z:/home/roman/routeOSC/routeOSC.dll and failed tried C:/Program Files/Common Files/Pd/routeOSC/routeOSC.dll and failed tried C:/users/roman/Application Data/Pd/routeOSC/routeOSC.dll and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC/routeOSC.dll and failed tried Z:/home/roman/routeOSC.pd and failed tried C:/Program Files/Common Files/Pd/routeOSC.pd and failed tried C:/users/roman/Application Data/Pd/routeOSC.pd and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC.pd and failed tried Z:/home/roman/routeOSC.pat and failed tried C:/Program Files/Common Files/Pd/routeOSC.pat and failed tried C:/users/roman/Application Data/Pd/routeOSC.pat and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC.pat and failed tried Z:/home/roman/routeOSC/routeOSC.pd and failed tried C:/Program Files/Common Files/Pd/routeOSC/routeOSC.pd and failed tried C:/users/roman/Application Data/Pd/routeOSC/routeOSC.pd and failed tried Z:/home/roman/pd-src/w32/pd/extra/routeOSC/routeOSC.pd and failed routeOSC /bla error: ... couldn't create
(The output is actually from Wine, but it really behaves the same on Windows)
There is no mention of 'osc' whatsoever.
On the other hand, [declare -stdlib zexy] works the same on Linux and on Windows.
[declare -stdpath] used to work on Windows in older version of Pd, but I can't tell exactly since when it isn't working anymore.
Roman
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On 09/09/2015 08:48 AM, Roman Haefeli wrote:
Now, the argument to -stdpath is appended unconditionally to the search paths. There is probably good reason why there is a check, I'm not proposing to remove it. But maybe this is gives you a hint at where things go wrong. Somehow the check always fails on Windows, even if the directory exists, while it works fine on Linux.
thanks for the tests.
i think i found the cause of the problem: on w32 we cannot use "open()" to check whether a *directory* exists (which is what the "check_exists()" test boils down to).
here's what [msdn] says about he return values of open():
<snip> EACCES
Tried to open a read-only file for writing, file's sharing mode does
not allow the specified operations, or the given path is a directory.
</snip>
i've a working solution on my harddisk, that re-implements
check_exists(), but i'm unsure whether i should turn that into a public
function sys_exists()
so it can be used in other places (e.g.
externals) as well...
fdsmrsa IOhannes
[msdn] https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx
On 09/09/2015 03:33 PM, IOhannes m zmölnig wrote:
i've a working solution on my harddisk, that re-implements
anyhow, submitted a patch on sourceforge that should fix this problem (and a worse one, that would append garbage strings to the search paths)
https://sourceforge.net/p/pure-data/patches/557/
fgmsadr IOhannes
On Mit, 2015-09-09 at 16:05 +0200, IOhannes m zmölnig wrote:
On 09/09/2015 03:33 PM, IOhannes m zmölnig wrote:
i've a working solution on my harddisk, that re-implements
anyhow, submitted a patch on sourceforge that should fix this problem (and a worse one, that would append garbage strings to the search paths)
Cool. I hope it gets accepted.
Roman