bugFreeciv - Bugs: bug #22781, Windows start script issues

 
 
Show feedback again

bug #22781: Windows start script issues

Submitted by:  Frank <dunnoob>
Submitted on:  Sat Oct 11 08:41:11 2014  
 
Category: NoneSeverity: 2 - Minor
Priority: 5 - NormalStatus: None
Assigned to: Christian Prochaska <cproc>Open/Closed: Open
Release: Operating System: Microsoft Windows
Planned Release: Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Mon Aug 1 14:58:31 2016, comment #16:

Not quoted. Insert swear words.

(file #28091)

Frank <dunnoob>
Mon Aug 1 13:02:15 2016, comment #15:

Forgot the QT_PLUGIN_PATH in my "13 hardlinks to beat them all" incarnation of this zoo, cf. bug #24901

(file #28088)

Frank <dunnoob>
Wed Jul 6 03:18:23 2016, comment #14:

The tiny little horrors start to get children in http://svn.gna.org/viewcvs/freeciv/trunk/win32/installer_msys2/

The attached freeciv-whatever.cmd.txt can replace this zoo by just renaming it to the name of the corresponding Windows binary (**\*.exe**) in the same directory.

(file #27807)

Frank <dunnoob>
Tue May 17 17:16:28 2016, comment #13:

Still working for me, the same (hardlinked) script handles 3*3 "start this" i18n kludges (auto or set LANG=xx) on Windows:

Frank <dunnoob>
Mon Dec 1 08:01:56 2014, comment #12:

Update for QT (one script to rule them all) attached, and while at it test the "verbatim" feature on Gna! again:

(file #23012)

Frank <dunnoob>
Tue Nov 11 10:12:02 2014, comment #11:

JFTR, I tested the suggested dogfood.cmd patch(es) with 2.4 + 2.5.0-beta1 locally:

Frank <dunnoob>
Tue Nov 11 10:00:33 2014, comment #10:

In a discussion about the dubious "native" style confusing my editor, which supports UNIX when I say so, but not some ftp or svn trying to outsmart me, I tested a local propset LF. Twice as nothing happened, the checked out files were not at all impressed by uncommitted property changes. Finally I ended up with some svn export -native-style LF (or similar) duplicating the complete wannabe-native trunk (at this time) into a copy with LF. IMO svn is broken, because it tries to be smart. But there is no way to define what "native" means, it's hardwired depending on the platform. No wonder that folks like git better, but I digress... and "native" is a nation on my box ;-)

If you adopt the suggestion with one command file foo.cmd working for foo.exe, but also working for bar.exe if copied/hardlinked to bar.cmd (etc.) we're talking about only one source file with this extension.

Frank <dunnoob>
Fri Nov 7 02:01:51 2014, SVN revision 26999:

Set eol-style to CRLF for .cmd files.

See bug #22781

(Browse SVN revision 26999)

Marko Lindqvist <cazfi>
Project Administrator
Fri Nov 7 02:01:35 2014, SVN revision 26998:

Set eol-style to CRLF for .cmd files.

See bug #22781

(Browse SVN revision 26998)

Marko Lindqvist <cazfi>
Project Administrator
Fri Nov 7 02:01:17 2014, SVN revision 26997:

Set eol-style to CRLF for .cmd files.

See bug #22781

(Browse SVN revision 26997)

Marko Lindqvist <cazfi>
Project Administrator
Tue Oct 28 18:31:35 2014, comment #6:

We should set eol-style to CRLF (on all environments)? These files are never needed in unixy environments.

Marko Lindqvist <cazfi>
Project Administrator
Mon Oct 27 23:23:45 2014, comment #5:

> Set property svn:eol-style=native for .cmd files.

Presumably this won't help with what we ship in Windows installers, because our I build our tarballs from svn on Unix.

Jacob Nevins <jtn>
Project Administrator
Fri Oct 24 23:54:13 2014, SVN revision 26866:

Set property svn:eol-style=native for .cmd files.

Reported by Frank

See bug #22781

(Browse SVN revision 26866)

Marko Lindqvist <cazfi>
Project Administrator
Fri Oct 24 23:53:55 2014, SVN revision 26865:

Set property svn:eol-style=native for .cmd files.

Reported by Frank

See bug #22781

(Browse SVN revision 26865)

Marko Lindqvist <cazfi>
Project Administrator
Fri Oct 24 23:53:32 2014, SVN revision 26864:

Set property svn:eol-style=native for .cmd files.

Reported by Frank

See bug #22781

(Browse SVN revision 26864)

Marko Lindqvist <cazfi>
Project Administrator
Fri Oct 24 23:49:47 2014, comment #1:

> Windows or OS/2 .cmd should be configured as binary in SVN,
> because tools on these platforms expect CR LF line ends for
> .cmd scripts.


They should have eol-style=native, not to be binary files. I'll check that this is correctly set up in svn.

Marko Lindqvist <cazfi>
Project Administrator
Sat Oct 11 08:41:11 2014, original submission:

On Windows 2.4.x and 2.5.0-beta1 install 3 scripts .cmd to start the corresponding (same name) binary .exe in the same directory, e.g., freeciv-server.cmd for freeciv-server.exe. The job of these scripts is to ignore a first argument "auto" or to SET LANG=arg1 for any other first argument. After that foo.cmd starts foo.exe arg2..9.

  1. The scripts should support more than eight (2..9) tokens for any options after the first "auto" or locale.
  2. Windows or OS/2 .cmd should be configured as binary in SVN, because tools on these platforms expect CR LF line ends for .cmd scripts.
  3. A ^Z (ASCII SUB) to indicate the "DOS" EOF is unnecessary, but no line end at all (even no LF) for the last line is odd.
  4. Changing LANG permanently is unnecessary, the script(s) should start with "setlocal".
  5. "if %1 NEQ auto" would trigger an error for a missing first argument, and NEQ requires enabled Windows NT cmd.exe extensions: "setlocal enableextensions" can handle this.

Suggested solutions attached, three identical scripts with different names.

Frank <dunnoob>

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #28091:  freeciv-gtk2.cmd added by dunnoob (670B - application/octet-stream)
file #28088:  freeciv-gtk2.cmd added by dunnoob (672B - application/octet-stream)
file #23012:  freeciv-qt.cmd added by dunnoob (670B - application/octet-stream)
file #22597:  2.4.freeciv-modpack.cmd.patch added by dunnoob (910B - application/octet-stream)
file #22598:  2.5.freeciv-mp-gtk2.cmd.patch added by dunnoob (910B - application/octet-stream)
file #22599:  2.x.freeciv-gtk2.cmd.patch added by dunnoob (872B - application/octet-stream)
file #22600:  2.x.freeciv-server.cmd.patch added by dunnoob (878B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jtn (Posted a comment)
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by dunnoob (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Error: not logged in

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Aug 1 14:58:31 2016dunnoobAttached File-=>Added freeciv-gtk2.cmd, #28091
    Mon Aug 1 13:02:15 2016dunnoobAttached File-=>Added freeciv-gtk2.cmd, #28088
    Wed Jul 6 03:18:22 2016dunnoobAttached File-=>Added freeciv-whatever.cmd.txt, #27807
    Mon Dec 1 08:01:56 2014dunnoobAttached File-=>Added freeciv-qt.cmd, #23012
    Tue Nov 11 18:13:56 2014cazfiAssigned toNone=>cproc
    Sat Oct 11 08:41:11 2014dunnoobAttached File-=>Added 2.4.freeciv-modpack.cmd.patch, #22597
      Attached File-=>Added 2.5.freeciv-mp-gtk2.cmd.patch, #22598
      Attached File-=>Added 2.x.freeciv-gtk2.cmd.patch, #22599
      Attached File-=>Added 2.x.freeciv-server.cmd.patch, #22600
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup