Message from discussion
build a node addon on windows for linux
Received: by 10.66.86.39 with SMTP id m7mr9360501paz.4.1351481415939;
Sun, 28 Oct 2012 20:30:15 -0700 (PDT)
X-BeenThere: nodejs@googlegroups.com
Received: by 10.68.223.67 with SMTP id qs3ls22796928pbc.8.gmail; Sun, 28 Oct
2012 20:30:04 -0700 (PDT)
Received: by 10.68.229.231 with SMTP id st7mr8705077pbc.2.1351481404187;
Sun, 28 Oct 2012 20:30:04 -0700 (PDT)
Date: Sun, 28 Oct 2012 20:30:03 -0700 (PDT)
From: NodeNinja <aeon6f...@gmail.com>
To: nodejs@googlegroups.com
Message-Id: <6a1b961b-825f-473d-9bf7-d6cd265fdbe7@googlegroups.com>
In-Reply-To: <02337796-1d7b-490d-8cb9-761c49598d21@r6g2000yqd.googlegroups.com>
References: <477b1221-a36c-46da-a306-0d5dd7490405@googlegroups.com>
<3e7dee92-b9f5-4867-baa3-87a0efc4f6f0@j18g2000yqf.googlegroups.com> <e4bbc0a2-80ab-4699-bed9-132a1805863c@googlegroups.com>
<02337796-1d7b-490d-8cb9-761c49598d21@r6g2000yqd.googlegroups.com>
Subject: Re: build a node addon on windows for linux
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_516_17716890.1351481403884"
------=_Part_516_17716890.1351481403884
Content-Type: multipart/alternative;
boundary="----=_Part_517_5741063.1351481403884"
------=_Part_517_5741063.1351481403884
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
On Sunday, October 28, 2012 11:07:48 PM UTC+5:30, mscdex wrote:
>
> On Oct 28, 1:15 pm, NodeNinja <aeon6f...@gmail.com> wrote:
> > and was wondering if there was anyway to target multiple platforms?
>
> Sure, you can target multiple platforms in your binding.gyp easily
> using conditionals like that. However I thought you were originally
> asking how to compile a Linux executable on Windows.
>
My intention in to build the addon on one system preferably having Windows
OS and then use that addon on Windows and Linux.
If I do something like this in binding.gyp
'conditions': [
['OS=="linux"',
['OS=="mac"',
['OS=="win"',
]
and then building the addon on windows?
1. Will three versions of the addon be generated?
2. Can I then run the addon on Windows and Linux?
------=_Part_517_5741063.1351481403884
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
<br><br>On Sunday, October 28, 2012 11:07:48 PM UTC+5:30, mscdex wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On Oct 28, 1:15 pm, NodeNinja <<a>aeon6f...@gmail.com</a>> wrote:
<br>> and was wondering if there was anyway to target multiple platforms?
<br>
<br>Sure, you can target multiple platforms in your binding.gyp easily
<br>using conditionals like that. However I thought you were originally
<br>asking how to compile a Linux executable on Windows.
<br></blockquote><div><br></div><div>My intention in to build the addon on one system preferably having Windows OS and then use that addon on Windows and Linux. </div><div>If I do something like this in binding.gyp </div><div><div>'conditions': [</div><div> ['OS=="linux"',</div><div><br></div><div>['OS=="mac"',</div><div><br></div><div> ['OS=="win"',</div><div><br></div><div>]</div></div><div>and then building the addon on windows?</div><div><br></div><div>1. Will three versions of the addon be generated?</div><div>2. Can I then run the addon on Windows and Linux?</div>
------=_Part_517_5741063.1351481403884--
------=_Part_516_17716890.1351481403884--