Upgrade Heimdall Frontend to Qt5 and build with cmake
Esse commit está contido em:
@@ -8,3 +8,4 @@ project(Heimdall)
|
||||
|
||||
add_subdirectory(libpit)
|
||||
add_subdirectory(heimdall)
|
||||
add_subdirectory(heimdall-frontend)
|
||||
|
||||
+4
-5
@@ -520,11 +520,11 @@ Appendix B - Installing Heimdall Suite from Source
|
||||
Heimdall and Heimdall Frontend both utilise the CMake for managing the build
|
||||
process. CMake can generate files for various build systems including GNU
|
||||
Make and Visual Studio. However, official packages are compiled with GNU
|
||||
Make and MinGW-W64 Clang.
|
||||
Make and MinGW-W64 GCC/G++.
|
||||
|
||||
NOTE: Official builds use MinGW-W64 simply because on-going cross-platform
|
||||
development is simpler when using just the one IDE (Jetbrain's CLion)
|
||||
and compiler (Clang) on all platforms.
|
||||
and similar toolchains.
|
||||
|
||||
1. Setup a MinGW-W64 build environment by utilising MSYS2:
|
||||
|
||||
@@ -533,7 +533,7 @@ Appendix B - Installing Heimdall Suite from Source
|
||||
2. After installing MSYS2 a command prompt will launch, enter:
|
||||
|
||||
Pacman -Syu
|
||||
Pacman -S mingw-w64-x86_64 mingw-w64-x86_64-clang mingw-w64-x86_64-cmake mingw-w64-x86_64-make
|
||||
Pacman -S mingw-w64-x86_64 mingw-w64-x86_64-clang mingw-w64-x86_64-cmake mingw-w64-x86_64-make mingw-w64-x86_64-qt5-static
|
||||
|
||||
3. Add the MinGW-W64 binaries to your PATH environment variable:
|
||||
|
||||
@@ -543,6 +543,5 @@ Appendix B - Installing Heimdall Suite from Source
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
export cxx=clang++
|
||||
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DQt5Widgets_DIR=/c/msys64/mingw64/qt5-static/lib/cmake/Qt5Widgets ..
|
||||
make
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
|
||||
project(heimdall-frontend)
|
||||
|
||||
set(LIBPIT_INCLUDE_DIRS
|
||||
../libpit/Source)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON) # moc files are generated in build (current) directory
|
||||
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")
|
||||
|
||||
include_directories(${LIBPIT_INCLUDE_DIRS})
|
||||
|
||||
set(HEIMDALL_FRONTEND_SOURCE_FILES
|
||||
Source/aboutform.cpp
|
||||
Source/Alerts.cpp
|
||||
Source/FirmwareInfo.cpp
|
||||
Source/main.cpp
|
||||
Source/mainwindow.cpp
|
||||
Source/PackageData.cpp
|
||||
Source/Packaging.cpp)
|
||||
|
||||
qt5_wrap_ui(HEIMDALL_FRONTEND_FORMS
|
||||
mainwindow.ui
|
||||
aboutform.ui)
|
||||
|
||||
qt5_add_resources(HEIMDALL_FRONTEND_RESOURCES
|
||||
mainwindow.qrc)
|
||||
|
||||
add_executable(heimdall-frontend WIN32
|
||||
${HEIMDALL_FRONTEND_SOURCE_FILES}
|
||||
${HEIMDALL_FRONTEND_FORMS}
|
||||
${HEIMDALL_FRONTEND_RESOURCES})
|
||||
|
||||
include(LargeFiles)
|
||||
use_large_files(heimdall-frontend YES)
|
||||
|
||||
set_property(TARGET heimdall-frontend
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS "QT_LARGEFILE_SUPPORT")
|
||||
|
||||
target_link_libraries(heimdall-frontend pit)
|
||||
target_link_libraries(heimdall-frontend Qt5::Widgets)
|
||||
target_link_libraries(heimdall-frontend z)
|
||||
@@ -25,6 +25,8 @@
|
||||
// Heimdall Frontend
|
||||
#include "aboutform.h"
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
#define UNUSED(x) (void)(x)
|
||||
|
||||
using namespace HeimdallFrontend;
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.*/
|
||||
|
||||
#ifndef ABOUTFORM_H
|
||||
#define ABOUTFORM_H
|
||||
|
||||
// Qt
|
||||
#include <QProcess>
|
||||
#include <QWidget>
|
||||
@@ -50,3 +53,6 @@ namespace HeimdallFrontend
|
||||
void HandleHeimdallError(QProcess::ProcessError error);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -19,17 +19,20 @@
|
||||
THE SOFTWARE.*/
|
||||
|
||||
// Qt
|
||||
#include <QtGui/QApplication>
|
||||
#include <QApplication>
|
||||
#include <QtPlugin>
|
||||
|
||||
// Heimdall Frontend
|
||||
#include "mainwindow.h"
|
||||
|
||||
Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin);
|
||||
|
||||
using namespace HeimdallFrontend;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication application(argc, argv);
|
||||
|
||||
|
||||
MainWindow window;
|
||||
window.show();
|
||||
|
||||
|
||||
@@ -836,7 +836,7 @@ void MainWindow::SelectPit(void)
|
||||
|
||||
for (int i = 0; i < partitionNamesCount; i++)
|
||||
{
|
||||
const PitEntry *pitEntry = currentPitData.FindEntry(partitionNames[i].toAscii().constData());
|
||||
const PitEntry *pitEntry = currentPitData.FindEntry(partitionNames[i].toLatin1().constData());
|
||||
|
||||
if (pitEntry)
|
||||
{
|
||||
|
||||
@@ -53,17 +53,6 @@
|
||||
<enum>QTabWidget::Rounded</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
</font>
|
||||
</property>
|
||||
<widget class="QTabWidget" name="functionTabWidget">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário