Compile fix for <QtPlatformHeaders/QWindowsWindowFunctions> header not existing in Windows Qt 6. Set Qt win64 auto build to build against Qt 6.

This commit is contained in:
harry 2024-02-24 10:35:09 -05:00
parent e2ac013cbb
commit 5f3ce5896a
4 changed files with 10 additions and 10 deletions

View File

@ -2,8 +2,8 @@
set PROJECT_ROOT=%~dp0.. set PROJECT_ROOT=%~dp0..
set CWD=%CD% set CWD=%CD%
call "C:\Qt\5.15\msvc2019_64\bin\qtenv2.bat" REM call "C:\Qt\5.15\msvc2019_64\bin\qtenv2.bat"
REM call "C:\Qt\6.0\msvc2019_64\bin\qtenv2.bat" call "C:\Qt\6.5\msvc2019_64\bin\qtenv2.bat"
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cd /d %CWD% cd /d %CWD%
@ -50,7 +50,7 @@ IF DEFINED FCEU_RELEASE_VERSION (set PUBLIC_RELEASE=1)
REM cmake -h REM cmake -h
REM cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DSDL_INSTALL_PREFIX=%SDL_INSTALL_PREFIX% .. REM cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DSDL_INSTALL_PREFIX=%SDL_INSTALL_PREFIX% ..
cmake -DQT6=0 -DPUBLIC_RELEASE=%PUBLIC_RELEASE% -DSDL_INSTALL_PREFIX=%SDL_INSTALL_PREFIX% -DLIBARCHIVE_INSTALL_PREFIX=%LIBARCHIVE_INSTALL_PREFIX% -DUSE_LIBAV=1 -DFFMPEG_INSTALL_PREFIX=%FFMPEG_INSTALL_PREFIX% -G"Visual Studio 16" -T"v142" .. cmake -DQT=6 -DPUBLIC_RELEASE=%PUBLIC_RELEASE% -DSDL_INSTALL_PREFIX=%SDL_INSTALL_PREFIX% -DLIBARCHIVE_INSTALL_PREFIX=%LIBARCHIVE_INSTALL_PREFIX% -DUSE_LIBAV=1 -DFFMPEG_INSTALL_PREFIX=%FFMPEG_INSTALL_PREFIX% -G"Visual Studio 16" -T"v142" ..
REM nmake REM nmake
msbuild /m fceux.sln /p:Configuration=Release msbuild /m fceux.sln /p:Configuration=Release

View File

@ -35,7 +35,7 @@
#include "Qt/ConsoleVideoConf.h" #include "Qt/ConsoleVideoConf.h"
#include "Qt/nes_shm.h" #include "Qt/nes_shm.h"
#ifdef WIN32 #if defined(WIN32) && (QT_VERSION_MAJOR < 6)
#include <QtPlatformHeaders/QWindowsWindowFunctions> #include <QtPlatformHeaders/QWindowsWindowFunctions>
#endif #endif
@ -132,7 +132,7 @@ ConsoleVideoConfDialog_t::ConsoleVideoConfDialog_t(QWidget *parent)
vbox1->addWidget( gl_LF_chkBox ); vbox1->addWidget( gl_LF_chkBox );
#ifdef WIN32 #if defined(WIN32) && (QT_VERSION_MAJOR < 6)
// 1px full screen border - hack fix for QOpenGLWidget fullscreen issues // 1px full screen border - hack fix for QOpenGLWidget fullscreen issues
winFullScreenBorderCbx = new QCheckBox( tr("Fullscreen Border (1px)") ); winFullScreenBorderCbx = new QCheckBox( tr("Fullscreen Border (1px)") );
winFullScreenBorderCbx->setToolTip(tr("Hack fix for QOpenGLWidget fullscreen issue. May not be needed.")); winFullScreenBorderCbx->setToolTip(tr("Hack fix for QOpenGLWidget fullscreen issue. May not be needed."));
@ -736,7 +736,7 @@ void ConsoleVideoConfDialog_t::openGL_linearFilterChanged( int value )
} }
} }
//---------------------------------------------------- //----------------------------------------------------
#ifdef WIN32 #if defined(WIN32) && (QT_VERSION_MAJOR < 6)
void ConsoleVideoConfDialog_t::winFullScreenBorderChanged(int value) void ConsoleVideoConfDialog_t::winFullScreenBorderChanged(int value)
{ {
bool opt = (value != Qt::Unchecked); bool opt = (value != Qt::Unchecked);

View File

@ -55,7 +55,7 @@ class ConsoleVideoConfDialog_t : public QDialog
QCheckBox *showFrameCount_cbx; QCheckBox *showFrameCount_cbx;
QCheckBox *showLagCount_cbx; QCheckBox *showLagCount_cbx;
QCheckBox *showRerecordCount_cbx; QCheckBox *showRerecordCount_cbx;
#ifdef WIN32 #if defined(WIN32) && (QT_VERSION_MAJOR < 6)
QCheckBox *winFullScreenBorderCbx; QCheckBox *winFullScreenBorderCbx;
#endif #endif
QDoubleSpinBox *xScaleBox; QDoubleSpinBox *xScaleBox;
@ -114,7 +114,7 @@ class ConsoleVideoConfDialog_t : public QDialog
void ntscEndScanLineChanged(int value); void ntscEndScanLineChanged(int value);
void palStartScanLineChanged(int value); void palStartScanLineChanged(int value);
void palEndScanLineChanged(int value); void palEndScanLineChanged(int value);
#ifdef WIN32 #if defined(WIN32) && (QT_VERSION_MAJOR < 6)
void winFullScreenBorderChanged(int value); void winFullScreenBorderChanged(int value);
#endif #endif

View File

@ -29,7 +29,7 @@
#include "Qt/SplashScreen.h" #include "Qt/SplashScreen.h"
#include "Qt/QtScriptManager.h" #include "Qt/QtScriptManager.h"
#ifdef WIN32 #if defined(WIN32) && (QT_VERSION_MAJOR < 6)
#include <QtPlatformHeaders/QWindowsWindowFunctions> #include <QtPlatformHeaders/QWindowsWindowFunctions>
#endif #endif
@ -159,7 +159,7 @@ int main( int argc, char *argv[] )
// Need to wait for window to initialize before video init can be called. // Need to wait for window to initialize before video init can be called.
//consoleWindow->videoInit(); //consoleWindow->videoInit();
#ifdef WIN32 #if defined(WIN32) && (QT_VERSION_MAJOR < 6)
// This function is needed to fix the issue referenced below. It adds a 1-pixel border // This function is needed to fix the issue referenced below. It adds a 1-pixel border
// around the fullscreen window due to some limitation in windows. // around the fullscreen window due to some limitation in windows.
// https://doc.qt.io/qt-5/windows-issues.html#fullscreen-opengl-based-windows // https://doc.qt.io/qt-5/windows-issues.html#fullscreen-opengl-based-windows