Just to announce that nar had an issue in Windows and it was fixed in
0.3.5 version
I've tested it in Windows 7 generating different executables for OSX and
Linux
Anyway, if you experiment any issue, please report it via Github
<https://github.com/h2non/nar/issues>
$ npm update -g nar
El 02/07/14 23:58, Ingwie Phoenix escribió:
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 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/53B5171E.1010203%40aparicio.me.
For more options, visit https://groups.google.com/d/optout.