Commit graph

46 commits

Author SHA1 Message Date
Dirk Hohndel
0e0d6135af Don't install Windows 64bit binaries on 32bit system
Also warn people installing 32bit binaries on a 64bit system

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-29 13:01:19 -07:00
Dirk Hohndel
6c15647858 Allow cross-building 64 bit binaries for Windows
This also makes sure that we package the Qt5 translations, not the Qt4
translations.

There was an odd issue that somehow a 32bit search path ended up being
used by win-dll which resulted in the wrong DLLs being packaged.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-02 15:08:22 -07:00
Venkatesh Shukla
6e10615666 Template for subsurface android package
For modifications to the final source code of built android package
such as permission additions and inclusion of xml and java files, it
is necessary to maintain a template. The template is copied without
any modifications on top of qt android-template before building
subsurface libraries. Refer:
http://qt-project.org/doc/qt-5/deployment-android.html#qmake-variables

Files that are required to be directly copied to android package
would be included in directory android.
Icons for subsurface on android and string.xml are included.

Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in>
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-25 13:50:21 +08:00
Dirk Hohndel
bded22f2f6 HTML export: fix packaging of theme dir
I was confused by the function name getSubsurfaceDataPath() - it does not
find paths relative to the "data" folder, if finds the path where we might
install folders like "data", "translations", or "theme".
"data" is for some reason where we install the "marbledata" files.
Therefore on both Mac and Windows we need to put the "theme" directory
next to the "data" directory, not below it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08 07:54:11 -07:00
Dirk Hohndel
cc22a98766 Install HTML export theme files on Windows and Mac
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-05 16:26:35 -07:00
Gehad elrobey
99d886f57f Update install script: copy HTML theme directory to usr/share
Updating the qmake file to check and copy the theme directory under
usr/share. THIS needs to work on windows and mac.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-03 21:08:48 -07:00
Dirk Hohndel
d461780369 Windows out of tree cross build: stage package in correct folder
When doing an out of tree build you don't want to stage the package with
the source but under your current directory. So let's make sure we
distinguish between source and target here... and instead of putting
things into packaging/windows they now end up in staging which is much
more consistent. And to make my life even easier, the installer .exe ends
up in the base dir in which you build the package.

Also, we link statically against libdivecomputer, so don't pack the dll.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-21 12:16:56 -07:00
Anton Lundin
df12944c93 Introduce android specific file
This contains a first stab at Subsurface platform interfacing code for
Android, and surrounding parts.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-27 10:40:43 -07:00
Thiago Macieira
775b4f702a Remove the hack to create most Makefile variables on Unix
I've just discovered, quite by accident, a new undocumented feature of
qmake: it can write Makefile variables. So let's use this feature
where we can instead of our hack.  The only thing is that it prepends
an "EXPORT_" prefix, so we can't use it for a variable like $(prefix)
that Linux distributions are expected to try to modify during make
install.

I've verified that the feature remains in Qt 5.x.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-28 15:39:15 -08:00
Thiago Macieira
b08b9183bc Fix creating the list of Qt translation files under Qt5
We were apparently exploiting a bug in qmake for Qt 4. The $$join
function in Qt 5 is fixed: it returns a single string, not a list with
multiple elements.

Instead, we just iterate over the element list.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-22 07:59:19 -08:00
Miika Turkia
55da333881 Install Subsurface icon
We want to install the Subsurface icon so it can be used e.g. in menus.
(Commit ee5d8e3c moved the icons to resources, but the application icon
is special case, that should be installed globally.)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-27 10:55:40 -08:00
Dirk Hohndel
1e443eb78b Fix broken Linux install
In commit ca8aee4701 ("Move the XSLT files into a Qt resource") we
removed a line from the .pri file without removing the trailing '\' from
the previous line which caused the following line to be consumed by the
assignment - and the dummy target not being added to the EXTRA_TARGETS...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-17 10:13:04 -08:00
Thiago Macieira
ca8aee4701 Move the XSLT files into a Qt resource
This means we no longer need to keep them on disk and worry about
installing / uninstalling them. They will always be kept in-memory
(compressed).

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-16 16:20:52 -08:00
Dirk Hohndel
79b8e558cd Fix install directory for Documentation on Mac
Can't believe I didn't catch that when I did the equivalent fix for Linux a
couple of days ago...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-15 09:45:30 -08:00
Dirk Hohndel
27a0f91cff Correct install path for Documentation under Linux
One could argue that /usr/share/doc/subsurface is indeed correct, but we
look for the user-manual.html in /usr/share/subsurface/Documentation

