Giter Site home page Giter Site logo

Comments (3)

jgrenon avatar jgrenon commented on May 25, 2024

That sound a lot of moving parts and lot of potential problems to pre-build for all platforms. Actually, before going this way, I’ld like to discuss this particular issue with the guys from node-webkit. They have a nw-gyp compiler, I’m not sure why, but sounds like they do some compiling on their own.

For me the natural approach would be to have a first time installation task that would be run just once and would perform all required compilation for the target platform and restart the app (if required). That could avoid to prebuilt and package everything (smaller executables) and still support all platforms. Force the presence of node-gyp, npm, etc. which might not be what we want though.

Another thought is : do this really has to be automated? Anyway, any one using this seed will likely be testing their app on all target platforms so, maybe it’s better just for them to clone their git repo and execute your nice grunt tasks manually in their VM/box? They need to have a box / vm anyway to at least see what their app is looking on this platform (minimal testing).

Unless of course, you need something like you describe quickly, in which case, let’s go with that, it will surely benefits someone else too!

Joel

On Monday, February 3, 2014 at 16:03, Tom Lawton wrote:

Currently, the grunt-node-webkit-builder module can download and install all flavours of node-webkit (linux64/32,win,mac), but there seems to be a big problem with npm modules which use node-gyp or similar compilation steps in the install process. node-gyp can only compile (without big mods) for the current platform, which makes creating a production package pointless for any target other than your host system.
I use Vagrant (the vm manager - http://www.vagrantup.com/) a lot in day to day web development. The great thing is that the Vagrantfile (which describes the VM and provides some great chef / puppet automation) is tiny and is easily included in the skeleton. It should allow us to build for true foreign platforms (ie. 32 bit on 64 bit host, mac on windows etc).
There's probably a whole load of unit-testing coolness to be had also.
Here's what I propose:
Vagrantfiles for each target host in subdirectories
vagrant up called in each sub-directory by Grunt will provision a new VM and bring it up
chef will install node, npm, and will mount our releases/ folder, and make a copy of src/ excluding node_modules to the VM disk.
Grunt connects to the VM over SSH / winRM and executes grunt build inside the VM
Grunt then frees the VM with vagrant suspend

The build will appear in the releases/ directory, but will have been built on a different platform, so any node-gyp stuff will work.
Provisioning closed-source OS's
It'll take a bit of messing around to build for OS X or Windows as foreign targets as you'll likely need an OEM install CD to create the VM. Possibly even need VM reconfiguration (running OSX on our ESXi server took a lot of effort).
Here's some notes for future reference:
http://grahamgilbert.com/blog/2013/08/23/creating-an-os-x-base-box-for-vagrant-with-packer/
https://github.com/WinRb/vagrant-windows


Reply to this email directly or view it on GitHub (#8).

from angular-desktop-app.

talss89 avatar talss89 commented on May 25, 2024

I think I lost sight of the typical use case for this project on reflection. I'm using it at the moment to build prototype software - the people I'm working with aren't that computer literate and run a variety of OS's, spread over the country. I just need to churn out binaries and it's understood I'm not guaranteeing they'll run. Sounds like chaos, and it is.

I'll just stick with a manual build process for this particular job - there's no need to add bloaty code, I agree. It's bad practice to introduce this as a quick fits-all solution.

from angular-desktop-app.

jgrenon avatar jgrenon commented on May 25, 2024

ok cool. Happy that this is useful to you BTW. I’m using it also for 2 customer products. I’ll share more code as I go.
Joel

On Monday, February 3, 2014 at 16:37, Tom Lawton wrote:

I think I lost sight of the typical use case for this project on reflection. I'm using it at the moment to build prototype software - the people I'm working with aren't that computer literate and run a variety of OS's, spread over the country. I just need to churn out binaries and it's understood I'm not guaranteeing they'll run. Sounds like chaos, and it is.
I'll just stick with a manual build process for this particular job - there's no need to add bloaty code, I agree. It's bad practice to introduce this as a quick fits-all solution.


Reply to this email directly or view it on GitHub (#8 (comment)).

from angular-desktop-app.

Related Issues (14)

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.