Skip to content

Commit

Permalink
windows: 64bit build
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Mar 17, 2024
1 parent c025b3c commit 76f2fa3
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 53 deletions.
80 changes: 40 additions & 40 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ jobs:
QMAKESPEC: win32-g++
QT_MODULES:
qtscript
CC: /mingw32/bin/i686-w64-mingw32-gcc.exe
CXX: /mingw32/bin/i686-w64-mingw32-g++.exe
CC: /mingw64/bin/x86_64-w64-mingw32-gcc.exe
CXX: /mingw64/bin/x86_64-w64-mingw32-g++.exe

steps:
- name: Checkout
Expand Down Expand Up @@ -321,52 +321,52 @@ jobs:
- name: Update and install MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: mingw32
msystem: mingw64
release: true
update: false
path-type: inherit
install: >-
wget
unzip
mingw-w64-i686-gcc
mingw-w64-i686-gcc-libs
mingw-w64-i686-cmake
mingw-w64-i686-libmad
mingw-w64-i686-libsndfile
mingw-w64-i686-flac
mingw-w64-i686-fftw
mingw-w64-i686-libusb
mingw-w64-i686-python-lxml
mingw-w64-i686-qt5-base
mingw-w64-i686-qt5-multimedia
mingw-w64-i686-qt5-serialport
mingw-w64-i686-qt5-script
mingw-w64-i686-qt5-tools
mingw-w64-i686-qt5-imageformats
mingw-w64-i686-qt5-svg
mingw-w64-i686-qt5-declarative
mingw-w64-i686-qt5-quickcontrols
mingw-w64-i686-qt5-quickcontrols2
mingw-w64-i686-qt5-3d
mingw-w64-i686-qt5-quick3d
mingw-w64-i686-nsis
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gcc-libs
mingw-w64-x86_64-cmake
mingw-w64-x86_64-libmad
mingw-w64-x86_64-libsndfile
mingw-w64-x86_64-flac
mingw-w64-x86_64-fftw
mingw-w64-x86_64-libusb
mingw-w64-x86_64-python-lxml
mingw-w64-x86_64-qt5-base
mingw-w64-x86_64-qt5-multimedia
mingw-w64-x86_64-qt5-serialport
mingw-w64-x86_64-qt5-script
mingw-w64-x86_64-qt5-tools
mingw-w64-x86_64-qt5-imageformats
mingw-w64-x86_64-qt5-svg
mingw-w64-x86_64-qt5-declarative
mingw-w64-x86_64-qt5-quickcontrols
mingw-w64-x86_64-qt5-quickcontrols2
mingw-w64-x86_64-qt5-3d
mingw-w64-x86_64-qt5-quick3d
mingw-w64-x86_64-nsis
- name: D2XX SDK
shell: msys2 {0}
run: |
set MSYSTEM=MINGW32
mkdir -p /c/Qt/D2XXSDK
wget https://ftdichip.com/wp-content/uploads/2023/09/CDM-v2.12.36.4-WHQL-Certified.zip -O /c/Qt/D2XXSDK/cdm.zip
cd /c/Qt/D2XXSDK
set MSYSTEM=MINGW64
mkdir -p /c/projects/D2XXSDK
wget https://ftdichip.com/wp-content/uploads/2023/09/CDM-v2.12.36.4-WHQL-Certified.zip -O /c/projects/D2XXSDK/cdm.zip
cd /c/projects/D2XXSDK
unzip cdm.zip
cd i386
gendef.exe - ftd2xx.dll > ftd2xx.def
dlltool -k --input-def ftd2xx.def --dllname ftd2xx.dll --output-lib libftd2xx.a
cd amd64
gendef.exe - ftd2xx64.dll > ftd2xx.def
dlltool -k --input-def ftd2xx.def --dllname ftd2xx64.dll --output-lib libftd2xx.a
- name: Print program versions
shell: msys2 {0}
run: |
set MSYSTEM=MINGW32
set MSYSTEM=MINGW64
echo "pwd:"
pwd
echo "CXX:"
Expand All @@ -381,19 +381,19 @@ jobs:
#if: false
shell: msys2 {0}
run: |
set MSYSTEM=MINGW32
set MSYSTEM=MINGW64
# disable Velleman plugin
sed -i -e 's/ add_subdirectory(velleman)/# add_subdirectory(velleman)/g' plugins/CMakeLists.txt
# fix MSYS2 system path
sed -i -e 's/$ENV{SystemDrive}\/msys64/D:\/a\/_temp\/msys64/g' platforms/windows/CMakeLists.txt
# fix project path in NSIS script
sed -i -e 's/c\:\\Qt/d:\\a\\qlcplus/g' platforms/windows/${{env.NSIS_SCRIPT}}
sed -i -e 's/c\:\\projects/d:\\a\\qlcplus/g' platforms/windows/${{env.NSIS_SCRIPT}}
- name: Configure v4 build for Windows
shell: msys2 {0}
if: ${{ matrix.task == 'compile-qt5' }}
run: |
set MSYSTEM=MINGW32
set MSYSTEM=MINGW64
mkdir build
cd build
cmake -G "Unix Makefiles" ..
Expand All @@ -402,22 +402,22 @@ jobs:
shell: msys2 {0}
if: ${{ matrix.task == 'compile-qt5qml' }}
run: |
set MSYSTEM=MINGW32
set MSYSTEM=MINGW64
mkdir build
cd build
cmake -G "Unix Makefiles" -Dqmlui=ON ..
- name: Build for Windows
shell: msys2 {0}
run: |
set MSYSTEM=MINGW32
set MSYSTEM=MINGW64
cd build
make -j${NPROC}
- name: Install on Windows
shell: msys2 {0}
run: |
set MSYSTEM=MINGW32
set MSYSTEM=MINGW64
#echo 'Silently installing QLC+...'
cd build
make install/fast
Expand All @@ -427,7 +427,7 @@ jobs:
- name: Build installation package
shell: msys2 {0}
run: |
set MSYSTEM=MINGW32
set MSYSTEM=MINGW64
cd /c/qlcplus
echo 'Creating package...'
makensis -X'SetCompressor /FINAL lzma' ${{env.NSIS_SCRIPT}}
Expand Down
4 changes: 2 additions & 2 deletions platforms/windows/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ endif()
get_filename_component(QT_LIBS_PATH ${QT_DIR}/../../../bin ABSOLUTE)
get_filename_component(QT_PLUGINS_PATH ${QT_LIBS_PATH}/../share/${QT_P}/plugins ABSOLUTE)
get_filename_component(QT_QML_PATH ${QT_LIBS_PATH}/../share/${QT_P}/qml ABSOLUTE)
set(SYS_LIBS_PATH $ENV{SystemDrive}/msys64/mingw32/bin)
set(SYS_LIBS_PATH $ENV{SystemDrive}/msys64/mingw64/bin)
# set(SYS_LIBS_PATH D:/msys64/mingw32/bin)

# Qt library dependencies
Expand Down Expand Up @@ -172,7 +172,7 @@ endif()
# MSYS2 libraries
set(msys_path "${INSTALLROOT}/${LIBSDIR}")
set(msys_files "${SYS_LIBS_PATH}/libstdc++-6.dll"
"${SYS_LIBS_PATH}/libgcc_s_dw2-1.dll"
"${SYS_LIBS_PATH}/libgcc_s_seh-1.dll"
"${SYS_LIBS_PATH}/libwinpthread-1.dll"
"${SYS_LIBS_PATH}/libicuin74.dll"
"${SYS_LIBS_PATH}/libicuuc74.dll"
Expand Down
2 changes: 1 addition & 1 deletion platforms/windows/qlcplus4Qt5.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

;--------------------------------
;Defines
!define QLCPLUS_HOME "c:\Qt\qlcplus"
!define QLCPLUS_HOME "c:\projects\qlcplus"
!define MUI_ICON "${QLCPLUS_HOME}\resources\icons\qlcplus.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\nsis3-uninstall.ico"
!define MUI_HEADERIMAGE
Expand Down
2 changes: 1 addition & 1 deletion platforms/windows/qlcplus4Qt6.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

;--------------------------------
;Defines
!define QLCPLUS_HOME "c:\Qt\qlcplus"
!define QLCPLUS_HOME "c:\projects\qlcplus"
!define MUI_ICON "${QLCPLUS_HOME}\resources\icons\qlcplus.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\nsis3-uninstall.ico"
!define MUI_HEADERIMAGE
Expand Down
2 changes: 1 addition & 1 deletion platforms/windows/qlcplus5Qt5.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

;--------------------------------
;Defines
!define QLCPLUS_HOME "c:\Qt\qlcplus"
!define QLCPLUS_HOME "c:\porjects\qlcplus"
!define MUI_ICON "${QLCPLUS_HOME}\resources\icons\qlcplus.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\nsis3-uninstall.ico"
!define MUI_HEADERIMAGE
Expand Down
12 changes: 5 additions & 7 deletions plugins/dmxusb/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ add_library(${module_name}
)

if(WIN32)
set(FTD2XXDIR "C:/Qt/D2XXSDK")
target_link_libraries(${module_name} PRIVATE ${FTD2XXDIR}/i386/libftd2xx.a)
set(FTD2XXDIR "C:/projects/D2XXSDK")
target_link_libraries(${module_name} PRIVATE ${FTD2XXDIR}/amd64/libftd2xx.a)
target_include_directories(${module_name} PRIVATE ${FTD2XXDIR})
message("Building with FTD2xx support.")
set(WITH_D2XX TRUE)
Expand Down Expand Up @@ -151,11 +151,6 @@ if(WITH_D2XX)
target_compile_definitions(${module_name} PRIVATE FTD2XX)
endif()

if((WITH_D2XX) AND (WIN32))
target_include_directories(${module_name} PRIVATE ${FTD2XXDIR})
target_link_libraries(${module_name} PRIVATE ${FTD2XXDIR}/i386/libftd2xx.a)
endif()

if(WITH_LIBFTDI)
target_sources(${module_name} PUBLIC libftdi-interface.cpp libftdi-interface.h)
endif()
Expand All @@ -166,6 +161,9 @@ if (UNIX AND NOT APPLE)
DESTINATION ${UDEVRULESDIR})
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/org.qlcplus.QLCPlus.dmxusb.metainfo.xml"
DESTINATION ${METAINFODIR})
elseif (WITH_D2XX)
install(FILES ${FTD2XXDIR}/amd64/ftd2xx64.dll
DESTINATION ${INSTALLROOT}/${LIBSDIR})
endif()

install(TARGETS ${module_name}
Expand Down
2 changes: 1 addition & 1 deletion plugins/dmxusb/src/src.pro
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CONFIG(ftd2xx) {

win32 {
# Windows target
FTD2XXDIR = C:/Qt/D2XXSDK
FTD2XXDIR = C:/projects/D2XXSDK
LIBS += -L$$FTD2XXDIR/i386 -lftd2xx
LIBS += $$FTD2XXDIR/i386/libftd2xx.a
INCLUDEPATH += $$FTD2XXDIR
Expand Down

0 comments on commit 76f2fa3

Please sign in to comment.