Permalink
Browse files

Added qml files and background as resources to the binary

  • Loading branch information...
1 parent e0df568 commit 00fb57458bd4d46fc888107e51e43e4027abf9a3 @calvaris calvaris committed Mar 22, 2012
Showing with 17 additions and 52 deletions.
  1. +1 −4 aura.pro
  2. +1 −1 src/aura.qml
  3. +0 −38 src/common.h
  4. +1 −3 src/main.cpp
  5. +1 −2 src/postcapture.cpp
  6. +10 −0 src/res.qrc
  7. BIN {data/bg → src/resources}/aura-bg.png
  8. +3 −4 src/src.pro
View
@@ -26,8 +26,5 @@ unix {
splash.files = data/splash/aura-splash.jpg
splash.path = $$DATADIR/aura
- bg.files = data/bg/aura-bg.png
- bg.path = $$DATADIR/aura
-
- INSTALLS += effects icon64 splash bg
+ INSTALLS += effects icon64 splash
}
View
@@ -69,7 +69,7 @@ Item {
Image {
anchors.fill: parent
- source: "file:///opt/aura/share/aura/aura-bg.png"
+ source: "qrc:/resources/aura-bg.png"
visible: !platformWindow.active || controller.pipelineStarting
}
View
@@ -1,38 +0,0 @@
-/*
- * This file is part of aura
- *
- * Copyright (C) 2012 Igalia S.L.
- *
- * Contact: Miguel Gómez <magomez@igalia.com>
- * Xabier Rodriguez Calvar <xrcalvar@igalia.com>
- * Víctor Jáquez <vjaquez@igalia.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- *
- */
-
-#ifndef COMMON_H
-#define COMMON_H
-
-#ifdef __i386__
-#define QML_PATH "src/"
-#else
-#define QML_PATH DATADIR "/" TARGET "/"
-#endif
-
-#define MAIN_QML_FILE QML_PATH TARGET ".qml"
-
-#endif
View
@@ -35,7 +35,6 @@
#include "controller.h"
#include "effectmanager.h"
-#include "common.h"
#include "postcapture.h"
static inline void
@@ -66,8 +65,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
QDeclarativeContext *context = view.rootContext();
EffectManager::setup();
context->setContextProperty("effectManager", EffectManager::instance());
- qDebug("opening qml files in %s", QML_PATH);
- view.setSource(QUrl::fromLocalFile(MAIN_QML_FILE));
+ view.setSource(QUrl("qrc:/aura.qml"));
view.showFullScreen();
int ret = app.exec();
View
@@ -28,7 +28,6 @@
#include <QDBusConnection>
#include <contentaction.h>
-#include "common.h"
#include "postcapture.h"
using ContentAction::Action;
@@ -37,7 +36,7 @@ PostCapture::PostCapture(QDeclarativeItem *parent)
: QDeclarativeItem(parent)
{
QDeclarativeComponent
- component(&m_engine, QUrl::fromLocalFile(QML_PATH "PostCapture.qml"));
+ component(&m_engine, QUrl("qrc:/PostCapture.qml"));
QDeclarativeItem *item =
dynamic_cast<QDeclarativeItem *>(component.create());
item->setParentItem(this);
View
@@ -0,0 +1,10 @@
+<RCC>
+ <qresource prefix="/">
+ <file>aura.qml</file>
+ <file>ButtonBorder.qml</file>
+ <file>Effects.qml</file>
+ <file>PostCapture.qml</file>
+ <file>ViewFinder.qml</file>
+ <file>resources/aura-bg.png</file>
+ </qresource>
+</RCC>
File renamed without changes
View
@@ -29,6 +29,8 @@ SOURCES += controller.cpp \
postcapture.cpp
#FORMS#
+RESOURCES += res.qrc
+
unix {
#VARIABLES
isEmpty(PREFIX) {
@@ -42,13 +44,10 @@ DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\" \
#MAKE INSTALL
-INSTALLS += target qmlgui desktop service iconxpm icon26 icon48 icon64
+INSTALLS += target desktop service iconxpm icon26 icon48 icon64
target.path =$$BINDIR
- qmlgui.path = $$DATADIR/aura
- qmlgui.files += aura.qml Effects.qml ButtonBorder.qml PostCapture.qml
-
desktop.path = /usr/share/applications
desktop.files += $${TARGET}.desktop

0 comments on commit 00fb574

Please sign in to comment.