Support 64-bit Windows builds
This commit is contained in:
parent
8d0915de6e
commit
0703fb8c68
9 changed files with 60 additions and 18 deletions
31
OpenRGB.pro
31
OpenRGB.pro
|
|
@ -208,11 +208,21 @@ win32:HEADERS += \
|
|||
RGBController/RGBController_AorusGPU.h \
|
||||
RGBController/RGBController_OpenRazerWindows.h \
|
||||
|
||||
win32:LIBS += \
|
||||
-lws2_32 \
|
||||
-L"$$PWD/dependencies/inpout32_1501/Win32/" -linpout32 \
|
||||
-L"$$PWD/dependencies/libusb-1.0.22/MS32/dll" -llibusb-1.0 \
|
||||
-L"$$PWD/dependencies/hidapi-win/x86/" -lhidapi
|
||||
win32:contains(QMAKE_TARGET.arch, x86_64) {
|
||||
LIBS += \
|
||||
-lws2_32 \
|
||||
-L"$$PWD/dependencies/inpout32_1501/x64/" -linpoutx64 \
|
||||
-L"$$PWD/dependencies/libusb-1.0.22/MS64/dll" -llibusb-1.0 \
|
||||
-L"$$PWD/dependencies/hidapi-win/x64/" -lhidapi
|
||||
}
|
||||
|
||||
win32:contains(QMAKE_TARGET.arch, x86) {
|
||||
LIBS += \
|
||||
-lws2_32 \
|
||||
-L"$$PWD/dependencies/inpout32_1501/Win32/" -linpout32 \
|
||||
-L"$$PWD/dependencies/libusb-1.0.22/MS32/dll" -llibusb-1.0 \
|
||||
-L"$$PWD/dependencies/hidapi-win/x86/" -lhidapi
|
||||
}
|
||||
|
||||
win32:DEFINES -= \
|
||||
UNICODE
|
||||
|
|
@ -225,8 +235,15 @@ win32:DEFINES += \
|
|||
WIN32_LEAN_AND_MEAN
|
||||
|
||||
# Copy OpenRazer.dll to output directory
|
||||
win32
|
||||
{
|
||||
win32:contains(QMAKE_TARGET.arch, x86_64) {
|
||||
copydata.commands = $(COPY_FILE) \"$$shell_path($$PWD\\dependencies\\openrazer-win32\\OpenRazer64.dll)\" \"$$shell_path($$OUT_PWD)\"
|
||||
first.depends = $(first) copydata
|
||||
export(first.depends)
|
||||
export(copydata.commands)
|
||||
QMAKE_EXTRA_TARGETS += first copydata
|
||||
}
|
||||
|
||||
win32:contains(QMAKE_TARGET.arch, x86) {
|
||||
copydata.commands = $(COPY_FILE) \"$$shell_path($$PWD\\dependencies\\openrazer-win32\\OpenRazer.dll)\" \"$$shell_path($$OUT_PWD)\"
|
||||
first.depends = $(first) copydata
|
||||
export(first.depends)
|
||||
|
|
|
|||
32
dependencies/inpout32_1501/x64/inpout32.h
vendored
Normal file
32
dependencies/inpout32_1501/x64/inpout32.h
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#pragma once
|
||||
|
||||
//Functions exported from DLL.
|
||||
//For easy inclusion is user projects.
|
||||
//Original InpOut32 function support
|
||||
void _stdcall Out32(short PortAddress, short data);
|
||||
short _stdcall Inp32(short PortAddress);
|
||||
|
||||
//My extra functions for making life easy
|
||||
BOOL _stdcall IsInpOutDriverOpen(); //Returns TRUE if the InpOut driver was opened successfully
|
||||
BOOL _stdcall IsXP64Bit(); //Returns TRUE if the OS is 64bit (x64) Windows.
|
||||
|
||||
//DLLPortIO function support
|
||||
UCHAR _stdcall DlPortReadPortUchar (USHORT port);
|
||||
void _stdcall DlPortWritePortUchar(USHORT port, UCHAR Value);
|
||||
|
||||
USHORT _stdcall DlPortReadPortUshort (USHORT port);
|
||||
void _stdcall DlPortWritePortUshort(USHORT port, USHORT Value);
|
||||
|
||||
ULONG _stdcall DlPortReadPortUlong(ULONG port);
|
||||
void _stdcall DlPortWritePortUlong(ULONG port, ULONG Value);
|
||||
|
||||
//WinIO function support (Untested and probably does NOT work - esp. on x64!)
|
||||
PBYTE _stdcall MapPhysToLin(PBYTE pbPhysAddr, DWORD dwPhysSize, HANDLE *pPhysicalMemoryHandle);
|
||||
BOOL _stdcall UnmapPhysicalMemory(HANDLE PhysicalMemoryHandle, PBYTE pbLinAddr);
|
||||
BOOL _stdcall GetPhysLong(PBYTE pbPhysAddr, PDWORD pdwPhysVal);
|
||||
BOOL _stdcall SetPhysLong(PBYTE pbPhysAddr, DWORD dwPhysVal);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
dependencies/inpout32_1501/x64/inpoutx64.dll
vendored
Normal file
BIN
dependencies/inpout32_1501/x64/inpoutx64.dll
vendored
Normal file
Binary file not shown.
BIN
dependencies/inpout32_1501/x64/inpoutx64.lib
vendored
Normal file
BIN
dependencies/inpout32_1501/x64/inpoutx64.lib
vendored
Normal file
Binary file not shown.
BIN
dependencies/openrazer-win32/OpenRazer64.dll
vendored
Normal file
BIN
dependencies/openrazer-win32/OpenRazer64.dll
vendored
Normal file
Binary file not shown.
|
|
@ -12,8 +12,6 @@
|
|||
#include <Windows.h>
|
||||
#include "inpout32.h"
|
||||
|
||||
#pragma comment(lib, "inpout32.lib")
|
||||
|
||||
/* Return negative errno on error. */
|
||||
s32 i2c_smbus_i801::i801_access(u16 addr, char read_write, u8 command, int size, i2c_smbus_data *data)
|
||||
{
|
||||
|
|
@ -480,4 +478,4 @@ int i2c_smbus_i801::i801_wait_intr()
|
|||
s32 i2c_smbus_i801::i2c_smbus_xfer(u8 addr, char read_write, u8 command, int size, i2c_smbus_data* data)
|
||||
{
|
||||
return i801_access(addr, read_write, command, size, data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@
|
|||
#include <Windows.h>
|
||||
#include "inpout32.h"
|
||||
|
||||
#pragma comment(lib, "inpout32.lib")
|
||||
|
||||
s32 i2c_smbus_nct6775::nct6775_access(u16 addr, char read_write, u8 command, int size, i2c_smbus_data *data)
|
||||
{
|
||||
int i, len, status, cnt;
|
||||
|
|
@ -157,4 +155,4 @@ s32 i2c_smbus_nct6775::nct6775_access(u16 addr, char read_write, u8 command, int
|
|||
s32 i2c_smbus_nct6775::i2c_smbus_xfer(u8 addr, char read_write, u8 command, int size, i2c_smbus_data* data)
|
||||
{
|
||||
return nct6775_access(addr, read_write, command, size, data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@
|
|||
#include <Windows.h>
|
||||
#include "inpout32.h"
|
||||
|
||||
#pragma comment(lib, "inpout32.lib")
|
||||
|
||||
//Logic adapted from piix4_transaction() in i2c-piix4.c
|
||||
int i2c_smbus_piix4::piix4_transaction()
|
||||
{
|
||||
|
|
@ -169,4 +167,4 @@ s32 i2c_smbus_piix4::piix4_access(u16 addr, char read_write, u8 command, int siz
|
|||
s32 i2c_smbus_piix4::i2c_smbus_xfer(u8 addr, char read_write, u8 command, int size, i2c_smbus_data* data)
|
||||
{
|
||||
return piix4_access(addr, read_write, command, size, data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include <Windows.h>
|
||||
#include "inpout32.h"
|
||||
|
||||
#pragma comment(lib, "inpout32.lib")
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
|
@ -91,4 +90,4 @@ int superio_inb(int ioreg, int reg)
|
|||
close(dev_port_fd);
|
||||
return((int)temp);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue