Clean up directory structure, provide out-of-source[-ish] build instructions

This commit is contained in:
Stephen Shelton 2019-10-04 09:41:57 -06:00
parent f18b87fa24
commit a24cc61859
8 changed files with 16 additions and 17 deletions

5
.gitignore vendored
View File

@ -1,7 +1,4 @@
# build artifacts
Makefile
.qmake.stash
*_qml.cpp
lokicp
build/
tags

View File

@ -13,7 +13,9 @@ sudo apt install qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-
Then build and run:
```bash
qmake .
mkdir build
cd build
qmake ../lokicp.pro "CONFIG+=debug"
make
./lokicp
```

View File

@ -2,7 +2,7 @@ TEMPLATE = app
QT += qml quick widgets
SOURCES += main.cpp
SOURCES += src/main.cpp
RESOURCES += resources.qrc
RESOURCES += res/resources.qrc

9
res/resources.qrc Normal file
View File

@ -0,0 +1,9 @@
<RCC>
<qresource prefix="res/">
<file>qml/main.qml</file>
<file>qml/TestPanel.qml</file>
</qresource>
<qresource prefix="res/">
<file>images/icon.png</file>
</qresource>
</RCC>

View File

@ -1,9 +0,0 @@
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>TestPanel.qml</file>
</qresource>
<qresource prefix="/">
<file>res/images/icon.png</file>
</qresource>
</RCC>

View File

@ -8,7 +8,7 @@ int32_t main(int32_t argc, char *argv[])
QApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
engine.load(QUrl(QStringLiteral("qrc:/res/qml/main.qml")));
return app.exec();
}