[PROGRAM] Fix Linux .LST Files

Note that alterations to the YSFlight .EXE is forbidden
Post Reply
User avatar
vincent
Contributor
Contributor
Posts: 202
Joined: Wed Feb 02, 2011 7:31 pm
Favorite Aircraft: virtual ones
Location: Toulouse, France
Has thanked: 1 time
Been thanked: 25 times
Contact:

[PROGRAM] Fix Linux .LST Files

Post by vincent » Mon Jul 25, 2011 11:54 pm

lst4Linux



Presentation
Some modders use the character "\" in their .lst instead of "/" which interrupts the YSFS loading on Linux.
Because opening all the problematic .lst takes a lot of time, I've made a little Python script to do it.

Download
http://www.yspilots.com/shadowhunters/p ... 4Linux.zip

System Requirement
You need to have Python and python-tk installed to run the script.

Usage
Select the directory of your YSFS installation, and the work is done!

Important

- Contrary to Windows, you don't select a directory by entering in it, but by entering the parent folder and selecting the directory.
- if you notice the script found no files, check in options.txt that the path is correct
- if you already have a options.txt file, the script won't ask you the path
- if you want to change the path, delete the file options.txt

------------------------------------------------------

New scripts!

Not willing to install your addons on a FAT32 partition?
Tired of renaming all your YSFS files and .lst because people don't respect the case ?

If you are doing a fresh install, the solution is to use only lowercase.

But how to rename all the files so that they use lowercase only and the content of the .lst without the agonising pain?
--> Using Linux scripts.

:arrow: STEP 1
Create a directory called scripts in your home folder and put the following scripts.
Don't forget tomake a chmod u+x for all of them

mvToLower

Code: Select all

file=$1
lcfile=`echo $file | tr '[:upper:]' '[:lower:]'`
mv -i $file $lcfile
treeMvToLower

Code: Select all

find . -exec ~/scripts/mvToLower {} ";"
ch_file_case

Code: Select all

find . -name *.lst -exec ~/scripts/ch_case {} ";"
ch_case

Code: Select all

dd if=$1 of=$1.new conv=lcase
rm $1
mv $1.new $1
:arrow: STEP 2
In the folder where you extracted the addon, run:
~/scripts/ch_file_case
~/scripts/treeMvToLower

User avatar
Welshy
Staff
Staff
Posts: 1991
Joined: Thu Feb 24, 2011 4:53 pm
Favorite Aircraft: Spaceships I see when in a K hole
Location: In a K Hole
OS: My Mind
Has thanked: 224 times
Been thanked: 222 times
Contact:

Re: lst4Linux: fix the .lst files for Linux

Post by Welshy » Tue Jul 26, 2011 8:04 am

I may now be upgrading to 11.04....thanks Vince, one of the best things you've ever made for YSF and maybe one of the best things for YSF......Very useful and I know several members will be grateful.

Many Thanks

Nick
YSFHQ Elected Overlord
Overlord of VMFA-125 (CVW-171)
Previously Supreme Overlord of 323rd CAW
Friendly Neighbourhood Miscreant

If you see me post like this in a thread pay attention!

User avatar
Eric
Senior Veteran
Senior Veteran
Posts: 1535
Joined: Thu Feb 10, 2011 5:30 am
Favorite Aircraft: Super Hornet
Location: Chicago, Illinois
Has thanked: 59 times
Been thanked: 164 times
Contact:

Re: lst4Linux: fix the .lst files for Linux

Post by Eric » Wed Jul 27, 2011 6:49 am

I make this website.

User avatar
vincent
Contributor
Contributor
Posts: 202
Joined: Wed Feb 02, 2011 7:31 pm
Favorite Aircraft: virtual ones
Location: Toulouse, France
Has thanked: 1 time
Been thanked: 25 times
Contact:

Re: lst4Linux: fix the .lst files for Linux

Post by vincent » Thu Jul 28, 2011 10:49 am

This solution is good for the case of a server.
However I still recommend for playing to use a FAT32/NTFS partition.

User avatar
acf492
Contributor
Contributor
Posts: 150
Joined: Sat Sep 10, 2011 4:18 am
Favorite Aircraft: 737
Location: Toronto, Ontario
OS: Linux
Has thanked: 14 times
Been thanked: 13 times
Contact:

Re: lst4Linux: fix the .lst files for Linux

Post by acf492 » Wed Jun 13, 2012 8:42 pm

vincent wrote:This solution is good for the case of a server.
However I still recommend for playing to use a FAT32/NTFS partition.
First off, the four shell scripts here are going to make it possible to easily add more addons to my civilian server (running Ubuntu 8.04.4 server edition), as I have gotten several requests to increase available aircraft from the VA livery provided.

But I disagree with the FAT32/NTFS partition idea to avoid the case sensitive filenames, as this is just avoiding the problem. It's like buying a dirty old couch to match dirty old cushions... the answer is to clean the cushions.

-acf492
I'm back.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest