Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

cygwin help needed

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Campaign Series: Vietnam >> Scenario Design and Modding >> cygwin help needed Page: [1] 2   next >   >>
Login
Message << Older Topic   Newer Topic >>
cygwin help needed - 1/25/2022 5:00:01 PM   
zoikkis

 

Posts: 83
Joined: 11/11/2015
Status: offline
I followed the video tutorial of creating a new scenario from scratch. I've created myScenario.map, myScenario.org and myScenario.scn that reside in scenarios folder and I can play the scenario without a problem. All good until trying to create the .lua file from the .scn file.

Installed cygwin64 with default libraries, plus Perl and Lua interpreters. Then I write this command in cslint -folder:

/cygdrive/d/Games/Matrix Games/Campaign Series Vietnam/Tools/CSlint
$ ./csmklua.pl -a -p -b -g vn -f myScenario.scn -o myScenario.lua

and it returns with "myScenario.scn not found"

Do I need to change some paths in cslint.conf, or perhaps something else? I even tried to copy the .scn file into the same folder where cslint resides, but still the same error message.

BTW thanks Jason for that excellent video tutorial!!!
Post #: 1
RE: cygwin help needed - 1/25/2022 5:12:24 PM   
berto


Posts: 20708
Joined: 3/13/2002
From: metro Chicago, Illinois, USA
Status: offline

Yes, you need to customize cslint.conf per your system's setup.

Sorry there is no formal CSEE/SAI how-to doc yet (will follow in a few months), but with some digging, you can figure things out.

