diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..d6f4b34 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,42 @@ +cmake_minimum_required(VERSION 3.18) + +project(NDSFactory) + +find_package(Qt5Core REQUIRED) +find_package(Qt5Gui REQUIRED) +find_package(Qt5Widgets REQUIRED) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTOUIC ON) + +set(SOURCES + main.cpp + mainwindow.cpp + ndsfactory.cpp + aboutdialog.cpp + unpackertabfunctions.cpp + unpackertabsignals.cpp + packertabsignals.cpp + packertabfunctions.cpp + fatpatchingtabsignals.cpp + fatpatchingtabfunctions.cpp +) + +SET(HEADERS + mainwindow.h + ndsheader.h + ndsfactory.h + aboutdialog.h + fatstruct.h + crctable.h +) + +set(FORMS + mainwindow.ui + aboutdialog.ui +) + +add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS} ${FORMS}) + +target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Gui Qt5::Widgets) diff --git a/NDSFactory.pro b/NDSFactory.pro deleted file mode 100644 index c0c4f89..0000000 --- a/NDSFactory.pro +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2019-08-29T12:15:45 -# -#------------------------------------------------- - -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - -TARGET = NDSFactory -TEMPLATE = app - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which has been marked as deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -# You can also make your code fail to compile if you use deprecated APIs. -# In order to do so, uncomment the following line. -# You can also select to disable deprecated APIs only up to a certain version of Qt. -#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 - -CONFIG += c++11 - -SOURCES += \ - main.cpp \ - mainwindow.cpp \ - ndsfactory.cpp \ - aboutdialog.cpp \ - unpackertabfunctions.cpp \ - unpackertabsignals.cpp \ - packertabsignals.cpp \ - packertabfunctions.cpp \ - fatpatchingtabsignals.cpp \ - fatpatchingtabfunctions.cpp - -HEADERS += \ - mainwindow.h \ - ndsheader.h \ - ndsfactory.h \ - aboutdialog.h \ - fatstruct.h \ - crctable.h - -FORMS += \ - mainwindow.ui \ - aboutdialog.ui - -# Default rules for deployment. -qnx: target.path = /tmp/$${TARGET}/bin -else: unix:!android: target.path = /opt/$${TARGET}/bin -!isEmpty(target.path): INSTALLS += target diff --git a/aboutdialog.h b/aboutdialog.h index 23df898..5681bc2 100644 --- a/aboutdialog.h +++ b/aboutdialog.h @@ -10,12 +10,12 @@ class AboutDialog; class AboutDialog : public QDialog { Q_OBJECT -public: - AboutDialog(QWidget *parent = nullptr); - ~AboutDialog(); + public: + AboutDialog(QWidget *parent = nullptr); + ~AboutDialog(); -private: - Ui::AboutDialog *ui; + private: + Ui::AboutDialog *ui; }; diff --git a/mainwindow.cpp b/mainwindow.cpp index 8bd89cd..f54834a 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,6 +1,7 @@ +#include #include "mainwindow.h" -#include "aboutdialog.h" #include "ui_mainwindow.h" +#include "aboutdialog.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), diff --git a/packertabsignals.cpp b/packertabsignals.cpp index 7a4d3e6..b8d36cd 100644 --- a/packertabsignals.cpp +++ b/packertabsignals.cpp @@ -3,6 +3,7 @@ #include "mainwindow.h" #include "ui_mainwindow.h" + void MainWindow::on_packerLoadHeaderBtn_clicked() { std::vector romHeader; diff --git a/unpackertabfunctions.cpp b/unpackertabfunctions.cpp index d952cdb..63f7d32 100644 --- a/unpackertabfunctions.cpp +++ b/unpackertabfunctions.cpp @@ -3,7 +3,6 @@ #include #include #include - #include "mainwindow.h" #include "ui_mainwindow.h" @@ -219,4 +218,5 @@ bool MainWindow::dumpEverything(QString dirPath) bool MainWindow::decodeFatFiles() { // TODO: implement me! + return false; }