You can automate it from node using the grunt
<https://github.com/h2non/grunt-nar> and gulp
<https://github.com/h2non/gulp-nar> plugins
I'll update both plugins to support executable creation mode


2014-07-02 23:58 GMT+02:00 Ingwie Phoenix <[email protected]>:

>
> Am 02.07.2014 um 20:31 schrieb Ryan Schmidt <[email protected]>:
>
> >
> > On Jun 29, 2014, at 6:45 AM, Tomás Aparicio wrote:
> >
> >> Some users asked me about a way to create fully self-contained nar
> archives that do not requires that node or nar must be already installed in
> the system in order to run or extract an application
> >>
> >> I've finally decided to provide support to this feature. From 0.3.0
> version you can create executable binary-like nar archives that do not have
> external dependencies. node binary and nar package are now embedded
> >>
> >> $ nar create --executable
> >>> It generates server-0.1.0.nar, for example
> >>
> >> Then you can distribute your archive into a fresh server (without node
> installed) and simply run
> >> $ chmod +x server-0.1.0.nar
> >> $ ./server-0.1.0.nar run --args-start='--port 8080'
> >>
> >> $ npm install -g nar
> >>
> >> I hope this will be useful
> >
> > Presumably this executable is only usable on a single
> platform/OS/architecture? Is that the same platform/OS/architecture on
> which it was created? For example, executable archives made on 64-bit Intel
> Mac OS X can only be run on 64-bit Intel Mac OS X, and executable archives
> created on 32-bit Intel Gentoo Linux can only be run on 32-bit Intel Gentoo
> Linux?
> Very surely. At least the embedded nodejs is.
>
> From what I can see, this sounds like the good old "shar". It was a way to
> archieve files into a shell script, and then extract them from themselves.
> Maybe I am getting soemthing wrong, but it was similar for sure.
>
> You can, however, create an automation. Lets say, a tool like node-gyp,
> just for nar:
>
> $ nar-maker ./myfolder
> -- Created: server-0.3.0-win32.nar
> -- Created: server-0.3.0-linux64.nar
> -- Created: server-0.3.0-linux32.nar
> -- Created: server-0.3.0-macosx64.nar
>
> How this would work? The tool would've been downloading the different
> nodejs executables - note, only the executables - and just packaged the nar
> archives with the correct binary.
>
> That, would at least solve this little issue. You can't make one package
> for all systems, sadly. Windows, Linux and Mac use far too different binary
> file layouts...just look at developers ranting about dynamic libraries for
> windows, where you have to add an extra macro across the whole of your
> project, just ot export the functions. XD
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "nodejs" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/nodejs/0_C1hcAbUyM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/E0E8D0C9-ADE4-49EF-9410-6ECED47682BE%40googlemail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Tomás Aparicio

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAOr4ezuhSwQUBrxNj%3DtCUDA%3DWsL-f2F7Z_sOTeOgBez%2B%3DEeLgA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to