getAppName always "NewProject"

5 posts / 0 new
Last post
jfitzpat
Offline
Last seen: 5 months 4 weeks ago
Joined: 10 Jan 2012 - 05:29
getAppName always "NewProject"

I happened to pull and rebuild the Introjucer today (commit 673b8b56) and noticed that main.cpp always contains the literal "NewProject" for getAppName, regardless of the project name or binary names set.

jules
Offline
Last seen: 2 hours 24 min ago
Joined: 29 Apr 2013 - 18:37
Re: getAppName always "NewProject"

No.. If you change it in the introjucer, it'll be updated when you save the project.

jfitzpat
Offline
Last seen: 5 months 4 weeks ago
Joined: 10 Jan 2012 - 05:29
Re: getAppName always "NewProject"

I open the enclosed project, change the name, save.

ProjectName is altered in JuceHeader.h, but main.cpp still has the literal string "NewProject".

I see the behavior you describe with the Introjucer I built a few days ago, but not the one today. I built it because I was going to write up step by step Android build hell, since I just went through it and wanted to make sure I was using your very latest.

attachment: 
jules
Offline
Last seen: 2 hours 24 min ago
Joined: 29 Apr 2013 - 18:37
Re: getAppName always "NewProject"

Sorry, I misunderstood your question.. main.cpp is only generated when you use the wizard to create a new project - it'll never touch that main.cpp file again, that's where you actually write your code! If you want to change the name in there, just edit it yourself. If you want it to return ProjectInfo::projectName, then just change it to do that.

jfitzpat
Offline
Last seen: 5 months 4 weeks ago
Joined: 10 Jan 2012 - 05:29
Re: getAppName always "NewProject"

It makes sense not to recreate main.cpp, folks would change things like run only one instance.

Sorry, I recalled the behavior being different. I guess I thought that it returned ProjectInfo::projectName by default. It just surprised me when everything else came up with the altered name, but the title bar in the generated window did not.