Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
probonopd authored Jun 1, 2017
2 parents 01056fa + 57e68b6 commit bd30e0e
Show file tree
Hide file tree
Showing 7 changed files with 300 additions and 34 deletions.
18 changes: 0 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,3 @@ branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous)$/

notifications:
irc:
channels:
- "chat.freenode.net#AppImage"
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: always # options: [always|never|change] default: always
template:
- "%{repository} build %{build_number}: %{result} %{build_url}"
use_notice: true
# skip_join: true
webhooks:
urls:
- https://webhooks.gitter.im/e/4bf20518805a55998cc2
on_success: always # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: always # options: [always|never|change] default: always
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Options:
-executable=<path> : Let the given executable use the deployed libraries too
-qmldir=<path> : Scan for QML imports in the given path
-always-overwrite : Copy files even if the target file exists
-no-translations : Skip deployment of translations
linuxdeployqt takes an application as input and makes it
self-contained by copying in the Qt libraries and plugins that
Expand All @@ -77,7 +78,7 @@ install:
script:
- qmake PREFIX=/usr
- make -j4
- make -j$(nproc)
- make INSTALL_ROOT=appdir install ; find appdir/
after_success:
Expand Down Expand Up @@ -105,14 +106,15 @@ __CMake__ wants `DESTDIR` instead:

```
- cmake . -DCMAKE_INSTALL_PREFIX=/usr
- make -j$(nproc)
- make DESTDIR=appdir install ; find appdir/
```

__autotools__ (the dinosaur that spends precious minutes "checking...") wants `DESTDIR` too but insists on an absolute link which we can feed it using readlink:

```
- ./configure --prefix=/usr
- make -j4
- make -j$(nproc)
- make install DESTDIR=$(readlink -f appdir) ; find appdir/
```

Expand All @@ -136,7 +138,7 @@ This PR, when merged, will compile this application on [Travis CI](https://travi
For this to work, you need to enable Travis CI for your repository as [described here](https://travis-ci.org/getting_started) __prior to merging this__, if you haven't already done so.
Providing an [AppImage](http://appimage.org/) would have, among others, these advantages:
- Works for most Linux distributions (including Ubuntu, Fedora, openSUSE, CentOS, elementaryOS, Linux Mint, and others)
- Applications packaged as an AppImage can run on many distributions (including Ubuntu, Fedora, openSUSE, CentOS, elementaryOS, Linux Mint, and others)
- One app = one file = super simple for users: just download one AppImage file, [make it executable](http://discourse.appimage.org/t/how-to-make-an-appimage-executable/80), and run
- No unpacking or installation necessary
- No root needed
Expand Down
12 changes: 12 additions & 0 deletions linuxdeployqt/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ int main(int argc, char **argv)
qDebug() << " -qmldir=<path> : Scan for QML imports in the given path";
qDebug() << " -always-overwrite : Copy files even if the target file exists";
qDebug() << " -qmake=<path> : The qmake executable to use";
qDebug() << " -no-translations : Skip deployment of translations.";
qDebug() << "";
qDebug() << "linuxdeployqt takes an application as input and makes it";
qDebug() << "self-contained by copying in the Qt libraries and plugins that";
Expand Down Expand Up @@ -170,6 +171,7 @@ int main(int argc, char **argv)
extern QStringList librarySearchPath;
QStringList additionalExecutables;
bool qmldirArgumentUsed = false;
bool skipTranslations = false;
QStringList qmlDirs;
QString qmakeExecutable;

Expand Down Expand Up @@ -365,6 +367,9 @@ int main(int argc, char **argv)
LogDebug() << "Argument found:" << argument;
int index = argument.indexOf("=");
qmakeExecutable = argument.mid(index+1);
} else if (argument == QByteArray("-no-translations")) {
LogDebug() << "Argument found:" << argument;
skipTranslations = true;
} else if (argument.startsWith("-")) {
LogError() << "Unknown argument" << argument << "\n";
return 1;
Expand Down Expand Up @@ -399,6 +404,9 @@ int main(int argc, char **argv)
deploymentInfo.deployedLibraries = deploymentInfo.deployedLibraries.toSet().toList();
}

deploymentInfo.usedModulesMask = 0;
findUsedModules(deploymentInfo);

if (plugins && !deploymentInfo.qtPath.isEmpty()) {
if (deploymentInfo.pluginPath.isEmpty())
deploymentInfo.pluginPath = QDir::cleanPath(deploymentInfo.qtPath + "/../plugins");
Expand All @@ -409,6 +417,10 @@ int main(int argc, char **argv)
if (runStripEnabled)
stripAppBinary(appDirPath);

if (!skipTranslations) {
deployTranslations(appDirPath, deploymentInfo.usedModulesMask);
}

if (appimage) {
int result = createAppImage(appDirPath);
LogDebug() << "result:" << result;
Expand Down
Loading

0 comments on commit bd30e0e

Please sign in to comment.