Be sure to look at

  • Manual/LUA_FUNCTIONS_REFERENCE.txt
  • user.lua
  • init.lua [no edits, please!]
  • Lua scripts in the Scenarios folder

    In lieu of a formal CSEE/SAI Manual, you can ask questions here at the Forum, of course.

    Good luck!

    _____________________________

    Campaign Series Legion https://cslegion.com/
    Campaign Series Lead Coder https://www.matrixgames.com/forums/tt.asp?forumid=1515
    Panzer Campaigns, Panzer Battles, Civil War Battles Lead Coder https://wargameds.com

    (in reply to zoikkis)
  • Post #: 2
    RE: cygwin help needed - 1/25/2022 5:25:18 PM   
    zoikkis

     

    Posts: 83
    Joined: 11/11/2015
    Status: offline
    This is how it looks now for me. I commented the original paths and put the new ones there. I guess something must still be wrong there... Do I need to define the scenario path somewhere too?

    # cslint.conf -- default CSlint configurations

    # for the following configs, may be any of:
    #
    # yes|YES|true|TRUE|on|ON
    # no|NO|false|FALSE|off|OFF
    #
    # omitting any config (perhaps by commenting out) defaults its setting to 'no'

    show_notice no
    show_warning no
    show_error yes
    show_files yes
    show_linenos yes
    test no
    debug no

    # for the following configs, set the appropriate directory (folder) path
    # cslintroot & gameroot are required

    cslintroot "/cygdrive/d/Games/Matrix games/Campaign Series Vietnam/Tools/CSlint"
    # cslintroot "~/CSlint"
    # gameroot "/mnt/d/Matrix Games/_CSLDEV"
    gameroot "/cygdrive/d/Games/Matrix games/Campaign Series Vietnam"

    # for non-default game installations, change the following configs as needed
    # these are optional, but advised

    medir "Campaign Series Middle East"
    vndir "Campaign Series Vietnam"
    efdir "Campaign Series East Front"
    cwdir "Campaign Series Cold War"

    #kwdir "John Tiller's Campaign Series/Korean War"
    #wfdir "John Tiller's Campaign Series/West Front"
    #rsdir "John Tiller's Campaign Series/Rising Sun"

    < Message edited by zoikkis -- 1/25/2022 5:32:00 PM >

    (in reply to berto)
    Post #: 3
    RE: cygwin help needed - 1/25/2022 5:47:44 PM   
    Crossroads


    Posts: 17372
    Joined: 7/5/2009
    Status: offline
    You have installed at D:\Games\Matrix Games\etc ?

    _____________________________


    (in reply to zoikkis)
    Post #: 4
    RE: cygwin help needed - 1/25/2022 5:50:45 PM   
    zoikkis

     

    Posts: 83
    Joined: 11/11/2015
    Status: offline
    quote:

    ORIGINAL: Crossroads

    You have installed at D:\Games\Matrix Games\etc ?


    That's right. The installation path for the game is D:\Games\Matrix Games\Campaign Series Vietnam.

    I also tried the gameroot path in this form:

    gameroot "/mnt/d/Games/Matrix games/Campaign Series Vietnam"

    Not sure if cslint.exe needs to be executed at some point. It was complaining about cygwin1.dll, so I copied that from C:\cygwin64\bin folder into CSlint folder and not giving errors anymore

    < Message edited by zoikkis -- 1/25/2022 5:53:07 PM >

    (in reply to Crossroads)
    Post #: 5
    RE: cygwin help needed - 1/25/2022 6:01:58 PM   
    Crossroads


    Posts: 17372
    Joined: 7/5/2009
    Status: offline
    We need Berto for Cygwin, I run Clint under WSL. One thing perhaps not mention is you need to run the scripts from CSlint directory. For ease of use I rsynced all CSlint stuff from /Tools to ~/CSlint as in the sample cslint.conf.

    _____________________________


    (in reply to zoikkis)
    Post #: 6
    RE: cygwin help needed - 1/25/2022 6:02:51 PM   
    berto


    Posts: 20708
    Joined: 3/13/2002
    From: metro Chicago, Illinois, USA
    Status: offline
    quote:

    ORIGINAL: zoikkis

    quote:

    ORIGINAL: Crossroads

    You have installed at D:\Games\Matrix Games\etc ?

    That's right. The installation path for the game is D:\Games\Matrix Games\Campaign Series Vietnam.

    I also tried the gameroot path in this form:

    gameroot "/mnt/d/Games/Matrix games/Campaign Series Vietnam"

    Not sure if cslint.exe needs to be executed at some point. It was complaining about cygwin1.dll, so I copied that from C:\cygwin64\bin folder into CSlint folder and not giving errors anymore

    Cygwin is a Linux-like environment designed to mimic Unix. In Unix, filenames and folder names are case sensitive. Unlike Windows, which is filename case agnostic.

    Note the lower case 'g' you have in

    cslintroot "/cygdrive/d/Games/Matrix games/Campaign Series Vietnam/Tools/CSlint"
    gameroot "/mnt/d/Games/Matrix games/Campaign Series Vietnam"

    That typo right there might the root cause of your difficulties.

    (The cslint.exe is for a different purpose. You can ignore it for now.)

    _____________________________

    Campaign Series Legion https://cslegion.com/
    Campaign Series Lead Coder https://www.matrixgames.com/forums/tt.asp?forumid=1515
    Panzer Campaigns, Panzer Battles, Civil War Battles Lead Coder https://wargameds.com

    (in reply to zoikkis)
    Post #: 7
    RE: cygwin help needed - 1/25/2022 6:06:15 PM   
    berto


    Posts: 20708
    Joined: 3/13/2002
    From: metro Chicago, Illinois, USA
    Status: offline

    Oh, also:

  • In Cygwin, the D: drive is rendered as: /cygdrive/d
  • In WSL (Windows Subsystem for Linux), the D: drive is rendered as: /mnt/d

    (Note the all lower case.)

    Since you said you are using Cygwin, you would follow the first example above.

    _____________________________

    Campaign Series Legion https://cslegion.com/
    Campaign Series Lead Coder https://www.matrixgames.com/forums/tt.asp?forumid=1515
    Panzer Campaigns, Panzer Battles, Civil War Battles Lead Coder https://wargameds.com

    (in reply to berto)
  • Post #: 8
    RE: cygwin help needed - 1/25/2022 6:43:40 PM   
    zoikkis

     

    Posts: 83
    Joined: 11/11/2015
    Status: offline
    I put them in the following form:

    cslintroot "/cygdrive/d/Games/Matrix Games/Campaign Series Vietnam/Tools/CSlint"
    gameroot "/cygdrive/d/Games/Matrix Games/Campaign Series Vietnam"

    Still no luck though. I might have some other settings still wrong... Also cygwin doesn't recognise rsync command, probably needs some additional libraries installed. I started to use Linux only about 6 months ago and still feeling a bit lost with it :)

    Anyway, thanks a lot for help Berto and Petri. I'll probably wait for more tutorials on this subject and fiddle around with the graphical editors till that.

    (in reply to berto)
    Post #: 9
    RE: cygwin help needed - 1/25/2022 6:55:45 PM   
    berto


    Posts: 20708
    Joined: 3/13/2002
    From: metro Chicago, Illinois, USA
    Status: offline

    IIRC, Cygwin doesn't install rsync by default. You would have to select that manually.

    We could dig deeper into this, but if you set it aside, that's good too (what with all the other user support we are now dealing with).

    _____________________________

    Campaign Series Legion https://cslegion.com/
    Campaign Series Lead Coder https://www.matrixgames.com/forums/tt.asp?forumid=1515
    Panzer Campaigns, Panzer Battles, Civil War Battles Lead Coder https://wargameds.com

    (in reply to zoikkis)
    Post #: 10
    RE: cygwin help needed - 1/25/2022 7:02:32 PM   
    zoikkis

     

    Posts: 83
    Joined: 11/11/2015
    Status: offline
    I tried through WSL too and by setting the following settings:

    cslintroot "/mnt/d/Games/Matrix Games/Campaign Series Vietnam/Tools/CSlint"
    gameroot "/mnt/d/Games/Matrix Games/Campaign Series Vietnam"

    ..but still no dice. Have made double sure that myScenario.scn has all the lower and uppercase letters correctly matching.

    I'd love to keep looking for a solution still if you guys have any ideas

    < Message edited by zoikkis -- 1/25/2022 7:03:39 PM >

    (in reply to berto)
    Post #: 11
    RE: cygwin help needed - 1/25/2022 7:04:05 PM   
    Crossroads


    Posts: 17372
    Joined: 7/5/2009
    Status: offline
    I'll have a look at my WSL + CSlint post from our internal Dev Forum a couple of years back if it is still relevant. If so, I can edit and post it here, too. I did that with one of the first W10 distros, so it might be a bit obsolete. Let us see.

    Cygwin and the more detailed guidelines we'll wait for when Berto has the time for that.

    _____________________________


    (in reply to berto)
    Post #: 12
    RE: cygwin help needed - 1/25/2022 7:10:53 PM   
    zoikkis

     

    Posts: 83
    Joined: 11/11/2015
    Status: offline
    conf file




    Attachment (1)

    (in reply to Crossroads)
    Post #: 13
    RE: cygwin help needed - 1/25/2022 7:11:28 PM   
    zoikkis

     

    Posts: 83
    Joined: 11/11/2015
    Status: offline
    Scenario




    Attachment (1)

    (in reply to zoikkis)
    Post #: 14
    RE: cygwin help needed - 1/25/2022 7:12:24 PM   
    zoikkis

     

    Posts: 83
    Joined: 11/11/2015
    Status: offline
    WSL actually seems better for me. Supports straight away rsync, nano etc.

    EDIT: Also tried the command with an absolute path but didn't work:

    ./csmklua.pl -a -p -b -g vn -f /mnt/d/Games/Matrix Games/Campaign Series Vietnam/Scenarios/myScenario.scn -o myScenario.lua

    < Message edited by zoikkis -- 1/25/2022 7:44:20 PM >

    (in reply to zoikkis)
    Post #: 15
    RE: cygwin help needed - 1/25/2022 7:57:46 PM   
    wololoh

     

    Posts: 10
    Joined: 11/16/2015
    Status: offline
    For now I started to play around by copying another scenario LUA file, renaming it, and stripping the specifics before rewriting for my own scenario (using the LUA_FUNCTIONS_REFERENCE). That method is working fine.

    The one thing which was a bit annoying was to write 'set_org_lists' manually, using the data from my org file (maybe this can be automatically generated when the tooling is running?).

    (in reply to zoikkis)
    Post #: 16
    RE: cygwin help needed - 1/25/2022 8:07:02 PM   
    berto


    Posts: 20708
    Joined: 3/13/2002
    From: metro Chicago, Illinois, USA
    Status: offline
    quote:

    ORIGINAL: zoikkis

    WSL actually seems better for me. Supports straight away rsync, nano etc.

    Yes, probably for most people. But I prefer Cygwin for a number of reasons, mainly because I think the Cygwin terminal is better. Cygwin is also Windows "friendlier".

    quote:

    EDIT: Also tried the command with an absolute path but didn't work:

    ./csmklua.pl -a -p -b -g vn -f /mnt/d/Games/Matrix Games/Campaign Series Vietnam/Scenarios/myScenario.scn -o myScenario.lua

    Nope, no absolute path. That is provided in the cslint.conf file.

    The next step would be to run the command adding the '+G' option, for debuG. That will spew out a ton of detail. But your deciphering it, or getting me a copy, would be time consuming.

    _____________________________

    Campaign Series Legion https://cslegion.com/
    Campaign Series Lead Coder https://www.matrixgames.com/forums/tt.asp?forumid=1515
    Panzer Campaigns, Panzer Battles, Civil War Battles Lead Coder https://wargameds.com

    (in reply to zoikkis)
    Post #: 17
    RE: cygwin help needed - 1/25/2022 8:16:51 PM   
    berto


    Posts: 20708
    Joined: 3/13/2002
    From: metro Chicago, Illinois, USA
    Status: offline
    quote:

    ORIGINAL: wololoh

    The one thing which was a bit annoying was to write 'set_org_lists' manually, using the data from my org file (maybe this can be automatically generated when the tooling is running?).

    A "bit annoying", you say? That right there had the potential to practically kill CSEE/SAI scripting. Because two or three years ago, when this was in earlier stages of development, it would require hours to set the org lists for larger scenarios.

    But you know what? csmklua.pl will do that automatically for you. In a matter of seconds!

    Look at any of the Scenarios Lua scripts. Every one of those org lists was hands-off auto-created. By csmklua.pl!

    _____________________________

    Campaign Series Legion https://cslegion.com/
    Campaign Series Lead Coder https://www.matrixgames.com/forums/tt.asp?forumid=1515
    Panzer Campaigns, Panzer Battles, Civil War Battles Lead Coder https://wargameds.com

    (in reply to wololoh)
    Post #: 18
    RE: cygwin help needed - 1/25/2022 8:26:53 PM   
    zoikkis

     

    Posts: 83
    Joined: 11/11/2015
    Status: offline
    Finally managed to generate the .lua file!!!

    I had to remove the game folder from the path, like this:

    ***************************************
    cslintroot "/mnt/d/Games/Matrix Games/Campaign Series Vietnam/Tools/CSlint"

    gameroot "/mnt/d/Games/Matrix Games/"

    ***************************************
    It did spit out this:

    /mnt/d/Games/Matrix Games/Campaign Series Vietnam/Tools/CSlint$ ./csmklua.pl -a -p -b -g vn -f myScenario.scn -o myScenario.lua
    sh: 1: /mnt/d/Games/Matrix: not found
    sh: 1: /mnt/d/Games/Matrix: not found
    sh: 1: /mnt/d/Games/Matrix: not found


    I wonder if those "not found" lines matter anything. The scenario seems to launch fine at least. The .lua file is 21KB in size

    < Message edited by zoikkis -- 1/25/2022 8:29:33 PM >

    (in reply to berto)
    Post #: 19
    RE: cygwin help needed - 1/25/2022 8:27:13 PM   
    wololoh

     

    Posts: 10
    Joined: 11/16/2015
    Status: offline
    quote:

    A "bit annoying", you say? That right there had the potential to practically kill CSEE/SAI scripting. Because two or three years ago, when this was in earlier stages of development, it would require hours to set the org lists for larger scenarios.


    Haha, for my small mockup scenario it was doable, but I can imagine the annoyance for a large scenario .

    Anyway, I think it is great that we have this capability now!

    < Message edited by wololoh -- 1/25/2022 8:28:06 PM >

    (in reply to berto)
    Post #: 20
    RE: cygwin help needed - 1/25/2022 8:34:17 PM   
    berto


    Posts: 20708
    Joined: 3/13/2002
    From: metro Chicago, Illinois, USA
    Status: offline
    quote:

    ORIGINAL: wololoh

    Anyway, I think it is great that we have this capability now!

    +1

    You would be amazed at some of the other things that CSlint can do. (Some other time.)

    _____________________________

    Campaign Series Legion https://cslegion.com/
    Campaign Series Lead Coder https://www.matrixgames.com/forums/tt.asp?forumid=1515
    Panzer Campaigns, Panzer Battles, Civil War Battles Lead Coder https://wargameds.com

    (in reply to wololoh)
    Post #: 21
    RE: cygwin help needed - 1/25/2022 8:39:16 PM   
    zoikkis

     

    Posts: 83
    Joined: 11/11/2015
    Status: offline
    Set org lists looks a bit too empty though...

    ******************************************
    function set_org_lists (turn, side)

    -- called in on_startup(), in every on_next_turn(), and potentially again (and again) in any subsequent on_resume()

    --traceon()

    turn = turn or 1
    side = side or "a"

    ALLA = counters_all(SIDE_A)
    ALLB = counters_all(SIDE_B)

    -- auto-generated org lists to follow; rename, resequence, regroup, and reorganize as necessary

    -- KEY:

    -- [P] Platoon
    -- [C] Company
    -- [B] Battalion
    -- [R] Regiment
    -- [G] Brigade
    -- [D] Division
    -- [K] Corps
    -- [A] Army

    -- hand-crafted org lists, if any, to follow

    --traceoff()

    end
    **************************************

    No list of the units I placed into the scenario. So maybe something is not quite working still

    (in reply to berto)
    Post #: 22
    RE: cygwin help needed - 1/25/2022 8:47:35 PM   
    berto


    Posts: 20708
    Joined: 3/13/2002
    From: metro Chicago, Illinois, USA
    Status: offline
    quote:

    ORIGINAL: zoikkis

    Finally managed to generate the .lua file!!!

    Victory!



    quote:

    I had to remove the game folder from the path, like this:

    ***************************************
    cslintroot "/mnt/d/Games/Matrix Games/Campaign Series Vietnam/Tools/CSlint"

    gameroot "/mnt/d/Games/Matrix Games/"

    ***************************************

    Yes. Sorry that was not clearer.

    quote:

    It did spit out this:

    /mnt/d/Games/Matrix Games/Campaign Series Vietnam/Tools/CSlint$ ./csmklua.pl -a -p -b -g vn -f myScenario.scn -o myScenario.lua
    sh: 1: /mnt/d/Games/Matrix: not found
    sh: 1: /mnt/d/Games/Matrix: not found
    sh: 1: /mnt/d/Games/Matrix: not found


    I wonder if those "not found" lines matter anything. The scenario seems to launch fine at least. The .lua file is 21KB in size

    I am guessing it doesn't like the highlighted / above.

    We plan to revise the stock cslint.conf to make things clearer. Sorry for the confusion.

    _____________________________

    Campaign Series Legion https://cslegion.com/
    Campaign Series Lead Coder https://www.matrixgames.com/forums/tt.asp?forumid=1515
    Panzer Campaigns, Panzer Battles, Civil War Battles Lead Coder https://wargameds.com

    (in reply to zoikkis)
    Post #: 23
    RE: cygwin help needed - 1/25/2022 8:49:25 PM   
    berto


    Posts: 20708
    Joined: 3/13/2002
    From: metro Chicago, Illinois, USA
    Status: offline

    quote:

    ORIGINAL: zoikkis

    Set org lists looks a bit too empty though...

    ******************************************
    function set_org_lists (turn, side)

    -- called in on_startup(), in every on_next_turn(), and potentially again (and again) in any subsequent on_resume()

    --traceon()

    turn = turn or 1
    side = side or "a"

    ALLA = counters_all(SIDE_A)
    ALLB = counters_all(SIDE_B)

    -- auto-generated org lists to follow; rename, resequence, regroup, and reorganize as necessary

    -- KEY:

    -- [P] Platoon
    -- [C] Company
    -- [B] Battalion
    -- [R] Regiment
    -- [G] Brigade
    -- [D] Division
    -- [K] Corps
    -- [A] Army

    -- hand-crafted org lists, if any, to follow

    --traceoff()

    end
    **************************************

    No list of the units I placed into the scenario. So maybe something is not quite working still

    Doubtless that failure relates to this:

    quote:

    sh: 1: /mnt/d/Games/Matrix: not found
    sh: 1: /mnt/d/Games/Matrix: not found
    sh: 1: /mnt/d/Games/Matrix: not found


    _____________________________

    Campaign Series Legion https://cslegion.com/
    Campaign Series Lead Coder https://www.matrixgames.com/forums/tt.asp?forumid=1515
    Panzer Campaigns, Panzer Battles, Civil War Battles Lead Coder https://wargameds.com

    (in reply to zoikkis)
    Post #: 24
    RE: cygwin help needed - 1/25/2022 8:53:16 PM   
    zoikkis

     

    Posts: 83
    Joined: 11/11/2015
    Status: offline
    Unfortunately same problem with the slash removed:

    gameroot "/mnt/d/Games/Matrix Games"

    I can see the victory points in the .lua file but not any organisational data

    (in reply to berto)
    Post #: 25
    RE: cygwin help needed - 1/25/2022 9:17:58 PM   
    wololoh

     

    Posts: 10
    Joined: 11/16/2015
    Status: offline
    I'm trying it too, running into the same issue (using cygwin). Somehow related to the space in the directory?


    /cygdrive/d/Games/Matrix Games/Campaign Series Vietnam/Tools/CSlint
    -->
    /cygdrive/d/Games/Matrix: not found


    (edit for later reference; I used /cygdrive/d here instead of /mnt/d/ because I use cygwin)




    < Message edited by wololoh -- 1/25/2022 9:57:40 PM >

    (in reply to zoikkis)
    Post #: 26
    RE: cygwin help needed - 1/25/2022 9:30:04 PM   
    berto


    Posts: 20708
    Joined: 3/13/2002
    From: metro Chicago, Illinois, USA
    Status: offline

    Post here your cslint.conf please.

    _____________________________

    Campaign Series Legion https://cslegion.com/
    Campaign Series Lead Coder https://www.matrixgames.com/forums/tt.asp?forumid=1515
    Panzer Campaigns, Panzer Battles, Civil War Battles Lead Coder https://wargameds.com

    (in reply to wololoh)
    Post #: 27
    RE: cygwin help needed - 1/25/2022 9:44:21 PM   
    wololoh

     

    Posts: 10
    Joined: 11/16/2015
    Status: offline
    Too late , it all works now after removing the spaces from the CSlint path!

    No errors, and org lists are generated




    edit to be clear: The issue was fixed after removing all spaces from the CSlintroot path (I simply replaced the spaces in folder names with underscores)

    < Message edited by wololoh -- 1/25/2022 9:58:50 PM >

    (in reply to berto)
    Post #: 28
    RE: cygwin help needed - 1/25/2022 10:21:54 PM   
    berto


    Posts: 20708
    Joined: 3/13/2002
    From: metro Chicago, Illinois, USA
    Status: offline
    quote:

    ORIGINAL: wololoh

    No errors, and org lists are generated

    Awesome!!

    _____________________________

    Campaign Series Legion https://cslegion.com/
    Campaign Series Lead Coder https://www.matrixgames.com/forums/tt.asp?forumid=1515
    Panzer Campaigns, Panzer Battles, Civil War Battles Lead Coder https://wargameds.com

    (in reply to wololoh)
    Post #: 29
    RE: cygwin help needed - 1/26/2022 4:45:56 AM   
    zoikkis

     

    Posts: 83
    Joined: 11/11/2015
    Status: offline
    Nice one!!!

    I got it working too by moving CSlint to a path without spaces. No errors anymore and the org lists are there.

    (in reply to berto)
    Post #: 30
    Page:   [1] 2   next >   >>
    All Forums >> [New Releases from Matrix Games] >> Campaign Series: Vietnam >> Scenario Design and Modding >> cygwin help needed Page: [1] 2   next >   >>
    Jump to:





    New Messages No New Messages
    Hot Topic w/ New Messages Hot Topic w/o New Messages
    Locked w/ New Messages Locked w/o New Messages
     Post New Thread
     Reply to Message
     Post New Poll
     Submit Vote
     Delete My Own Post
     Delete My Own Thread
     Rate Posts


    Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

    0.875