Fix DMG support and try to support installation into /Applications
This commit is contained in:
18
src/init.cpp
18
src/init.cpp
@@ -858,11 +858,21 @@ static void ZC_LoadParams(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
// DMG Support: Apple just has to do things differently...
|
// This will only work when SD is installed into /Applications, which is the only supported method
|
||||||
sapling_spend = boost::filesystem::path("silentdragon.app/Contents/MacOS") / "hush3" / "sapling-spend.params";
|
sapling_spend = boost::filesystem::path("/Applications/silentdragon.app/Contents/MacOS") / "sapling-spend.params";
|
||||||
sapling_output = boost::filesystem::path("silentdragon.app/Contents/MacOS") / "hush3" / "sapling-output.params";
|
sapling_output = boost::filesystem::path("/Applications/silentdragon.app/Contents/MacOS") / "sapling-output.params";
|
||||||
if (files_exist(sapling_spend, sapling_output)) {
|
if (files_exist(sapling_spend, sapling_output)) {
|
||||||
fprintf(stderr,"Found sapling params in ../Contents/MacOS\n");
|
fprintf(stderr,"Found sapling params in /Applications/Contents/MacOS\n");
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!found) {
|
||||||
|
// DMG Support: Apple just has to do things differently...
|
||||||
|
sapling_spend = boost::filesystem::path("./silentdragon.app/Contents/MacOS") / "sapling-spend.params";
|
||||||
|
sapling_output = boost::filesystem::path("./silentdragon.app/Contents/MacOS") / "sapling-output.params";
|
||||||
|
if (files_exist(sapling_spend, sapling_output)) {
|
||||||
|
fprintf(stderr,"Found sapling params in /Applications/Contents/MacOS\n");
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user