Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language crash with app renaming #153

Closed
DorpsGek opened this issue May 5, 2006 · 6 comments
Closed

Language crash with app renaming #153

DorpsGek opened this issue May 5, 2006 · 6 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented May 5, 2006

Anonymous opened the ticket and wrote:

OpenTTD appears hardcoded to using OpenTTD.app/Contents/Lang, instead of $(APPDIR)/Contents/Lang, which makes parallel versions a minor pain.

This causes a couple of possible crashes:

Directory layout:
/Applications/OpenTTD-0.4.7.app/
/Applications/OpenTTD-R3464.app/
/Applications/OpenTTD-R4735.app/
# no /Applications/OpenTTD.app/
Running any of them causes "No available language packs"

Directory layout:
/Applications/OpenTTD.app/ # any of the above versions
/Applications/*.app/ # others remaining unchanged
Running any of the non-OpenTTD.app ones causes "Invalid version of language packs"

Workarounds tried:
Changing $(APPNAME).app/Contents/Info.plist's CFBundleName to match $(APPNAME) has no effect.
Changing /Applications/OpenTTD-$(VER).app/ to /Applications/OpenTTD-$(VER)/OpenTTD.app/ works, although appbar becomes confusing (no version names)

Assigned to Bjarni at Celestar's request.

-PandaMojo

Reported version: 0.4.7
Operating system: Mac OS X


This issue was imported from FlySpray: https://bugs.openttd.org/task/153
@DorpsGek
Copy link
Member Author

Bjarni wrote:

I have known this bug from the time it was added (0.2.x or something like that)

The issue is that it got a hardcoded relative path for the lang dir, which contains the name. I got a plan to make all the paths hardcoded, but relative to the dir where the binary file is in the bundle, since the dir ".." will work even if somebody renames the bundle

I just got other stuff to do first, so a workaround is to NOT rename the bundle app. This should be somewhat easy to do. Another workaround is to edit Makefile to set a different name, like

OSXAPP="OpenTTD.app"
replace it with
OSXAPP="OpenTTD-0.4.7.app"

It's not a nice solution, but it should work

Another thing: OpenTTD do not need to be in Applications, so another solution could be to make a folder (say in your homedir) called OpenTTD and inside that one make a folder for each version, then no renaming will be needed. It's not recommended to use savegames and config files for more than one version anyway. You can upgrade them to a newer version, but it's pure luck if it works the other way without problems


This comment was imported from FlySpray: https://bugs.openttd.org/task/153#comment294

@DorpsGek
Copy link
Member Author

DorpsGek commented Nov 2, 2006

Darkvater wrote:

Any progress on this?


This comment was imported from FlySpray: https://bugs.openttd.org/task/153#comment562

@DorpsGek
Copy link
Member Author

DorpsGek commented Nov 2, 2006

Bjarni wrote:

err, the plan was to wait for a certain path patch to be finished as it could be used to solve this. Maybe it's time to solve this in a different way.

But there is one thing, that's important here: the game was never meant to be used in the application folder and adding support for it without doing real work to the path handling will likely end up as a hack.


This comment was imported from FlySpray: https://bugs.openttd.org/task/153#comment564

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 5, 2006

Bjarni wrote:

The makefile rewrite will be able to solve this.


This comment was imported from FlySpray: https://bugs.openttd.org/task/153#comment678

@DorpsGek
Copy link
Member Author

Bjarni wrote:

The makefile rewrite didn't solve this because the path update was taken out of it. Now it will be solved when the path patch is done (look at task dependancies)


This comment was imported from FlySpray: https://bugs.openttd.org/task/153#comment1371

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r10182.


This comment was imported from FlySpray: https://bugs.openttd.org/task/153

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant