Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: solvespace/solvespace
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 945a28277f4e
Choose a base ref
...
head repository: solvespace/solvespace
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dc6c7bd0ceb9
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Apr 21, 2019

  1. Add a lookup for resources in ../share/solvespace.

    This is useful for relocatable bundles, e.g. AppImage or NixOS.
    probonopd authored and whitequark committed Apr 21, 2019
    Copy the full SHA
    dc6c7bd View commit details
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/platform/platform.cpp
6 changes: 6 additions & 0 deletions src/platform/platform.cpp
Original file line number Diff line number Diff line change
@@ -541,6 +541,12 @@ static Platform::Path FindLocalResourceDir() {
return resourceDir;
}

resourceDir = selfPath.Parent().Parent().Join("share/solvespace");
if(stat(resourceDir.raw.c_str(), &st) != -1) {
// A resource directory exists at a relative path, good.
return resourceDir;
}

// No executable-adjacent resource directory; use the one from compile-time prefix.
return Path::From(UNIX_DATADIR);
}