How to build? How to add features?

429 views
Skip to first unread message

Jake Bartlett

unread,
Aug 6, 2012, 6:17:00 PM8/6/12
to appj...@googlegroups.com
I want to add some platform specific features for Windows / OS X. For example, I want to be able to record from a microphone.

How do I set up a build environment for Windows?
How do I set up a build environment for OS X?
How do I build from scratch for those environments?

Thanks,
Jake

Kevin Ingwersen

unread,
Aug 6, 2012, 6:46:50 PM8/6/12
to appj...@googlegroups.com
Im sure youll need the source code for the appjs.node addon o.o...
On OSX, download Xcode and install the command like utillities.
On windows, get cygwin. It installs compilers and alike, so that should set you up.

Jake Bartlett

unread,
Aug 6, 2012, 7:23:18 PM8/6/12
to appj...@googlegroups.com, ingwi...@googlemail.com
But I'll need the CEF header files and libraries to compile, right? That's what I need to know: What dependencies should I download? Do I compile those deps with my own extensions?

-Jake

Brandon Benvie

unread,
Aug 6, 2012, 10:17:34 PM8/6/12
to appj...@googlegroups.com, ingwi...@googlemail.com
Clone the repo from github first. Then get the platforms CEF distributable from https://github.com/appjs/appjs/downloads. Extract the distributable, rename the folder to "cef", and put it in the repo as ./deps/cef. You'll need node installed. Install node-gyp "npm install node-gyp -g" (use sudo on mac or linux).

On Windows you're going to need to have Visual C++ 2010 express installed at least (Visual Studio includes it and regular/pro versions work). The express version can be downloaded from http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express. I also always compile from inside MozillaBuild which can be obtained from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe. This takes care of setting up the build environment so all the dependencies are taken care of which otherwise will lead to frustration.

From inside MozillaBuild or the console or where, in the root of the appjs repo, you should be able to make the appjs distributable by running "node-gyp rebuild". This will compile it and then copy all the files to "./app" which is the complete package for that platform.

Juzer Ali

unread,
Nov 15, 2012, 10:06:30 AM11/15/12
to appj...@googlegroups.com, ingwi...@googlemail.com
I am unable to do "node-gyp rebuild". Check the stack trace.

  CXX(target) Release/obj.target/appjs/src/native_menu/native_menu_linux.o
../src/native_menu/native_menu_linux.cpp: In member function ‘int appjs::NativeMenu::AddSubMenu(GtkWidget*, appjs::Settings*)’:
../src/native_menu/native_menu_linux.cpp:58:40: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
../src/native_menu/native_menu_linux.cpp:59:39: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
  CXX(target) Release/obj.target/appjs/src/native_status_icon/native_status_icon_linux.o
../src/native_status_icon/native_status_icon_linux.cpp: In member function ‘void appjs::NativeStatusIcon::Init(appjs::Settings*)’:
../src/native_status_icon/native_status_icon_linux.cpp:30:49: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
../src/native_status_icon/native_status_icon_linux.cpp:31:52: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
  SOLINK_MODULE(target) Release/obj.target/appjs.node
g++: error: /home/juzer/Desktop/Open-Source/appjs/build/Release/obj.target/deps/cef/cef_dll_wrapper.node: No such file or directory
make: *** [Release/obj.target/appjs.node] Error 1
make: Leaving directory `/home/juzer/Desktop/Open-Source/appjs/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:232:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:674:10)
gyp ERR! System Linux 3.5.0-15-generic
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/juzer/Desktop/Open-Source/appjs
gyp ERR! node -v v0.8.5
gyp ERR! node-gyp -v v0.8.0
gyp ERR! not ok 

Juzer Ali

unread,
Nov 15, 2012, 12:11:20 PM11/15/12
to appj...@googlegroups.com, ingwi...@googlemail.com
On Ubuntu 12.10 32-bit.

I've also tried node cli/configure.js && node cli/postinstall.js
Still same error.

Morteza Milani

unread,
Nov 16, 2012, 2:03:08 AM11/16/12
to appj...@googlegroups.com
Old versions of `node-gyp` used to create all shared libraries with
`.node` as extension. But in newer versions it creates `.so` for linux
and `.dll` for Windows.

So what you want to do is to modify `binding.gyp` and correct the
names. I will update my node-gyp and push necessary changes later.

For your case, find `cef_dll_wrapper.node` in binding.gyp and replace
it with whatever node-gyp named it ( look at build directory ).

Juzer Ali

unread,
Nov 16, 2012, 12:38:31 PM11/16/12
to appj...@googlegroups.com, mrtz....@googlemail.com
make: *** No rule to make target `/home/juzer/Desktop/Open-Source/appjs/data/linux/ia32/node-bin/node', needed by `/home/juzer/Desktop/Open-Source/appjs/app/data/bin/node'.  Stop.

