Code Monkey home page Code Monkey logo

wxnode's Introduction

Feel free to use this module but, I am no longer supporting it in favor of AppJs

wxNode

node.js wrapper for wxWidgets.

Installation Linux

  • Download and install wxWidgets 2.9.3.
$ npm install wxnode

Installation Windows

  • Download wxWidgets 2.9.3.
  • Download and install node from source (release, 64-bit) "vcbuild.bat release"
cd d:\dev\wxWidgets-2.9.3\build\msw
nmake -f makefile.vc BUILD=release UNICODE=1 RUNTIME_LIBS=static DEBUG_FLAG=0
set WXWIN=d:\dev\wxWidgets-2.9.3
set WXCFG=vc_lib\mswu
cd d:\dev\wxNode
node mnm.js build

Try an example

node examples/helloWorld.js
node examples/...

Quick Examples

var wx = require("wxnode");

var MyApp = wx.App.extend({
  onInit: function() {
    var location = new wx.Point(50, 50);
    var size = new wx.Size(450, 340);
    var frame = new MyFrame("Hello World", location, size);
    frame.show(true);
    this.setTopWindow(frame);
    return true;
  }
});

var MyFrame = wx.Frame.extend({
  init: function(title, pos, size) {
    this._super(null, -1, title, pos, size);

    this.EVT_CLOSE(this.onClose);
  },

  onClose: function(event) {
    process.exit();
  }
});

var app = new MyApp();
app.run();

Building wxWidgets linux

$ sudo apt-get install libwebkitgtk-dev
$ sudo ldconfig
$ ./configure --enable-webview --enable-webview-webkit && make
$ sudo make install
## Creating wxapi.xml from wxWidgets
$ sudo apt-get install libwebkitgtk-dev
$ cd wxWidgets-2.9.3/docs/doxygen
$ ./regen.sh xml
$ cd ../..
$ ./configure --enable-webview --enable-webview-webkit
$ patch -p0 -i ~/wxNode/rungccxml.sh.patch
$ patch -p0 -i ~/wxNode/strvararg.h.patch
$ cd utils/ifacecheck/
$ ./rungccxml.sh
$ cp wxapi.xml ~/wxNode/wxapi.xml
$ cd ~/wxNode
$ rm wxapi.json
$ rm -rf build
$ ./render-templates.js && ./mnm.js build

wxnode's People

Contributors

joeferner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wxnode's Issues

Compile failed on Mac OSX 10.7

/usr/local/lib/node_modules/wxnode/src-generated/wxNode_wxTopLevelWindow.cpp: In static member function ‘static v8::Handlev8::Value wxNode_wxTopLevelWindow::_SetRepresentedFilename(const v8::Arguments&)’:
/usr/local/lib/node_modules/wxnode/src-generated/wxNode_wxTopLevelWindow.cpp:1504: error: ‘class wxNode_wxTopLevelWindow’ has no member named ‘SetRepresentedFilename’

Core dump from recent changes

On Ubuntu 11.04 getting a core dump with both regenerated bindings or using the ones on github. The version on npm works without an issue but that's prior to a lot of changes it looks like, the webview stuff etc.

Is this project alive?

I just wanted to know if there is any plan to maintain this project or not, as i've seen open issues from 2013, thanks.

Small build error

Here it is:

/Users/Ingwie/Downloads/wxWidgets-3.0.0/test/node_modules/wxnode/render-templates.js:575
    name = name.split('<')[0];
                ^
TypeError: Object GDriveStartStopType has no method 'split'
    at removeTemplateFromClassName (/Users/Ingwie/Downloads/wxWidgets-3.0.0/test/node_modules/wxnode/render-templates.js:575:17)
    at /Users/Ingwie/Downloads/wxWidgets-3.0.0/test/node_modules/wxnode/render-templates.js:107:28
    at Parser.<anonymous> (/Users/Ingwie/Downloads/wxWidgets-3.0.0/test/node_modules/xml2js/lib/xml2js.js:344:20)
    at Parser.EventEmitter.emit (events.js:95:17)
    at Object.saxParser.onclosetag (/Users/Ingwie/Downloads/wxWidgets-3.0.0/test/node_modules/xml2js/lib/xml2js.js:314:24)
    at emit (/Users/Ingwie/Downloads/wxWidgets-3.0.0/test/node_modules/xml2js/node_modules/sax/lib/sax.js:615:33)
    at emitNode (/Users/Ingwie/Downloads/wxWidgets-3.0.0/test/node_modules/xml2js/node_modules/sax/lib/sax.js:620:3)
    at closeTag (/Users/Ingwie/Downloads/wxWidgets-3.0.0/test/node_modules/xml2js/node_modules/sax/lib/sax.js:861:5)
    at Object.write (/Users/Ingwie/Downloads/wxWidgets-3.0.0/test/node_modules/xml2js/node_modules/sax/lib/sax.js:1293:29)
    at Parser.exports.Parser.Parser.parseString (/Users/Ingwie/Downloads/wxWidgets-3.0.0/test/node_modules/xml2js/lib/xml2js.js:362:29)
    at Parser.parseString (/Users/Ingwie/Downloads/wxWidgets-3.0.0/test/node_modules/xml2js/lib/xml2js.js:6:61)

