Skip to content
Snippets Groups Projects
Commit 9cceffd3 authored by SeeLook's avatar SeeLook
Browse files

Awake Android build, small fixes to make it compile and work

parent ce1f18d8
Branches
Tags
No related merge requests found
......@@ -6,36 +6,32 @@ TARGET = nootka
TEMPLATE = subdirs
SUBDIRS = src/libs/core\
src/libs/mobile\
src/libs/score\
src/libs/widgets\
src/libs/sound\
src/libs/misc\
src/libs/main\
# src/libs/mobile\
# src/libs/sound\
# src/libs/misc\
# src/libs/main\
src\
src/plugins/about\
src/plugins/level\
src/plugins/settings\
src/plugins/wizard\
src/plugins/exam\
src/plugins/updater\
# src/plugins/about\
# src/plugins/level\
# src/plugins/settings\
# src/plugins/wizard\
# src/plugins/exam\
# src/plugins/updater\
CONFIG += ordered
src/libs/mobile.depends = src/libs/core
src/libs/score.depends = src/libs/mobile
src/libs/widgets.depends = src/libs/score
# src/libs/mobile.depends = src/libs/core
src/libs/sound.depends = src/libs/score
src/libs/misc.depends = src/libs/widgets
src/libs/main.depends = src/libs/widgets
src.depends = src/libs/main
src/plugins/about.depends = src/libs/misc
src/plugins/level.depends = src/libs/widgets src/libs/sound
src/plugins/settings.depends = src/libs/misc
src/plugins/wizard.depends = src/libs/misc
src/plugins/exam.depends = src/libs/main
src/plugins/updater.depends = src/libs/core
# src/libs/misc.depends = src/libs/widgets
# src/libs/main.depends = src/libs/widgets
src.depends = src/libs/core
# src/plugins/about.depends = src/libs/misc
# src/plugins/level.depends = src/libs/widgets src/libs/sound
# src/plugins/settings.depends = src/libs/misc
# src/plugins/wizard.depends = src/libs/misc
# src/plugins/exam.depends = src/libs/main
# src/plugins/updater.depends = src/libs/core
<?xml version="1.0"?>
<manifest package="net.sf.nootka"
<manifest package="net.sf.nootka-devel"
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionName="1.4.0"
android:versionName="1.5.0-alpha"
android:versionCode="15"
android:installLocation="auto">
<application android:hardwareAccelerated="true"
......@@ -114,7 +114,7 @@
<!-- Background running -->
</activity>
</application>
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14"/>
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16"/>
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
......
QT += core gui widgets androidextras
QT += core gui androidextras quick quickcontrols2
TARGET = NootkaCore
......@@ -9,30 +9,19 @@ SOURCES += tcolor.cpp\
tfingerpos.cpp\
tglobals.cpp\
tinitcorelib.cpp\
tnoofont.cpp\
# tnoofont.cpp\
tpath.cpp\
tmtr.cpp\
# tmtr.cpp\
tnootkaqml.cpp\
ttickcolors.cpp\
\
animations/tabstractanim.cpp\
animations/tblinkingitem.cpp\
animations/tcoloredanim.cpp\
animations/tcombinedanim.cpp\
animations/tcrossfadetextanim.cpp\
animations/tfadeanim.cpp\
animations/tmorphedanim.cpp\
animations/tmovedanim.cpp\
animations/tscaledanim.cpp\
\
exam/tattempt.cpp\
exam/texam.cpp\
exam/tlevel.cpp\
exam/tqagroup.cpp\
exam/tqatype.cpp\
exam/tqaunit.cpp\
exam/tresulttext.cpp\
\
graphics/tdropshadoweffect.cpp\
graphics/tgraphicstexttip.cpp\
# exam/tattempt.cpp\
# exam/texam.cpp\
# exam/tlevel.cpp\
# exam/tqagroup.cpp\
# exam/tqatype.cpp\
# exam/tqaunit.cpp\
# exam/tresulttext.cpp\
\
music/tchunk.cpp\
music/tclef.cpp\
......@@ -43,22 +32,21 @@ SOURCES += tcolor.cpp\
music/tnamestylefilter.cpp\
music/tnote.cpp\
music/ttune.cpp\
music/trhythm.cpp\
music/tmeter.cpp\
\
widgets/tpushbutton.cpp\
\
plugins/tpluginsloader.cpp\
score/tscoreobject.cpp\
score/tstaffobject.cpp\
score/tmeasureobject.cpp\
score/tnoteobject.cpp\
score/tnotepair.cpp\
score/tbeamobject.cpp\
\
touch/ttouchproxy.cpp\
# touch/ttouchmenu.cpp\
touch/ttoucharea.cpp\
# touch/tmenuwidget.cpp\
touch/ttouchparams.cpp\
# touch/ttouchmessage.cpp\
instruments/tguitarbg.cpp\
\
Android/tandroid.cpp\
HEADERS += nootkaconfig.h\
tprecisetimer.h\
texamparams.h\
taudioparams.h\
tcolor.h\
......@@ -69,26 +57,18 @@ HEADERS += nootkaconfig.h\
tnoofont.h\
tpath.h\
tscoreparams.h\
tmtr.h\
# tmtr.h\
tnootkaqml.h\
ttickcolors.h\
\
animations/tabstractanim.h\
animations/tblinkingitem.h\
animations/tcoloredanim.h\
animations/tcombinedanim.h\
animations/tcrossfadetextanim.h\
animations/tfadeanim.h\
animations/tmorphedanim.h\
animations/tmovedanim.h\
animations/tscaledanim.h\
\
exam/tattempt.h\
exam/texam.h\
exam/textrans.h\
exam/tlevel.h\
exam/tqagroup.h\
exam/tqatype.h\
exam/tqaunit.h\
exam/tresulttext.h\
# exam/tattempt.h\
# exam/texam.h\
# exam/textrans.h\
# exam/tlevel.h\
# exam/tqagroup.h\
# exam/tqatype.h\
# exam/tqaunit.h\
# exam/tresulttext.h\
\
music/tchunk.h\
music/tclef.h\
......@@ -96,27 +76,21 @@ HEADERS += nootkaconfig.h\
music/tkeysignature.h\
music/tmeasure.h\
music/tmelody.h\
music/tmetrum.h\
music/tmeter.h\
music/tnamestylefilter.h\
music/tnote.h\
music/tnotestruct.h\
music/trhythm.h\
music/ttune.h\
\
graphics/tdropshadoweffect.h\
graphics/tgraphicstexttip.h\
\
widgets/tpushbutton.h\
\
plugins/tplugininterface.h\
plugins/tpluginsloader.h\
score/tscoreobject.h\
score/tstaffobject.h\
score/tmeasureobject.h\
score/tnoteobject.h\
score/tnotepair.h\
score/tbeamobject.h\
\
touch/ttouchproxy.h\
# touch/ttouchmenu.h\
touch/ttoucharea.h\
# touch/tmenuwidget.h\
touch/ttouchparams.h\
# touch/ttouchmessage.h\
instruments/tguitarbg.h\
Android/tandroid.h\
CONFIG += mobility warn_off
......@@ -125,7 +99,6 @@ MOBILITY =
android {
QMAKE_CXXFLAGS_RELEASE += -fsigned-char
QMAKE_CXXFLAGS_DEBUG += -fsigned-char -O1
# ANDROID_EXTRA_LIBS += libNootkaCore.so
}
# INCLUDEPATH = core
......
<RCC>
<qresource prefix="/">
<file>fonts/nootka.ttf</file>
<file>fonts/Scorek.otf</file>
<file>picts/body-bass.png</file>
<file>picts/body-electro.png</file>
<file>picts/body.png</file>
......
......@@ -78,7 +78,7 @@ public:
TnotePair* note(int nr) { return m_notes[nr]; }
TnotePair* first() { return m_notes.first(); }
TnotePair* last() { return m_notes.last(); }
bool isEmpty() { m_notes.isEmpty(); }
bool isEmpty() { return m_notes.isEmpty(); }
/**
* Staff index of the first measure note
......
......@@ -252,10 +252,10 @@ void Tglobals::loadSettings(QSettings* cfg) {
E->expertsAnswerEnable = cfg->value(QStringLiteral("expertsAnswerEnable"), false).toBool();
E->studentName = cfg->value(QStringLiteral("studentName"), QString()).toString();
#if defined (Q_OS_ANDROID)
E->examsDir = cfg->value(QStringLiteral("examsDir")), Tandroid::getExternalPath()).toString();
E->examsDir = cfg->value(QStringLiteral("examsDir"), Tandroid::getExternalPath()).toString();
if (!QFileInfo::exists(E->examsDir)) // reset if doesn't exist
E->examsDir = Tandroid::getExternalPath();
E->levelsDir = cfg->value(QStringLiteral("levelsDir")), Tandroid::getExternalPath()).toString();
E->levelsDir = cfg->value(QStringLiteral("levelsDir"), Tandroid::getExternalPath()).toString();
if (!QFileInfo::exists(E->levelsDir))
E->levelsDir = Tandroid::getExternalPath();
#else
......
......@@ -24,7 +24,6 @@
#include "tpath.h"
#include <QtGui/qguiapplication.h>
#include <QtGui/qpalette.h>
// #include <QtWidgets/qmessagebox.h>
#include <QtCore/qtranslator.h>
#include <QtCore/qlibraryinfo.h>
#include <QtGui/qfontdatabase.h>
......@@ -32,15 +31,11 @@
#include <QtCore/qdir.h>
#if defined (Q_OS_ANDROID)
#include "Android/tandroid.h"
#include <QtWidgets/qstylefactory.h>
#endif
Tglobals* Tcore::m_gl = nullptr;
#if defined (Q_OS_ANDROID)
QStyle* Tcore::androidStyle = nullptr;
#endif
bool initCoreLibrary() {
if (Tcore::gl() == nullptr) {
......@@ -48,11 +43,6 @@ bool initCoreLibrary() {
return false;
}
#if defined (Q_OS_ANDROID)
if (Tcore::androidStyle == nullptr)
Tcore::androidStyle = QStyleFactory::create(QStringLiteral("android"));
#endif
Trhythm::initialize();
Tcolor::setShadow(qApp->palette());
......
......@@ -25,7 +25,6 @@
class QTranslator;
class QGuiApplication;
class QStyle;
/**
* Internal instance of Tglobals pointer used by in initCoreLibrary. *
......@@ -38,9 +37,6 @@ class NOOTKACORE_EXPORT Tcore
public:
static Tglobals* gl() { return m_gl; } /** static global pointer to Tglobals */
#if defined (Q_OS_ANDROID)
static QStyle* androidStyle;
#endif
protected:
static void setGlobals(Tglobals *g) { m_gl = g; }
......
......@@ -20,8 +20,8 @@
#include "ttickcolors.h"
#include "nootkaconfig.h"
#include "tpath.h"
#include "music/tmeter.h"
#include "music/tclef.h"
//#include "music/tmeter.h"
//#include "music/tclef.h"
#include "music/tkeysignature.h"
#include "score/tscoreobject.h"
#include "score/tstaffobject.h"
......
......@@ -21,12 +21,11 @@
#include <nootkacoreglobal.h>
#include <QtCore/qobject.h>
#include "music/tmeter.h"
#include "music/tclef.h"
#include "music/tnote.h"
class Tclef;
class Tmeter;
class Tnote;
#include <QtCore/qobject.h>
/**
......@@ -51,6 +50,13 @@ public:
Q_INVOKABLE QString minorKeyName(int key);
Q_INVOKABLE QString getLicense();
Q_INVOKABLE QString getChanges();
Q_INVOKABLE bool isAndroid() {
#if defined (Q_OS_ANDROID)
return true;
#else
return false;
#endif
}
private:
static TnootkaQML *m_instance;
......
......@@ -36,9 +36,11 @@ public:
Q_INVOKABLE void resize(qreal w);
Q_INVOKABLE QColor colorAt(int nr) {
return m_tickColors[qBound(0, nr, m_tickColors.count() - 1)];
if (nr < 0 || nr > m_tickColors.count() - 1)
if (nr < 0 || nr > m_tickColors.count() - 1) {
qDebug() << "wrong color number" << nr;
return QColor();
}
return m_tickColors[qBound(0, nr, m_tickColors.count() - 1)];
}
QColor gradColorAtPoint(float lineX1, float lineX2, QColor startC, QColor endC, float posC);
......
......@@ -17,12 +17,9 @@
***************************************************************************/
#if defined (Q_OS_ANDROID)
#include <Android/tandroid.h>
#endif
#include <tinitcorelib.h>
#include <tpath.h>
#include <tmtr.h>
//#include <tmtr.h>
#include <QtGui/qguiapplication.h>
#include <QtGui/qicon.h>
#include <QtQml/qqmlapplicationengine.h>
......@@ -36,6 +33,9 @@
#include "tnootkaqml.h"
#if defined (Q_OS_ANDROID)
#include <Android/tandroid.h>
#endif
static QString logFile;
......@@ -120,9 +120,9 @@ int main(int argc, char *argv[])
if (firstTime) {
#if defined (Q_OS_ANDROID)
QString androidArg = Tandroid::getRunArgument();
if (!androidArg.isEmpty())
w->openFile(androidArg);
// QString androidArg = Tandroid::getRunArgument();
// if (!androidArg.isEmpty())
// w->openFile(androidArg);
#else // TODO
// if (argc > 1)
// w->openFile(QString::fromLocal8Bit(argv[argc - 1]));
......
......@@ -37,7 +37,7 @@ Grid {
onSelClefChanged: {
for (var c = 0; c < 7; ++c) {
clefButtons.itemAt(c).highlighted = (clefNr[c] == selClef)
clefButtons.itemAt(c).highlighted = (clefNr[c] === selClef)
}
}
......
QT += multimedia androidextras core gui widgets printsupport
QT += multimedia androidextras core gui quick quickcontrols2 printsupport
TARGET = Nootka
TARGET = Nootka2
TEMPLATE = app
SOURCES += main.cpp \
mainwindow.cpp \
ttouchstyle.cpp \
HEADERS += mainwindow.h \
ttouchstyle.h \
\
# HEADERS +=
CONFIG += mobility warn_off
......@@ -21,22 +17,21 @@ android {
QMAKE_CXXFLAGS_RELEASE += -fsigned-char
QMAKE_CXXFLAGS_DEBUG += -fsigned-char -O1
ANDROID_EXTRA_LIBS += $$OUT_PWD/libs/core/libNootkaCore.so\
$$OUT_PWD/libs/mobile/libNootkaMobile.so\
$$OUT_PWD/libs/score/libNootkaScore.so\
$$OUT_PWD/libs/widgets/libNootkaWidgets.so\
$$OUT_PWD/libs/sound/libNootkaSound.so\
$$OUT_PWD/libs/misc/libNootkaMisc.so\
$$OUT_PWD/libs/main/libNootkaMain.so\
# $$OUT_PWD/libs/mobile/libNootkaMobile.so\
# $$OUT_PWD/libs/sound/libNootkaSound.so\
# $$OUT_PWD/libs/misc/libNootkaMisc.so\
# $$OUT_PWD/libs/main/libNootkaMain.so\
}
INCLUDEPATH = INCLUDEPATH += libs/core libs/mobile libs/score libs/widgets libs/sound libs/main
INCLUDEPATH += libs/core
#libs/mobile libs/sound libs/main
LIBS += -Llibs/core/ -lNootkaCore \
-Llibs/mobile/ -lNootkaMobile \
-Llibs/score/ -lNootkaScore \
-Llibs/widgets -lNootkaWidgets \
-Llibs/sound -lNootkaSound \
-Llibs/main -lNootkaMain
# -Llibs/mobile/ -lNootkaMobile \
# -Llibs/sound -lNootkaSound \
# -Llibs/main -lNootkaMain
RESOURCES += nootka.qrc
DISTFILES += \
android/AndroidManifest.xml \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment