cygwin help needed (Full Version)

All Forums >> [New Releases from Matrix Games] >> Campaign Series: Vietnam >> Scenario Design and Modding



Message


zoikkis -> cygwin help needed (1/25/2022 5:00:01 PM)

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!!!




berto -> RE: cygwin help needed (1/25/2022 5:12:24 PM)


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!




  • zoikkis -> RE: cygwin help needed (1/25/2022 5:25:18 PM)

    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"




    Crossroads -> RE: cygwin help needed (1/25/2022 5:47:44 PM)

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




    zoikkis -> RE: cygwin help needed (1/25/2022 5:50:45 PM)

    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




    Crossroads -> RE: cygwin help needed (1/25/2022 6:01:58 PM)

    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.




    berto -> RE: cygwin help needed (1/25/2022 6:02:51 PM)

    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.)




    berto -> RE: cygwin help needed (1/25/2022 6:06:15 PM)


    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.




  • zoikkis -> RE: cygwin help needed (1/25/2022 6:43:40 PM)

    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.




    berto -> RE: cygwin help needed (1/25/2022 6:55:45 PM)


    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).




    zoikkis -> RE: cygwin help needed (1/25/2022 7:02:32 PM)

    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




    Crossroads -> RE: cygwin help needed (1/25/2022 7:04:05 PM)

    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.




    zoikkis -> RE: cygwin help needed (1/25/2022 7:10:53 PM)

    conf file

    [image]local://upfiles/52859/AB9D86C1F2F64331A54A583C7B7EC9F7.jpg[/image]




    zoikkis -> RE: cygwin help needed (1/25/2022 7:11:28 PM)

    Scenario

    [image]local://upfiles/52859/DF81EB36FF5445ACB3BC57A24EC204C8.jpg[/image]




    zoikkis -> RE: cygwin help needed (1/25/2022 7:12:24 PM)

    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




    wololoh -> RE: cygwin help needed (1/25/2022 7:57:46 PM)

    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?).




    berto -> RE: cygwin help needed (1/25/2022 8:07:02 PM)

    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.




    berto -> RE: cygwin help needed (1/25/2022 8:16:51 PM)

    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! [8D]




    zoikkis -> RE: cygwin help needed (1/25/2022 8:26:53 PM)

    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




    wololoh -> RE: cygwin help needed (1/25/2022 8:27:13 PM)

    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 [:D].

    Anyway, I think it is great that we have this capability now! [:)][sm=sign0031.gif]




    berto -> RE: cygwin help needed (1/25/2022 8:34:17 PM)

    quote:

    ORIGINAL: wololoh

    Anyway, I think it is great that we have this capability now! [:)][sm=sign0031.gif]

    +1

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




    zoikkis -> RE: cygwin help needed (1/25/2022 8:39:16 PM)

    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




    berto -> RE: cygwin help needed (1/25/2022 8:47:35 PM)

    quote:

    ORIGINAL: zoikkis

    Finally managed to generate the .lua file!!!

    Victory!

    [sm=character0272.gif]

    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.




    berto -> RE: cygwin help needed (1/25/2022 8:49:25 PM)


    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




    zoikkis -> RE: cygwin help needed (1/25/2022 8:53:16 PM)

    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




    wololoh -> RE: cygwin help needed (1/25/2022 9:17:58 PM)

    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)






    berto -> RE: cygwin help needed (1/25/2022 9:30:04 PM)


    Post here your cslint.conf please.




    wololoh -> RE: cygwin help needed (1/25/2022 9:44:21 PM)

    Too late [:D], it all works now after removing the spaces from the CSlint path!

    No errors, and org lists are generated [8D]




    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)




    berto -> RE: cygwin help needed (1/25/2022 10:21:54 PM)

    quote:

    ORIGINAL: wololoh

    No errors, and org lists are generated [8D]

    Awesome!!




    zoikkis -> RE: cygwin help needed (1/26/2022 4:45:56 AM)

    Nice one!!!

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




    Page: [1] 2   next >   >>

    Valid CSS!




    Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
    1.234375