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 E2756200B3E for ; Wed, 7 Sep 2016 23:21:53 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E13B7160AC1; Wed, 7 Sep 2016 21:21:53 +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 B772B160ABF for ; Wed, 7 Sep 2016 23:21:52 +0200 (CEST) Received: (qmail 88419 invoked by uid 500); 7 Sep 2016 21:21:51 -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 88409 invoked by uid 99); 7 Sep 2016 21:21:51 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2016 21:21:51 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 77409C6E8D for ; Wed, 7 Sep 2016 21:21:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.189 X-Spam-Level: ** X-Spam-Status: No, score=2.189 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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_REMOTE_IMAGE=0.01] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id JKCwxNIzIdIu for ; Wed, 7 Sep 2016 21:21:47 +0000 (UTC) Received: from mail-qk0-f170.google.com (mail-qk0-f170.google.com [209.85.220.170]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 04E735F1F3 for ; Wed, 7 Sep 2016 21:21:47 +0000 (UTC) Received: by mail-qk0-f170.google.com with SMTP id z190so13307651qkc.3 for ; Wed, 07 Sep 2016 14:21:46 -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=0U9w0+M+J3MGAFKbIP6vdGiPr4H8u6jEtFv0QanEG44=; b=mD56eEOoVEtmgLtg5+1K24csUrKgtbMd9M/UmEgr8+obOLxAZ1+PCppKY0FN1YMYZG z5nfJjF3/dVkFM4j/Jft8Zr7orqAHcCrEMAdrN2o8oN9pZ8AITqpEM0WIssnfMOV4uGY SSH3xc85lqVW+WFInWBSKGFqm3/GlJV8PnfYI8NA5L1F0bLZWIuCKtC2KVxXhrWet4lE P81a8i2PGCiMcqSUwJZ9jSixGyDMtR2/AYEYdLaJcJn4bIWG5MMult15CJZGdMOf1zVZ I8IQxeFMBVwL7kEq3+WlNNeBs9gypJamDVIScxV+nOgIRf+VC6eVUbdO6GejbDEaHyis i/6Q== 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=0U9w0+M+J3MGAFKbIP6vdGiPr4H8u6jEtFv0QanEG44=; b=X4FUxfMNS0B/xNTkyrou5uwdn6UsqIy6l4PHMvY8JYoXAf2BviWGMLpfCyPf4bCrWu 7QEKs13GqGNdosg9NTPCB13BljrwRc+CUBYWDNilQDp+gDCN3OHRk1chuzunh0WogOTH +vRrokRrrsyfWKZ1caCm+i50n7UaB432MBZYHRyvA48KdglDXBWoAJYtcZH0Izz1lXaA +RLBoncSv7Mk62I1F2097sl0A4gauTg9lsBpyClaiqGBZ6XN0XmT8+AaSvW33oEpstsB 9+roaYYYNBs0tHn/4s+8jc9z3iLVbXHGQYNuHYbuIgrx8Mt5p4KZ9PeULbQOyqvepdCn qFow== X-Gm-Message-State: AE9vXwNm9MRwzi1MUsMR7mjJP6VUmYwTG0BLOnXbg4LAbI4abiXUfZRUmJefG2/Je6prPjCL9xJlPuN29UJmvA== X-Received: by 10.55.141.131 with SMTP id p125mr53221144qkd.132.1473283305886; Wed, 07 Sep 2016 14:21:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.84.168 with HTTP; Wed, 7 Sep 2016 14:21:25 -0700 (PDT) In-Reply-To: References: From: Keegan Witt Date: Wed, 7 Sep 2016 17:21:25 -0400 Message-ID: Subject: Re: Looking for testers & feedback: new Groovy binaries for Windows To: users@groovy.apache.org Content-Type: multipart/alternative; boundary=94eb2c08540619d9eb053bf180e0 archived-at: Wed, 07 Sep 2016 21:21:54 -0000 --94eb2c08540619d9eb053bf180e0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Paco, Good catch. I'll correct that. Raviteja, That's correct, they are just wrappers. The advantage is that you can set file associations in Windows to an exe, but you can't associate a file type with a bat file. 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. Although it is good that you wante= d > to contribute, I don't see the advantage in using exe file iff all it doe= s > 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 th= e >> 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 deci= ded >>> 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 installatio= n >>> (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 Ja= va >>> 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 >>> 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 pass= 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 to >>> 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] > > > --94eb2c08540619d9eb053bf180e0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Paco,
Good catch.=C2=A0 I'll correct that.

Raviteja,
That's correct, they are just wra= ppers.=C2=A0 The advantage is that you can set file associations in Windows= to an exe, but you can't associate a file type 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, Ravite= ja 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 e= xisting bat file. Although it is good that you wanted to contribute, I don&= #39;t see the advantage 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 <<= a href=3D"mailto:contacto@nazcasistemas.com" target=3D"_blank">contacto@naz= casistemas.com> 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 reco= gnized as an internal or external command,
operable program or batch fil= e.

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


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

C:\W= INDOWS\system32>groovy.exe -v
Groovy Version: 2.4.7 JVM: 1.8.0_101 Ve= ndor: Oracle Corporation OS: Windows 10

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


If i remove the JAVA_HO= ME 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 a= s an internal or external command,
operable program or batch file.
Gr= oovy Version: 2.4.7 JVM: 1.8.0_101 Vendor: Oracle Corporation OS: Windows 1= 0

C:\WINDOWS\system32>groovyc.exe -v
'MySQL' is n= ot recognized as an internal or external command,
operable program or ba= tch file.
'MySQL' is not recognized as an internal or external c= ommand,
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, Se= p 1, 2016 at 2:05 PM, Keegan Witt <keeganwitt@gmail.com> = wrote:

I'm building so= me new binaries for Windows (groovy.exe, groovyConsole.exe, etc) and am loo= king for some folks to test and 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 tha= t should be groovy-windows-installer=C2=A0or groovy-native-la= uncher).

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 Ameritrade

E:=C2=A0raviteja= .lokineni@gmail.com

<= a href=3D"http://in.linkedin.com/in/ravitejalokineni" target=3D"_blank"> =20 3D"View

=

--94eb2c08540619d9eb053bf180e0--