edeforas / edeforas/Astree

Glass catalogs path for AppImage

Open
#29 13 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
81
Forks
12
PR merge metrics
No merged PRs in 30d

Description

I try to use AppImage builds, but seems like there are some issues with glass catalog path.

- AppImage builds - https://github.com/Symbian9/Astree/releases/tag/continuous

Actually, according [`../src/gui/MainWindow.cpp`](https://github.com/edeforas/Astree/blob/master/src/gui/MainWindow.cpp), *Astree* use next path for `sGlassPath`:

```
std::string MainWindow::get_glass_path() const
{

...

#ifdef __unix__ //linux

string sAppPath = QCoreApplication::applicationDirPath().toStdString();
string sGlassPath = sAppPath + "/../share/astree/glass/"; //not very clean but should work
return sGlassPath;
#endif

return "invalid glass path";
}
```

Inside AppImage (if extract it as `$ ./Astree*.AppImage --appimage-extract`) there is `/glass/` catalog, but its path looks next:

```
/squashfs-root/usr/glass
```

So, if I run AppImage build *Astree* recognize only built-in materials (`Air`; `Vacuum`; `Water`).

As result, on opening [`Newton_BK7_diagonals.astree`](https://github.com/edeforas/Astree/blob/master/samples/others/Newton_BK7_diagonals.astree) sample `BK7` could not be loaded from `../glass/common_glass.agf`: *"Glass BK7 doesn't exist in catalog!"*

![pic.1](https://i.imgur.com/NFCzH9q.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in src/gui/MainWindow.cpp at MainWindow::get_glass_path() and compare its returned path with the /usr/glass location inside the AppImage extraction. Reproduce the problem by opening samples/others/Newton_BK7_diagonals.astree in the AppImage and verify that BK7 loads from ../glass/common_glass.agf when the path handling is corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.