I tried starting a new project in Introjucer, and it keeps asking me that the juce modules folder is invalid. Tried setting it to everything, the git checked out juce modules folder, an new empty folder, whatever... and it keeps asking me, even if i press cancel on the alert box (endless loop) !
Any way to make this work ?
ps. Sometimes i wonder where my good old premake files are gone...
No idea what you could be doing wrong - all you need to do is select the juce/modules folder and it'll go from there. I've tested it, obviously, and it certainly does work. Would be keen to know what's different in your set-up that's confusing it, if you can figure it out..
Nothing particular, just cloned the repo, entered the extras/Introjucer/Builds/Linux and hit make CONFIG=Release... then executed Introjucer and created a new project, setup its name and hit ok... then it bogs me asking for the juce modules folder: no matter what i choose !
exactly... the problem is that if there is something wrong in stderr for kdialog/zenity... it is read out by the child process readAllFunction... so the filename gets corrupted.
Well please don't go for a hacky fix - if you've got a test-case that fails and are willing to try a few things out then I'd rather figure out a proper solution.
I suggested elsewhere that adding this in juce_linux_FileChooser.cpp, line 138:
if (! file.getFileName().isEmpty())
args.add ("--filename=" + file.getFileName());
args.add ("2>/dev/null");
}
..might work, but I don't have a distro to test it on myself, and nobody ever confirmed that it works.
I have a bug with the Introjucer with Windows too (got JUCE last week). Sometimes, when I'm creating a new project, and after a few modifications in the Introjucer, the modules folder isn't found by the software anymore. I think something is happening when I delete the default projects which have been created. For example, if I create the VS2008 and I delete the default VS2010 generated automatically by the Introjucer, everything is fine. But if I delete first the VS2010 and then I create a VS2008, the bug appears.
I have a few issues with the Introjucer about the size of the window, and the colours which change a few times on the general window between the creation of the project and the moment I save it...
As far as I can see, your original change had a bug in that it never actually closed stderr, however even after fixing that it still doesn't work. I think you need to make this change at least:
diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h
index 23a5334..88def31 100644
--- a/modules/juce_core/native/juce_posix_SharedCode.h
+++ b/modules/juce_core/native/juce_posix_SharedCode.h
@@ -1023,12 +1023,12 @@ public:
// we're the child process..
close (pipeHandles[0]); // close the read handle
- if ((streamFlags | wantStdOut) != 0)
+ if ((streamFlags & wantStdOut) != 0)
dup2 (pipeHandles[1], 1); // turns the pipe into stdout
else
close (STDOUT_FILENO);
- if ((streamFlags | wantStdErr) != 0)
+ if ((streamFlags & wantStdErr) != 0)
dup2 (pipeHandles[1], 2);
else
close (STDERR_FILENO);
Eventually after printing out what Introjucer was trying to execute, I figured out that I was missing the zentiy file dialog program. My system has KDE, but I'm running the XFCE window manager (an old Linux box with little power). Maybe your installation notes can say that a full install of Gnome is required if not using the Gnome or KDE window managers?
Got it working finally. I am using the XFCE window manager, in which case the 'zenity' file dialogue wasn't available, and the KDE_FULL_SESSION environment variable isn't set so kdialog (which is installed on my system) wasn't executed. I installed zenity, and it works now. I still think you need to fix the juce_posix_SharedCode.h file as per the above.
Maybe there should be some notes somewhere stating that JUCE requires KDE or Gnome (or at least a full install of Gnome)?