sudasana / armcom2

Armoured Commander II
104 stars 13 forks source link

Linux compatability #5

Closed Stew-rt closed 4 years ago

Stew-rt commented 6 years ago

There are two issues that make the git package not run on Linux (at least on my system).

If deemed an acceptable change, I can make the above changes to allow Linux support to work "out of the box" and build an AUR package.

sudasana commented 6 years ago

Both of those changes are fine with me! I can make the renderer automatically default to SDL if it detects as Linux OS.

Stew-rt commented 6 years ago

Great - I'll try to get enough work done to send you a pull request over the weekend. Thanks

sudasana commented 6 years ago

I've added the default to SDL for linux OS to the master branch:

https://github.com/sudasana/armcom2/commit/cf0693bcecdd461bc78973948f244ab7d14a7675

wart-github commented 5 years ago

Tried this on my archlinux machine this evening. python armcom2.py loads the main screen. I can adjust options. But when I hit 'N' it bails with: Starting Armoured Commander II version 0.4.0 Current keyboard layout: QWERTY Traceback (most recent call last): File "armcom2.py", line 9673, in result = campaign.CampaignSelectionMenu() File "armcom2.py", line 581, in CampaignSelectionMenu campaign_list = sorted(campaign_list, key = lambda x : (x['start_date']['year'], File "armcom2.py", line 581, in campaign_list = sorted(campaign_list, key = lambda x : (x['start_date']['year'], TypeError: string indices must be integers

Will be able to look closer tomorrow...

wart-github commented 4 years ago

Great stuff!

Managed to get the very latest version (pulled today) to work. I had to do a few things to get it to work under linux (archlinux).

(1) I had to install precisely libtcod 1.6.5 --- newer versions throw errors. (2) I had to copy /usr/lib/libtcod.so. into libtcodpy_local/ (3) I had to modify xp_loader.py per the diff below (basically, add an if check for 'linux').

from sys import platform if platform == 'darwin': import tcod as libtcod elif platform == 'linux': import libtcodpy_local as libtcod else: import libtcodpy as libtcod import binascii

sudasana commented 4 years ago

Thanks for the info; I can modify xploader but I don't have access to the /usr/lib/libtcod.so. files; can you submit a pull request to add them to libtcodpy_local/ ?

wart-github commented 4 years ago

I'd just add to README (which was in the README for libtcodpy anyway) to cp the libtcod so files to that directory, since those are linked files.

sudasana commented 4 years ago

Sounds good!

sudasana commented 4 years ago

I've added these instructions to readme.md, so I'm going to mark this issue as closed for now.