Skip to content

Commit

Permalink
Added qml files and background as resources to the binary
Browse files Browse the repository at this point in the history
  • Loading branch information
calvaris committed Mar 22, 2012
1 parent e0df568 commit 00fb574
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 52 deletions.
5 changes: 1 addition & 4 deletions aura.pro
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion src/aura.qml
Expand Up @@ -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
}

Expand Down
38 changes: 0 additions & 38 deletions src/common.h

This file was deleted.

4 changes: 1 addition & 3 deletions src/main.cpp
Expand Up @@ -35,7 +35,6 @@

#include "controller.h"
#include "effectmanager.h"
#include "common.h"
#include "postcapture.h"

static inline void
Expand Down Expand Up @@ -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();
Expand Down
3 changes: 1 addition & 2 deletions src/postcapture.cpp
Expand Up @@ -28,7 +28,6 @@
#include <QDBusConnection>
#include <contentaction.h>

#include "common.h"
#include "postcapture.h"

using ContentAction::Action;
Expand All @@ -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);
Expand Down
10 changes: 10 additions & 0 deletions src/res.qrc
@@ -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
7 changes: 3 additions & 4 deletions src/src.pro
Expand Up @@ -29,6 +29,8 @@ SOURCES += controller.cpp \
postcapture.cpp
#FORMS#

RESOURCES += res.qrc

unix {
#VARIABLES
isEmpty(PREFIX) {
Expand All @@ -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

Expand Down

0 comments on commit 00fb574

Please sign in to comment.