diff --git a/bin/data/templates/codeliteLinux/Makefile b/bin/data/templates/codeliteLinux/Makefile
new file mode 100644
index 0000000..7a7fe8b
--- /dev/null
+++ b/bin/data/templates/codeliteLinux/Makefile
@@ -0,0 +1,13 @@
+# Attempt to load a config.make file.
+# If none is found, project defaults in config.project.make will be used.
+ifneq ($(wildcard config.make),)
+ include config.make
+endif
+
+# make sure the the OF_ROOT location is defined
+ifndef OF_ROOT
+ OF_ROOT=../../..
+endif
+
+# call the project makefile!
+include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
diff --git a/bin/data/templates/codeliteLinux/bin/data/.gitkeep b/bin/data/templates/codeliteLinux/bin/data/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/bin/data/templates/codeliteLinux/config.make b/bin/data/templates/codeliteLinux/config.make
new file mode 100644
index 0000000..836fce7
--- /dev/null
+++ b/bin/data/templates/codeliteLinux/config.make
@@ -0,0 +1,141 @@
+################################################################################
+# CONFIGURE PROJECT MAKEFILE (optional)
+# This file is where we make project specific configurations.
+################################################################################
+
+################################################################################
+# OF ROOT
+# The location of your root openFrameworks installation
+# (default) OF_ROOT = ../../..
+################################################################################
+# OF_ROOT = ../../..
+
+################################################################################
+# PROJECT ROOT
+# The location of the project - a starting place for searching for files
+# (default) PROJECT_ROOT = . (this directory)
+#
+################################################################################
+# PROJECT_ROOT = .
+
+################################################################################
+# PROJECT SPECIFIC CHECKS
+# This is a project defined section to create internal makefile flags to
+# conditionally enable or disable the addition of various features within
+# this makefile. For instance, if you want to make changes based on whether
+# GTK is installed, one might test that here and create a variable to check.
+################################################################################
+# None
+
+################################################################################
+# PROJECT EXTERNAL SOURCE PATHS
+# These are fully qualified paths that are not within the PROJECT_ROOT folder.
+# Like source folders in the PROJECT_ROOT, these paths are subject to
+# exlclusion via the PROJECT_EXLCUSIONS list.
+#
+# (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank)
+#
+# Note: Leave a leading space when adding list items with the += operator
+################################################################################
+# PROJECT_EXTERNAL_SOURCE_PATHS =
+
+################################################################################
+# PROJECT EXCLUSIONS
+# These makefiles assume that all folders in your current project directory
+# and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations
+# to look for source code. The any folders or files that match any of the
+# items in the PROJECT_EXCLUSIONS list below will be ignored.
+#
+# Each item in the PROJECT_EXCLUSIONS list will be treated as a complete
+# string unless teh user adds a wildcard (%) operator to match subdirectories.
+# GNU make only allows one wildcard for matching. The second wildcard (%) is
+# treated literally.
+#
+# (default) PROJECT_EXCLUSIONS = (blank)
+#
+# Will automatically exclude the following:
+#
+# $(PROJECT_ROOT)/bin%
+# $(PROJECT_ROOT)/obj%
+# $(PROJECT_ROOT)/%.xcodeproj
+#
+# Note: Leave a leading space when adding list items with the += operator
+################################################################################
+# PROJECT_EXCLUSIONS =
+
+################################################################################
+# PROJECT LINKER FLAGS
+# These flags will be sent to the linker when compiling the executable.
+#
+# (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs
+#
+# Note: Leave a leading space when adding list items with the += operator
+#
+# Currently, shared libraries that are needed are copied to the
+# $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to
+# add a runtime path to search for those shared libraries, since they aren't
+# incorporated directly into the final executable application binary.
+################################################################################
+# PROJECT_LDFLAGS=-Wl,-rpath=./libs
+
+################################################################################
+# PROJECT DEFINES
+# Create a space-delimited list of DEFINES. The list will be converted into
+# CFLAGS with the "-D" flag later in the makefile.
+#
+# (default) PROJECT_DEFINES = (blank)
+#
+# Note: Leave a leading space when adding list items with the += operator
+################################################################################
+# PROJECT_DEFINES =
+
+################################################################################
+# PROJECT CFLAGS
+# This is a list of fully qualified CFLAGS required when compiling for this
+# project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS
+# defined in your platform specific core configuration files. These flags are
+# presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below.
+#
+# (default) PROJECT_CFLAGS = (blank)
+#
+# Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in
+# your platform specific configuration file will be applied by default and
+# further flags here may not be needed.
+#
+# Note: Leave a leading space when adding list items with the += operator
+################################################################################
+# PROJECT_CFLAGS =
+
+################################################################################
+# PROJECT OPTIMIZATION CFLAGS
+# These are lists of CFLAGS that are target-specific. While any flags could
+# be conditionally added, they are usually limited to optimization flags.
+# These flags are added BEFORE the PROJECT_CFLAGS.
+#
+# PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets.
+#
+# (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank)
+#
+# PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets.
+#
+# (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank)
+#
+# Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the
+# PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration
+# file will be applied by default and further optimization flags here may not
+# be needed.
+#
+# Note: Leave a leading space when adding list items with the += operator
+################################################################################
+# PROJECT_OPTIMIZATION_CFLAGS_RELEASE =
+# PROJECT_OPTIMIZATION_CFLAGS_DEBUG =
+
+################################################################################
+# PROJECT COMPILERS
+# Custom compilers can be set for CC and CXX
+# (default) PROJECT_CXX = (blank)
+# (default) PROJECT_CC = (blank)
+# Note: Leave a leading space when adding list items with the += operator
+################################################################################
+# PROJECT_CXX =
+# PROJECT_CC =
diff --git a/bin/data/templates/codeliteLinux/emptyExample.project b/bin/data/templates/codeliteLinux/emptyExample.project
new file mode 100644
index 0000000..890d896
--- /dev/null
+++ b/bin/data/templates/codeliteLinux/emptyExample.project
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ make clean Debug
+ make Debug
+
+
+
+ None
+ $(ProjectPath)/..
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ make clean Release
+ make Release
+
+
+
+ None
+ $(ProjectPath)/..
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bin/data/templates/codeliteLinux/emptyExample.workspace b/bin/data/templates/codeliteLinux/emptyExample.workspace
new file mode 100644
index 0000000..6030c3e
--- /dev/null
+++ b/bin/data/templates/codeliteLinux/emptyExample.workspace
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bin/data/templates/codeliteLinux/src/main.cpp b/bin/data/templates/codeliteLinux/src/main.cpp
new file mode 100644
index 0000000..8bce185
--- /dev/null
+++ b/bin/data/templates/codeliteLinux/src/main.cpp
@@ -0,0 +1,14 @@
+#include "ofMain.h"
+#include "ofApp.h"
+
+//========================================================================
+int main( ){
+
+ ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context
+
+ // this kicks off the running of my app
+ // can be OF_WINDOW or OF_FULLSCREEN
+ // pass in width and height too:
+ ofRunApp( new ofApp());
+
+}
diff --git a/bin/data/templates/codeliteLinux/src/ofApp.cpp b/bin/data/templates/codeliteLinux/src/ofApp.cpp
new file mode 100644
index 0000000..3e7b517
--- /dev/null
+++ b/bin/data/templates/codeliteLinux/src/ofApp.cpp
@@ -0,0 +1,61 @@
+#include "ofApp.h"
+
+//--------------------------------------------------------------
+void ofApp::setup(){
+
+}
+
+//--------------------------------------------------------------
+void ofApp::update(){
+
+}
+
+//--------------------------------------------------------------
+void ofApp::draw(){
+
+}
+
+//--------------------------------------------------------------
+void ofApp::keyPressed(int key){
+
+}
+
+//--------------------------------------------------------------
+void ofApp::keyReleased(int key){
+
+}
+
+//--------------------------------------------------------------
+void ofApp::mouseMoved(int x, int y){
+
+}
+
+//--------------------------------------------------------------
+void ofApp::mouseDragged(int x, int y, int button){
+
+}
+
+//--------------------------------------------------------------
+void ofApp::mousePressed(int x, int y, int button){
+
+}
+
+//--------------------------------------------------------------
+void ofApp::mouseReleased(int x, int y, int button){
+
+}
+
+//--------------------------------------------------------------
+void ofApp::windowResized(int w, int h){
+
+}
+
+//--------------------------------------------------------------
+void ofApp::gotMessage(ofMessage msg){
+
+}
+
+//--------------------------------------------------------------
+void ofApp::dragEvent(ofDragInfo dragInfo){
+
+}
\ No newline at end of file
diff --git a/bin/data/templates/codeliteLinux/src/ofApp.h b/bin/data/templates/codeliteLinux/src/ofApp.h
new file mode 100644
index 0000000..d800fe0
--- /dev/null
+++ b/bin/data/templates/codeliteLinux/src/ofApp.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#include "ofMain.h"
+
+class ofApp : public ofBaseApp{
+ public:
+ void setup();
+ void update();
+ void draw();
+
+ void keyPressed(int key);
+ void keyReleased(int key);
+ void mouseMoved(int x, int y);
+ void mouseDragged(int x, int y, int button);
+ void mousePressed(int x, int y, int button);
+ void mouseReleased(int x, int y, int button);
+ void windowResized(int w, int h);
+ void dragEvent(ofDragInfo dragInfo);
+ void gotMessage(ofMessage msg);
+};
diff --git a/projectGenerator_linux64.cbp b/projectGenerator_linux64.cbp
index 3865643..77a3e57 100644
--- a/projectGenerator_linux64.cbp
+++ b/projectGenerator_linux64.cbp
@@ -2,7 +2,7 @@
-
+
@@ -96,6 +96,12 @@
+
+
+
+
+
+
diff --git a/projectGenerator_linux64.workspace b/projectGenerator_linux64.workspace
index eabcc7d..bfbcb8c 100644
--- a/projectGenerator_linux64.workspace
+++ b/projectGenerator_linux64.workspace
@@ -1,7 +1,7 @@
-
+
-
-
-
-
+
+
+
+
diff --git a/src/projects/CodeliteLinuxProject.cpp b/src/projects/CodeliteLinuxProject.cpp
new file mode 100644
index 0000000..02d1e78
--- /dev/null
+++ b/src/projects/CodeliteLinuxProject.cpp
@@ -0,0 +1,150 @@
+#include "CodeliteLinuxProject.h"
+
+#define LOG_NAME "codelite"
+
+CodeliteLinuxProject::CodeliteLinuxProject()
+{
+ codeliteDirName = "codelite/";
+}
+
+CodeliteLinuxProject::~CodeliteLinuxProject()
+{
+ //dtor
+}
+
+
+void CodeliteLinuxProject::setup(){
+ templatePath = ofToDataPath("templates/codeliteLinux/", true);
+}
+
+bool CodeliteLinuxProject::createProjectFile(){
+ ofDirectory dir(projectDir);
+ if(!dir.exists()) dir.create(true);
+
+ ofDirectory codeliteDir(ofFilePath::join(projectDir, codeliteDirName));
+ if(!codeliteDir.exists()) codeliteDir.create(true);
+
+ //prepare paths
+ ofFile project(ofFilePath::join(codeliteDir.getAbsolutePath(), projectName + ".project"));
+ string src = ofFilePath::join(templatePath,"emptyExample.project");
+ string dst = project.path();
+
+ bool ret = true;
+
+ //copy the project file over if necessary
+ if(!project.exists()){
+ ret = ofFile::copyFromTo(src,dst);
+ if(!ret){
+ ofLogError(LOG_NAME) << "error copying codelite template from " << src << " to " << dst;
+ return false;
+ }else{
+ findandreplaceInTexfile(dst, "emptyExample", projectName);
+ }
+ }
+
+ ofFile workspace(ofFilePath::join(codeliteDir.getAbsolutePath(), projectName + ".workspace"));
+ if(!workspace.exists()){
+ src = ofFilePath::join(templatePath,"emptyExample.workspace");
+ dst = workspace.path();
+ ret = ofFile::copyFromTo(src,dst);
+ if(!ret){
+ ofLogError(LOG_NAME) << "error copying workspace template from "<< src << " to " << dst;
+ return false;
+ }else{
+ findandreplaceInTexfile(dst, "emptyExample", projectName);
+ }
+ }
+
+ ofFile makefile(ofFilePath::join(projectDir,"Makefile"));
+ if(!makefile.exists()){
+ src = ofFilePath::join(templatePath,"Makefile");
+ dst = makefile.path();
+ ret = ofFile::copyFromTo(src,dst);
+ if(!ret){
+ ofLogError(LOG_NAME) << "error copying Makefile template from " << src << " to " << dst;
+ return false;
+ }
+ }
+
+ ofFile config(ofFilePath::join(projectDir,"config.make"));
+ if(!config.exists()){
+ src = ofFilePath::join(templatePath,"config.make");
+ dst = config.path();
+ ret = ofFile::copyFromTo(src,dst);
+ if(!ret){
+ ofLogError(LOG_NAME) << "error copying config.make template from " << src << " to " << dst;
+ return false;
+ }
+ }
+
+ // handle the relative roots.
+ string relRoot = getOFRelPath(ofFilePath::removeTrailingSlash(projectDir));
+ if (relRoot != "../../../"){
+ string relPath2 = relRoot;
+ relPath2.erase(relPath2.end()-1);
+ findandreplaceInTexfile(projectDir + "config.make", "../../..", relPath2);
+ findandreplaceInTexfile(ofFilePath::join(projectDir , projectName + ".workspace"), "../../../", relRoot);
+ findandreplaceInTexfile(ofFilePath::join(projectDir , projectName + ".cbp"), "../../../", relRoot);
+ }
+
+ return ret;
+}
+
+bool CodeliteLinuxProject::loadProjectFile(){
+ ofFile project(projectDir + codeliteDirName + projectName + ".project");
+ if(!project.exists()){
+ ofLogError(LOG_NAME) << "error loading" << project.path() << "doesn't exist";
+ return false;
+ }
+ pugi::xml_parse_result result = doc.load(project);
+ bLoaded =result.status==pugi::status_ok;
+ return bLoaded;
+}
+
+bool CodeliteLinuxProject::saveProjectFile(){
+ findandreplaceInTexfile(ofFilePath::join(projectDir , codeliteDirName+projectName + ".workspace"),"emptyExample",projectName);
+ pugi::xpath_node_set title = doc.select_nodes("//CodeLite_Project[@Name]");
+ if(!title.empty()){
+ if(!title[0].node().attribute("Name").set_value(projectName.c_str())){
+ ofLogError(LOG_NAME) << "can't set title";
+ }
+ }
+ return doc.save_file((projectDir + codeliteDirName + projectName + ".project").c_str());
+}
+
+void CodeliteLinuxProject::addSrc(string srcFile, string folder, SrcType type){
+ std::vector path = ofSplitString(folder, "/");
+ pugi::xml_node node = doc.child("CodeLite_Project");
+ for(unsigned int i=0;i
+
+#define OF_TARGET_LINUX_CODELITE 99 //Philip: this is a little bit of an ugly hack but somehow we have to separate the linux codelite project from the general linux project
+
+class CodeliteLinuxProject : virtual public baseProject
+{
+ public:
+ CodeliteLinuxProject();
+ virtual ~CodeliteLinuxProject();
+ void setup();
+ bool createProjectFile();
+ bool loadProjectFile();
+ bool saveProjectFile();
+ void addSrc(string srcFile, string folder, SrcType type=DEFAULT);
+ void addInclude(string path);
+ void addLibrary(string libraryName, LibType libType = RELEASE_LIB);
+ protected:
+ private:
+ string codeliteDirName;
+};
+
+#endif // CODELITELINUXPROJECT_H
diff --git a/src/testApp.cpp b/src/testApp.cpp
index 47112ce..3120637 100644
--- a/src/testApp.cpp
+++ b/src/testApp.cpp
@@ -101,6 +101,10 @@ string testApp::setupForTarget(int targ){
project = new CBLinuxProject;
target = "linux";
break;
+ case OF_TARGET_LINUX_CODELITE:
+ project = new CodeliteLinuxProject;
+ target = "linux";
+ break;
}
project->setup(target);
@@ -124,14 +128,12 @@ void testApp::setup(){
ofSetLogLevel(OF_LOG_VERBOSE);
ofSetVerticalSync(true);
ofSetFrameRate(60);
-
statusEnergy = 0;
-
+
mode = 0;
bInited = false;
project = NULL;
sketchName = "mySketch";
-
//-------------------------------------
// get settings
@@ -177,7 +179,7 @@ void testApp::setup(){
font.loadFont("fonts/Inconsolata.otf", 14, true,false,false,0.3,90);
titleFont.loadFont("fonts/Inconsolata.otf", 28, true,false,false,0.3,90);
secondFont.loadFont("fonts/Inconsolata.otf", 11, true,false,false,0.3,90);
-
+
// Sketch button
//
button.font = &font;
@@ -185,7 +187,7 @@ void testApp::setup(){
button.prefix = "Name: ";
button.topLeftAnchor.set(76, 160+40); //set top button position - others are set relative to this.
button.setText(sketchName);
-
+
button.secondaryText = "<< CLICK TO CHANGE THE NAME";
buttons.push_back(button);
@@ -206,6 +208,11 @@ void testApp::setup(){
button.bDrawLong = false;
button.secondaryText = "";
button.bSelectable = false;
+ #ifdef TARGET_LINUX
+ button.bSelectable = true;
+ button.secondaryText = "<< CLICK TO SELECT PLATFORMS";
+ button.bDrawLong = true;
+ #endif
button.setText(platform);
button.topLeftAnchor.set(button.topLeftAnchor.x, button.topLeftAnchor.y + button.rect.height + 20);
@@ -233,19 +240,20 @@ void testApp::setup(){
generateButton.bSelectable = true;
generateButton.setText("");
generateButton.bDrawLong = false;
-
+
addonButton = button;
addonButton.topLeftAnchor.set(906, 535);
addonButton.prefix = "<< BACK";
addonButton.setText("");
addonButton.bDrawLong = false;
-
+
for (int i = 0; i < buttons.size(); i++){
buttons[i].calculateRect();
}
addonButton.calculateRect();
generateButton.calculateRect();
+
//-------------------------------------
// addons panels:
@@ -274,20 +282,22 @@ void testApp::setup(){
}
}
-
+
//-------------------------------------
// platform panel (not used, really, but here just in case)
//-------------------------------------
+
panelPlatforms.setup();
panelPlatforms.add(wincbToggle.setup("windows (codeblocks)",ofGetTargetPlatform()==OF_TARGET_WINGCC));
- panelPlatforms.add(winvsToggle.setup("windows (visual studio)", ofGetTargetPlatform()==OF_TARGET_WINVS));
+ panelPlatforms.add(winvsToggle.setup("windows (visualStudio)", ofGetTargetPlatform()==OF_TARGET_WINVS));
panelPlatforms.add(linuxcbToggle.setup("linux (codeblocks)",ofGetTargetPlatform()==OF_TARGET_LINUX));
panelPlatforms.add(linux64cbToggle.setup("linux64 (codeblocks)",ofGetTargetPlatform()==OF_TARGET_LINUX64));
+ panelPlatforms.add(linuxCodeliteToggle.setup("linux (codelite)",ofGetTargetPlatform()==OF_TARGET_LINUX64));
//for ios, we need to fake that the target is ios (since we're compiling w/ osx OF)
//#define MAKE_IOS
-
+
#ifdef MAKE_IOS
panelPlatforms.add(osxToggle.setup("osx (xcode)",false));
panelPlatforms.add(iosToggle.setup("ios (xcode)",true));
@@ -295,8 +305,8 @@ void testApp::setup(){
panelPlatforms.add(osxToggle.setup("osx (xcode)",ofGetTargetPlatform()==OF_TARGET_OSX));
panelPlatforms.add(iosToggle.setup("ios (xcode)",ofGetTargetPlatform()==OF_TARGET_IPHONE));
#endif
-
-
+
+
// update the platforms text in the platform button
string platforms = "";
for (int i = 0; i < panelPlatforms.getNumControls(); i++){
@@ -312,17 +322,17 @@ void testApp::setup(){
panelPlatforms.setPosition(10,40);
panelCoreAddons.setPosition(10,40);
panelOtherAddons.setPosition(330,40);
-
+
logo.loadImage("images/ofw-logo.png");
ofBackground(230,230,230);
-
-
+
+
generateButton.topLeftAnchor.set(ofGetWidth() - buttons[0].rect.x - generateButton.rect.width + 10 ,
ofGetHeight() - generateButton.rect.height - 40);// 535);
generateButton.calculateRect();
-
+
addonButton.topLeftAnchor.set(ofGetWidth() - buttons[0].rect.x - addonButton.rect.width + 10 ,
ofGetHeight() - addonButton.rect.height - 40);// 535);
addonButton.calculateRect();
@@ -358,7 +368,7 @@ void testApp::update(){
}
generateButton.checkMousePressed(ofPoint(mouseX, mouseY));
-
+
for (int i = 0; i < buttons.size(); i++){
if (i != 0){
buttons[i].topLeftAnchor.y = buttons[i-1].topLeftAnchor.y +buttons[i-1].rect.height + 20;
@@ -387,25 +397,25 @@ void testApp::update(){
//--------------------------------------------------------------
void testApp::draw(){
-
-
+
+
if (mode != MODE_ADDON ) {
-
+
ofSetColor(100);
logo.draw(64, 61,logo.getWidth(),logo.getHeight());
-
+
//ofSetColor(74,255,203);
titleFont.drawString("PROJECT", 64 + logo.getWidth() + 25, 85);
titleFont.drawString("GENERATOR", 64 + logo.getWidth() + 25, 117);
}
-
+
if (mode == 0){
for (int i = 0; i < buttons.size(); i++){
buttons[i].draw();
}
-
+
generateButton.draw();
-
+
} else if (mode == 1){
panelCoreAddons.draw();
if (bHaveNonCoreAddons){
@@ -417,18 +427,28 @@ void testApp::draw(){
//cout << panelAddons.getShape().height << endl;
-
-
+
+
if (mode == 1 ){
addonButton.draw();
-
+
ofRectangle rect = secondFont.getStringBoundingBox("select core and non-core addons to add", addonButton.topLeftAnchor.x-200, 60);
ofSetColor(220,220,220);
ofRect(rect.x-10, rect.y-10, rect.width+20, rect.height+20);
ofSetColor(0,0,0);
secondFont.drawString("select core and non-core addons to add", addonButton.topLeftAnchor.x-200, 60);
}
-
+
+ if (mode == MODE_PLATFORM ){
+ addonButton.draw();
+
+ ofRectangle rect = secondFont.getStringBoundingBox("select core and non-core addons to add", addonButton.topLeftAnchor.x-200, 60);
+ ofSetColor(220,220,220);
+ ofRect(rect.x-10, rect.y-10, rect.width+20, rect.height+20);
+ ofSetColor(0,0,0);
+ secondFont.drawString("select platforms to add", addonButton.topLeftAnchor.x-200, 60);
+ }
+
if (mode == 0){
ofFill();
ofSetColor(0 + 220 * (1-statusEnergy),0 + 220 * (1-statusEnergy),0 + 220 * (1-statusEnergy));
@@ -459,6 +479,7 @@ void testApp::generateProject(){
if( winvsToggle ) targetsToMake.push_back(OF_TARGET_WINVS);
if( linuxcbToggle ) targetsToMake.push_back(OF_TARGET_LINUX);
if( linux64cbToggle ) targetsToMake.push_back(OF_TARGET_LINUX64);
+ if( linuxCodeliteToggle ) targetsToMake.push_back(OF_TARGET_LINUX_CODELITE);
if( targetsToMake.size() == 0 ){
cout << "Error: makeNewProjectViaDialog - must specifiy a project to generate " < 0) platforms+=", ";
+ platforms += ((ofxToggle *)panelPlatforms.getControl(i))->getName();
+ }
+ }
+ buttons[2].setText(platforms);
+
+ setStatus("platforms set to: " + platforms);
+
+ addonButton.bMouseOver = false;
+ mode = MODE_NORMAL;
+ }
}
}
@@ -676,11 +715,11 @@ void testApp::windowResized(int w, int h){
generateButton.topLeftAnchor.set(ofGetWidth() - buttons[0].rect.x - generateButton.rect.width + 10 ,
ofGetHeight() - generateButton.rect.height - 40);// 535);
generateButton.calculateRect();
-
+
addonButton.topLeftAnchor.set(ofGetWidth() - buttons[0].rect.x - addonButton.rect.width + 10 ,
ofGetHeight() - addonButton.rect.height - 40);// 535);
addonButton.calculateRect();
-
+
}
//--------------------------------------------------------------
@@ -688,35 +727,35 @@ void testApp::gotMessage(ofMessage msg){
}
void testApp::addAddon(string addon) {
-
+
string addons = "";
-
+
for (int i = 0; i < panelCoreAddons.getNumControls(); i++){
-
+
ofxToggle *toggle = ((ofxToggle *)panelCoreAddons.getControl(i));
if(toggle->getName()==addon) {
(*toggle) = true;
}
-
+
if (*toggle){
if (addons.length() > 0) addons+=", ";
addons += toggle->getName();
}
-
+
}
for (int i = 0; i < panelOtherAddons.getNumControls(); i++){
ofxToggle *toggle = ((ofxToggle *)panelOtherAddons.getControl(i));
-
+
if(toggle->getName()==addon) {
(*toggle) = true;
}
-
+
if (*toggle){
if (addons.length() > 0) addons+=", ";
addons += toggle->getName();
}
-
+
}
buttons[3].setText(addons);
}
diff --git a/src/testApp.h b/src/testApp.h
index 3437a23..e4ef7f7 100644
--- a/src/testApp.h
+++ b/src/testApp.h
@@ -5,6 +5,7 @@
#include "ofMain.h"
#include "CBLinuxProject.h"
#include "CBWinProject.h"
+#include "CodeliteLinuxProject.h"
#include "visualStudioProject.h"
#include "xcodeProject.h"
#include
@@ -45,7 +46,7 @@ class testApp : public ofBaseApp{
ofxPanel panelPlatforms;
- ofxToggle osxToggle, iosToggle, wincbToggle, winvsToggle, linuxcbToggle, linux64cbToggle;
+ ofxToggle osxToggle, iosToggle, wincbToggle, winvsToggle, linuxcbToggle, linux64cbToggle, linuxCodeliteToggle;
ofTrueTypeFont font;
ofTrueTypeFont titleFont;
@@ -67,7 +68,7 @@ class testApp : public ofBaseApp{
string appToRoot;
string defaultLoc;
- float uiLeftX;
+ float uiLeftX;
textButton button;
@@ -85,6 +86,7 @@ class testApp : public ofBaseApp{
void setStatus(string newStatus);
ofImage logo;
- void addAddon(string addon);
-
+ void addAddon(string addon);
+
+
};