Cannot start a new project in Introjucer


#1

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...

 


#2

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..


#3

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 !

Any ideas ?


#4

Oh, maybe it's a linux problem, I haven't tried the new project wizard on there. Will have a go soon.


#5

Can't reproduce this on linux.. Could be this problem: http://www.juce.com/forum/topic/assert-hit-when-using-native-file-dialogs ?


#6

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.


#7

Have you been able to fix this?

Although i do have Windows installed(where everything works just fine), i'd really like to get this going under linux.

EDIT: I have been able to fix it with the solution kraken proposed in the other thread.

Linkylink: http://www.juce.com/comment/300388#comment-300388


#8

I thought I'd already fixed that (?)


#9

i thought so too. but it didn't work until i changed your fix to the fix kraken proposed(the more "hacky" solution ;)

i can't tell you what exactly went wrong with your fix. i'm still learning. only that it didn't work and works now.

EDIT: oh btw, i cloned the repository on April 3rd. just to clarify that i didn't use old code.


#10

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.


#11

same as before.


#12

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...


#13

Just a comment:

I have also problems to use the Introjucer filedialog and if I run Introjucer as super user -> everything is fine. I'm on fedora/KDE.

And I have also problems to use the native file dialog on Linux in my App and use the Juce one instead the native.


#14

Hi jules,

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?

Thanks,

John.


#15

Damn, I didn't notice that blooper! Thanks!


#16

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)?


#17

I've confirmed that after making the above change, the following can be done to eliminate the 'ugly' addition of 2>/dev/null to the command line.

diff --git a/lib/JUCE/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp b/lib/JUCE/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp
index fb5a411..7c58ef8 100644
--- a/lib/JUCE/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp
+++ b/lib/JUCE/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp
@@ -135,8 +135,6 @@ void FileChooser::showPlatformDialog (Array<File>& results,
             args.add ("--filename=" + file.getFileName());
     }
 
-    args.add ("2>/dev/null"); // (to avoid logging info ending up in the results)
-
     ChildProcess child;
 
     if (child.start (args, ChildProcess::wantStdOut))

Cheers.