Skip to content

Commit

Permalink
Rework build logic to allow building on amd64
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems committed Jan 17, 2024
1 parent 6ed9d5e commit 0905934
Show file tree
Hide file tree
Showing 44 changed files with 132 additions and 103 deletions.
3 changes: 0 additions & 3 deletions applications/desktop-file-edit/desktop-file-edit.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ QT += dbus
CONFIG += c++11 console
CONFIG -= app_bundle

DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
edit.cpp \
main.cpp
Expand Down
3 changes: 0 additions & 3 deletions applications/desktop-file-install/desktop-file-install.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ QT += dbus
CONFIG += c++11 console
CONFIG -= app_bundle

DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
../desktop-file-edit/edit.cpp \
main.cpp
Expand Down
3 changes: 0 additions & 3 deletions applications/desktop-file-validate/desktop-file-validate.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ QT += dbus
CONFIG += c++11 console
CONFIG -= app_bundle

DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
main.cpp

Expand Down
3 changes: 0 additions & 3 deletions applications/gio/gio.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ QT += dbus
CONFIG += c++11 console
CONFIG -= app_bundle

DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
common.cpp \
main.cpp
Expand Down
3 changes: 0 additions & 3 deletions applications/inject_evdev/inject_evdev.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ QT += dbus
CONFIG += c++11 console
CONFIG -= app_bundle

DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
main.cpp

