Page 2 of 2
RE: cygwin help needed
Posted: Tue Jan 25, 2022 6:34 pm
by berto
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.)
RE: cygwin help needed
Posted: Tue Jan 25, 2022 6:39 pm
by 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
-- 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
RE: cygwin help needed
Posted: Tue Jan 25, 2022 6:47 pm
by berto
ORIGINAL: zoikkis
Finally managed to generate the .lua file!!!
Victory!
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.
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.
RE: cygwin help needed
Posted: Tue Jan 25, 2022 6:49 pm
by berto
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
-- 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:
sh: 1: /mnt/d/Games/Matrix: not found
sh: 1: /mnt/d/Games/Matrix: not found
sh: 1: /mnt/d/Games/Matrix: not found
RE: cygwin help needed
Posted: Tue Jan 25, 2022 6:53 pm
by zoikkis
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
RE: cygwin help needed
Posted: Tue Jan 25, 2022 7:17 pm
by wololoh
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)
RE: cygwin help needed
Posted: Tue Jan 25, 2022 7:30 pm
by berto
Post here your cslint.conf please.
RE: cygwin help needed
Posted: Tue Jan 25, 2022 7:44 pm
by wololoh
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)
RE: cygwin help needed
Posted: Tue Jan 25, 2022 8:21 pm
by berto
ORIGINAL: wololoh
No errors, and org lists are generated [8D]
Awesome!!
RE: cygwin help needed
Posted: Wed Jan 26, 2022 2:45 am
by zoikkis
Nice one!!!
I got it working too by moving CSlint to a path without spaces. No errors anymore and the org lists are there.
RE: cygwin help needed
Posted: Wed Jan 26, 2022 3:00 am
by Crossroads
Great news that! I have never had any issues with white space on paths, go figure.
My old W10 laptop does not have WSL, I will install Vietnam there, then install WSL and Perl, and document that along the way. I will provide a cleaned up cslint.conf while at it.
Just give me a couple of days to do this.
RE: cygwin help needed
Posted: Wed Jan 26, 2022 5:00 am
by zoikkis
Managed to get the script working also with Windows 7, using Cygwin this time. With Linux I didn't manage yet, not finding the .scn file again even without spaces in pathnames. Will need to dig deeper when more time.
It's really cool that the script can be edited during the scenario gameplay and the game engine notices and executes any changes!
RE: cygwin help needed
Posted: Wed Jan 26, 2022 6:30 am
by Crossroads
It is quite neat, just don't have any pop-up in-game messages open when you save your file, it often hangs then.
Re: cygwin help needed
Posted: Sat Feb 26, 2022 12:51 pm
by Schlonz
When running the Cygwin setup on my Win7 crate, I'm asked to select packages.
What are the recommended/necessary packages to get CSlint up and running?
Re: cygwin help needed
Posted: Sat Feb 26, 2022 3:24 pm
by berto
In addition to the Cygwin standard, default, base install pieces, you should also make sure you have
- Perl (base, bin only; no need for src or other fancy stuff)
- Python (ditto; for possible future CSlint development)
- gawk
- grep
- gzip
- less
- lua
- sed
Many of those may already be selected (checked) by default.
Cygwin is an older implementation of a Linux-like environment for Windows. The emerging newer standard will be one of the regular Linux distros (such as Ubuntu) running within the WSL (Windows Subsystem for Linux) framework. Among the CSVN Dev Team, although Jason and I prefer to use Cygwin, Petri (Crossroads) prefers WSL Ubuntu.
I commend you, I guess, for taking the Cygwin plunge. Perhaps the hardest part of using Cygwin is getting over the install hurdle. Installing WSL and Ubuntu Linux (for instance; there are alternatives) is much less daunting.
In a week or two, I will commence a new series of posts here in re Cygwin, WSL, CSlint, etc. You can't begin scripting the CSEE/SAI unless/until you are first set up with Cygwin or WSL, and know your way around CSlint.
Fun times ahead!
Re: cygwin help needed
Posted: Sat Feb 26, 2022 8:18 pm
by Schlonz
Thanks for your help, Berto.
I had some initial troubles with the syntax, but now it works fine.
Re: cygwin help needed
Posted: Sat Feb 26, 2022 8:52 pm
by Schlonz
First tests

- smeac.jpg (15.68 KiB) Viewed 1045 times
Re: cygwin help needed
Posted: Sat Feb 26, 2022 9:52 pm
by berto