cygwin help needed

Post new scenarios and mods here to share with other gamers.

Moderator: Campaign Series Matrix Edition Development Group

User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: cygwin help needed

Post 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.)
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
zoikkis
Posts: 83
Joined: Wed Nov 11, 2015 7:50 am

RE: cygwin help needed

Post 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
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: cygwin help needed

Post 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.
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: cygwin help needed

Post 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
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
zoikkis
Posts: 83
Joined: Wed Nov 11, 2015 7:50 am

RE: cygwin help needed

Post 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
wololoh
Posts: 10
Joined: Mon Nov 16, 2015 1:44 pm

RE: cygwin help needed

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


User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: cygwin help needed

Post by berto »


Post here your cslint.conf please.
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
wololoh
Posts: 10
Joined: Mon Nov 16, 2015 1:44 pm

RE: cygwin help needed

Post 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)
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

RE: cygwin help needed

Post by berto »

ORIGINAL: wololoh

No errors, and org lists are generated [8D]
Awesome!!
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
zoikkis
Posts: 83
Joined: Wed Nov 11, 2015 7:50 am

RE: cygwin help needed

Post 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.
User avatar
Crossroads
Posts: 17498
Joined: Sun Jul 05, 2009 8:57 am

RE: cygwin help needed

Post 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.
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < Available now
CS: Middle East 1948-1985 2.0 < 3.0 In the works
zoikkis
Posts: 83
Joined: Wed Nov 11, 2015 7:50 am

RE: cygwin help needed

Post 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!
User avatar
Crossroads
Posts: 17498
Joined: Sun Jul 05, 2009 8:57 am

RE: cygwin help needed

Post 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.
Visit us at: Campaign Series Legion
---
CS: Vietnam 1948-1967 < Available now
CS: Middle East 1948-1985 2.0 < 3.0 In the works
User avatar
Schlonz
Posts: 72
Joined: Sun Aug 26, 2007 10:10 am

Re: cygwin help needed

Post 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?
"I've got a plan so cunning, you could put a tail on it and call it a weasel."
- Blackadder
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

Re: cygwin help needed

Post 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!
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
User avatar
Schlonz
Posts: 72
Joined: Sun Aug 26, 2007 10:10 am

Re: cygwin help needed

Post by Schlonz »

Thanks for your help, Berto.
I had some initial troubles with the syntax, but now it works fine.
"I've got a plan so cunning, you could put a tail on it and call it a weasel."
- Blackadder
User avatar
Schlonz
Posts: 72
Joined: Sun Aug 26, 2007 10:10 am

Re: cygwin help needed

Post by Schlonz »

First tests
smeac.jpg
smeac.jpg (15.68 KiB) Viewed 605 times
"I've got a plan so cunning, you could put a tail on it and call it a weasel."
- Blackadder
User avatar
berto
Posts: 21461
Joined: Wed Mar 13, 2002 1:15 am
Location: metro Chicago, Illinois, USA
Contact:

Re: cygwin help needed

Post by berto »

:D
Campaign Series Legion https://cslegion.com/
Campaign Series Lead Coder https://www.matrixgames.com/forums/view ... hp?f=10167
Panzer Campaigns, Panzer Battles Lead Coder https://wargameds.com
Post Reply

Return to “Scenario Design and Modding”