Message from discussion
Idea: executable stubs to replace batch files
Received: by 10.52.240.229 with SMTP id wd5mr10767047vdc.8.1339159693737;
Fri, 08 Jun 2012 05:48:13 -0700 (PDT)
X-BeenThere: rubyinstaller@googlegroups.com
Received: by 10.220.155.19 with SMTP id q19ls899090vcw.6.gmail; Fri, 08 Jun
2012 05:48:12 -0700 (PDT)
Received: by 10.52.29.193 with SMTP id m1mr10382560vdh.4.1339159692704;
Fri, 08 Jun 2012 05:48:12 -0700 (PDT)
Received: by 10.52.29.193 with SMTP id m1mr10382554vdh.4.1339159692663;
Fri, 08 Jun 2012 05:48:12 -0700 (PDT)
Return-Path: <luislav...@gmail.com>
Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169])
by gmr-mx.google.com with ESMTPS id u6si1276180vdi.1.2012.06.08.05.48.12
(version=TLSv1/SSLv3 cipher=OTHER);
Fri, 08 Jun 2012 05:48:12 -0700 (PDT)
Received-SPF: pass (google.com: domain of luislav...@gmail.com designates 209.85.220.169 as permitted sender) client-ip=209.85.220.169;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of luislav...@gmail.com designates 209.85.220.169 as permitted sender) smtp.mail=luislav...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-vc0-f169.google.com with SMTP id fl10so1189080vcb.14
for <rubyinstaller@googlegroups.com>; Fri, 08 Jun 2012 05:48:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to
:content-type:content-transfer-encoding;
bh=VGMqGQ65l8Cu2ecqQgluYm7k6Ch1RLowW51+/0AgF8I=;
b=TaHaKU85yYyXI4M9shH4RK38vJczUvDDD8CAeYlvneNsbRmBL29lQpdk4UASjE0aZU
jSk5Hv+QBWNskTgIZWS096jc0t8TLqYt/goLN9ki12r8TScX4KjanEm7P45ut9P3cdel
elhPAIBMQhQd5pu7VOoXdmMYJGIFi/hBjPzTsRKzhmIWgwBsYXixy0VuYy3wpW/WPAv4
xr6Vfy47Vt9SExaG/pfJuhA4XG3w2Ln0X3RSLg1uUWRGOHaNGcfl+hZnzyCLWYRv9bAs
ZY8X+t6Xovcz9ZlsTczxsFsi9gfeWN0mf5l9scWRgmnjnzuwGudANACKFihINcwkxdyN
zU+w==
Received: by 10.220.150.131 with SMTP id y3mr5949202vcv.42.1339159692486; Fri,
08 Jun 2012 05:48:12 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.106.198 with HTTP; Fri, 8 Jun 2012 05:47:52 -0700 (PDT)
In-Reply-To: <CABSXzx2FA4YyargmS1SNK57Y=5N=D1X5LjG28Ot89nOer3A...@mail.gmail.com>
References: <CAN_J9at6VCwTr0R-PoQ8xEYa=EYh8yNAH-XGuc-=Lk5MR3L...@mail.gmail.com>
<CABSXzx2FA4YyargmS1SNK57Y=5N=D1X5LjG28Ot89nOer3A...@mail.gmail.com>
From: Luis Lavena <luislav...@gmail.com>
Date: Fri, 8 Jun 2012 09:47:52 -0300
Message-ID: <CAN_J9avDvsax-QyWHe09-i8eCL5XBvJ4mKsQUUHcZqAAoa4...@mail.gmail.com>
Subject: Re: [RubyInstaller] Idea: executable stubs to replace batch files
To: rubyinstaller@googlegroups.com
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Fri, Jun 8, 2012 at 8:05 AM, Bo=C5=A1ko Ivani=C5=A1evi=C4=87
<bosko.ivanise...@gmail.com> wrote:
>
> Hi guys,
>
> It's been a long time since I contributed to this project. My daily job t=
ook
> too much time but now I'm back (at least with this small contribution :))=
.
>
We miss you!
> I just pushed initial commit to new project at
> http://github.com/bosko/gem-exefy. This is RubyGems plugin which adds new
> command - exefy. Executing
>
> =C2=A0 gem exefy <gem_name>
>
> will search for all executables in target Gem. For each executable it wil=
l
> try to find corresponding batch file which will, finally, be replaced wit=
h
> .exe file with the name of the Gem executable (batch file name).
>
> Gem is still not ready for publishing. It is still missing DevKit's
> detection. BTW what would be the best way to detect if DevKit is availabl=
e,
> to automatically expand PATH variable to include it while .exe file is
> created? John, Luis?
>
You can:
begin
require "devkit"
rescue LoadError
# ...
end
A proper installation of DevKit will place a "devkit.rb" in the
$LOAD_PATH, you can use that to detect if is present or fail.
I just sent you a pull request with minor changes.
https://github.com/bosko/gem-exefy/pull/1
> Nevertheless Gem is completely functional if you manually execute
> devkitvars.bat before executing:
>
> =C2=A0 gem exefy...
>
> Of course I would like to hear what you guys think about this.
>
This is awesome! thank you for taking the time to work on this!
I noticed that with every gem the compilation of the executable is
triggered, perhaps we would like to cache the executable inside the
Gem datadir and compile only once?
I'll investigate that a bit more and get back to you, in the
meantime... welcome back and thank you!
Cheers,
--=20
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exup=C3=A9ry