-
Notifications
You must be signed in to change notification settings - Fork 41
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
Scenarios list not loading on Linux #1133
Comments
jwrober
added
bug
Something isn't working
gui
This issue requires changes to the user interface
labels
Jul 14, 2022
static QStringList default_scenario_path()
{
return {QStringLiteral("."), QStringLiteral("data/scenarios"),
freeciv_storage_dir()
+ QStringLiteral("/" DATASUBDIR "/scenarios"),
freeciv_storage_dir() + QStringLiteral("/scenarios")};
}
QString freeciv_storage_dir()
{
static QString storage_dir;
if (storage_dir.isEmpty()) {
// Make sure that all exe get the same directory.
auto app_name = QCoreApplication::applicationName();
QCoreApplication::setApplicationName("freeciv21");
storage_dir =
QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
QCoreApplication::setApplicationName(app_name);
qDebug() << _("Storage dir:") << storage_dir;
}
return storage_dir;
} We should look in static QStringList default_data_path()
{
// Make sure that all executables get the same directory.
auto app_name = QCoreApplication::applicationName();
QCoreApplication::setApplicationName("freeciv21");
auto paths =
QStringList{QStringLiteral("."), QStringLiteral("data"),
freeciv_storage_dir() + QStringLiteral("/" DATASUBDIR),
QStringLiteral(FREECIV_INSTALL_DATADIR)}
+ QStandardPaths::standardLocations(QStandardPaths::DataLocation);
QCoreApplication::setApplicationName(app_name);
return paths;
} |
lmoureaux
added a commit
to lmoureaux/freeciv21
that referenced
this issue
Jul 16, 2022
After it is installed, Freeciv21 is supposed to find its default set of scenarios independent from where it's started from. Use default_data_path() to build a list of paths to search in. Closes longturn#1133.
jwrober
pushed a commit
that referenced
this issue
Jul 16, 2022
After it is installed, Freeciv21 is supposed to find its default set of scenarios independent from where it's started from. Use default_data_path() to build a list of paths to search in. Closes #1133.
psampathkumar
pushed a commit
to psampathkumar/freeciv21
that referenced
this issue
Aug 1, 2022
After it is installed, Freeciv21 is supposed to find its default set of scenarios independent from where it's started from. Use default_data_path() to build a list of paths to search in. Closes longturn#1133.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
From the start screen, when you click the button to load a scenario game, the list of scenarios is empty.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
You should get a list of the scenarios installed.
Screenshots
This is the issue...
This is what I expect...
Platform and version (please complete the following information):
Additional context
During discord conversation it seems that in
utility/shared.cpp
thefreeciv_storage_dir()
is looking for a writable location, but the out of box scenarios are not installed in a writable location when installed via the package.The text was updated successfully, but these errors were encountered: