[plugin] Node-webkit

Post your completed addons to share with the community

Post » Thu Dec 06, 2012 4:04 am

12/12/2012

edited the plugin; You can use it now in your html5 apps, it won't break the project, eg. if you are in a html5 app and try to call an node-webkit action, project won't break. (so it follows the "code once, export everywhere" mantra)

Also, added the "IsOnNodeWebkit" condition so you can tell in what environment are you running on.

Added the "open window" action so you can open additional windows. it accepts two parameters: URI and specs;

URI can be either some url, eg "http://www.google.com", or it can be URI to another .html file in your app, so if you have an folder in your app package called "AnotherConstructProject", and in it another exported C2 project, you can open it in another window eg. "AnotherConstructProject/index.html". Just remember to add it to your package.json, so beneath the "main:'index.html'" line add another line "second: 'AnotherConstructProject/index.html'" , and you're set to go!


specs are anything that goes in the "window" section of the package.json; eg. "screenX=0,screenY=0,width=100,height=100".

re-download, add suggestions, and enjoy!

7/12/2012

Edited the plugin, you can use action "close window" and little red x, it won't break, but i had to put deprecated property on the "onClose" trigger because it caused problems. Also, bumped version to 1.1.

Re-download plugin if you like!

7/12/2012

Edited the plugin, action "quit" now quits the app properly and instantly.

BUT, when you try to close window either with a red X or action "close window" it doesn't work. It's just a problem with catching the "onClose" event and managing the closure properly, but i'll check into that tomorrow. For now, use the "quit" action to close the app.

Re-download the plugin, uploaded a new version

Exported a new demo with faster loading time

Did some minor changes to .capx
__________________

Download the plugin here

And the demo here

And the .capx here

Conversation about and more info on node-webkit here

Plugin is still in development and heavy testing. Please test and be careful!

I really don't want to copy and paste bunch of text so read about implemented stuff
here (window related stuff)
and
here (App related stuff)
and
here (clipboard related stuff)
and
here(Shell related stuff)


Final note: for succesfuly creating an .exe you'll have to play with package.json, it's nothing scary, just a bunch of variables you can set so that .exe knows how to run.
Read about package.json for node-webkit here

Cheers!

EDIT: forgot to mention, plugin exports an example package.json file for you. After exporting your project, open package.json file in your favorite text editor and edit it as you need!

For exporting to .exe check hereJohnnySheffield2012-12-12 19:35:20
Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652

Post » Thu Dec 06, 2012 4:52 am

You blew my mind
B
95
S
25
G
20
Posts: 3,052
Reputation: 22,613

Post » Thu Dec 06, 2012 4:57 am

I hope it could work with exported NW for mac and linux
B
95
S
25
G
20
Posts: 3,052
Reputation: 22,613

Post » Thu Dec 06, 2012 5:07 am

Haven't tested but i believe it should work. There was no warnings in the wiki about cross-platform problems on the stuff i implemented, but here will probably be some problems, eg:

bug # 154
Menu icon has no effect on Ubuntu bug linux

bug #142     
Frameless app windows are not resizable on Linux bug linux

and mac:
bug #170

etc.
Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652

Post » Thu Dec 06, 2012 5:07 am

I tried this demo, there an issue when you quit this app, it wont quit, sometimes i do ctrl+del+alt

Isn't conflict when you add API quit application?
B
95
S
25
G
20
Posts: 3,052
Reputation: 22,613

Post » Thu Dec 06, 2012 5:09 am

Yup i noticed that too, but haven't got time to check that, sometimes it won't quit, sometimes goes smoothly and quits instantly... not sure where's the problem

i'll check it tomorrow or sometimes when i got time :DJohnnySheffield2012-12-06 05:10:40
Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652

Post » Thu Dec 06, 2012 8:35 pm

Man, nice work making that so fast!
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Thu Dec 06, 2012 9:13 pm

Thanks, you all made this place so nice, i feel i need to return something, and i really like node.js so this is really fun. And nights are calm, quiet and good for some hanging around with good ole' notepad++!

Also good news; i sorted the loading time, it loads instantly now!

Problem was in the index.html, i edited line 59 as follows:
     <script src='jquery-1.7.1.min.js'>\x3C/script>

C2 was actually trying to get jquery form ajax.googleapis.com, once you say to construct to look for jquery locally everything is much, much smoother!

Also, standby, i will release plugin to access to node.js OS module soon! (1-2hrs)




Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652

Post » Thu Dec 06, 2012 11:34 pm

Did some minor edits to the plugin, see the first post for more info!
Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652

Post » Fri Dec 07, 2012 12:47 pm

Amazing!

I'd like to see a performance test ASAP. Could you ask Ashley for the standard performance test in capx form?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,390

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests