Flight Sims: Linux Air Combat READY for Debian Repos

Programming languages, Coding, executables, and scripting.
Message
Author
User avatar
stevepusser
Posts: 12397
Joined: 2009-10-06 05:53
Has thanked: 6 times
Been thanked: 4 times

Re: Flight Sims: Linux Air Combat READY for Debian Repos

#16 Post by stevepusser »

I forgot to add that I had to patch the Makefile for the previous version to allow the "make clean" step to complete. The Debian packaging does this at the start of the process to make sure it's clean, and since the Makefile wanted to remove the completed Lac08p43 binary and failed to do so because it wasn't built yet, I just added a "-f" to the rm command to allow it to continue regardless. If you could add that to the next version, that would be great. I could do another kludge to work around that by touching that file first to make sure it exists before the Makefile zaps it...I'll try that with this new version, and then remove the kludge when the Makefile adds the -f.
MX Linux packager and developer

rjbosen
Posts: 24
Joined: 2020-10-02 04:14

Re: Flight Sims: Linux Air Combat READY for Debian Repos

#17 Post by rjbosen »

OK Steve, thanks.

I confirm that your suggestion to add "-f" works correctly in my prototype of the next version. Accordingly, all subsequent releases of LAC will include and benefit from that tiny change.

ONE MORE LITTLE CHANGE: When the current version (Lac08p45.tar.gz) builds the initial config files in the user's ~home folder at ".LAC", the default keyboard key mapping for "Fire Secondary Weapon" is incorrectly mapped to NUM8 (Numeric keypad "8"). While that works well, it is inconsistent with our documentation. It should be mapped to the keyboard's "Alt" key at the right of the spacebar. All future releases of LAC will also be updated to fix that.

To fix that little oversight in Lac08p45, please edit "conf.cpp". At or near line 173 you will find code something like this:

Code: Select all

unsigned int key_SECONDARY = 8;
Please change that to this:

Code: Select all

unsigned int key_SECONDARY = 563;
Thanks!

-Bob-

User avatar
stevepusser
Posts: 12397
Joined: 2009-10-06 05:53
Has thanked: 6 times
Been thanked: 4 times

Re: Flight Sims: Linux Air Combat READY for Debian Repos

#18 Post by stevepusser »

OK, it's easy to add a patch to do that to the code during the build. I'll increment the version from 0.1 to 0.2. I also noticed that the user's LAC folder lacks a "DefaultHeightMap.LAC" file after the installation, got warnings in the terminal to that effect, and was able to copy that over from the source after the install to fix that, but that won't be an easy option for the user if they just install the binaries from a repo. I will add it to the -data package, and have it sitting in /etc/LAC for either manual or automatic copying to the user's LAC, but since packages are installed as the superuser, there's no mechanism for a package install to create and populate any folders in a user's home--it's left for the program itself to do so when first run.
MX Linux packager and developer

rjbosen
Posts: 24
Joined: 2020-10-02 04:14

Re: Flight Sims: Linux Air Combat READY for Debian Repos

#19 Post by rjbosen »

Understood. I will add logic inside LAC to copy DefaultHeightMap.LAC from wherever you put it in /etc to its required location inside the .LAC folder whenever it is missing. The next revision of LAC will get that (and all of the other details recently discussed in this thread). Just let me know where to expect it (unless I hear otherwise from you I will assume it's at /etc/LAC/DefaultHeightMap.LAC).

(For those following this thread: If the DefaultHeightMap.LAC file is missing, LAC will run more-or-less as expected, but the terrain features do not match up with airfield locations, so the terrain map looks "funny".)

-Bob-

User avatar
stevepusser
Posts: 12397
Joined: 2009-10-06 05:53
Has thanked: 6 times
Been thanked: 4 times

Re: Flight Sims: Linux Air Combat READY for Debian Repos

#20 Post by stevepusser »

OK, it's in /etc/LAC.

Now I have to figure out why all the linking failures on Debian testing, Sid, and more recent Ubuntus, when I gather that manual builds from source on those distros have no issues of that sort.
MX Linux packager and developer

rjbosen
Posts: 24
Joined: 2020-10-02 04:14

Re: Flight Sims: Linux Air Combat READY for Debian Repos

#21 Post by rjbosen »

Steve:

I have the new version of LAC you've been expecting. It's version 8.47, available through my archive "Lac08p47.tar.gz" here:

https://sourceforge.net/projects/linuxa ... z/download

Here is the relevant portion of its "WhatsNew.txt" file:

Code: Select all

Changes in Lac08p47:

The "Makefile" was enhanced to eliminate an error message that was only seen if the operator issued the "make clean" command when there was no executable file to delete.

Default key mapping for "Fire Secondary Weapon" is now set to the "Alt" key immediately to the right of the spacebar.

If the "DefaultHeightMap.LAC" file is missing, the logic that tries to find a copy elsewhere in the filesystem has been made even more intelligent. Now, in addition to searching filesystem areas that have proven handy in the past, it also looks for a new folder at /etc/LAC, where Repository-oriented installation activities may have left a copy.
One other note: When compiling for the Raspberry Pi on the popular "Raspbian" version of LINUX, it is necessary to edit the "common.h" file to ensure that the following single line of code (located near the top of the file) is NOT commented out:

Code: Select all

// #define RASPBIAN // Raspberry Pi requires a few tweaks. Define RASPBIAN to activate them or comment this line out.
I think this new version of LAC meets all of the requirements you have described, but if other changes are needed, please let me know. I am most anxious to help.

-Bob-

rjbosen
Posts: 24
Joined: 2020-10-02 04:14

Re: Flight Sims: Linux Air Combat READY for Debian Repos

#22 Post by rjbosen »

Steve:

I have learned of your struggles to get LAC to compile successfully on the latest version(s) of Ubuntu for X86 architectures. I haven't suffered with that but there is a discussion about it in one of our forums that you may find helpful. Look here:

https://sourceforge.net/p/linuxaircomba ... 271d3d0fc/

As you can see in that discussion, Daniel Barland had better success after he applied a couple of tiny "tweaks" to our Makefile. Perhaps one of those little adjustments may help you with your problem??? I hope this helps!

-Bob-

User avatar
stevepusser
Posts: 12397
Joined: 2009-10-06 05:53
Has thanked: 6 times
Been thanked: 4 times

Re: Flight Sims: Linux Air Combat READY for Debian Repos

#23 Post by stevepusser »

I'll have time to work on LAC builds tomorrow (California time), so I hope the tweaks from the forum help!
MX Linux packager and developer

rjbosen
Posts: 24
Joined: 2020-10-02 04:14

Re: Flight Sims: Linux Air Combat READY for Debian Repos

#24 Post by rjbosen »

Steve (and all),

Your work continues to inspire related progress. Somebody using the handle "alfrednewman" has created a repository entry for LAC V8.47 in the "Arch User Repository" (AUR), making LAC easily available for Arch Linux and Manjaro Linux. Because Version 8.47 automates an easy fix to the complexity you identified in loading the "DefaultHeightMap.LAC" file, I can confirm that we now have a complete solution for those platforms. Here's a link with further details:

https://sourceforge.net/p/linuxaircomba ... bef7b740d/

Here's a link about and with a YouTube PlayList showing easy success with that AUR repository:

https://sourceforge.net/p/linuxaircomba ... 66d74ce53/

-Bob-

rjbosen
Posts: 24
Joined: 2020-10-02 04:14

Re: Flight Sims: Linux Air Combat READY for Debian Repos

#25 Post by rjbosen »

Steve:

I just confirmed that the LAC repository archive you created for Debian10 works splendidly. First I created a brand-new, "virgin" installation of Debian 10 with the light-weight "xfce" desktop, fully upgraded as of the current date (early June 2021), but without any additional applications. Then I fired up firefox and accessed your LAC repository work from here:

https://build.opensuse.org/package/show ... air-combat

After pressing the prominent "Download package" button, I selected "Download package and install manually". From there I went to the section labeled "For Debian 10 run the following:" That provided me with the text of the following little four-line script to run:

Code: Select all

echo 'deb http://download.opensuse.org/repositories/home:/stevenpusser:/LAC/Debian_10/ /' | sudo tee /etc/apt/sources.list.d/home:stevenpusser:LAC.list
curl -fsSL https://download.opensuse.org/repositories/home:stevenpusser:LAC/Debian_10/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_stevenpusser_LAC.gpg > /dev/null
sudo apt update
sudo apt install linux-air-combat
I decided to run that script just one line at a time, by simply "pasting" each line into a bash shell.

The "sudo" command in the first line gave me trouble because (from that "virgin" installation of debian) my username did not yet have any authority to run "sudo". I fixed that with the well-known "usermod" program from /sbin/usermod. Because my Debian username on that system is "bbosen", the root-level command I used to fix "sudo" was:

Code: Select all

/sbin/usermod -aG sudo, adm bbosen
After that command completed I had to log out and log back in again before I was able to complete that first line of the script.

The script's second line also failed, because (from that virgin installation of debian) the "curl" command had not yet been installed. I installed it with the following root-level command according to well-established norms:

Code: Select all

apt-get install curl
After that command completed I was able complete the second, third, and fourth line of that little 4-line script without further problems. The entire process required less than 5 minutes start to finish. All of the prerequisite compiling, linking, library, and resource tools were installed and configured automatically without any manual intervention. Easy peasy!

Your install script successfully creates a prominent link to "linux-air-combat" in Debian's main menu under "Games", with the appropriate graphic icon showing a little airplane, exactly as I had hoped. Clicking on that icon immediately starts lac, which performs thereafter exactly as documented.

THANKS for all of your work! None of the little complications were beyond "trivial" to overcome, and none would even be apparent to anybody that was exercising a robust copy of Debian that had already been exercised enough to activate "sudo" and "curl" as a consequence of normal, routine work.

Within the next few days I will create a YouTube Playlist showing the EXACT steps described above.

-Bob-

User avatar
stevepusser
Posts: 12397
Joined: 2009-10-06 05:53
Has thanked: 6 times
Been thanked: 4 times

Re: Flight Sims: Linux Air Combat READY for Debian Repos

#26 Post by stevepusser »

Thanks for the feedback. The "linux-air-combat" symlink to the actual versioned LAC binary (I think LAC0847, offhand, but don't quote me) is actually automatically created in a special "debian/links" file during the packaging, so that the linux-air-combat.desktop file that creates the menu entry doesn't need to change with every updated version, just some other files to install the actual binary.

I'll have to look at the AUR version to see if I can pick up any tips from their build procedure; at the end of the day, I'm still just a hobbyist packager and am always learning new things.
MX Linux packager and developer

Post Reply