Deprecate --app-name

It's been a useful parameter, but only in some rare edge cases. Instead,
we'll focus more on desktop files, e.g., using the Icon entry contents
for (re)naming icons, etc.
This commit is contained in:
TheAssassin 2018-08-25 23:46:13 +02:00
parent 36c6be95d6
commit e8dee64447
4 changed files with 3 additions and 14 deletions

View File

@ -59,7 +59,7 @@ If your build system cannot produce such install trees or you prefer to bundle e
An example run could look like this:
```bash
./linuxdeploy*.AppImage --app-name myapp --appdir AppDir --init-appdir -e myapp -d myapp.desktop -i myapp_64x64.png
./linuxdeploy*.AppImage --appdir AppDir --init-appdir -e myapp -d myapp.desktop -i myapp_64x64.png
```
Of course both approaches can be combined, e.g., you can bundle additional executables with your main app.

View File

@ -79,12 +79,6 @@ namespace linuxdeploy {
// create symlinks for AppRun, desktop file and icon in the AppDir root directory
bool createLinksInAppDirRoot(const desktopfile::DesktopFile& desktopFile, boost::filesystem::path customAppRunPath = "");
// set application name of primary "entry point" application
// icons and other resources will then automatically be renamed using this value in order to
// make the deployment easier by not requiring special filenames
// resources' filenames should be prefixed with this value (example: linuxdeploy_48x48.png)
void setAppName(const std::string& appName);
// list all executables in <AppDir>/usr/bin
// this function does not perform a recursive search, but only searches the bin directory
std::vector<boost::filesystem::path> listExecutables();

View File

@ -796,10 +796,6 @@ namespace linuxdeploy {
return d->deployFile(from, to, true);
}
void AppDir::setAppName(const std::string& appName) {
d->appName = appName;
}
std::vector<bf::path> AppDir::listExecutables() {
std::vector<bf::path> executables;

View File

@ -30,7 +30,7 @@ int main(int argc, char** argv) {
args::Flag initAppDir(parser, "", "Create basic AppDir structure", {"init-appdir"});
args::ValueFlag<std::string> appDirPath(parser, "appdir", "Path to target AppDir", {"appdir"});
args::ValueFlag<std::string> appName(parser, "app-name", "Application name (used to initialize desktop file and name icons etc.)", {'n', "app-name"});
args::ValueFlag<std::string> appName(parser, "app-name", "deprecated, please don't use it any more", {'n', "app-name"});
args::ValueFlagList<std::string> sharedLibraryPaths(parser, "library", "Shared library to deploy", {'l', "library"});
@ -91,8 +91,7 @@ int main(int argc, char** argv) {
appdir::AppDir appDir(appDirPath.Get());
if (appName) {
ldLog() << std::endl << "-- Deploying application \"" << LD_NO_SPACE << appName.Get() << LD_NO_SPACE << "\" --" << std::endl;
appDir.setAppName(appName.Get());
ldLog() << LD_WARNING << std::endl << "--app-name parameter is deprecated, please don't use it any more" << std::endl;
}
// initialize AppDir with common directories on request