Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 77226200B88 for ; Thu, 8 Sep 2016 04:39:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 75BD3160ACF; Thu, 8 Sep 2016 02:39:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6FD7A160AC1 for ; Thu, 8 Sep 2016 04:39:49 +0200 (CEST) Received: (qmail 3617 invoked by uid 500); 8 Sep 2016 02:39:48 -0000 Mailing-List: contact users-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.apache.org Delivered-To: mailing list users@groovy.apache.org Received: (qmail 3605 invoked by uid 99); 8 Sep 2016 02:39:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Sep 2016 02:39:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 29E68180656 for ; Thu, 8 Sep 2016 02:39:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.208 X-Spam-Level: ** X-Spam-Status: No, score=2.208 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_REMOTE_IMAGE=0.01] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id fjFmFhCJd06l for ; Thu, 8 Sep 2016 02:39:44 +0000 (UTC) Received: from mail-qk0-f171.google.com (mail-qk0-f171.google.com [209.85.220.171]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id BDED25F5A1 for ; Thu, 8 Sep 2016 02:39:43 +0000 (UTC) Received: by mail-qk0-f171.google.com with SMTP id m184so28916043qkb.1 for ; Wed, 07 Sep 2016 19:39:43 -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; bh=9EjmktT1ck2sIfdcy1MjGx1J5UM6H7NFRkbZPzRVe3o=; b=fT6siGuYT+3Q8LBdjr/4iud9EatvIAWr12KDSTgxLo/RQ2f1AXG2V4XlTm/vwAuKzV 5XEEdYTDP0ga/BFlXUCeaJKeDhqjleTSy2q6Lnvcg+/ysj7hdDG4mNpS3fardPhigUqs TdCIAniAeXK7YTQ+uahAX7y6+nZush03TXF2m3McGt1FXNIj6OHLHtoSE+h64yEU6Cmj ersBayujmY/PTphFJ6gxKccWa8mjjNT8Ap+O+7Fw5ISV+gESq9Hu7U/JZj45Evxi+BXP +j+RYwTZO5aoWRDp9d9jQbGUCS4mE5o+woumdooi1euwTa9iWgS3rR+m1/ok4G6cljMR dWwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=9EjmktT1ck2sIfdcy1MjGx1J5UM6H7NFRkbZPzRVe3o=; b=hqsyg/8Dne0vkeys48/CjX0FTe3chc2RMXLuY8SfAGvcFJgAmCR5ZA+tD2GLUt1dSR CDoZCKGsQJAPmqFgPgKjWDiiAvr+Gy/wm1xTknBwXBBhfsyGORk17MW8Nnun5l4B/eTM ENO/rAZ1EbH0frg4BUtKd4o9poS+oOLH1gCfHSvr38xxti1rzR8ZawSY04ysmWqIWD+/ ICbomkVHlEaMZh7czXr5JUQ6KviZ7fKqEX6PduBvc64Xc5PyHBAQnXAOEZA8XX1ZdK5Z l1a5+6RW4zLDVgUgYwX4HT3A/4yKfJoHBJEnSYr0MIea/Woil3T3nYYGjac5Pnxx0YmQ iIvQ== X-Gm-Message-State: AE9vXwOTht5F04ICLNObIQTxCxV1CgL2DNFvWqnmbEyKE+auzimmaJa4sq5T5oLZvnXpOENmLSF5Ql6P4C6zRg== X-Received: by 10.55.159.77 with SMTP id i74mr6357788qke.60.1473302382555; Wed, 07 Sep 2016 19:39:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.84.168 with HTTP; Wed, 7 Sep 2016 19:39:22 -0700 (PDT) In-Reply-To: References: From: Keegan Witt Date: Wed, 7 Sep 2016 22:39:22 -0400 Message-ID: Subject: Re: Looking for testers & feedback: new Groovy binaries for Windows To: users@groovy.apache.org Content-Type: multipart/alternative; boundary=94eb2c06c61028bade053bf5f135 archived-at: Thu, 08 Sep 2016 02:39:50 -0000 --94eb2c06c61028bade053bf5f135 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I've uploaded new executables to fix the issue with invoking without .exe suffix. -Keegan On Wed, Sep 7, 2016 at 5:21 PM, Keegan Witt wrote: > Paco, > Good catch. I'll correct that. > > Raviteja, > That's correct, they are just wrappers. The advantage is that you can se= t > file associations in Windows to an exe, but you can't associate a file ty= pe > with a bat file. If you could, than you'd be right -- there'd be no reas= on > to have a wrapper. > > -Keegan > > On Wed, Sep 7, 2016 at 1:57 PM, Raviteja Lokineni < > raviteja.lokineni@gmail.com> wrote: > >> I just glanced over the code and found that the cpp code just seems to b= e >> a wrapper on top of existing bat file. Although it is good that you want= ed >> to contribute, I don't see the advantage in using exe file iff all it do= es >> is wrap existing bat file. >> >> Thanks, >> Raviteja >> >> On Wed, Sep 7, 2016 at 5:45 AM, Paco Zarate >> wrote: >> >>> Hello Keegan! >>> >>> I was trying the new .exe files and i receive these errors when using >>> the commands without .exe: >>> >>> C:\WINDOWS\system32>groovyc -v >>> 'groobat' is not recognized as an internal or external command, >>> operable program or batch file. >>> >>> C:\WINDOWS\system32>groovy -v >>> 'grobat' is not recognized as an internal or external command, >>> operable program or batch file. >>> >>> >>> Including the .exe seems to work fine: >>> >>> C:\WINDOWS\system32>groovy.exe -v >>> Groovy Version: 2.4.7 JVM: 1.8.0_101 Vendor: Oracle Corporation OS: >>> Windows 10 >>> >>> C:\WINDOWS\system32>groovyc.exe -v >>> Groovy compiler version 2.4.7 >>> Copyright 2003-2016 The Apache Software Foundation. >>> http://groovy-lang.org/ >>> >>> >>> If i remove the JAVA_HOME env variable I get these responses: >>> C:\WINDOWS\system32>groovy.exe -v >>> 'MySQL' is not recognized as an internal or external command, >>> operable program or batch file. >>> 'MySQL' is not recognized as an internal or external command, >>> operable program or batch file. >>> Groovy Version: 2.4.7 JVM: 1.8.0_101 Vendor: Oracle Corporation OS: >>> Windows 10 >>> >>> C:\WINDOWS\system32>groovyc.exe -v >>> 'MySQL' is not recognized as an internal or external command, >>> operable program or batch file. >>> 'MySQL' is not recognized as an internal or external command, >>> operable program or batch file. >>> Groovy compiler version 2.4.7 >>> Copyright 2003-2016 The Apache Software Foundation. >>> http://groovy-lang.org/ >>> >>> Thanks!! >>> >>> Paco. >>> >>> On Thu, Sep 1, 2016 at 2:05 PM, Keegan Witt >>> wrote: >>> >>>> I'm building some new binaries for Windows (groovy.exe, >>>> groovyConsole.exe, etc) and am looking for some folks to test and code >>>> review it. Their temporary home is here: https://github.com/keega >>>> nwitt/groovy-binaries. After I've incorporated any feedback I get, >>>> I'll transfer it to a repo under the groovy org on Github (haven't dec= ided >>>> yet whether that should be groovy-windows-installer >>>> or >>>> groovy-native-launcher >>>> ). >>>> >>>> To make it easy to test, you can download the compiled binaries from >>>> here (https://drive.google.com/folderview?id=3D0B_uOQFeu84v0TDVkS00 >>>> xeE5yNHc&usp=3Dsharing) and put them in your current Groovy installati= on >>>> (whether from zip or installer). >>>> >>>> The overall approach is to have an exe that calls the matching .bat >>>> file. This approach was to avoid a few things I didn't like about the >>>> current binaries, namely >>>> Windows installer determines 32 or 64 bit version of Java at install >>>> time and installs the appropriate groovy.exe, but if you change your J= ava >>>> version later, exe won't be able to run Groovy because it won't be abl= e to >>>> find right Java to invoke. >>>> Binaries have their own logic to find Java, which adds unnecessary >>>> complexity since the batch files maintained by the Groovy team already= have >>>> this logic. >>>> Parameters are hard-coded into the binaries, coupling any change in >>>> parameters between Groovy versions to that binary. >>>> I'm not a Windows or C++ guy, so there are some things I'd like >>>> somebody's thoughts on: >>>> Am I following best practices in C++ source and Makefile? >>>> Would it be better to have wmain() instead of main()? >>>> Any better way to have done resource templating other than* sed*? >>>> Would there be a reason to have chosen C over C++? >>>> Any non-ASCII character hangups? >>>> Running groovy.exe =E8=B1=A1.groovy =E8=B1=A1 seemed to invoke and pas= s argument in >>>> fine, but it printed the arg as a question mark. Although the current >>>> binaries binaries do the same thing, so maybe it's a limitation of* >>>> cmd.exe*. >>>> Does my strategy of passing args from exe to bat have any edge cases t= o >>>> worry about with the use of system() and CreateProcess()? >>>> >>>> -Keegan >>>> >>> >>> >> >> >> -- >> *Raviteja Lokineni* | Business Intelligence Developer >> TD Ameritrade >> >> E: raviteja.lokineni@gmail.com >> >> [image: View Raviteja Lokineni's profile on LinkedIn] >> >> >> > --94eb2c06c61028bade053bf5f135 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I've uploaded new executables to fix the issue with in= voking without .exe suffix.

-Keegan

On Wed, Sep 7, 2016 at 5:2= 1 PM, Keegan Witt <keeganwitt@gmail.com> wrote:
Paco,
Good catch.=C2=A0 I'= ;ll correct that.

Raviteja,
That's c= orrect, they are just wrappers.=C2=A0 The advantage is that you can set fil= e associations in Windows to an exe, but you can't associate a file typ= e with a bat file.=C2=A0 If you could, than you'd be right -- there'= ;d be no reason to have a wrapper.

-Keegan

On Wed, Sep 7, 2016 at 1:57 PM, Raviteja Lokineni <raviteja.lokineni@gmail.com> wrote:
I just glanced over the code and found = that the cpp code just seems to be a wrapper on top of existing bat file. A= lthough it is good that you wanted to contribute, I don't see the advan= tage in using exe file iff all it does is wrap existing bat file.
=

Thanks,
Raviteja

On Wed, Sep 7, 2016 at 5= :45 AM, Paco Zarate <contacto@nazcasistemas.com> wr= ote:
Hell= o Keegan!

I was trying the new .exe files and i receive these = errors when using the commands without .exe:

C:\WINDOWS\system32>= groovyc -v
'groobat' is not recognized as an internal or externa= l command,
operable program or batch file.

C:\WINDOWS\system32>= ;groovy -v
'grobat' is not recognized as an internal or external= command,
operable program or batch file.


Including the= .exe seems=C2=A0 to work fine:

C:\WINDOWS\system32>groovy.exe -v=
Groovy Version: 2.4.7 JVM: 1.8.0_101 Vendor: Oracle Corporation OS: Win= dows 10

C:\WINDOWS\system32>groovyc.exe -v
Groovy compile= r version 2.4.7
Copyright 2003-2016 The Apache Software Foundation. http://groovy-lang.org/


If i remove the JAVA_HOME env variable I get these resp= onses:
C:\WINDOWS\system32>groovy.exe -v
'MySQL' is not re= cognized as an internal or external command,
operable program or batch f= ile.
'MySQL' is not recognized as an internal or external comman= d,
operable program or batch file.
Groovy Version: 2.4.7 JVM: 1.8.0_1= 01 Vendor: Oracle Corporation OS: Windows 10

C:\WINDOWS\system32>= groovyc.exe -v
'MySQL' is not recognized as an internal or = external command,
operable program or batch file.
'MySQL' is = not recognized as an internal or external command,
operable program or b= atch file.
Groovy compiler version 2.4.7
Copyright 2003-2016 The Apac= he Software Foundation.
http://groovy-lang.org/

Thanks!!

Paco.

On Thu, Sep 1, 2016 at 2:05 PM, Keegan W= itt <keeganwitt@gmail.com> wrote:

I'm building some new binaries for Windows (g= roovy.exe, groovyConsole.exe, etc) and am looking for some folks to test an= d code review it.=C2=A0 Their temporary home is here:=C2=A0https://github.= com/keeganwitt/groovy-binaries.=C2=A0 After I've incorporated = any feedback I get, I'll transfer it to a repo under the groovy org on = Github (haven't decided yet whether that should be groovy-windows= -installer=C2=A0or groovy-native-launcher).

To make it easy to test, you can download the compiled binar= ies from here (https://drive.goo= gle.com/folderview?id=3D0B_uOQFeu84v0TDVkS00xeE5yNHc&usp=3Dsh= aring) and put them in your current Groovy installation (whether from z= ip or installer).

The overall approach is to have an exe that calls the matchi= ng .bat file.=C2=A0 This approach was to avoid a few things I didn't li= ke about the current binaries, namely
Windows installer determines 32 or 64 bit version of Java at install time a= nd installs the appropriate groovy.exe, but if you change your Java version= later, exe won't be able to run Groovy because it won't be able to= find right Java to invoke.
Binaries have their own logic to find Java, which adds unnecessary complexi= ty since the batch files maintained by the Groovy team already have this lo= gic.
Parameters are hard-coded into the binaries, coupling any change in paramet= ers between Groovy versions to that binary.
I'm not a Windows or C++ guy, so there are some things I'd like som= ebody's thoughts on:
Am I following best practices in C++ source and Makefile?
Would it be better to have=C2=A0wmain()=C2=A0instead of= =C2=A0main()?
Any better way to have done resource templating other than sed?
Would there be a reason to have chosen C over C++?
Any non-ASCII character hangups?
Running groovy.exe=C2=A0=E8=B1=A1.groovy=C2=A0=E8=B1=A1=C2=A0seemed to invoke and pass argument in fine, but it printed the arg = as a question mark.=C2=A0 Although the current binaries binaries do the sam= e thing, so=C2=A0maybe=C2=A0it's a limitation of cmd.exe.
Does my strategy of passing args from exe to bat have any edge cases to wor= ry about with the use of=C2=A0system() and Create= Process()?

-Keegan





<= /div>--
Raviteja Lokineni=C2=A0| Business= Intelligence Developer
TD Amer= itrade


=


--94eb2c06c61028bade053bf5f135--