Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easier to build #46

Merged
merged 5 commits into from
Apr 11, 2014
Merged

Make it easier to build #46

merged 5 commits into from
Apr 11, 2014

Conversation

ivantodorovich
Copy link
Contributor

I cleaned up a bit compilation tasks.

  • Merged both 'inject-player' and 'inject-index' into 'inject-html'.
  • Added a 'compile' task

Added tasks to help install & build

  • build handles ffmpeglib
  • run launches the app

Also updates README to reflect this changes.

Also added nodewebkit as a dependency in package.json.
It is a dependency after all.

Please test the build and run scripts on different platforms. I tested it on Windows and it works just fine.

I cleaned up a bit compilation tasks.
- Merged both 'inject-player' and 'inject-index' into 'inject-html'.
- Added a 'compile' task

Added tasks to help install & build
- build handles ffmpeg lib
- run launches the app

Also updates README to reflect this changes.

Also added nodewebkit as a dependency in package.json.
It is a dependency after all.

Please test the build and run scripts on different platforms. I tested
it on Windows and it works just fine.
@ivantodorovich
Copy link
Contributor Author

#35 (comment)

@ivantodorovich ivantodorovich mentioned this pull request Apr 9, 2014
@sharkiller
Copy link
Contributor

@ivantodorovich the nodewebkit binary name in mac is node-webkit, not nw

Please test. Although I think it should work properly on every platform,
since it falls back nicely.

It now makes use of npm scripts to install and run.
@ivantodorovich
Copy link
Contributor Author

Fixed. I think it's perfect now.

Install

npm install handles everything. It even copies the correct ffmpeglib to nodewebkit's folder, and rebuilds css and html injection (just in case).

Run

npm start

Simple.


"scripts": {
"install": "gulp build",
"start": "nodewebkit . -- --debug"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this right? sorry cant test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be. Does not work for you?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm install no jode con el que instala las dependencias? porque no lo cambias a npm build? o cada vez que se escriba npm install para compilar va a bajar las dependencias de nuevo?
No uso mucho npm asi que ni idea

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cada vez que se ejecuta npm install, además de instalar las dependencias y hacer lo que siempre hace, va a hacer correr gulp build. Funciona como un hook al comando install, no lo reemplaza.
Probalo y después me contás :)

@ivantodorovich
Copy link
Contributor Author

I'm currently working on extending this branch to implement scripts for building the standalone executable.

Currently It's only supporting win32. Will add other platforms once I get this polished.

@Cuevana how did you set the executable's icon on the build?

@Foxito
Copy link

Foxito commented Apr 10, 2014

@ivantodorovich I'm not sure if this is what you are looking for, but to pack all in an executable i found this, https://github.com/rogerwang/node-webkit/wiki/How-to-package-and-distribute-your-apps at the bottom it says that you can use "Enigma Virtual Box"

By the way, i'm having troubles to understand how to pack the app, i would like to do some custom modifications to it, and i think you may know how to do what i need, it's my whatsapp if you have a minute to discuss this: (3942 546 59 083+) Al verez, o sea, empezá por el + y terminas en 93. Te hago una consulta y si te parece posible vemos como arreglamos. Saludos.

@ivantodorovich
Copy link
Contributor Author

@Foxito Thanks, that's what I'm doing right now and I successfully pack the executable. But it doesn't say anything about app icon. I'm guessing @Cuevana hacked the executable resources to accomplish that.

@ivantodorovich
Copy link
Contributor Author

@Foxito agregame a Hangouts, o por mail. ['ivan','todorovich'].join('.')+'@gmail.com'

@Foxito
Copy link

Foxito commented Apr 10, 2014

@ivantodorovich here is a good tutorial about how to hack the .exe to change the icon:

http://www.wikihow.com/Change-the-Icon-for-an-Exe-File

PS: ya te mande mail.

Cuevana added a commit that referenced this pull request Apr 11, 2014
@Cuevana Cuevana merged commit 6577da0 into Cuevana:master Apr 11, 2014
@Cuevana
Copy link
Owner

Cuevana commented Apr 11, 2014

Great work @ivantodorovich. We used https://github.com/geo8bit/nodebob for Windows build, maybe we can add it to the build process.

@ghost
Copy link

ghost commented Apr 14, 2014

I made binaries for Linux 32-bit copying and modifying lines of code (changing "win32" with "ia32/linux32" and removing ".exe"). Is it possible to build for all platforms, or build for a particular platform, using the same code to avoid redundant and repetitive lines?

@cesasol
Copy link

cesasol commented Apr 14, 2014

Not really. I will made the script for both, linux 32 and 64 bits. Maybe ill made a pull request this wendsday.

This script, will include a desktop and icons files acording the freedesktop specification.

@ivantodorovich
Copy link
Contributor Author

At the time I made this PR this project didn't work: https://github.com/mllrsohn/node-webkit-builder

But now it does. We should add it as a devDependencies and use it in our build process. It can even build for multiple target platforms, something that will never work using the script I made (only for user platform).

@cesasol let me know if you wanna handle it.

@cesasol
Copy link

cesasol commented Apr 14, 2014

I do, at least for GNU/Linux distributions

@ivantodorovich
Copy link
Contributor Author

Using the node-webkit-builder the code should look the same for all platforms.

Example taken of https://github.com/mllrsohn/node-webkit-builder :

var NwBuilder = require('node-webkit-builder');
var nw = new NwBuilder({
    files: './path/to/nwfiles/**/**', // use the glob format
    plattforms: ['win','osx']
});

You still need to handle ffmpegsumo lib, which is platform specific in our case. You may need to hack the resulting build of NwBuilder, or maybe hack into its _plattforms.files internal variable to replace ffmpegsumo's path

@ivantodorovich ivantodorovich deleted the gulpBuild branch April 14, 2014 21:00
@ghost
Copy link

ghost commented Apr 15, 2014

@ivantodorovich check out how Flixtor build using node-webkit-builder. Even easily handles libffmpegsumo. I tried changing the directory names of the Gruntfile.js, and generated binaries work fine on Windows 8 and Linux 32 bits at least.

https://github.com/TorrentLookup/Flixtor/blob/master/Gruntfile.js

I'm sure you can adapt this to the tasks you added.

@ivantodorovich
Copy link
Contributor Author

#61

@ivantodorovich ivantodorovich mentioned this pull request Apr 17, 2014
Cuevana added a commit that referenced this pull request Sep 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants