Addons of YSFLIGHT for Linux/Mac

Questions, comments, concerns, & fixes
Post Reply
mobius
Newbie
Newbie
Posts: 11
Joined: Mon Mar 04, 2019 6:56 am
Favorite Aircraft: Su-57
OS: Debian, Mint, Win7
Been thanked: 5 times

Addons of YSFLIGHT for Linux/Mac

Post by mobius » Sun Aug 11, 2019 7:52 pm

Hello,

Personally I use Linux, in home and work. at 90% of the time I do not have access to a Windows machine, and this post has been made from my own perspective in the matter.

I have noticed that while the various addons in existence are mostly installable under Windows with little effort, that can not be said when installing them under Linux. When launching the sim, you get several messages of "file not found", or "can not load file", or the sim would crash with "invalid pointer: Aborted (core dumped)".

Investigating a few cases, it seems that all this comes from inconsistencies in the filenames (or folder names) of the addons. In so many cases I have found the names of the files in the .lst file to be capitalised differently than what the filename (and it's directory path) is.

Example 1
In the file: "aircraft/air_SARFServer.lst" there is the line:
user/SARFServer/aircraft/UPEO/EW18RW.dat user/SARFServer/aircraft/UPEO/ew18rw.dnm user/SARFServer/aircraft/advcoll.srf user/SARFServer/special/coffin2M.dnm

Yet, the filename in the filesystem is: "user/SARFServer/aircraft/UPEO/ew18rw.dat"

Example 2
In the file: "aircraft/aircraftahqp.lst there is the line:
user/HQPGAC/f-86d.dat user/HQPGAC/f-86d.dnm user/HQPGAC/f86d_coll.srf user/HQPGAC/f-86dcpt.srf

Yet, the filenames in the filesystem are: "user/HQPGAC/F-86D.dat" and "user/HQPGAC/F-86D.dnm"

Example 3
In the file: "aircraft/air_Scorpions.lst" there is the line:
User/4AWP/4AS/falcon/f16f.dat user/4AWP/4AS/falcon/f16f.dnm user/4AWP/4AS/falcon/f16b_coll.srf

Yet, the filename in the filesystem is: "user/4AWP/4AS/falcon/f16f.dat"

Example 4
In the file: "ground/gro_SARF_Yokubari.lst" there is the line:
user/Makoto_YV_Megaflot/ground/m1a1.dat user/Makoto_YV_Megaflot/ground/m1a1.dnm user/Makoto_YV_Megaflot/ground/m1a1.dat user/Makoto_YV_Megaflot/ground/m1a1coll.srf

Yet, the filename in the filesystem is: "user/Makoto_YV_Megaflot/Ground/m1a1.dat"
...
...
and so on with many others, Majorpack's addons appearing quite a lot in the errors.

While in Windows filename capitalisation doesn't matter, Linux, and Mac, do treat uppercase letters as different from the same but lowercase.


If you see the base initial YSFLIGHT directory and file name convention, everything is lowercase. That is what makes the sim function properly in all operating system.

So I wonder, why the addon makers and releasers, do not follow the same convention? there is absolutely no need to capitalise directory and file names which make up the addons, and then also all the contents of the various .lst files would be also all in lowercase and such problems like described above would not exist.

We often speak of bugs in the software. Well these are bugs as well, bugs of the addons. So then, is it any hope for these bugs to be fixed?

User avatar
decaff_42
Staff
Staff
Posts: 3562
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 626 times
Been thanked: 1364 times
Contact:

Re: Addons of YSFLIGHT for Linux/Mac

Post by decaff_42 » Sun Aug 11, 2019 9:28 pm

I think on one level the issue is that new modders can be discouraged by an established standard. If it is something that doesn't impact them, then they may end up ignoring it. That being said, perhaps a script can be developed that will look for specific issues in a pack and highlight them or even correct them for the new modder (or old modder :D ).

Personally I've had some packs with issues like the ones you describe. I know the biggest example is the / vs \ in lst files, and it seems that on the whole modern packs use / which is compatible across all platforms. Perhaps

To your point about lowercase, I personally have never noticed that convention!

To why people don't follow the same convention, I think there are multiple reasons.
(1) Ignorance of the impact
(2) Other conventions (like aircraft designations using capital letters)
(3) People think in different ways and tackle challenges differently.
(4) There are somewhat different conventions around the globe. Just look at the addon re-hosting debate that happened a few years back.

If we came up with a list of things to do, I'd certainly be willing to write a python script to evaluate packs.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

mobius
Newbie
Newbie
Posts: 11
Joined: Mon Mar 04, 2019 6:56 am
Favorite Aircraft: Su-57
OS: Debian, Mint, Win7
Been thanked: 5 times

Re: Addons of YSFLIGHT for Linux/Mac

Post by mobius » Sun Aug 11, 2019 10:04 pm

I understand what you mean.

Well personally, I have gone the easy way to rename every single folder and filename under /path/where/ysflight/is/installed and turn them to be lowercase.

Code: Select all

$ pwd ; ls
/home/ats/games
ysflight
$
$ find ysflight -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;
And then the second step, was to find every single .lst file in there as well and edit it in a way that everything in them was lowercase.

Code: Select all

for i in `find . -name *lst -print` ; do sed -i 's/\(.*\)/\L\1/' $i ; echo Finished with $i ; done
I know there are some other files that I found, besides the .lst files, that needed editing, here and there, but which I can't remember which they were. But at any rate, this small simple trick solved around 90% of all the files and the problems. the rest of them I just went and had them manually fixed.

The idea of a script which analyses the packs and does all the needful modifications is a really nice one. It probably is the best solution: keep the packs as they are and if you happen to use linux, just run the script after installing the pack/addon.

User avatar
decaff_42
Staff
Staff
Posts: 3562
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 626 times
Been thanked: 1364 times
Contact:

Re: Addons of YSFLIGHT for Linux/Mac

Post by decaff_42 » Sun Aug 11, 2019 10:07 pm

I envision that the modder would run the script, that way their work can work seamlessly across all operating systems. Once you start messing with automatically editing files, things can start to get messy.

Do you find issues within .dnm files of lower-case vs capitals are a factor? For example with my F-35 v2 pack and a lot of other packs from Japan and Korea, there are filepath dependencies from DNM to .srf files.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

mobius
Newbie
Newbie
Posts: 11
Joined: Mon Mar 04, 2019 6:56 am
Favorite Aircraft: Su-57
OS: Debian, Mint, Win7
Been thanked: 5 times

Re: Addons of YSFLIGHT for Linux/Mac

Post by mobius » Tue Aug 13, 2019 3:11 pm

Yes, there is a problem with practically every plane.
The list appears, but at the moment of seleting one of the planes from that list, there is an error:

ERROR
Load Error (VISUAL): ./user/decaff_42/F35/F-35A/F-35A_421_SQ_Mixed.dnm

mobius
Newbie
Newbie
Posts: 11
Joined: Mon Mar 04, 2019 6:56 am
Favorite Aircraft: Su-57
OS: Debian, Mint, Win7
Been thanked: 5 times

Re: Addons of YSFLIGHT for Linux/Mac

Post by mobius » Tue Aug 13, 2019 3:40 pm

Ok. More ivestigation with the F-35 v2 pack, shows that most of the .dat files (if not all) have a wrong reference in the dat file for the needing .dnm file.

Here is the list and how it was generated

Code: Select all

:~/Ysflight/ysflight/user/decaff_42$ grep -R -n User *
F35/F-35B/F-35B_1_Gruppo_Marina_RCS.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_VMFAT-501_CAG.dat:115:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35B/F-35B_BF-01_DEMO.dat:127:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_BL-1.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_BF-05.dat:127:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35B/F-35B_VMFA-211_CAG_USS_AMERICA.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_BK-01_ZM135.dat:116:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2A.dat:119:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35B/F-35B_VMX-1_USS_AMERICA.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_BF-03_VX-23_pylons.dat:127:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_1_Gruppo_Marina.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_VMFA-121_CAG.dat:115:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35B/F-35B_VMFA-211.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_VMFA-211_RCS.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_BF-03_VX-23_clean.dat:127:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_VMFA-211_CAG.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_VMFA-211_USS_AMERICA.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_VMFA-121_RCS.dat:115:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35B/F-35B_BF-02_VX-23.dat:127:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_VMFA-122.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_no617_RAF_SQNLDR_RCS.dat:117:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35B/F-35B_BF-05_RCS.dat:127:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35B/F-35B_VMFAT-501.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35B/F-35B_BF-01.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35B/F-35B_VMFAT-501_RCS.dat:115:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35B/F-35B_BF-03_VX-23_wingtips.dat:127:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_VMX-1.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_BF-01_RCS.dat:127:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35B/F-35B_VMFA-122_CAG_A2A.dat:125:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_VMFA-122_RCS.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_VMFA-121.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2G.dat:142:WPNSHAPE FLR FLYING User/VMFA-125_F-35B_Pack/Weapons/FLR/flr.dnm
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2G.dat:144:WPNSHAPE AIM120 FLYING User/VMFA-125_F-35B_Pack/Weapons/METEOR/Meteor_f.srf
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2G.dat:145:WPNSHAPE AIM120 STATIC User/VMFA-125_F-35B_Pack/Weapons/METEOR/Meteor_s2.srf
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2G.dat:147:WPNSHAPE AIM9 FLYING User/VMFA-125_F-35B_Pack/Weapons/AIM-120D/AIM-120D_f.srf
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2G.dat:148:WPNSHAPE AIM9 STATIC User/VMFA-125_F-35B_Pack/Weapons/AIM-120D/AIM-120D_LAU-128.srf
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2G.dat:150:WPNSHAPE AIM9X FLYING User/VMFA-125_F-35B_Pack/Weapons/ASRAAM/ASRAAM_F.srf
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2G.dat:151:WPNSHAPE AIM9X STATIC User/VMFA-125_F-35B_Pack/Weapons/ASRAAM/ASRAAM_S_rot.srf
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2G.dat:153:WPNSHAPE AGM65 FLYING User/VMFA-125_F-35B_Pack/Weapons/BRIMSTONE/Brimstone_f.srf
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2G.dat:154:WPNSHAPE AGM65 STATIC User/VMFA-125_F-35B_Pack/Weapons/BRIMSTONE/Brimstone_s2.srf
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2G.dat:156:WPNSHAPE B250 FLYING User/VMFA-125_F-35B_Pack/Weapons/SPEAR3/spear3_f.srf
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2G.dat:157:WPNSHAPE B250 STATIC User/VMFA-125_F-35B_Pack/Weapons/SPEAR3/spear3_s2.srf
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2G.dat:159:WPNSHAPE B500 FLYING User/VMFA-125_F-35B_Pack/Weapons/PW4/GBU-12f.srf
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2G.dat:160:WPNSHAPE B500 STATIC User/VMFA-125_F-35B_Pack/Weapons/PW4/GBU-12s2.srf
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2G.dat:162:WPNSHAPE B500HD FLYING User/VMFA-125_F-35B_Pack/Weapons/GBU-32/GBU-32_2.srf
F35/F-35B/F-35B_no617_RAF_SQNLDR_A2G.dat:163:WPNSHAPE B500HD STATIC User/VMFA-125_F-35B_Pack/Weapons/GBU-32/GBU-32_2.srf
F35/F-35B/F-35B_VMX-1_RCS.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_BF-03_VX-23.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_no617_RAF_LO_Pylons.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35B/F-35B_no617_RAF_LO_RCS.dat:116:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35B/F-35B_VMFA-122_CAG.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35B/F-35B_BF-04.dat:127:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35A/F-35A_RNLAF_DEMO.dat:97:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35A/F-35I_253_SQN_RCS.dat:101:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35A/F-35A_Italy_32_13_Special.dat:122:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35A/F-35A_34FS_Mixed.dat:125:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35A/F-35A_34FS_Heavy.dat:129:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35A/F-35A_58th_FS_RCS.dat:121:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35A/F-35A_n3_SL_RCS.dat:103:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35A/F-35A_AF-01_RCS.dat:110:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35A/F-35A_AF-06_461st_FLTS.dat:110:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35A/F-35A_34FS_A2A.dat:121:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35A/F-35A_421_SQ_Pylons.dat:121:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35A/F-35A_RNLAF_RCS.dat:103:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35A/F-35A_34FS_RCS.dat:121:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35A/F-35A_RNLAF.dat:114:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35A/F-35A_n3_LO.dat:113:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35A/F-35A_AF-01.dat:123:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35A/F-35I_253_SQN.dat:113:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35A/F-35A_2_OCU_LO_RCS.dat:102:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35A/F-35A_n3_LO_RCS.dat:102:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35A/F-35A_n3_SL.dat:113:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35A/F-35A_421_SQ_Mixed.dat:125:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35A/F-35A_58th_FS_A2A.dat:121:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35A/F-35A_421_SQ_RCS.dat:121:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35A/F-35A_421_SQ_A2A.dat:121:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35A/F-35A_2_OCU_LO.dat:113:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35A/F-35A_AF-02.dat:113:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35C/F-35C_VFA-125_CAG_A2A.dat:123:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35C/F-35C_CF-05.dat:112:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35C/F-35C_VFA-147_A2A.dat:122:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35C/F-35C_VX-9.dat:123:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35C/F-35C_VFA-101_CAG.dat:112:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35C/F-35C_VFA-125_A2G.dat:133:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35C/F-35C_VFA-147_CAG.dat:123:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35C/F-35C_VFA-125_RCS.dat:123:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35C/F-35C_VFA-147_RCS.dat:123:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35C/F-35C_VFA-101_RCS.dat:112:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35C/F-35C_VFA-101.dat:123:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35C/F-35C_CF-02_VX-23.dat:123:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35C/F-35C_VFA-147_Pylons.dat:122:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35C/F-35C_VFA-125_CAG_RCS.dat:123:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35C/F-35C_VX-9_RCS.dat:123:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35C/F-35C_VFA-125_CAG.dat:123:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35C/F-35C_VFA-125.dat:123:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
F35/F-35C/F-35C_CF-01_RCS.dat:112:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35C/F-35C_CF-01.dat:123:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm 
F35/F-35C/F-35C_CF-03.dat:112:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm
Analysing the very first line in the list:
F35/F-35B/F-35B_1_Gruppo_Marina_RCS.dat:126:WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm

So, the file "F35/F-35B/F-35B_1_Gruppo_Marina_RCS.dat" has this at line nr. 126:
WPNSHAPE FLR FLYING User/decaff_42/Weapons/flr.dnm

And there, what should have been "user" is actually "User". Different captalisation of the first 'u'.

All the files listed suffer from the same issue at the indicated lines.

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1270
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 759 times
Been thanked: 280 times
Contact:

Re: Addons of YSFLIGHT for Linux/Mac

Post by u2fly » Tue Aug 13, 2019 10:29 pm

decaff_42 wrote:
Sun Aug 11, 2019 10:07 pm
I envision that the modder would run the script, that way their work can work seamlessly across all operating systems
@mobius, could your create Python-script, instead of using Linux-only tools!

P.S.: I'm Linux user too, but most of other users are Mac or Windows. So, Python-script would be cross platform solution ;-)
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

U.S. Senator John McCain wrote:
“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost - we stand w/ them in their fight against #Putin's aggression”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

mobius
Newbie
Newbie
Posts: 11
Joined: Mon Mar 04, 2019 6:56 am
Favorite Aircraft: Su-57
OS: Debian, Mint, Win7
Been thanked: 5 times

Re: Addons of YSFLIGHT for Linux/Mac

Post by mobius » Wed Aug 14, 2019 2:15 pm

I will.. try. I am not well versed with programming, and right now I don't have much time available. Actually I am helping decaf_42 in doing exactly that, developing a script of some kind for finding, fixing, suggesting what to do, etc... . He seems to be a much more proficient programmer and already uses python to do his own wizardry with the addons.

In the meanwhile, I will test soon utilities from here: https://github.com/ysflight-opensource
This link is what I saw here in the forum at the left side, under "Addon Creation -> Open-Source Tools for YSflight". Am especially interested in the installer for adons under linux, https://github.com/YSFlight-opensource/install_addon-py

mobius
Newbie
Newbie
Posts: 11
Joined: Mon Mar 04, 2019 6:56 am
Favorite Aircraft: Su-57
OS: Debian, Mint, Win7
Been thanked: 5 times

Re: Addons of YSFLIGHT for Linux/Mac

Post by mobius » Wed Aug 14, 2019 2:39 pm

There seems to be a bug in ysflight for linux in versions 20150425 and 20120701, when it comes to addons. Specifically, if there is a .dnm file that in turn has a reference (or more than one) to an external .srf file, if the filepath to this file is not all in capitals, then ysflght will fail to load that dnm file with a message similar to:
Load Error (VISUAL):./user/decaff_42/test/test001.dnm

On the console where the program was started from, at the same time, there appears something like:
Cannot read ./PARTS/TEST001.SRF
Line 6


In the dnm file, there is a line that reads:
FIL parts/test001.srf

There is a workaround to this, by naming in capital letters all the folders where the srf files are and the files themselves. It seems that ysflight reads the FIL section(s) of the .dnm file, and then capitalises what it finds there, and then searches for that capitalised version of the path+filename. I have no clue why this has to be done!

The good news is that the version 20181124 of ysflight does not suffer from this bug. It will look for that .srf filename as it is specified in the .dnm file. If it can't find any, the software will still launch and continue to run, ignoring the missing .srf file and will display nothing (transparency), instead of what the .srf file was supposed to have there.

User avatar
decaff_42
Staff
Staff
Posts: 3562
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 626 times
Been thanked: 1364 times
Contact:

Re: Addons of YSFLIGHT for Linux/Mac

Post by decaff_42 » Thu Aug 15, 2019 1:01 am

I'm going to have to make a change to my pack filesize reducer program to go all-caps. That way it should work on all computers.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1270
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 759 times
Been thanked: 280 times
Contact:

Re: Addons of YSFLIGHT for Linux/Mac

Post by u2fly » Fri Aug 16, 2019 12:32 am

mobius wrote:
Wed Aug 14, 2019 2:39 pm
There seems to be a bug in ysflight for linux in versions 20150425 and 20120701, when it comes to addons. Specifically, if there is a .dnm file that in turn has a reference (or more than one) to an external .srf file, if the filepath to this file is not all in capitals, then ysflght will fail to load that dnm file with a message similar to:
Load Error (VISUAL):./user/decaff_42/test/test001.dnm

On the console where the program was started from, at the same time, there appears something like:
Cannot read ./PARTS/TEST001.SRF
Line 6


In the dnm file, there is a line that reads:
FIL parts/test001.srf
Yep, this is known issue of YSFlight versions 20150425 and 20120701 on Linux, that I also reported many times on YSFHQ. 8-)
mobius wrote:
Wed Aug 14, 2019 2:39 pm
There is a workaround to this, by naming in capital letters all the folders where the srf files are and the files themselves. It seems that ysflight reads the FIL section(s) of the .dnm file, and then capitalises what it finds there, and then searches for that capitalised version of the path+filename. I have no clue why this has to be done!
Very interesting solution! Think, it could be happen due to "hardcoded" parsing of folder names with CAPITALIZED letters. :-?
mobius wrote:
Wed Aug 14, 2019 2:39 pm
The good news is that the version 20181124 of ysflight does not suffer from this bug. It will look for that .srf filename as it is specified in the .dnm file. If it can't find any, the software will still launch and continue to run, ignoring the missing .srf file and will display nothing (transparency), instead of what the .srf file was supposed to have there.
Yeah, Soji finally fixed this issue in YSFlight ver.20181124 ;-)
Last edited by u2fly on Fri Aug 16, 2019 12:45 am, edited 2 times in total.
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

U.S. Senator John McCain wrote:
“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost - we stand w/ them in their fight against #Putin's aggression”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
decaff_42
Staff
Staff
Posts: 3562
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 626 times
Been thanked: 1364 times
Contact:

Re: Addons of YSFLIGHT for Linux/Mac

Post by decaff_42 » Fri Aug 16, 2019 12:35 am

This issue is not present on Mac, hence why I release the F-35 v2 pack with this format.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1270
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 759 times
Been thanked: 280 times
Contact:

Re: Addons of YSFLIGHT for Linux/Mac

Post by u2fly » Fri Aug 16, 2019 12:43 am

mobius wrote:
Wed Aug 14, 2019 2:15 pm
In the meanwhile, I will test soon utilities from here: https://github.com/ysflight-opensource
This link is what I saw here in the forum at the left side, under "Addon Creation -> Open-Source Tools for YSflight".
This is my repo on GitHub, where I collect all known open-source tools for YSFlight. Any contributions are welcome! ;)
mobius wrote:
Wed Aug 14, 2019 2:15 pm
Am especially interested in the installer for adons under linux, https://github.com/YSFlight-opensource/install_addon-py
This is Python-script designed by Soji Yamakawa and officially distributed with «Auto-Test Scripts» package: Here is topic for install_addon.py discuss:
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

U.S. Senator John McCain wrote:
“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost - we stand w/ them in their fight against #Putin's aggression”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1270
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 759 times
Been thanked: 280 times
Contact:

Re: Addons of YSFLIGHT for Linux/Mac

Post by u2fly » Fri Aug 16, 2019 12:59 am

decaff_42 wrote:
Thu Aug 15, 2019 1:01 am
I'm going to have to make a change to my pack filesize reducer program to go all-caps. That way it should work on all computers.
Could you also combine it with install_addon.py?

Then we would get magic cross-platform YSFlight add-ons installer, that "would install, fix and reduce size" any addons! ;-)
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

U.S. Senator John McCain wrote:
“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost - we stand w/ them in their fight against #Putin's aggression”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
decaff_42
Staff
Staff
Posts: 3562
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 626 times
Been thanked: 1364 times
Contact:

Re: Addons of YSFLIGHT for Linux/Mac

Post by decaff_42 » Fri Aug 16, 2019 1:01 am

No I cannot. My tool is designed for use by the addon creator. You need the base blank model. While some addons have blank models, most do not. It also would require a significant change to the addon's file folder structure
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
Welshy
Staff
Staff
Posts: 1996
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: 224 times
Contact:

Re: Addons of YSFLIGHT for Linux/Mac

Post by Welshy » Fri Aug 16, 2019 9:29 pm

Running YS from a FAT32 file system removes many of the lst errors as they're actually file system not Linux errors
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!

mobius
Newbie
Newbie
Posts: 11
Joined: Mon Mar 04, 2019 6:56 am
Favorite Aircraft: Su-57
OS: Debian, Mint, Win7
Been thanked: 5 times

Re: Addons of YSFLIGHT for Linux/Mac

Post by mobius » Sat Aug 31, 2019 10:13 pm

Welshy wrote:
Fri Aug 16, 2019 9:29 pm
Running YS from a FAT32 file system removes many of the lst errors as they're actually file system not Linux errors
Well that is interesting. So then an immediate solution come to mind for me in this case.

1. Create an empty file, sized around 20-30GB (Or whatever size one expects the total size of the ysflight folder to be, also having enough space for new addons in the future.
2. Format the file itself as FAT32.
3. Loop-mount the file in a directory of choice.
4. Install ysflight in this directory of choice. Install also any addons as needed and required.
5. Play.

HOWTO:
The following assumes that all the commands are entered in home directory and that there is the file "20150425YsflightForLinux.zip" in the "Downloads" directory of the homedir. The idea is to create a new folder YSFLIGHT.COM and place a new install of the ysflight there.

Code: Select all

~$ cd; mkdir YSFLIGHT.COM
~$ dd if=/dev/zero of=ysflightloopfs.fat32 bs=1M count=100
~$ sudo mkfs.vfat ysflightloopfs.fat32
~$ sudo mount -o loop,uid=`id -u` ysflightloopfs.fat32 YSFLIGHT.COM
~$ unzip Downloads/20150425YsflightForLinux.zip -d YSFLIGHT.COM
~$ YSFLIGHT.COM/Ysflight/ysflight/ysflight64_gl1 
~$ # YSflight should be running and the main window opens #
What this does is to perform a new basic install of ysflight inside a 100M fat32 formatted file.

To start the game again, what is needed is only the mounting (if not done already) and launching the executable.

Code: Select all

~$ cd; sudo mount -o loop,uid=`id -u` ysflightloopfs.fat32 YSFLIGHT.COM
~$ YSFLIGHT.COM/Ysflight/ysflight/ysflight64_gl1 
~$ # YSflight should be running and the main window opens #
Tested and works like a charm for me.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests