mirror of
https://github.com/audacity/linuxdeploy.git
synced 2026-07-02 20:08:02 -05:00
Ensure that custom AppRun are deployed even if no desktop files are found
This commit is contained in:
@@ -57,6 +57,12 @@ namespace linuxdeploy {
|
||||
std::string customAppRunPath, appdir::AppDir& appDir) {
|
||||
ldLog() << std::endl << "-- Deploying files into AppDir root directory --" << std::endl;
|
||||
|
||||
if (!customAppRunPath.empty()) {
|
||||
ldLog() << LD_WARNING << "Deploying custom AppRun: " << customAppRunPath << std::endl;
|
||||
appDir.deployFile(customAppRunPath, appDir.path() / "AppRun");
|
||||
appDir.executeDeferredOperations();
|
||||
}
|
||||
|
||||
auto deployedDesktopFiles = appDir.deployedDesktopFiles();
|
||||
if (deployedDesktopFiles.empty()) {
|
||||
ldLog() << LD_WARNING << "Could not find desktop file in AppDir, cannot create links for AppRun, "
|
||||
|
||||
@@ -89,4 +89,11 @@ namespace LinuxDeployTest {
|
||||
ASSERT_TRUE(exists(tmpAppDir / source_icon_path.filename()));
|
||||
ASSERT_TRUE(exists(target_apprun_path));
|
||||
}
|
||||
|
||||
TEST_F(LinuxDeployTestsFixture, deployAppDirRootFilesWithCustomAppRun) {
|
||||
linuxdeploy::core::appdir::AppDir appDir(tmpAppDir);
|
||||
linuxdeploy::deployAppDirRootFiles({}, source_apprun_path.string(), appDir);
|
||||
|
||||
ASSERT_TRUE(exists(target_apprun_path));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user