Fixes #363

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-13 22:27:01 -08:00
Thiago Macieira
ee5d8e3cfc Don't install the actual icon files
They are loaded into a Qt resource and always accessed via it.

[Dirk Hohndel: had to hand edit / apply the changes to the .pri file]

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12 08:00:41 +01:00
Martin Gysel
26dab9b5ce correctly install translations after a clean checkout
Signed-off-by: Martin Gysel <me@bearsh.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07 07:27:32 -08:00
Dirk Hohndel
9cb9dba7b6 Fix the Windwos installer
Install the Documentation and include it in the installer.
Try and get all the directories and files removed in the uninstaller.
Where the heck does 'oldshare' come from?

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 21:46:15 -08:00
Thiago Macieira
69826a6c2f Install Qt and Subsurface translations for Windows
Dirk had done most of the work already. I just needed to add some
trickery to install the system translations in case cross-mingw32
didn't provide it.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 20:09:24 -08:00
Thiago Macieira
dbab619489 Install Subsurface translation files on Linux
This was the easiest: all the file names are already in a variable and
we don't need to install the Qt translations since we're using a system
Qt.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 20:09:24 -08:00
Thiago Macieira
51f66a2d15 Fix typo introduced accidentally: marbledir has no h
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 20:09:24 -08:00
Thiago Macieira
7881fb7edc Avoid copying the icons, xslt and other dirs into themselves.
The install rule that qmake generates was of the form:
  -$(INSTALL_DIR) icons packaging/windows/icons

The first time you run make install, packaging/windows/icons doesn't
exist, so /usr/bin/install understands it as the name to be given to the
dir being installed. However, when you run make install a second time,
/usr/bin/install understands it as the target directory, so it copies
icons into the packaging/windows/icons dir.

We need to teach qmake not to add the dir name. Inspecting the source
code reveals:
    if(fi.isDir() && project->isActiveConfig("copy_dir_files")) {
        if(!dst_file.endsWith(Option::dir_sep))
            dst_file += Option::dir_sep;
        dst_file += fi.fileName();
    }

This option is enabled by default on all the win32-* targets.

So if we remove the "copy_dir_files" config, it won't append the source
name. The qmake manual says this about that option: "Enables the install
rule to also copy directories, not just files.", which doesn't help us
much. Probably just stale documentation.

Fixes #325

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 20:09:24 -08:00
Lubomir I. Ivanov
1f7f5e18e2 qmake: use real tabs for all .pri files
subsurface.pro already useses that.

For consistency with the app, we use swap 4 spaces with
a tab character for indentation.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03 13:03:46 -08:00
Lubomir I. Ivanov
8003377622 qmake: Fix unescaped backslashes issues
We need to espace the backslash with '\\' on win32.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-03 13:03:09 -08:00
Dirk Hohndel
d936c55a01 Make sure Subsurface will find Marble theme when installed on Linux
We need the marble data to go into a subdirectory of /usr/share/subsurface
and we need to search for both data and marbledata when trying to find the
theme.

Fixes #310

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 11:46:41 -08:00
Thiago Macieira
1080e5ca35 Fix plugin deployment on Windows
And increase our list of plugins to be deployed to include the GIF and
SVG image plugins, the SVG icon engine and the CJK text codecs.

The install rules now iterate over the plugin list and deploy the
plugins in the right path in the staging area. The plugins must also
be scanned for dependencies (Fedora's qjpeg4.dll depends on
libjpeg-62.dll, which neds to be copied to the staging area).

Finally, fix qt.conf needed to be fixed.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 17:55:24 -08:00
Thiago Macieira
586437df89 Fix "make install" on Windows with srcdir != builddir
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 17:51:38 -08:00
Dirk Hohndel
06bf0e1849 Include icons in the Windows installer
Also fix the dependency / ordering issue with running makensis

Fixes #252

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15 15:02:45 -08:00
Thiago Macieira
e2a4da767d Make qmake generate the install rule for user-manual.html
The default behaviour is to skip files that don't exist. It does that
to decide whether to create an $(INSTALL_FILE) rule or an
$(INSTALL_DIR) one. We need to add a setting so that it will ignore
the not-found error.

Found in Qt 4's own doc/doc.pri:
  # Install rules
  htmldocs.files = $$QT_BUILD_TREE/doc/html
  htmldocs.path = $$[QT_INSTALL_DOCS]
  htmldocs.CONFIG += no_check_exist directory

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15 09:06:31 +09:00
Dirk Hohndel
9383693928 Create installer with qmake
This is seriously flawed. makensis is run twice for some reason. I also
noticed that the data and xslt directories under packaging/windows aren't
created when running make install. Running
	make -f Makefile.Release install_marbledir install_deploy