Is it necessary to build node again inside appjs despite it being availaible on user's computer?

Morteza Milani

unread,
Nov 16, 2012, 12:48:04 PM11/16/12
to appj...@googlegroups.com
No It's not. Actually we do not build node, we only move it around because we need node for preparing precompiled packages. Put a copy of your node executable at the place mentioned in the make error.

--
You received this message because you are subscribed to the Google Groups "appjs-dev" group.
To post to this group, send email to appj...@googlegroups.com.
To unsubscribe from this group, send email to appjs-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Juzer Ali

unread,
Nov 16, 2012, 1:18:37 PM11/16/12
to appj...@googlegroups.com, mrtz....@googlemail.com
Thanks Milani, I did that but still I could some more of your help.

make: *** No rule to make target `/home/juzer/Desktop/Open-Source/appjs/deps/cef/Release/lib.target/libffmpegsumo.so', needed by `/home/juzer/Desktop/Open-Source/appjs/app/data/bin/libffmpegsumo.so'.  Stop.

There is no libffmpegsumo.so inside cef/Release/lib.target. There is just a libcef.so.

I have downloaded the packages via cli/configure.js and cli/postinstall.js. Whats wrong now?

Willy Ha

unread,
Jan 2, 2013, 2:39:12 PM1/2/13
to appj...@googlegroups.com, ingwi...@googlemail.com

I would love to help out with fixing bugs but I'm only good with high level languages like C# and Java. I tried to get my hands dirty by starting off learning how to compile/build the C++ source code but I've given up. I feel stupid and useless.

ashish negi

unread,
Sep 4, 2013, 12:33:22 AM9/4/13
to appj...@googlegroups.com, ingwi...@googlemail.com
I am having problems with building appjs from source:
Are their any page for instructions for building with MozillaBuilds ?
Should we run start-msvc10.bat ? It open git prompt and then you can not access  node-gyp from there ?
Please see below console output :

C:\mozilla-build>start-msvc10.bat
"Mozilla tools directory: C:\mozilla-build\"
Visual C++ 10 directory: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\
Visual C++ 11 directory: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\
Windows SDK directory: C:\Program Files (x86)\Windows Kits\8.0\
Windows SDK version: 8.0
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
Using the Windows 8.0 Developer Kit
Mozilla build environment: MSVC version 10.
asnegi@ASNEGI-WIN7 ~
$ cd /c/cef/appjs/appjs/
asnegi@ASNEGI-WIN7 /c/cef/appjs/appjs
$ ls
BUILDING.md   TODO.md      build      deps      node_modules     package.json
CONTRIBUTORS  appjs.png    build.log  docs      npm-debug.log    src
LICENSE       binding.gyp  cli        examples  out_rebuild.out
README.md     buil.log     data       lib       package
asnegi@ASNEGI-WIN7 /c/cef/appjs/appjs
$ node-gyp
bash": node-gyp: command not found
asnegi@ASNEGI-WIN7 /c/cef/appjs/appjs
$

ashish negi

unread,
Sep 4, 2013, 12:37:58 AM9/4/13
to appj...@googlegroups.com, ingwi...@googlemail.com
I am sorry running start-msvs10.bat opens bash shell in windows not git. How do we then use it to build appjs ?

ashish negi

unread,
Sep 4, 2013, 2:33:52 AM9/4/13
to appj...@googlegroups.com, ingwi...@googlemail.com
From here at the end of page: https://github.com/appjs/appjs/blob/master/docs/building.md#windows
What do we have to do after moving to the directory ?

Simon Horton

unread,
Sep 4, 2013, 4:10:21 AM9/4/13
to appj...@googlegroups.com, Ingwie Phoenix
I personally was not able to build appjs with MozillaBuild which was why I wrote the wiki page about building: https://github.com/appjs/appjs/wiki/Building-Appjs, and following exactly the instructions there with the exact same environment and build tools worked for me.

I think what is meant by the instructions is to run the bat script and a command prompt should open. Then type in the cd command and enter in the folder that you have appjs source code. Then try typing something like "make" and see if it starts building. It might be that you need to do make configure to setup the environment first. MozillaBuild is documented here: https://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructionshttps://wiki.mozilla.org/MozillaBuild so hopefully the exact commands that are expected to start off a compile are there as well.

/Simon


--
You received this message because you are subscribed to the Google Groups "appjs-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appjs-dev+...@googlegroups.com.

To post to this group, send email to appj...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages