pgelectron
My priceless app
Dev
$ npm install
Run
$ npm start
Build
$ npm run build
Builds the app for OS X, Linux, and Windows, using electron-packager.
License
MIT Β© LΓ©o Colombaro
repo for testing a gui using electron for the project generator
License: MIT License
My priceless app
$ npm install
$ npm start
$ npm run build
Builds the app for OS X, Linux, and Windows, using electron-packager.
MIT Β© LΓ©o Colombaro
the front gui got a little messy now with tiny icons, move some stuff to the settings menu maybe... I moved the recycle name to the field but I still feel like it should be cleaner. I think open project should only be on the dialog prompt for new / update not on the main gui.... I also think re-scan addons could be in the settings menu. will move some stuff around now.
and we should not let there be no platform selected :)
right now the always on screen (if button checked) console seems kind of excessive to me, it feels like we get a lot of value by popping the log up on the overlay on create or update. Maybe we don't need the additional bottom console?
instead of showing a tooltip on the "Addons" label, maybe we should use an icon (like the glyphicon/halflings "share" icon) and this technique jlord/git-it-electron#35 to open a window to ofxaddons.com in a browser.
the less it feels like a web app, the better.
unless there is an error message we specifically want people to be able to copy and paste to find out more (or it could link to a forum topic directly).
edit: it would also be cool if it didn't move around when scrolling -- but this is an important feature to have when the addons list is long enough, so it's not a priority.
picking platforms is an advanced option. We should use the highlighted default platform (platform should be set in the settings.json)
This is looking really great guys! Thanks for all the work you've put into this.
I noticed a bug with the dropdown list for addons. If you start typing an addon, say "ofxG" and then click on something from the filtered list (like ofxGui), the initial few characters remain in the field. Maybe it's a "feature" so you can speed-add things (ofxGui! ofxGrabCam!) but I'm assuming it should clear out π
so that it doesn't default to update, ie, if it's always "myApp" the app will launch with update functionality once that project exists. Maybe we can look at what processing or arduino does for reference or leave the name field blank (with a suggestion not an actual value)
There's several cases in which the behaviour of the create/update button is kind of weird:
settings should have a save option so that on relaunching they are remembered
I think we don't need the walk
dependency in package.json
...
There might be others to remove too.
i think when we are generating for a single platform (the one that this PG was packaged with for download) then the "platform" field might be unnecessary.
right now, for me it shows "Unknown" but maybe that has something to do with it not being initialized by default anywhere.
(i'm going to post a couple other things i noticed rather than compiling it in one issue/thread)
most tasks are immediate, but even seeing a visual done message (as the current gui simple) is pretty nice.
i'd like to contribute but i'm not really sure where this is right now. here's the experience i'm getting:
npm start
the first thing i see is "no addons were found in /User/addons". but i would expect it to use ../../addons or similar on first startup.example-simplePoints
inside ofxDelaunay
. now the addons field updates to show the addon.Command failed: /bin/sh -c /Users/kyle/Documents/openFrameworks/pgElectron/app/commandLinePG -o"/Users/kyle/Documents/openFrameworks" -a"ofxDelaunay" -x"osx" "/Users/kyle/Documents/openFrameworks/addons/ofxDelaunay/example-simplePoints"
/bin/sh: /Users/kyle/Documents/openFrameworks/pgElectron/app/commandLinePG: Permission denied
pgElectron/app/
and chmod +x commandLinePG
First of all: This project generator looks amazing! I really like the project name generator (very meta).
Running on Windows 10, testing the binary release from the Windows dropbox link (https://www.dropbox.com/s/2s6n08fywb8es9z/projectGenerator.zip?dl=0), however, I was not able to generate a project, for the "Platforms" dropdown stays greyed out, not letting me select a platform. Maybe it's something to do with the platform detection?
we need a dope icon
Using path in index.js (server side) causes an error.., sometimes yes, sometimes not.
In this case it happens when re-generating a moniker
name (which uses path
)
Uncaught Exception:
TypeError: Cannot read property 'join' of undefined
at EventEmitter.<anonymous> (/Developer/openFrameworks/projectGenerator-darwin-x64/projectGenerator.app/Contents/Resources/app/index.js:374:25)
I tried caching it like tmpPath = require('path');
but same issue, it sometimes crashes with the same error.
Btw, it happens mostly when the Gui switched to (single) update mode but I can't figure out what's causing the problem.
to fix the top bar drag issue that @kylemcdonald mentioned in feedback I suggest creating a top bar above the menu and making both these things fixed. the top bar would be draggable but the menu would not be.
I've tried styling this with different colors, but the best thing I've seen it to actually use a small image sliver... I'm not sure if this is too distracting -- including a few refs as examples.....
this seems like the perfect chance to separate our strings out :)
this is the kind of thing that might make sense to roll this ourselves instead of trying to use a library.
one way to do it would be to remove all the text from the HTML, and have a js object like this:
var strings = {
"#platform": {
"en": "Platform",
"jp": "γγ©γγγγ©γΌγ "
},
".addons": {
"en": "Addons"
},
};
where, if a language is not available it defaults to english. then in settings there would be a dropdown based on the available keys.
we need an advanced mode in settings for allowing for platform selection and for doing the batch updating (which we should not let beginners do...)
verbose with the command line tool is really helpful we should expose this in the gui.
this could be a setting in the settings.json, but we should convert any path inside the root of the OF location to relative to the root of OF. ie, if it's testApp in OF/apps/myApps the path should be
apps/myApps
not absolute as it is now. this should be be possible with:
https://nodejs.org/api/path.html#path_path_relative_from_to
we could have a setting in settings.json if folks want to work with fixed paths.
If it's outside of the OF directory, I think it's better to use absolute paths (and even if we can, post a warning that the project is created relatively to OF location)
for me the open project button gives a white screen and some errors
[1722:0831/124444:INFO:CONSOLE(15)] "Popup:", source: file:///Users/zachlieberman/Desktop/pgElectron/js/semantic.min.js (15)
[1722:0831/124444:INFO:CONSOLE(2)] "Uncaught TypeError: Cannot read property 'replace' of undefined", source: file:///Users/zachlieberman/Desktop/pgElectron/js/jquery.min.js (2)
[1722:0831/124444:WARNING:ipc_message_attachment_set.cc(37)] MessageAttachmentSet destroyed with unconsumed descriptors: 0/1
will dig into this a bit. (and move this to the dialog after the generate or update action has completed)
Just noticed this...I went to create project files from one of the examples. The gui reports that I'm missing addons (ofxNetwork, parsed from addons.make) though this addon does exist in the addons folder. Creating the project worked fine (and the project compiles & runs). Once the project files are created and you "re-import" this folder (technically this happens automatically when you hit the "update" button), the error goes away. Looks like it's related to being in update mode and not being able to find existing project files.
@kylemcdonald mentions 2 behaviours for handling the missing addons:
Maybe the best thing to do is to put the missing addons back in the addons.make while generating the project anyways with the available addons ?
But.... does it make sense to generate it anyways, event if you don't have the needed addon ?
What is the OF philosophy behind this? Allow and learn from your errors I guess; so don't restrict the user ?
What if an addon vanishes from the internet? There should always be an option to remove a missing addon.
right now: osx, win_cb, vs, ios, linux, linux64, linuxarmv6l, linuxarmv7l
perhaps: OS X (Xcode), iOS (Xcode), Windows (Visual Studio 2015), Linux 32-bit (Code::Blocks), Linux 64-bit (Code::Blocks), Linux ARMv6 (Makefiles), Linux ARMv7 (Makefiles)
instead of OS (Build system)
we could also do Build system (OS)
When the "no addons found" message has been shown in the addons multiselect; it doesn't disappear when it's updated until next launch. (the message disappears at least 1 addon is selected, and comes back when it's none are selected)
i suggest the default height is based on the "Create / Update" tab in "simple" mode. if it gets bigger with lots of addons, it's still possible to scroll.
this appears in command+tab, and in the menubar at the top left.
this might just be because i was running the app from npm start
though? when i run npm run build
i get errors. it's off topic, but here it is anyway :)
kyle:pgElectron kyle$ npm run build
> [email protected] build /Users/kyle/Documents/openFrameworks/pgElectron
> electron-packager . $npm_package_productName --out=dist --ignore=['dist','readme.md'] --prune --all --version=0.30.0 --icon=icon.ico
Packaging app for platform linux ia32 using electron v0.30.0
Command failed: /bin/sh -c npm prune --production
npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "prune" "--production"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! path /private/var/folders/18/0s6nty6s7x3c8b5x57fp4czw0000gn/T/electron-packager/linux-ia32/pgElectron-linux-ia32/resources/app/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! enoent ENOENT, open '/private/var/folders/18/0s6nty6s7x3c8b5x57fp4czw0000gn/T/electron-packager/linux-ia32/pgElectron-linux-ia32/resources/app/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /private/var/folders/18/0s6nty6s7x3c8b5x57fp4czw0000gn/T/electron-packager/linux-ia32/pgElectron-linux-ia32/resources/app/npm-debug.log
npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `electron-packager . $npm_package_productName --out=dist --ignore=['dist','readme.md'] --prune --all --version=0.30.0 --icon=icon.ico`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script 'electron-packager . $npm_package_productName --out=dist --ignore=['dist','readme.md'] --prune --all --version=0.30.0 --icon=icon.ico'.
npm ERR! This is most likely a problem with the pgelectron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! electron-packager . $npm_package_productName --out=dist --ignore=['dist','readme.md'] --prune --all --version=0.30.0 --icon=icon.ico
npm ERR! You can get their info via:
npm ERR! npm owner ls pgelectron
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/kyle/Documents/openFrameworks/pgElectron/npm-debug.log
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.