Dunno exactly how to fix this myself but, eh. ovo"

AppJS is being deprecated, and a new system is made - I need your help.

Hello!

So, in the README, you say that you discontinued this project in favor of appJS. Well, appJS itself has been deprecated, and ownership has been transfered to me.

We currently are working out a new system that overtakes appjs. The reason is, that appjs had too many issues arising, and the original developer couldnt continue it anymore. So we are working on deskshell. Currently, it runs by using a build of Chromium, and adding switches to it in order to boot it up correctly. However, that makes a realyl large binary, and we do not have all the functions we may want.

So we have started making a new concept - and I have completed it. We will use CEF - chrome embedded framework - in order to create Deskshell. We, well me at the moment, will use nodejs as the top layer, entrence and preperation program. The main script is subject to change and accept a few options to decide what to do next. Since we have also a nice base of PHP users, we are going to use a "fake PHP" which is called ph7. It is an in-process PHP engine, based off the php-5.3 standart.

The concept is to have nodejs read a descriptive file, that gives it all of the informations that the engine may needs. Those information are passed to a module called deskshell-core. The core then looks up how to bootstrap everything. It opens up a new process with the bootstrap script - either using nodejs or ph7 as the engine for the script. Of course, pure html5 apps are possible too. By that, it will relaunch itself with an internal script that bootstraps a basic browser and lets it handle all the html content. We also can use CGI content such as php here - they will be interpreted by a subprocess in the router. If you bootstrap the engine with a script, you can add additional cgi.

The problem I faced though was, to create a GUI frontend that works cross platform for Mac, Windows and Linux. So I found wxWidgets that I used before for small toying. But wx works on all three platforms, so I looked up everything I could. Soon I found a wx extension for Chromium that we can use.

But what if we encounter an error while bootstraping the project? So I wanted to integrate wx - when I already have a static lib of it. So I came across your extension.

I need your help in so far, that I need to know if this extension is still valid and working. If so, it is going to become a tight part of Deskshell. :)

Sorry for being so talkactive like a waterfall, but I thought i should tell you what I am about to do ovo"

Kind regards, Ingwie.

"not found"

npm install wxnode
npm ERR! code 1
npm ERR! path /home/joker/Документы/scripts/node/node_modules/wxnode
npm ERR! command failed
npm ERR! command sh -c node mnm.js build
npm ERR! node:internal/modules/cjs/loader:1093
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module 'mustache'
npm ERR! Require stack:
npm ERR! - /home/joker/Документы/scripts/node/node_modules/wxnode/render-templates.js
npm ERR! - /home/joker/Документы/scripts/node/node_modules/wxnode/mnm.js
npm ERR! at Module._resolveFilename (node:internal/modules/cjs/loader:1090:15)
npm ERR! at Module._load (node:internal/modules/cjs/loader:934:27)
npm ERR! at Module.require (node:internal/modules/cjs/loader:1157:19)
npm ERR! at require (node:internal/modules/helpers:119:18)
npm ERR! at Object. (/home/joker/Документы/scripts/node/node_modules/wxnode/render-templates.js:5:16)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1275:14)
npm ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:1133:32)
npm ERR! at Module._load (node:internal/modules/cjs/loader:972:12)
npm ERR! at Module.require (node:internal/modules/cjs/loader:1157:19) {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: [
npm ERR! '/home/joker/Документы/scripts/node/node_modules/wxnode/render-templates.js',
npm ERR! '/home/joker/Документы/scripts/node/node_modules/wxnode/mnm.js'
npm ERR! ]
npm ERR! }
npm ERR!
npm ERR! Node.js v19.9.0

npm ERR! A complete log of this run can be found in: /home/joker/.npm/_logs/2023-06-02T04_57_09_565Z-debug-0.log
2023-06-02T04_57_09_565Z-debug-0.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.