Juce Quake Introjucer (ready to use?)


#1

I just compiled the new Introjucer from the modules branch, the module-tab is empty and if a generate a project, it seems there is no connection to any juce files (Did i forget something?)


#2

It just sounds like it doesn’t know the location of your juce folder. If you set that up correctly in your project exporter settings, it should work. I’m going to add some stuff to make that process easier next…


#3

i run the introjucer (latest tip) with VS-Debugger.
When i first created a project, it seems it ignores the juce-path, after i changed it manually in on exporter tab, saved the project, and than created a new project it used the right folder from the beginning.

[attachment=2]1.png[/attachment]
[attachment=1]2.png[/attachment]
[attachment=0]3.png[/attachment]


#4

This is work-in-progress. I’m in the middle of rewriting all the juce/modules folder stuff. Will be checking in very soon…


#5

nice to hear.
I’m currently working on a script, which automatically downloads the latest modules branch, compiles the introjucer, and resave all my static-library projects (I see you implemented nice command-line options in the introjucer :slight_smile: , if you plan something like this for the introjucer, please tell me, so i don’t have to do this twice.


#6

Yes - it’ll do all that. There’ll be a gui to download the latest modules individually, and also some command-line options to do the same thing.


#7

i just checked the latest tip again "Sat, 17 Sep 2011 15:15:38 ", and its the same as described above. The juce location seems to be ignored first time.


#8

Still working on it. Haven’t looked at the new project wizard yet.


#9

…but I just tried it and it works fine (?)

Maybe clear out your settings files and try again, or if I’m misunderstanding the problem, perhaps talk me through what’s not working?


#10

The problem seems to be that the Introjucer is looking for a file called juce_module_info file which isn’t in the directory. The file also doesn’t exist in the juce/modules directory.

Edit: Removed previous nonsense edit.

Chris


#11

?

Well yes. There’s one of those in each module folder. That’s how it recognises a module.


#12

Me too. :slight_smile:

It works now. I changed the juce path to jucequake/juce/, but I am quite certain I tried that before.

Chris


#13

i had a quick look at the the introjucer source, maybe i’m just blind but the return value of juceFolderSelector.getCurrentFile() will be checked but not used ?!

[code]Project* NewProjectWizard::runNewProjectWizard (Component* ownerWindow)
{
ScopedPointer wizard;

{
    AlertWindow aw ("New Juce Project",
                    "Select the type of project to create, and the location of your Juce folder",
                    AlertWindow::NoIcon,
                    ownerWindow);

    aw.addComboBox ("type", getWizards(), "Project Type");

    FilenameComponent juceFolderSelector ("Juce Library Location", ModuleList::getLocalModulesFolder (nullptr),
                                          true, true, false, "*", String::empty, "(Please select the folder containing Juce!)");
    juceFolderSelector.setSize (350, 22);

    aw.addCustomComponent (&juceFolderSelector);

    aw.addButton ("Next", 1, KeyPress (KeyPress::returnKey));
    aw.addButton ("Cancel", 0, KeyPress (KeyPress::escapeKey));

    for (;;)
    {
        if (aw.runModalLoop() == 0)
            return 0;

        if (FileHelpers::isJuceFolder (juceFolderSelector.getCurrentFile()))
        {
            wizard = createWizard (aw.getComboBoxComponent ("type")->getSelectedItemIndex());
            break;
        }

        aw.setColour (AlertWindow::textColourId, Colours::red);
        aw.setMessage ("Please select a valid Juce folder for the project to use!");
    }
}

return wizard != nullptr ? wizard->runWizard (ownerWindow) : 0;

}[/code]


#14

You’re probably right, I need to take a proper look at the wizard code.


#15

Will there be also a wizard for static library projects?
And i guess using a static library with a plugin-projects is now a not possible, because the wrapper code is linked directly to the library source code, or will be there an option to generate plugin-projects for static libraries ?
In the moment the introjucer generates wrong paths in the VC-Project like:

[attachment=0]5.png[/attachment]


#16

because i’m refactoring my whole source code structure because of the juce quake, i have to make some decision now.
In the past i used always the static-Library with my plug-in-projects (it was perfect and easy), but now it seems the plugin-client is directly inside of a module, so i have to use one static library for every project - to set different plugin-specific flag.

I also could use the introjucer to include the juce-source directly in to the project, but i have no good feeling about this. Because, i use special prebuilt-commands and build rules (for assembler) in the MSVC settings, and every time when i use the introjucer to add files these - the settings will be overwritten. :frowning:

And somehow i’m not sure how the different juce-locations are managed in the introjucer. When every Project-Exporter has different juce-location, how does this interact with module downloader?

But anyway what i need is a juce-Static Library Project (the good old monolithic style) with all modules (expect the plugin-client) and than include the plugin-specific files into my plugin-project. But then I am the only man on planet earth how does it this way, and run into a bunch of new problems?!
I’m a little bit frustrated, because i need the new juce module tree (not because of the modules, because of the changes), but i don’t know what the best way how to proceed is. Any Ideas?


#17

I definitely think a static library would be a bad move. If you’ve got some custom MSVC stuff that your project relies on, why not modify the introjucer to generate that for you? Could it be something that other people might also find useful?


#18

ok what i need is (all of these things are essential for me to go with the introjucer)

  • x64 Platform should be automatically generated

  • extra project exporters, I need seperate VST and AU Solution/Projects with different JUCE_ObjCExtraSuffix (!!!)

  • pre-build-event for the project in MVSC

[attachment=1]preBuiltEvent.png[/attachment]

  • custom build-events i can define for special files

[attachment=0]customBuildEvent.png[/attachment]

i could write it myself, but always i send you some code, you will implement it in a complete different way :wink:


#19

True, but often that’s the quickest way to get me to do what you need!


#20

ok, i begin:

This is how to add a pre build event to a Project

in jucer_ProjectExport_MSVC.h: ( scroll below the last 3 lines)

[code]
void createConfig (XmlElement& xml, const Project::BuildConfiguration& config) const
{
String binariesPath (getConfigTargetPath (config));
String intermediatesPath (getIntermediatesPath (config));
const bool isDebug = (bool) config.isDebug().getValue();
const String binaryName (File::createLegalFileName (config.getTargetBinaryName().toString()));

    xml.setAttribute ("Name", createConfigName (config));
    xml.setAttribute ("OutputDirectory", FileHelpers::windowsStylePath (binariesPath));
    xml.setAttribute ("IntermediateDirectory", FileHelpers::windowsStylePath (intermediatesPath));
    xml.setAttribute ("ConfigurationType", isLibraryDLL() ? "2" : (projectType.isLibrary() ? "4" : "1"));
    xml.setAttribute ("UseOfMFC", "0");
    xml.setAttribute ("ATLMinimizesCRunTimeLibraryUsage", "false");
    xml.setAttribute ("CharacterSet", "2");

    if (! isDebug)
        xml.setAttribute ("WholeProgramOptimization", "1");
    

	XmlElement* preBuildEvent = createToolElement (xml, "VCPreBuildEventTool");
	preBuildEvent->setAttribute ("Description",msvcPreBuildDescription);
	preBuildEvent->setAttribute ("CommandLine",msvcPreBuildCommand);[/code]

This is how to add a custom Build Event to an File ( there is an hard coded “Debug|Win32” in there)

jucer_ProjectExport_MSVC.h:

[code]
void addFile (const RelativePath& file, XmlElement& parent, const bool excludeFromBuild, const bool useStdcall, String customBuildToolCommandLine, String customBuildOutput, String customBuildDependencies )
{
jassert (file.getRoot() == RelativePath::buildTargetFolder);

    XmlElement* fileXml = parent.createNewChildElement ("File");
    fileXml->setAttribute ("RelativePath", file.toWindowsStyle());
	if (customBuildToolCommandLine.isNotEmpty() || customBuildDependencies.isNotEmpty() || customBuildOutput.isNotEmpty() )
	{
		XmlElement* fileConfiguration =fileXml->createNewChildElement("FileConfiguration");
		fileConfiguration->setAttribute("Name","Debug|Win32"); // !!! Debug|Win32 is hard coded

		XmlElement* preBuildEvent = createToolElement (*fileConfiguration, "VCCustomBuildTool");
		preBuildEvent->setAttribute ("CommandLine",customBuildToolCommandLine);
		preBuildEvent->setAttribute ("AdditionalDependencies",customBuildDependencies);
		preBuildEvent->setAttribute ("Outputs",customBuildOutput);
	};

	[/code]

Can you do something with this, there should be the possibility for additional attributes for files in the internal jucer project.