File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,17 @@ console.log("detected platform: " + hostplatform + " in " + __dirname);
77
77
78
78
var defaultOfPath = obj [ "defaultOfPath" ] ;
79
79
var addons ;
80
+
81
+ // hide some addons, per https://github.com/openframeworks/projectGenerator/issues/62
82
+
83
+ var addonsToSkip = [
84
+ "ofxiOS" ,
85
+ "ofxMultiTouch" ,
86
+ "ofxEmscripten" ,
87
+ "ofxAccelerometer" ,
88
+ "ofxAndroid"
89
+ ]
90
+
80
91
var platforms = {
81
92
"osx" : "OS X (Xcode)" ,
82
93
"vs" : "Windows (Visual Studio 2015)" ,
@@ -289,6 +300,27 @@ function parseAddonsAndUpdateSelect(arg) {
289
300
console . log ( "in parseAddonsAndUpdateSelect " + arg ) ;
290
301
//path = require('path').resolve(__dirname, defaultOfPath + "/addons");
291
302
addons = getDirectories ( arg + "/addons" , "ofx" ) ;
303
+
304
+ var a = addons ;
305
+ var b = addonsToSkip ;
306
+ var addonsThatShouldBeShown = [ ] ;
307
+ var found ;
308
+ for ( var i = 0 ; i < a . length ; i ++ ) {
309
+ found = false ;
310
+ // find a[i] in b
311
+ for ( var j = 0 ; j < b . length ; j ++ ) {
312
+ if ( a [ i ] == b [ j ] ) {
313
+ found = true ;
314
+ break ;
315
+ }
316
+ }
317
+ if ( ! found ) {
318
+ addonsThatShouldBeShown . push ( a [ i ] ) ;
319
+ }
320
+ }
321
+
322
+ addons = addonsThatShouldBeShown ;
323
+
292
324
console . log ( "Reloading the addons folder, these were found:" ) ;
293
325
console . log ( addons ) ;
294
326
mainWindow . webContents . send ( 'setAddons' , addons ) ;
You can’t perform that action at this time.
0 commit comments