Commit 3f183b7e authored by Daniel Teske's avatar Daniel Teske
Browse files

Purge deployment.pri



It was only used by the plain C and plain C++ templates. Given how ugly
and unmaintained deployment.pri is that is probably not a smart choice.

Change-Id: Idfdd4ec2b8e353d39505b603c3f4ca92bb34efcf
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@theqtcompany.com>
parent e6881bd6
# This file was generated by an application wizard of Qt Creator.
# The code below handles deployment to Android and Maemo, aswell as copying
# of the application data to shadow build directories on desktop.
# It is recommended not to modify this file, since newer versions of Qt Creator
# may offer an updated version of it.
defineTest(qtcAddDeployment) {
for(deploymentfolder, DEPLOYMENTFOLDERS) {
item = item$${deploymentfolder}
greaterThan(QT_MAJOR_VERSION, 4) {
itemsources = $${item}.files
} else {
itemsources = $${item}.sources
}
$$itemsources = $$eval($${deploymentfolder}.source)
itempath = $${item}.path
$$itempath= $$eval($${deploymentfolder}.target)
export($$itemsources)
export($$itempath)
DEPLOYMENT += $$item
}
MAINPROFILEPWD = $$PWD
android-no-sdk {
for(deploymentfolder, DEPLOYMENTFOLDERS) {
item = item$${deploymentfolder}
itemfiles = $${item}.files
$$itemfiles = $$eval($${deploymentfolder}.source)
itempath = $${item}.path
$$itempath = /data/user/qt/$$eval($${deploymentfolder}.target)
export($$itemfiles)
export($$itempath)
INSTALLS += $$item
}
target.path = /data/user/qt
export(target.path)
INSTALLS += target
} else:android {
for(deploymentfolder, DEPLOYMENTFOLDERS) {
item = item$${deploymentfolder}
itemfiles = $${item}.files
$$itemfiles = $$eval($${deploymentfolder}.source)
itempath = $${item}.path
$$itempath = /assets/$$eval($${deploymentfolder}.target)
export($$itemfiles)
export($$itempath)
INSTALLS += $$item
}
x86 {
target.path = /libs/x86
} else: armeabi-v7a {
target.path = /libs/armeabi-v7a
} else {
target.path = /libs/armeabi
}
export(target.path)
INSTALLS += target
} else:win32 {
copyCommand =
for(deploymentfolder, DEPLOYMENTFOLDERS) {
source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
source = $$replace(source, /, \\)
sourcePathSegments = $$split(source, \\)
target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
target = $$replace(target, /, \\)
target ~= s,\\\\\\.?\\\\,\\,
!isEqual(source,$$target) {
!isEmpty(copyCommand):copyCommand += &&
isEqual(QMAKE_DIR_SEP, \\) {
copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
} else {
source = $$replace(source, \\\\, /)
target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
target = $$replace(target, \\\\, /)
copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
}
}
}
!isEmpty(copyCommand) {
copyCommand = @echo Copying application data... && $$copyCommand
copydeploymentfolders.commands = $$copyCommand
first.depends = $(first) copydeploymentfolders
export(first.depends)
export(copydeploymentfolders.commands)
QMAKE_EXTRA_TARGETS += first copydeploymentfolders
}
} else:ios {
copyCommand =
for(deploymentfolder, DEPLOYMENTFOLDERS) {
source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
source = $$replace(source, \\\\, /)
target = $CODESIGNING_FOLDER_PATH/$$eval($${deploymentfolder}.target)
target = $$replace(target, \\\\, /)
sourcePathSegments = $$split(source, /)
targetFullPath = $$target/$$last(sourcePathSegments)
targetFullPath ~= s,/\\.?/,/,
!isEqual(source,$$targetFullPath) {
!isEmpty(copyCommand):copyCommand += &&
copyCommand += mkdir -p \"$$target\"
copyCommand += && cp -r \"$$source\" \"$$target\"
}
}
!isEmpty(copyCommand) {
copyCommand = echo Copying application data... && $$copyCommand
!isEmpty(QMAKE_POST_LINK): QMAKE_POST_LINK += ";"
QMAKE_POST_LINK += "$$copyCommand"
export(QMAKE_POST_LINK)
}
} else:unix {
maemo5 {
desktopfile.files = $${TARGET}.desktop
desktopfile.path = /usr/share/applications/hildon
icon.files = $${TARGET}64.png
icon.path = /usr/share/icons/hicolor/64x64/apps
} else:!isEmpty(MEEGO_VERSION_MAJOR) {
desktopfile.files = $${TARGET}_harmattan.desktop
desktopfile.path = /usr/share/applications
icon.files = $${TARGET}80.png
icon.path = /usr/share/icons/hicolor/80x80/apps
} else { # Assumed to be a Desktop Unix
copyCommand =
for(deploymentfolder, DEPLOYMENTFOLDERS) {
source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
source = $$replace(source, \\\\, /)
macx {
target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
} else {
target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
}
target = $$replace(target, \\\\, /)
sourcePathSegments = $$split(source, /)
targetFullPath = $$target/$$last(sourcePathSegments)
targetFullPath ~= s,/\\.?/,/,
!isEqual(source,$$targetFullPath) {
!isEmpty(copyCommand):copyCommand += &&
copyCommand += $(MKDIR) \"$$target\"
copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
}
}
!isEmpty(copyCommand) {
copyCommand = @echo Copying application data... && $$copyCommand
copydeploymentfolders.commands = $$copyCommand
first.depends = $(first) copydeploymentfolders
export(first.depends)
export(copydeploymentfolders.commands)
QMAKE_EXTRA_TARGETS += first copydeploymentfolders
}
}
!isEmpty(target.path) {
installPrefix = $${target.path}
} else {
installPrefix = /opt/$${TARGET}
}
for(deploymentfolder, DEPLOYMENTFOLDERS) {
item = item$${deploymentfolder}
itemfiles = $${item}.files
$$itemfiles = $$eval($${deploymentfolder}.source)
itempath = $${item}.path
$$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
export($$itemfiles)
export($$itempath)
INSTALLS += $$item
}
!isEmpty(desktopfile.path) {
export(icon.files)
export(icon.path)
export(desktopfile.files)
export(desktopfile.path)
INSTALLS += icon desktopfile
}
isEmpty(target.path) {
target.path = $${installPrefix}/bin
export(target.path)
}
INSTALLS += target
}
export (ICON)
export (INSTALLS)
export (DEPLOYMENT)
export (LIBS)
export (QMAKE_EXTRA_TARGETS)
}
......@@ -4,6 +4,3 @@ CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.c
include(deployment.pri)
qtcAddDeployment()
......@@ -45,7 +45,6 @@ leave room for the Qt 4 target page.
<displaycategory>Non-Qt Project</displaycategory>
<files>
<file source="../common/main.c" target="main.c" openeditor="true"/>
<file source="../../../shared/deployment.pri" target="deployment.pri"/>
<file source="project.pro" target="%ProjectName%.pro" openproject="true"/>
</files>
</wizard>
......@@ -4,6 +4,3 @@ CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.%CppSourceSuffix%
include(deployment.pri)
qtcAddDeployment()
......@@ -45,7 +45,6 @@ leave room for the Qt 4 target page.
<displaycategory>Non-Qt Project</displaycategory>
<files>
<file source="../common/main.cpp" target="main.%CppSourceSuffix%" openeditor="true"/>
<file source="../../../shared/deployment.pri" target="deployment.pri"/>
<file source="project.pro" target="%ProjectName%.pro" openproject="true"/>
</files>
</wizard>
......@@ -54,7 +54,6 @@ AbstractGeneratedFileInfo::AbstractGeneratedFileInfo()
const QString AbstractMobileApp::CFileComment(QLatin1String("//"));
const QString AbstractMobileApp::ProFileComment(QLatin1Char('#'));
const QString AbstractMobileApp::DeploymentPriFileName(QLatin1String("deployment.pri"));
const QString AbstractMobileApp::FileChecksum(QLatin1String("checksum"));
const QString AbstractMobileApp::FileStubVersion(QLatin1String("version"));
const int AbstractMobileApp::StubVersion = 9;
......@@ -93,8 +92,6 @@ QString AbstractMobileApp::path(int fileType) const
case AppProOrigin: return originsRootApp + QLatin1String("app.pro");
case AppProPath: return outputPathBase();
case DesktopOrigin: return originsRootShared + QLatin1String("app.desktop");
case DeploymentPri: return outputPathBase() + DeploymentPriFileName;
case DeploymentPriOrigin: return originsRootShared + DeploymentPriFileName;
default: return pathExtended(fileType);
}
return QString();
......@@ -209,8 +206,6 @@ QByteArray AbstractMobileApp::generateProFile(QString *errorMessage) const
out << line << endl;
};
proFileContent.replace("../shared/" + DeploymentPriFileName.toLatin1(),
DeploymentPriFileName.toLatin1());
return proFileContent;
}
......@@ -314,11 +309,6 @@ QByteArray AbstractMobileApp::generateFile(int fileType,
data = generateProFile(errorMessage);
comment = ProFileComment;
break;
case AbstractGeneratedFileInfo::DeploymentPriFile:
data = readBlob(path(DeploymentPriOrigin), errorMessage);
comment = ProFileComment;
versionAndChecksum = true;
break;
default:
data = generateFileExtended(fileType, &versionAndChecksum,
&comment, errorMessage);
......
......@@ -86,8 +86,6 @@ public:
AppProOrigin,
AppProPath,
DesktopOrigin,
DeploymentPri,
DeploymentPriOrigin,
ExtendedFile
};
......@@ -109,7 +107,6 @@ public:
QList<AbstractGeneratedFileInfo> fileUpdates(const QString &mainProFile) const;
bool updateFiles(const QList<AbstractGeneratedFileInfo> &list, QString &error) const;
static const QString DeploymentPriFileName;
protected:
AbstractMobileApp();
virtual QByteArray generateProFile(QString *errorMessage) const;
......
CREATORSOURCEDIR = ../../../
include ($$CREATORSOURCEDIR/qtcreator.pri)
DEFINES += \
CREATORLESSTEST
APPSOURCEDIR = $$CREATORSOURCEDIR/src/plugins/qmakeprojectmanager/wizards
LIBS *= -L$$IDE_LIBRARY_PATH -lUtils
HEADERS += \
$$APPSOURCEDIR/qtquickapp.h \
$$APPSOURCEDIR/html5app.h \
$$APPSOURCEDIR/abstractmobileapp.h
SOURCES += \
$$APPSOURCEDIR/qtquickapp.cpp \
$$APPSOURCEDIR/html5app.cpp \
$$APPSOURCEDIR/abstractmobileapp.cpp \
main.cpp \
helpers.cpp
INCLUDEPATH += $$APPSOURCEDIR
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include "qtquickapp.h"
#include "html5app.h"
#include <QtCore>
using namespace QmakeProjectManager;
using namespace QmakeProjectManager::Internal;
static bool writeFile(const QByteArray &data, const QString &targetFile)
{
const QFileInfo fileInfo(targetFile);
QDir().mkpath(fileInfo.absolutePath());
QFile file(fileInfo.absoluteFilePath());
file.open(QIODevice::WriteOnly);
Q_ASSERT(file.isOpen());
return file.write(data) != -1;
}
bool QtQuickApp::generateFiles(QString *errorMessage) const
{
return writeFile(generateFile(QtQuickAppGeneratedFileInfo::MainCppFile, errorMessage), path(MainCpp))
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::AppProFile, errorMessage), path(AppPro))
&& (m_mainQmlMode == ModeImport ? true : writeFile(generateFile(QtQuickAppGeneratedFileInfo::MainQmlFile, errorMessage), path(MainQml)))
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::AppViewerPriFile, errorMessage), path(AppViewerPri))
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::AppViewerCppFile, errorMessage), path(AppViewerCpp))
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::AppViewerHFile, errorMessage), path(AppViewerH))
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::PngIcon64File, errorMessage), path(PngIcon64))
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::PngIcon80File, errorMessage), path(PngIcon80))
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::DesktopFremantleFile, errorMessage), path(DesktopFremantle))
&& writeFile(generateFile(QtQuickAppGeneratedFileInfo::DesktopHarmattanFile, errorMessage), path(DesktopHarmattan));
}
bool Html5App::generateFiles(QString *errorMessage) const
{
return writeFile(generateFile(Html5AppGeneratedFileInfo::MainCppFile, errorMessage), path(MainCpp))
&& writeFile(generateFile(Html5AppGeneratedFileInfo::AppProFile, errorMessage), path(AppPro))
&& (mainHtmlMode() != ModeGenerate ? true : writeFile(generateFile(Html5AppGeneratedFileInfo::MainHtmlFile, errorMessage), path(MainHtml)))
&& writeFile(generateFile(Html5AppGeneratedFileInfo::AppViewerPriFile, errorMessage), path(AppViewerPri))
&& writeFile(generateFile(Html5AppGeneratedFileInfo::AppViewerCppFile, errorMessage), path(AppViewerCpp))
&& writeFile(generateFile(Html5AppGeneratedFileInfo::AppViewerHFile, errorMessage), path(AppViewerH))
&& writeFile(generateFile(Html5AppGeneratedFileInfo::PngIcon64File, errorMessage), path(PngIcon64))
&& writeFile(generateFile(Html5AppGeneratedFileInfo::PngIcon80File, errorMessage), path(PngIcon80))
&& writeFile(generateFile(Html5AppGeneratedFileInfo::DesktopFremantleFile, errorMessage), path(DesktopFremantle))
&& writeFile(generateFile(Html5AppGeneratedFileInfo::DesktopHarmattanFile, errorMessage), path(DesktopHarmattan));
}
QString AbstractMobileApp::templatesRoot()
{
return QLatin1String("../../../share/qtcreator/templates/");
}
$(document).ready(function () {
$("div").mousedown(function () {
$(this).hide(400);
});
$("#quit").click(function () {
Qt.quit();
});
});
body {
margin: 0; font-size: 2em;
}
div {
border: 0.2em solid red;
padding: 0.8em;
margin: 0.1em;
background-color: #ffeeee;
}
#quit {
background-color: gray;
color: white;
font-weight: bold;
display: block;
text-align: right;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<script src="jquery-1.5.min.js" type="text/javascript"></script>
<script src="script.js" type="text/javascript"></script>
</head>
<body>
<a id="quit">X</a>
<div>Bug #01</div>
<div>Bug #02</div>
<div>Bug #03</div>
<div>Bug #04</div>
<div>Bug #05</div>
<div>Bug #06</div>
<div>Bug #07</div>
<div>Bug #08</div>
<div>Bug #09</div>
<div>Bug #10</div>
<div>Bug #11</div>
<div>Bug #12</div>
<div>Bug #13</div>
<div>Bug #14</div>
<div>Bug #15</div>
<div>Bug #16</div>
<div>Bug #17</div>
<div>Bug #18</div>
<div>Bug #19</div>
<div>Bug #20</div>
</body>
</html>
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include "qtquickapp.h"
#include "html5app.h"
#include <QApplication>
#include <QDebug>
using namespace QmakeProjectManager::Internal;
int main(int argc, char *argv[])
{
Q_UNUSED(argc)
Q_UNUSED(argv)
QString errorMessage;
const QString projectPath = QLatin1String("testprojects");
{
QtQuickApp sAppNew;
sAppNew.setProjectPath(projectPath);
sAppNew.setProjectName(QLatin1String("new_qml_app"));
if (!sAppNew.generateFiles(&errorMessage))
return 1;
}
{
QtQuickApp sAppNew;
sAppNew.setProjectPath(projectPath);
sAppNew.setComponentSet(QtQuickApp::QtQuick20Components);
sAppNew.setProjectName(QLatin1String("new_qtquick2_app"));
if (!sAppNew.generateFiles(&errorMessage))
return 1;
}
{
QtQuickApp sAppImport01;
sAppImport01.setProjectPath(projectPath);
sAppImport01.setProjectName(QLatin1String("qml_imported_scenario_01"));
sAppImport01.setMainQml(QtQuickApp::ModeImport, QLatin1String("../appwizards/qmlimportscenario_01/myqmlapp.qml"));
if (!sAppImport01.generateFiles(&errorMessage))
return 1;
}
{
Html5App sAppNew;
sAppNew.setProjectPath(projectPath);
sAppNew.setProjectName(QLatin1String("new_html5_app"));
qDebug() << sAppNew.path(Html5App::MainHtml);
if (!sAppNew.generateFiles(&errorMessage))
return 1;
}
{
Html5App sAppNew;
sAppNew.setProjectPath(projectPath);
sAppNew.setProjectName(QLatin1String("html5_imported_scenario_01"));
sAppNew.setMainHtml(Html5App::ModeImport, QLatin1String("../appwizards/htmlimportscenario_01/themainhtml.html"));
sAppNew.setTouchOptimizedNavigationEnabled(true);
qDebug() << sAppNew.path(Html5App::MainHtml);
if (!sAppNew.generateFiles(&errorMessage))
return 1;
}
{
Html5App sAppNew;
sAppNew.setProjectPath(projectPath);
sAppNew.setProjectName(QLatin1String("html5_url"));
sAppNew.setMainHtml(Html5App::ModeUrl, QLatin1String("http://www.jqtouch.com/preview/demos/main/"));
qDebug() << sAppNew.path(Html5App::MainHtml);
if (!sAppNew.generateFiles(&errorMessage))
return 1;
}
return 0;
}
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
import QtQuick 1.0
Rectangle {
width: 360
height: 360
Text {
text: "Hello World"
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onClicked: {
Qt.quit();
}
}
}