Skip to content

Commit

Permalink
Infrastructure: remove old Windows build system stuff (Mudlet#7370)
Browse files Browse the repository at this point in the history
#### Brief overview of PR changes/additions
Removes some cruft left over from when we used to use the original Mingw
platform for building some of the project on Windows.

#### Motivation for adding to Mudlet
Elimiination of redundent code.

#### Other info (issues closed, discussion etc)
As mentioned in
https://github.com/Mudlet/Mudlet/pull/7365/files#r1694289176

Signed-off-by: Stephen Lyons <[email protected]>
  • Loading branch information
SlySven authored Jul 28, 2024
1 parent 3f30879 commit 8052923
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 88 deletions.
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,6 @@ include_optional_module(ENVIRONMENT_VARIABLE WITH_VARIABLE_SPLASH_SCREEN
include_optional_module(ENVIRONMENT_VARIABLE WITH_OWN_QTKEYCHAIN
OPTION_VARIABLE USE_OWN_QTKEYCHAIN
READABLE_NAME "own QtKeychain library")
include_optional_module(ENVIRONMENT_VARIABLE WITH_MAIN_BUILD_SYSTEM
OPTION_VARIABLE USE_MAIN_BUILD_SYSTEM
READABLE_NAME "original CI (setup-windows-sdk.ps1) windows build system"
SUPPORTED_SYSTEMS "Windows")
include_optional_module(ENVIRONMENT_VARIABLE WITH_QT6
OPTION_VARIABLE USE_QT6
READABLE_NAME "build with Qt6 (if installed)")
Expand Down
3 changes: 0 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,6 @@ endif()
if(WIN32)
target_link_libraries(mudlet ws2_32)
set_target_properties(mudlet PROPERTIES WIN32_EXECUTABLE ON)
if(USE_MAIN_BUILD_SYSTEM)
target_compile_definitions(mudlet PRIVATE INCLUDE_MAIN_BUILD_SYSTEM)
endif()
# The UNICODE and _UNICODE definitions are needed to make
# (QString) mudlet::getShortPathName(const QString& name) work in Windows:
target_compile_definitions(mudlet PRIVATE UNICODE _UNICODE)
Expand Down
3 changes: 0 additions & 3 deletions src/TLuaInterpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5476,9 +5476,6 @@ void TLuaInterpreter::initLuaGlobals()
// Luarocks installs rocks locally for developers, even with sudo
additionalCPaths << qsl("%1/.luarocks/lib/lua/5.1/?.so").arg(QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first());
additionalLuaPaths << qsl("%1/.luarocks/share/lua/5.1/?.lua;%1/.luarocks/share/lua/5.1/?/init.lua").arg(QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first());
#elif defined(Q_OS_WIN32) && defined(INCLUDE_MAIN_BUILD_SYSTEM)
// For CI builds or users/developers using the setup-windows-sdk.ps1 method:
additionalCPaths << qsl("C:\\Qt\\Tools\\mingw730_32\\lib\\lua\\5.1\\?.dll");
#endif

insertNativeSeparatorsFunction(pGlobalLua);
Expand Down
95 changes: 34 additions & 61 deletions src/mudlet.pro
Original file line number Diff line number Diff line change
Expand Up @@ -243,16 +243,6 @@ isEmpty( OWN_QTKEYCHAIN_TEST ) | !equals( OWN_QTKEYCHAIN_TEST, "NO" ) {
DEFINES += INCLUDE_OWN_QT5_KEYCHAIN
}

################ Alternative Windows build environment support #################
# Developers using a full MSYS2/Mingw-w64 system, as documented at:
# https://wiki.mudlet.org/w/Compiling_Mudlet#Compiling_on_Windows_7.2B_.28MSYS2_Alternative.29
# will need some tweaks to names/paths for some libraries/header files, do this
# by setting an environment variable WITH_MAIN_BUILD_SYSTEM variable to "NO".
MAIN_BUILD_SYSTEM_TEST = $$upper($$(WITH_MAIN_BUILD_SYSTEM))
isEmpty( MAIN_BUILD_SYSTEM_TEST ) | !equals( MAIN_BUILD_SYSTEM_TEST, "NO" ) {
DEFINES += INCLUDE_MAIN_BUILD_SYSTEM
}

###################### Platform Specific Paths and related #####################
# Specify default location for Lua files, in OS specific LUA_DEFAULT_DIR value
# below, if this is not done then a hardcoded default of a ./mudlet-lua/lua
Expand Down Expand Up @@ -352,67 +342,50 @@ unix:!macx {
LUA_DEFAULT_DIR = $${DATADIR}/lua
} else:win32 {
MINGW_BASE_DIR_TEST = $$(MINGW_BASE_DIR)

contains( DEFINES, INCLUDE_MAIN_BUILD_SYSTEM ) {
# For CI builds or users/developers using the setup-windows-sdk.ps1 method:
isEmpty( MINGW_BASE_DIR_TEST ) {
MINGW_BASE_DIR_TEST = "C:\\Qt\\Tools\\mingw730_32"
}
isEmpty( MINGW_BASE_DIR_TEST ) {
error($$escape_expand("Build aborted as environmental variable MINGW_BASE_DIR not set to the root of \\n"\
"the Mingw32 or Mingw64 part (depending on the number of bits in your desired\\n"\
"application build) typically this is one of:\\n"\
"'C:\msys32\mingw32' {32 Bit Mudlet built on a 32 Bit Host}\\n"\
"'C:\msys64\mingw32' {32 Bit Mudlet built on a 64 Bit Host}\\n"\
"'C:\msys64\mingw64' {64 Bit Mudlet built on a 64 Bit Host}\\n"))
}
GITHUB_WORKSPACE_TEST = $$(GITHUB_WORKSPACE)
isEmpty( GITHUB_WORKSPACE_TEST ) {
# For users/developers building with MSYS2 on Windows:
LIBS += \
-L"$${MINGW_BASE_DIR_TEST}\\bin" \
-llua51 \
-lhunspell-1.6
-L$${MINGW_BASE_DIR_TEST}/bin \
-llua5.1 \
-llibhunspell-1.7

INCLUDEPATH += \
"C:\\Libraries\\boost_1_83_0" \
"$${MINGW_BASE_DIR_TEST}\\include" \
"$${MINGW_BASE_DIR_TEST}\\lib\\include"

$${MINGW_BASE_DIR_TEST}/include/lua5.1 \
$${MINGW_BASE_DIR_TEST}/include/pugixml
} else {
isEmpty( MINGW_BASE_DIR_TEST ) {
error($$escape_expand("Build aborted as environmental variable MINGW_BASE_DIR not set to the root of \\n"\
"the Mingw32 or Mingw64 part (depending on the number of bits in your desired\\n"\
"application build) typically this is one of:\\n"\
"'C:\msys32\mingw32' {32 Bit Mudlet built on a 32 Bit Host}\\n"\
"'C:\msys64\mingw32' {32 Bit Mudlet built on a 64 Bit Host}\\n"\
"'C:\msys64\mingw64' {64 Bit Mudlet built on a 64 Bit Host}\\n"))
}
GITHUB_WORKSPACE_TEST = $$(GITHUB_WORKSPACE)
isEmpty( GITHUB_WORKSPACE_TEST ) {
# For users/developers building with MSYS2 on Windows:
# For CI building with MSYS2 for Windows in a GH Workflow:
contains(QMAKE_HOST.arch, x86_64) {

LIBS += \
-L$${MINGW_BASE_DIR_TEST}/bin \
-LD:\\a\\_temp\\msys64\\mingw64/lib \
-LD:\\a\\_temp\\msys64\\mingw64/bin \
-llua5.1 \
-llibhunspell-1.7

INCLUDEPATH += \
$${MINGW_BASE_DIR_TEST}/include/lua5.1 \
$${MINGW_BASE_DIR_TEST}/include/pugixml
D:\\a\\_temp\\msys64\\mingw64/include \
D:/a/_temp/msys64/mingw64/include/lua5.1 \
$${MINGW_BASE_DIR_TEST}/include/pugixml
} else {
# For users/developers building with MSYS2 for Windows in a GH Workflow:
contains(QMAKE_HOST.arch, x86_64) {
LIBS += \
-LD:\\a\\_temp\\msys64\\mingw64/lib \
-LD:\\a\\_temp\\msys64\\mingw64/bin \
-llua5.1 \
-llibhunspell-1.7

INCLUDEPATH += \
D:\\a\\_temp\\msys64\\mingw64/include \
D:/a/_temp/msys64/mingw64/include/lua5.1 \
$${MINGW_BASE_DIR_TEST}/include/pugixml
} else {
LIBS += \
-LD:\\a\\_temp\\msys64\\mingw32/lib \
-LD:\\a\\_temp\\msys64\\mingw32/bin \
-llua5.1 \
-llibhunspell-1.7

INCLUDEPATH += \
D:\\a\\_temp\\msys64\\mingw32/include \
D:/a/_temp/msys64/mingw32/include/lua5.1 \
$${MINGW_BASE_DIR_TEST}/include/pugixml
}
LIBS += \
-LD:\\a\\_temp\\msys64\\mingw32/lib \
-LD:\\a\\_temp\\msys64\\mingw32/bin \
-llua5.1 \
-llibhunspell-1.7

INCLUDEPATH += \
D:\\a\\_temp\\msys64\\mingw32/include \
D:/a/_temp/msys64/mingw32/include/lua5.1 \
$${MINGW_BASE_DIR_TEST}/include/pugixml
}
}

Expand Down
17 changes: 0 additions & 17 deletions src/uiawrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,6 @@
#include <uiautomationcore.h>
#include <uiautomationcoreapi.h>

#if defined(INCLUDE_MAIN_BUILD_SYSTEM)
enum NotificationProcessing {
NotificationProcessing_ImportantAll = 0,
NotificationProcessing_ImportantMostRecent = 1,
NotificationProcessing_All = 2,
NotificationProcessing_MostRecent = 3,
NotificationProcessing_CurrentThenMostRecent = 4
};

enum NotificationKind {
NotificationKind_ItemAdded = 0,
NotificationKind_ItemRemoved = 1,
NotificationKind_ActionCompleted = 2,
NotificationKind_ActionAborted = 3,
NotificationKind_Other = 4
};
#endif // INCLUDE_MAIN_BUILD_SYSTEM

class UiaWrapper {
UiaWrapper();
Expand Down

0 comments on commit 8052923

Please sign in to comment.