Expand Down
2 changes: 1 addition & 1 deletion applications/launcher/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class Controller : public QObject
networks->setAPI(wifiApi);
auto state = wifiApi->state();
m_wifion = state != WifiState::WifiOff && state != WifiState::WifiUnknown;
QTimer::singleShot(1000, [=](){
QTimer::singleShot(1000, [this](){
// Get initial values when UI is ready
batteryLevelChanged(powerApi->batteryLevel());
batteryStateChanged(powerApi->batteryState());
Expand Down
3 changes: 0 additions & 3 deletions applications/launcher/launcher.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ CONFIG += qml_debug
CONFIG += qtquickcompiler
CONFIG += precompile_header

DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
main.cpp \
controller.cpp \
Expand Down
2 changes: 1 addition & 1 deletion applications/launcher/wifinetworklist.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ class WifiNetworkList : public QAbstractListModel
for(auto network : networks){
network->setAPI(api);
}
connect(api, &Wifi::scanningChanged, this, [=](bool scanning){
connect(api, &Wifi::scanningChanged, this, [this](bool scanning){
emit scanningChanged(scanning);
});
}
Expand Down
3 changes: 0 additions & 3 deletions applications/lockscreen/lockscreen.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ CONFIG += c++11
CONFIG += qml_debug
CONFIG += qtquickcompiler

DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
main.cpp

Expand Down
3 changes: 0 additions & 3 deletions applications/notify-send/notify-send.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ QT += dbus
CONFIG += c++11 console
CONFIG -= app_bundle

DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
main.cpp

Expand Down
10 changes: 9 additions & 1 deletion applications/process-manager/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ class Controller : public QObject
Q_PROPERTY(QString sortBy READ sortBy WRITE sortBy NOTIFY sortByChanged)
public:
int protectPid;
explicit Controller(QQmlApplicationEngine* engine) : QObject(nullptr), mutex(QMutex::NonRecursive), _engine(engine){
explicit Controller(QQmlApplicationEngine* engine)
: QObject(nullptr),
#if QT_DEPRECATED_SINCE(5,15)
mutex(QMutex::NonRecursive),
#else
mutex(),
#endif
_engine(engine)
{
m_tasks = new TaskList();
connect(m_tasks, &TaskList::sortByChanged, this, &Controller::sortByChanged);
emit tasksChanged(m_tasks);
Expand Down
5 changes: 1 addition & 4 deletions applications/process-manager/process-manager.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ QT += dbus

CONFIG += c++11
CONFIG += qtquickcompiler
CONFIG += precompile_header

DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
CONFIG += precompile_header# disables all the APIs deprecated before Qt 6.0.0

SOURCES += main.cpp

Expand Down
3 changes: 1 addition & 2 deletions applications/process-manager/tasklist.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ class TaskList : public QAbstractListModel
}
void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override{
Q_UNUSED(column)
Q_UNUSED(order)
emit layoutAboutToBeChanged();
std::sort(taskItems.begin(), taskItems.end(), [=](TaskItem* a, TaskItem* b) -> bool {
std::sort(taskItems.begin(), taskItems.end(), [this, order](TaskItem* a, TaskItem* b) -> bool {
if(order == Qt::DescendingOrder){
auto temp = a;
a = b;
Expand Down
5 changes: 1 addition & 4 deletions applications/screenshot-tool/screenshot-tool.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ QT -= gui
QT += dbus

CONFIG += c++11 console
CONFIG -= app_bundle

DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
CONFIG -= app_bundle # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
main.cpp
Expand Down
1 change: 0 additions & 1 deletion applications/screenshot-viewer/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <QImage>
#include <QQuickItem>
#include <liboxide.h>
#include <epframebuffer.h>

#include "screenshotlist.h"

Expand Down
3 changes: 0 additions & 3 deletions applications/screenshot-viewer/screenshot-viewer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ CONFIG += qml_debug
CONFIG += qtquickcompiler
CONFIG += precompile_header

DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
main.cpp

Expand Down
3 changes: 0 additions & 3 deletions applications/settings-manager/settings-manager.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ QT += dbus
CONFIG += c++11 console
CONFIG -= app_bundle

DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
main.cpp

Expand Down
1 change: 0 additions & 1 deletion applications/system-service/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "screenapi.h"
#include "buttonhandler.h"


using namespace Oxide::Applications;

const event_device touchScreen(deviceSettings.getTouchDevicePath(), O_WRONLY);
Expand Down
1 change: 0 additions & 1 deletion applications/system-service/powerapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

class PowerAPI : public APIBase {
Q_OBJECT
Q_CLASSINFO("Version", OXIDE_INTERFACE_VERSION)
Q_CLASSINFO("D-Bus Interface", OXIDE_POWER_INTERFACE)
Q_PROPERTY(int state READ state WRITE setState NOTIFY stateChanged)
Q_PROPERTY(int batteryState READ batteryState NOTIFY batteryStateChanged)
Expand Down
2 changes: 2 additions & 0 deletions applications/system-service/screenapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#include "notificationapi.h"
#include "systemapi.h"

#include <liboxide/epaper.h>

QDBusObjectPath ScreenAPI::screenshot(){
if(!hasPermission("screen")){
return QDBusObjectPath("/");
Expand Down
2 changes: 0 additions & 2 deletions applications/system-service/screenapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
#include <unistd.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <epframebuffer.h>
#include <liboxide.h>

#include "apibase.h"
#include "mxcfb.h"
#include "screenshot.h"

#define DISPLAYWIDTH 1404
Expand Down
3 changes: 0 additions & 3 deletions applications/system-service/system-service.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ CONFIG += console
CONFIG -= app_bundle
CONFIG += precompile_header

DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

QMAKE_CFLAGS += -std=c99

SOURCES += \
Expand Down
1 change: 0 additions & 1 deletion applications/system-service/tarnish_stable.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#if defined __cplusplus
#include <algorithm>
#include <cstdlib>
#include <epframebuffer.h>
#include <ext/stdio_filebuf.h>
#include <fcntl.h>
#include <fstream>
Expand Down
2 changes: 1 addition & 1 deletion applications/system-service/wpa_supplicant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was generated by qdbusxml2cpp version 0.8
* Command line was: qdbusxml2cpp -N -p wpa_supplicant.h:wpa_supplicant.cpp fi.w1.wpa_supplicant1.xml
*
* qdbusxml2cpp is Copyright (C) 2020 The Qt Company Ltd.
* qdbusxml2cpp is Copyright (C) 2022 The Qt Company Ltd.
*
* This is an auto-generated file.
* This file may have been hand-edited. Look for HAND-EDIT comments
Expand Down
2 changes: 1 addition & 1 deletion applications/system-service/wpa_supplicant.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file was generated by qdbusxml2cpp version 0.8
* Command line was: qdbusxml2cpp -N -p wpa_supplicant.h:wpa_supplicant.cpp fi.w1.wpa_supplicant1.xml
*
* qdbusxml2cpp is Copyright (C) 2020 The Qt Company Ltd.
* qdbusxml2cpp is Copyright (C) 2022 The Qt Company Ltd.
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
Expand Down
1 change: 0 additions & 1 deletion applications/task-switcher/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <QGuiApplication>
#include <QScreen>

#include <epframebuffer.h>
#include <signal.h>
#include <liboxide.h>

Expand Down
1 change: 0 additions & 1 deletion applications/task-switcher/corrupt_stable.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#if defined __cplusplus
#include <cstdlib>
#include <epframebuffer.h>
#include <fstream>
#include <iostream>
#include <liboxide.h>
Expand Down
3 changes: 0 additions & 3 deletions applications/task-switcher/task-switcher.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ CONFIG += qml_debug
CONFIG += qtquickcompiler
CONFIG += precompile_header

DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
appitem.cpp \
main.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ QT += dbus
CONFIG += c++11 console
CONFIG -= app_bundle

DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
main.cpp

Expand Down
3 changes: 0 additions & 3 deletions applications/xdg-desktop-icon/xdg-desktop-icon.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ QT += dbus
CONFIG += c++11 console
CONFIG -= app_bundle

DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
main.cpp

Expand Down
3 changes: 0 additions & 3 deletions applications/xdg-desktop-menu/xdg-desktop-menu.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ QT += dbus
CONFIG += c++11 console
CONFIG -= app_bundle

DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
main.cpp

Expand Down
3 changes: 0 additions & 3 deletions applications/xdg-icon-resource/xdg-icon-resource.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ QT += dbus
CONFIG += c++11 console
CONFIG -= app_bundle

DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
main.cpp

Expand Down
3 changes: 0 additions & 3 deletions applications/xdg-open/xdg-open.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ QT += dbus
CONFIG += c++11 console
CONFIG -= app_bundle

DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
main.cpp

Expand Down
3 changes: 0 additions & 3 deletions applications/xdg-settings/xdg-settings.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ QT += dbus
CONFIG += c++11 console
CONFIG -= app_bundle

DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
main.cpp

Expand Down
10 changes: 8 additions & 2 deletions qmake/common.pri
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
VERSION = 2.8

DEFINES += QT_DEPRECATED_WARNINGS
!contains(DEFINES, QT_DEPRECATED_WARNINGS){
DEFINES += QT_DEPRECATED_WARNINGS
}
!contains(DEFINES, QT_DISABLE_DEPRECATED_BEFORE){
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x051510
isEmpty(QT_DISABLE_DEPRECATED_BEFORE){
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000
}else{
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=$${QT_DISABLE_DEPRECATED_BEFORE}
}
}
CONFIG(debug, debug|release){
LIBS += -lunwind
Expand Down
7 changes: 5 additions & 2 deletions qmake/epaper.pri
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
LIBS += -L$$OUT_PWD/../../shared/epaper -lqsgepaper
INCLUDEPATH += $$OUT_PWD/../../shared/epaper
linux-oe-g++{
LIBS += -L$$OUT_PWD/../../shared/epaper -lqsgepaper
INCLUDEPATH += $$OUT_PWD/../../shared/epaper
DEFINES += EPAPER
}
1 change: 1 addition & 0 deletions qmake/liboxide.pri
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ contains(DEFINES, LIBOXIDE_PRIVATE){
INCLUDEPATH += $$OUT_PWD/../../shared/liboxide/include
QT += network
QT += dbus
QT += gui

QML_IMPORT_PATH += qrc:/codes.eeems.oxide
include(sentry.pri)
Expand Down
5 changes: 5 additions & 0 deletions shared/epaper/epaper.pro
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
!linux-oe-g++{
error("epaper is only supported on the reMarkable")
}
TEMPLATE = lib
QT += core

include(../../qmake/common.pri)

VERSION = 1.0

DISTFILES = epframebuffer.h

TARGET = qsgepaper
target.path = /opt/lib
INSTALLS += target
Expand Down
Loading

0 comments on commit 0905934

Please sign in to comment.