Skip to content

Commit 5233313

Browse files
committed
win_cb -> msys2
1 parent 87796c1 commit 5233313

File tree

5 files changed

+25
-28
lines changed

5 files changed

+25
-28
lines changed

commandLine/commandLine.qbs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import qbs.TextFile
66
import "../../../libs/openFrameworksCompiled/project/qtcreator/ofApp.qbs" as ofApp
77

88
Project{
9-
property string of_root: "../../.."
9+
property string of_root: '../../..'
1010

1111
ofApp {
1212
name: { return FileInfo.baseName(path) }
@@ -17,9 +17,15 @@ Project{
1717
'src/ofApp.h',
1818
]
1919

20-
of.addons: [
21-
'../ofxProjectGenerator',
22-
]
20+
// This project is using addons.make to include the addons
21+
// since it was imported from old code. To change it to include
22+
// the addons from the qbs file change the following lines to
23+
// the list of used addons in array format. eg:
24+
//
25+
// of.addons: [
26+
// 'ofxGui',
27+
// 'ofxOpenCv',
28+
// ]
2329

2430
// additional flags for the project. the of module sets some
2531
// flags by default to add the core libraries, search paths...
@@ -30,7 +36,7 @@ Project{
3036
of.cxxFlags: [] // flags passed to the c++ compiler
3137
of.linkerFlags: [] // flags passed to the linker
3238
of.defines: [] // defines are passed as -D to the compiler
33-
// and can be checked with #ifdef or #if in the code
39+
// and can be checked with #ifdef or #if in the code
3440

3541
// other flags can be set through the cpp module: http://doc.qt.io/qbs/cpp-module.html
3642
// eg: this will enable ccache when compiling
@@ -54,3 +60,4 @@ Project{
5460

5561
references: [FileInfo.joinPaths(of_root, "/libs/openFrameworksCompiled/project/qtcreator/openFrameworks.qbs")]
5662
}
63+

commandLine/src/main.cpp

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ void addPlatforms(string value) {
156156
else if (platforms[i] == "linuxarmv7l") {
157157
targets.push_back(OF_TARGET_LINUXARMV7L);
158158
}
159-
else if (platforms[i] == "win_cb") {
160-
targets.push_back(OF_TARGET_WINGCC);
159+
else if (platforms[i] == "msys2") {
160+
targets.push_back(OF_TARGET_MINGW);
161161
}
162162
else if (platforms[i] == "vs") {
163163
targets.push_back(OF_TARGET_WINVS);
@@ -177,7 +177,7 @@ void addPlatforms(string value) {
177177
targets.push_back(OF_TARGET_LINUX64);
178178
targets.push_back(OF_TARGET_LINUXARMV6L);
179179
targets.push_back(OF_TARGET_LINUXARMV7L);
180-
targets.push_back(OF_TARGET_WINGCC);
180+
targets.push_back(OF_TARGET_MINGW);
181181
targets.push_back(OF_TARGET_WINVS);
182182
targets.push_back(OF_TARGET_OSX);
183183
targets.push_back(OF_TARGET_IOS);
@@ -521,16 +521,6 @@ int main(int argc, char* argv[]){
521521
return EXIT_USAGE;
522522
}
523523

524-
525-
526-
if (!isGoodOFPath(ofPath)) {
527-
consoleSpace();
528-
ofLogError() << "path to openframeworks (" << ofPath << ") seems wrong, please check";
529-
consoleSpace();
530-
531-
return EXIT_USAGE;
532-
}
533-
534524

535525
if (ofDirectory(projectPath).exists()) {
536526
mode = PG_MODE_UPDATE;

ofxProjectGenerator/src/addons/ofAddon.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ofAddon::ConfigParseState ofAddon::stateFromString(string name){
2626
if(name=="common") return Common;
2727
if(name=="linux64") return Linux64;
2828
if(name=="linux") return Linux;
29-
if(name=="win_cb") return WinCB;
29+
if(name=="msys2") return MinGW;
3030
if(name=="vs") return VS;
3131
if(name=="linuxarmv6l") return LinuxARMv6;
3232
if(name=="linuxarmv7l") return LinuxARMv7;
@@ -47,8 +47,8 @@ string ofAddon::stateName(ofAddon::ConfigParseState state){
4747
return "linux";
4848
case Linux64:
4949
return "linux64";
50-
case WinCB:
51-
return "win_cb";
50+
case MinGW:
51+
return "msys2";
5252
case VS:
5353
return "vs";
5454
case LinuxARMv6:
@@ -78,7 +78,7 @@ bool ofAddon::checkCorrectPlatform(ConfigParseState state){
7878
return true;
7979
case Linux:
8080
case Linux64:
81-
case WinCB:
81+
case MinGW:
8282
case VS:
8383
case LinuxARMv6:
8484
case LinuxARMv7:
@@ -101,7 +101,7 @@ bool ofAddon::checkCorrectVariable(string variable, ConfigParseState state){
101101
case Common:
102102
case Linux:
103103
case Linux64:
104-
case WinCB:
104+
case MinGW:
105105
case VS:
106106
case LinuxARMv6:
107107
case LinuxARMv7:

ofxProjectGenerator/src/addons/ofAddon.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class ofAddon {
6868
Common,
6969
Linux,
7070
Linux64,
71-
WinCB,
71+
MinGW,
7272
VS,
7373
LinuxARMv6,
7474
LinuxARMv7,

ofxProjectGenerator/src/utils/Utils.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ static vector <string> platforms;
211211
bool isFolderNotCurrentPlatform(string folderName, string platform){
212212
if( platforms.size() == 0 ){
213213
platforms.push_back("osx");
214-
platforms.push_back("win_cb");
214+
platforms.push_back("msys2");
215215
platforms.push_back("vs");
216216
platforms.push_back("ios");
217217
platforms.push_back("linux");
@@ -469,8 +469,8 @@ std::string getTargetString(ofTargetPlatform t){
469469
switch (t) {
470470
case OF_TARGET_OSX:
471471
return "osx";
472-
case OF_TARGET_WINGCC:
473-
return "win_cb";
472+
case OF_TARGET_MINGW:
473+
return "msys2";
474474
case OF_TARGET_WINVS:
475475
return "vs";
476476
case OF_TARGET_IOS:
@@ -495,7 +495,7 @@ unique_ptr<baseProject> getTargetProject(ofTargetPlatform targ) {
495495
switch (targ) {
496496
case OF_TARGET_OSX:
497497
return unique_ptr<xcodeProject>(new xcodeProject(getTargetString(targ)));
498-
case OF_TARGET_WINGCC:
498+
case OF_TARGET_MINGW:
499499
return unique_ptr<QtCreatorProject>(new QtCreatorProject(getTargetString(targ)));
500500
case OF_TARGET_WINVS:
501501
return unique_ptr<visualStudioProject>(new visualStudioProject(getTargetString(targ)));

0 commit comments

Comments
 (0)