Skip to content

Commit bd30e0e

Browse files
authored
Merge branch 'master' into master
2 parents 01056fa + 57e68b6 commit bd30e0e

File tree

7 files changed

+300
-34
lines changed

7 files changed

+300
-34
lines changed

.travis.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,3 @@ branches:
2525
except:
2626
- # Do not build tags that we create when we upload to GitHub Releases
2727
- /^(?i:continuous)$/
28-
29-
notifications:
30-
irc:
31-
channels:
32-
- "chat.freenode.net#AppImage"
33-
on_success: always # options: [always|never|change] default: always
34-
on_failure: always # options: [always|never|change] default: always
35-
on_start: always # options: [always|never|change] default: always
36-
template:
37-
- "%{repository} build %{build_number}: %{result} %{build_url}"
38-
use_notice: true
39-
# skip_join: true
40-
webhooks:
41-
urls:
42-
- https://webhooks.gitter.im/e/4bf20518805a55998cc2
43-
on_success: always # options: [always|never|change] default: always
44-
on_failure: always # options: [always|never|change] default: always
45-
on_start: always # options: [always|never|change] default: always

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Options:
5151
-executable=<path> : Let the given executable use the deployed libraries too
5252
-qmldir=<path> : Scan for QML imports in the given path
5353
-always-overwrite : Copy files even if the target file exists
54+
-no-translations : Skip deployment of translations
5455
5556
linuxdeployqt takes an application as input and makes it
5657
self-contained by copying in the Qt libraries and plugins that
@@ -77,7 +78,7 @@ install:
7778
7879
script:
7980
- qmake PREFIX=/usr
80-
- make -j4
81+
- make -j$(nproc)
8182
- make INSTALL_ROOT=appdir install ; find appdir/
8283
8384
after_success:
@@ -105,14 +106,15 @@ __CMake__ wants `DESTDIR` instead:
105106

106107
```
107108
- cmake . -DCMAKE_INSTALL_PREFIX=/usr
109+
- make -j$(nproc)
108110
- make DESTDIR=appdir install ; find appdir/
109111
```
110112

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

113115
```
114116
- ./configure --prefix=/usr
115-
- make -j4
117+
- make -j$(nproc)
116118
- make install DESTDIR=$(readlink -f appdir) ; find appdir/
117119
```
118120

@@ -136,7 +138,7 @@ This PR, when merged, will compile this application on [Travis CI](https://travi
136138
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.
137139
138140
Providing an [AppImage](http://appimage.org/) would have, among others, these advantages:
139-
- Works for most Linux distributions (including Ubuntu, Fedora, openSUSE, CentOS, elementaryOS, Linux Mint, and others)
141+
- Applications packaged as an AppImage can run on many distributions (including Ubuntu, Fedora, openSUSE, CentOS, elementaryOS, Linux Mint, and others)
140142
- 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
141143
- No unpacking or installation necessary
142144
- No root needed

linuxdeployqt/main.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ int main(int argc, char **argv)
5656
qDebug() << " -qmldir=<path> : Scan for QML imports in the given path";
5757
qDebug() << " -always-overwrite : Copy files even if the target file exists";
5858
qDebug() << " -qmake=<path> : The qmake executable to use";
59+
qDebug() << " -no-translations : Skip deployment of translations.";
5960
qDebug() << "";
6061
qDebug() << "linuxdeployqt takes an application as input and makes it";
6162
qDebug() << "self-contained by copying in the Qt libraries and plugins that";
@@ -170,6 +171,7 @@ int main(int argc, char **argv)
170171
extern QStringList librarySearchPath;
171172
QStringList additionalExecutables;
172173
bool qmldirArgumentUsed = false;
174+
bool skipTranslations = false;
173175
QStringList qmlDirs;
174176
QString qmakeExecutable;
175177

@@ -365,6 +367,9 @@ int main(int argc, char **argv)
365367
LogDebug() << "Argument found:" << argument;
366368
int index = argument.indexOf("=");
367369
qmakeExecutable = argument.mid(index+1);
370+
} else if (argument == QByteArray("-no-translations")) {
371+
LogDebug() << "Argument found:" << argument;
372+
skipTranslations = true;
368373
} else if (argument.startsWith("-")) {
369374
LogError() << "Unknown argument" << argument << "\n";
370375
return 1;
@@ -399,6 +404,9 @@ int main(int argc, char **argv)
399404
deploymentInfo.deployedLibraries = deploymentInfo.deployedLibraries.toSet().toList();
400405
}
401406

407+
deploymentInfo.usedModulesMask = 0;
408+
findUsedModules(deploymentInfo);
409+
402410
if (plugins && !deploymentInfo.qtPath.isEmpty()) {
403411
if (deploymentInfo.pluginPath.isEmpty())
404412
deploymentInfo.pluginPath = QDir::cleanPath(deploymentInfo.qtPath + "/../plugins");
@@ -409,6 +417,10 @@ int main(int argc, char **argv)
409417
if (runStripEnabled)
410418
stripAppBinary(appDirPath);
411419

420+
if (!skipTranslations) {
421+
deployTranslations(appDirPath, deploymentInfo.usedModulesMask);
422+
}
423+
412424
if (appimage) {
413425
int result = createAppImage(appDirPath);
414426
LogDebug() << "result:" << result;

0 commit comments

Comments
 (0)