Permalink
Browse files

Added 'make installer' extra target.

  • Loading branch information...
1 parent 4f2eab5 commit 8adc2c4d219b7be40d256e22b1b92bdc35a7e451 @till213 till213 committed Jan 13, 2011
Showing with 110 additions and 101 deletions.
  1. +3 −1 Distribution.pri
  2. +14 −2 Distribution_Mac.pri
  3. +39 −14 Distribution_Windows.pri
  4. +22 −65 Installer/Windows/GPL3.rtf
  5. +12 −0 Installer/Windows/README.txt
  6. +20 −19 Installer/Windows/Screenie.wxs
View
@@ -8,4 +8,6 @@ win32 {
distribution.depends = all
-QMAKE_EXTRA_TARGETS += distribution
+installer.depends = distribution
+
+QMAKE_EXTRA_TARGETS += distribution installer
View
@@ -2,15 +2,19 @@
CONFIG(debug, debug|release) {
APP_BUNDLE = bin/debug/$${APP_NAME}.app
- message(Distributing $$APP_NAME in debug mode)
+ message(Distributing $$APP_NAME in DEBUG mode)
} else {
APP_BUNDLE = bin/release/$${APP_NAME}.app
- message(Distributing $$APP_NAME in release mode)
+ message(Distributing $$APP_NAME in RELEASE mode)
}
DIST_APP_BUNDLE = dist/$${APP_NAME}.app
FRAMEWORKS_DIR = $${DIST_APP_BUNDLE}/Contents/Frameworks
QT_PLUGINS_DIR = $${DIST_APP_BUNDLE}/Contents/PlugIns
+#
+# Distribution
+#
+
distribution.commands += @echo Making dist on Mac;
# Remove previous bundle
@@ -23,6 +27,8 @@ distribution.commands += cp -R ./$$APP_BUNDLE ./$$DIST_APP_BUNDLE;
distribution.commands += test -d $$FRAMEWORKS_DIR/QtCore.framework || mkdir $$FRAMEWORKS_DIR/QtCore.framework;
distribution.commands += test -d $$FRAMEWORKS_DIR/QtCore.framework/Versions || mkdir $$FRAMEWORKS_DIR/QtCore.framework/Versions;
distribution.commands += test -d $$FRAMEWORKS_DIR/QtCore.framework/Versions/4 || mkdir $$FRAMEWORKS_DIR/QtCore.framework/Versions/4;
+
+# TODO: Use $$[QT_INSTALL_BINS] etc. instead!
distribution.commands += cp /Library/Frameworks/QtCore.framework/QtCore $$FRAMEWORKS_DIR/QtCore.framework/Versions/4;
distribution.commands += install_name_tool -id @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore $$DIST_APP_BUNDLE/Contents/Frameworks/QtCore.framework/Versions/4/QtCore;
@@ -131,6 +137,12 @@ distribution.commands += lipo -remove i386 $$QT_PLUGINS_DIR/imageformats/libqjpe
distribution.commands += lipo -remove i386 $$QT_PLUGINS_DIR/imageformats/libqtiff.dylib -output $$QT_PLUGINS_DIR/imageformats/libqtiff.dylib;
distribution.commands += lipo -remove i386 $$QT_PLUGINS_DIR/imageformats/libqgif.dylib -output $$QT_PLUGINS_DIR/imageformats/libqgif.dylib;
+#
+# Installer
+#
+
+# TODO: Create compressed DMG disk image with some fancy background image ;)
+installer.commands =
View
@@ -1,5 +1,10 @@
#include(Common.pri)
+QT_BIN_DIR = $$[QT_INSTALL_BINS]
+QT_BIN_DIR = $$replace(QT_BIN_DIR, /, \\)
+QT_PLUGINS_DIR = $$[QT_INSTALL_PLUGINS]
+QT_PLUGINS_DIR = $$replace(QT_PLUGINS_DIR, /, \\)
+
CONFIG(debug, debug|release) {
BIN_DIR = bin\\debug
DIST_DIR = dist
@@ -8,7 +13,7 @@ CONFIG(debug, debug|release) {
QT_IMAGE_JPEG = qjpegd4.dll
QT_IMAGE_TIFF = qtiffd4.dll
QT_IMAGE_GIF = qgifd4.dll
- message(Distributing $${APP_NAME} together with $$(QTDIR) in debug mode)
+ message(Distribution: DEBUG $${APP_NAME} with $${QT_BIN_DIR} and $${QT_PLUGINS_DIR})
} else {
BIN_DIR = bin\\release
DIST_DIR = dist
@@ -17,28 +22,48 @@ CONFIG(debug, debug|release) {
QT_IMAGE_JPEG = qjpeg4.dll
QT_IMAGE_TIFF = qtiff4.dll
QT_IMAGE_GIF = qgif4.dll
- message(Distributing $${APP_NAME} together with $$(QTDIR) in release mode)
+ message(Distribution: RELEASE $${APP_NAME} with $${QT_BIN_DIR} and $${QT_PLUGINS_DIR})
}
+#
+# Distribution
+#
+
# Remove previous dist
-distribution.commands += rmdir /S /Q $${DIST_DIR} &
-distribution.commands += mkdir $${DIST_DIR} &&
+distribution.commands += rmdir /S /Q "$${DIST_DIR}" &
+distribution.commands += mkdir "$${DIST_DIR}" &&
# Copy application libraries from 'bin' to 'dist'
-distribution.commands += xcopy $${BIN_DIR}\\*$${VERSION_MAJ}.dll $${DIST_DIR} &&
+distribution.commands += xcopy "$${BIN_DIR}\\*$${VERSION_MAJ}.dll" "$${DIST_DIR}" &&
# Copy application binary from 'bin' to 'dist'
-distribution.commands += xcopy $${BIN_DIR}\\$${APP_NAME}.exe $${DIST_DIR} &&
+distribution.commands += xcopy "$${BIN_DIR}\\$${APP_NAME}.exe" "$${DIST_DIR}" &&
# Copy Qt libraries
-distribution.commands += xcopy $$(QTDIR)\\bin\\$${QT_CORE} $${DIST_DIR} &&
-distribution.commands += xcopy $$(QTDIR)\\bin\\$${QT_GUI} $${DIST_DIR} &&
-distribution.commands += xcopy $$(QTDIR)\\bin\\libgcc_s_dw2-1.dll $${DIST_DIR} &&
-distribution.commands += xcopy $$(QTDIR)\\bin\\mingwm10.dll $${DIST_DIR} &&
+distribution.commands += xcopy "$${QT_BIN_DIR}\\$${QT_CORE}" "$${DIST_DIR}" &&
+distribution.commands += xcopy "$${QT_BIN_DIR}\\$${QT_GUI}" "$${DIST_DIR}" &&
+distribution.commands += xcopy "$${QT_BIN_DIR}\\libgcc_s_dw2-1.dll" "$${DIST_DIR}" &&
+distribution.commands += xcopy "$${QT_BIN_DIR}\\mingwm10.dll" "$${DIST_DIR}" &&
# Copy Qt plugins
-distribution.commands += mkdir $${DIST_DIR}\\imageformats &&
-distribution.commands += xcopy $$(QTDIR)\\plugins\\imageformats\\$${QT_IMAGE_JPEG} $${DIST_DIR}\\imageformats &&
-distribution.commands += xcopy $$(QTDIR)\\plugins\\imageformats\\$${QT_IMAGE_TIFF} $${DIST_DIR}\\imageformats &&
-distribution.commands += xcopy $$(QTDIR)\\plugins\\imageformats\\$${QT_IMAGE_GIF} $${DIST_DIR}\\imageformats
+distribution.commands += mkdir "$${DIST_DIR}\\imageformats" &&
+distribution.commands += xcopy "$${QT_PLUGINS_DIR}\\imageformats\\$${QT_IMAGE_JPEG}" "$${DIST_DIR}\\imageformats" &&
+distribution.commands += xcopy "$${QT_PLUGINS_DIR}\\imageformats\\$${QT_IMAGE_TIFF}" "$${DIST_DIR}\\imageformats" &&
+distribution.commands += xcopy "$${QT_PLUGINS_DIR}\\imageformats\\$${QT_IMAGE_GIF}" "$${DIST_DIR}\\imageformats"
+
+#
+# Installer
+#
+
+# Make sure the WiX installer tools candle.exe and light.exe are in the PATH
+# e.g. set PATH="c:\Program Files\WixEdit\wix-3.0.5419.0";%PATH%
+# Attention: with the current version ming32-make crashes when the WiX tools
+# are APPENDED to the PATH. It seems to work when PREPENDING to the PATH!
+CONFIG(debug, debug|release) {
+ message("Installer: skipping this build step. Target 'Installer' can only be done in RELEASE mode.")
+} else {
+ installer.commands = candle.exe -nologo "Installer\\Windows\\Screenie.wxs" -out "Installer\\Windows\\Screenie.wixobj" -ext WixUIExtension &&
+ installer.commands += light.exe -nologo "Installer\\Windows\\Screenie.wixobj" -out "Installer\\Windows\\Screenie.msi" -ext WixUIExtension
+}
+
View
@@ -4,7 +4,7 @@
\fs20 A Fancy Screenshot Composer\par
\b0\par
Copyright (C) 2011\par
-Ariya Hidayat, Oliver Knoll\par
+Oliver Knoll\par
\par
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See below for a verbatim copy of this license.\par
\par
@@ -28,77 +28,34 @@ The GNU General Public License is a free, copyleft license forsoftware and other
\par
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.\par
\par
- Developers that use the GNU GPL protect your rights with two steps:\par
-(1) assert copyright on the software, and (2) offer you this License\par
-giving you legal permission to copy, distribute and/or modify it.\par
-\par
- For the developers' and authors' protection, the GPL clearly explains\par
-that there is no warranty for this free software. For both users' and\par
-authors' sake, the GPL requires that modified versions be marked as\par
-changed, so that their problems will not be attributed erroneously to\par
-authors of previous versions.\par
-\par
- Some devices are designed to deny users access to install or run\par
-modified versions of the software inside them, although the manufacturer\par
-can do so. This is fundamentally incompatible with the aim of\par
-protecting users' freedom to change the software. The systematic\par
-pattern of such abuse occurs in the area of products for individuals to\par
-use, which is precisely where it is most unacceptable. Therefore, we\par
-have designed this version of the GPL to prohibit the practice for those\par
-products. If such problems arise substantially in other domains, we\par
-stand ready to extend this provision to those domains in future versions\par
-of the GPL, as needed to protect the freedom of users.\par
-\par
- Finally, every program is threatened constantly by software patents.\par
-States should not allow patents to restrict development and use of\par
-software on general-purpose computers, but in those that do, we wish to\par
-avoid the special danger that patents applied to a free program could\par
-make it effectively proprietary. To prevent this, the GPL assures that\par
-patents cannot be used to render the program non-free.\par
-\par
- The precise terms and conditions for copying, distribution and\par
-modification follow.\par
+ Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
\par
+ For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.\par
+\par
+ Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.\par
+\par
+ Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.\par
+\par
+ The precise terms and conditions for copying, distribution and modification follow.\par
\b TERMS AND CONDITIONS\b0\par
\par
0. Definitions.\par
\par
"This License" refers to version 3 of the GNU General Public License.\par
\par
- "Copyright" also means copyright-like laws that apply to other kinds of\par
-works, such as semiconductor masks.\par
-\par
- "The Program" refers to any copyrightable work licensed under this\par
-License. Each licensee is addressed as "you". "Licensees" and\par
-"recipients" may be individuals or organizations.\par
-\par
- To "modify" a work means to copy from or adapt all or part of the work\par
-in a fashion requiring copyright permission, other than the making of an\par
-exact copy. The resulting work is called a "modified version" of the\par
-earlier work or a work "based on" the earlier work.\par
-\par
- A "covered work" means either the unmodified Program or a work based\par
-on the Program.\par
-\par
- To "propagate" a work means to do anything with it that, without\par
-permission, would make you directly or secondarily liable for\par
-infringement under applicable copyright law, except executing it on a\par
-computer or modifying a private copy. Propagation includes copying,\par
-distribution (with or without modification), making available to the\par
-public, and in some countries other activities as well.\par
-\par
- To "convey" a work means any kind of propagation that enables other\par
-parties to make or receive copies. Mere interaction with a user through\par
-a computer network, with no transfer of a copy, is not conveying.\par
-\par
- An interactive user interface displays "Appropriate Legal Notices"\par
-to the extent that it includes a convenient and prominently visible\par
-feature that (1) displays an appropriate copyright notice, and (2)\par
-tells the user that there is no warranty for the work (except to the\par
-extent that warranties are provided), that licensees may convey the\par
-work under this License, and how to view a copy of this License. If\par
-the interface presents a list of user commands or options, such as a\par
-menu, a prominent item in the list meets this criterion.\par
+ "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.\par
+\par
+ "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations.\par
+\par
+ To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.\par
+\par
+ A "covered work" means either the unmodified Program or a work based on the Program.\par
+\par
+ To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.\par
+\par
+ To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.\par
+\par
+ An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.\par
\par
1. Source Code.\par
\par
@@ -28,6 +28,18 @@ Installer Creation
Alternatively use the WiX tools "candle.exe" and "light.exe" directly.
+License Text
+------------
+
+The license text is taken from a given *.rtf Rich Text Format document,
+in this case the GPL3.rtf.
+
+DON'T edit this file with MS Word, as this adds more data than necessary
+to the document and WiX installer has trouble displaying that document
+(the license screen remains blank, unless a button is clicked or so).
+
+Only use WordPad (possibly other RTF editors - OpenOffice might be fine, too).
+
Links
-----
Oops, something went wrong.

0 comments on commit 8adc2c4

Please sign in to comment.