[Launcher] Check for WIN32.
This commit is contained in:
parent
4a519d1b88
commit
24ac3da37e
|
@ -34,6 +34,10 @@ add_definitions(-DQRC_SOURCE_PATH="${PROJECT_SOURCE_DIR}/src/qml")
|
|||
add_definitions(-DQT_QML_DEBUG)
|
||||
endif(DEVELOP)
|
||||
|
||||
if(WIN32)
|
||||
add_definitions(-DWINDOWS)
|
||||
endif(WIN32)
|
||||
|
||||
add_executable(KittehPlayer ${SOURCES} ${qml_QRC})
|
||||
|
||||
# Use the Qml/Quick modules from Qt 5.
|
||||
|
|
|
@ -27,6 +27,10 @@ unix {
|
|||
INSTALLS += icon
|
||||
}
|
||||
|
||||
win32 {
|
||||
DEFINES += WINDOWS
|
||||
}
|
||||
|
||||
INSTALLS += target
|
||||
|
||||
HEADERS += src/mpvobject.h src/filesavedialog.h src/fileopendialog.h
|
||||
|
|
|
@ -12,11 +12,10 @@
|
|||
#include "filesavedialog.h"
|
||||
#include "mpvobject.h"
|
||||
|
||||
#if defined(MINGW) || defined(__MINGW32__) || defined(__MINGW64__)
|
||||
#ifdef WIN32
|
||||
#include "setenv_mingw.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
setenv("QT_QPA_PLATFORMTHEME", "gtk3", 0);
|
||||
|
@ -25,7 +24,6 @@ int main( int argc, char *argv[] )
|
|||
app.setOrganizationName("KittehPlayer");
|
||||
app.setOrganizationDomain("namedkitten.pw");
|
||||
app.setApplicationName("KittehPlayer");
|
||||
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
if (!qstrcmp(argv[i], "--update")) {
|
||||
QString program = QProcessEnvironment::systemEnvironment().value("APPDIR", "") + "/usr/bin/appimageupdatetool";
|
||||
|
@ -44,8 +42,8 @@ int main( int argc, char *argv[] )
|
|||
QString newpath = QProcessEnvironment::systemEnvironment().value("APPDIR", "") + "/usr/bin:" + QProcessEnvironment::systemEnvironment().value("PATH", "");
|
||||
qDebug() << newpath;
|
||||
setenv("PATH", newpath.toUtf8().constData(), 1);
|
||||
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QApplication::setAttribute(Qt::AA_UseSoftwareOpenGL );
|
||||
qmlRegisterType<MpvObject>("player", 1, 0, "MpvObject");
|
||||
qmlRegisterType<FileOpenDialog>("player", 1, 0, "FileOpenDialog");
|
||||
qmlRegisterType<FileSaveDialog>("player", 1, 0, "FileSaveDialog");
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
Loading…
Reference in a new issue