works, but obviously this should be taken care of by the dependency.

The installed binary under Windows is not finding its icon, the
translations are missing... lots of work left to do here.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-05 13:05:14 +09:00
Dirk Hohndel
9dbf5a6daa Use full version for Mac dmg file
Only tagged releases should get the short version number.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-14 22:39:29 -07:00
Lubomir I. Ivanov
d23266ad51 subsurface-install.pri: attempt to fix the perl command line
\$^ or $(DESTDIR_TARGET) do not expand for some reason,
but also we cannot use $$DESTDIR, $$TARGET, or $$DESTDIR_TARGET
because these are empty. So what we use is a hardcoded path
(debug/release) and a target with an .exe suffix on win32.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-13 11:31:14 -07:00
Dirk Hohndel
d031b54d16 Install qt translations into Mac bundle
This is much harder than it should be...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11 13:51:03 -07:00
Thiago Macieira
fa532f0f28 Fix deployment: make isn't expanding $(DESTDIR_TARGET) for me
I don't know why. Working around the issue by using $^ (all
dependencies) and listing the files to be processed as dependencies for
the rule.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11 12:05:22 -07:00
Thiago Macieira
c684df4976 Fix the sed regexp: we want to match "lib" followed by : or at the end
There was one extra backslash that got passed to sed, which meant it
matched a literal dollar sign.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11 12:05:07 -07:00
Thiago Macieira
d3aceafdaa Fix non-expansion of some Makefile variables
Apparently SED isn't set on Windows-native Makefiles. And for some
reason, $(CC) wasn't getting expanded properly -- it expanded to "cc",
even though it is set at the beginning of the Makefile to "gcc".

Reported-by: Lubomir I. Ivanov
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11 12:04:40 -07:00
Dirk Hohndel
2e2212da5f Fix translation compilation
Now the Makefile should automatically detect when it needs to create a specific
.qm file and do the right thing to create it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-11 09:25:46 -07:00
Dirk Hohndel
e3e47b34a1 Automatically build translations
This runs lrelease against the .ts files and automatically recreates the .qm
files if any of the .ts files changes.

This also moves the .ts files into the translations directory.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10 14:52:56 -07:00
Dirk Hohndel
3b691d5d6e Fix some paths for Mac and add translations to bundle
'share' is under Subsurface.app - you don't need a 'subsurface' directory
under 'share'.

This also installs the processed translations.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-10 12:42:37 -07:00
Dirk Hohndel
58db3e363a Correct Mac bundle path
Should be /Applications (plural)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-09 13:42:37 -07:00
Thiago Macieira
6c90fa7c64 Fix the Marble data installation for Windows
Qt-only Marble expects the data to be on applicationDirPath() + "/data".

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-10-08 23:29:44 -07:00
Thiago Macieira
603d65c961 Deploy some Qt plugins alongside the binary
Only implemented for Windows for now. On Mac, macdeployqt copies all
imageformat plugins on its own.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-10-08 23:29:44 -07:00
Thiago Macieira
245e29a72e Use the $PATH environment variable to pass extra dirs for DLLs
Unix developers, look away... this is how it's done on Windows: the
binary loader searches $PATH for the DLLs, so let's reuse the same
variable. This simplifies the command-line a little.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-10-08 23:29:43 -07:00
Thiago Macieira
9294d5984c Disable the code that tries to find an alternate objdump
On Linux distros, it seems, objdump is configured to read Windows
executables (BFD architecture "pei-i386"), so we don't need to find an
alternate / cross-compile version. But leave the code here in case we
run into a distro that does things differently.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-10-08 23:29:43 -07:00
Thiago Macieira
2fedb100ca Add a tool to scan for dependencies on Windows
Similar to ldd on Linux.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-10-08 23:29:43 -07:00
Thiago Macieira
9e069371c6 Add qmake rules to install Subsurface
This is probably the most complex part of the new buildsystem. This
adds the following targets:

 - Linux:
   make install - installs to $(prefix) (default: /usr)
   The install path can be changed during make install time.

 - Windows:
   make install - installs Subsurface and its dependencies to
                  packaging/windows.

 - Mac:
   make mac-deploy     - populates Subsurface.app with the dependencies
   make install        - mac-deploy + install Subsurface.app to /Application
   make mac-create-dmg - mac-deploy + creates Subsurface-$VERSION.dmg

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-10-08 23:29:43 -07:00