Skip to content

Commit dfaa528

Browse files
committed
mingw-w64-codelite-git: Add package
1 parent 44541b2 commit dfaa528

8 files changed

+542
-0
lines changed
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
From c11775724016ab6f3beff61a0dfab6ac28d35052 Mon Sep 17 00:00:00 2001
2+
From: Tim Stahlhut <[email protected]>
3+
Date: Sat, 18 Oct 2025 11:36:39 -0400
4+
Subject: Replace "CMAKE_INSTALL_PREFIX" with "CL_INSTALL_BIN"
5+
6+
---
7+
CMakeLists.txt | 10 +++++-----
8+
CodeLite/CMakeLists.txt | 4 ++--
9+
DatabaseExplorer/CMakeLists.txt | 8 ++++----
10+
Plugin/CMakeLists.txt | 4 ++--
11+
sdk/wxsqlite3/CMakeLists.txt | 4 ++--
12+
5 files changed, 15 insertions(+), 15 deletions(-)
13+
14+
diff --git a/CMakeLists.txt b/CMakeLists.txt
15+
index 240a0d57b..8d53c4e1e 100644
16+
--- a/CMakeLists.txt
17+
+++ b/CMakeLists.txt
18+
@@ -1246,16 +1246,16 @@ if(MINGW)
19+
20+
foreach(DLL ${SYSTEM_DLLS})
21+
install(FILES "${MSYS2_BASE}/clang64/bin/${DLL}"
22+
- DESTINATION "${CMAKE_INSTALL_PREFIX}")
23+
+ DESTINATION "${CL_INSTALL_BIN}")
24+
endforeach()
25+
26+
foreach(DLL ${MSYS2_CORE_FILES})
27+
install(FILES "${MSYS2_BASE}/usr/bin/${DLL}"
28+
- DESTINATION "${CMAKE_INSTALL_PREFIX}")
29+
+ DESTINATION "${CL_INSTALL_BIN}")
30+
endforeach()
31+
32+
foreach(DLL ${WXWIDGETS_DLLS})
33+
- install(FILES "${DLL}" DESTINATION "${CMAKE_INSTALL_PREFIX}")
34+
+ install(FILES "${DLL}" DESTINATION "${CL_INSTALL_BIN}")
35+
endforeach()
36+
37+
foreach(RESOURCE ${CODELITE_RESOURCES})
38+
@@ -1264,11 +1264,11 @@ if(MINGW)
39+
40+
# copy extra deps dlls
41+
foreach(DLL ${LIBHUNSPELL_DEPS})
42+
- install(FILES "${DLL}" DESTINATION "${CMAKE_INSTALL_PREFIX}")
43+
+ install(FILES "${DLL}" DESTINATION "${CL_INSTALL_BIN}")
44+
endforeach()
45+
46+
foreach(DLL ${LIBSSH_DEPS})
47+
- install(FILES "${DLL}" DESTINATION "${CMAKE_INSTALL_PREFIX}")
48+
+ install(FILES "${DLL}" DESTINATION "${CL_INSTALL_BIN}")
49+
endforeach()
50+
51+
foreach(DLL ${OPENSSL_DEPS})
52+
diff --git a/CodeLite/CMakeLists.txt b/CodeLite/CMakeLists.txt
53+
index 4731e147e..73cf4af0f 100644
54+
--- a/CodeLite/CMakeLists.txt
55+
+++ b/CodeLite/CMakeLists.txt
56+
@@ -132,8 +132,8 @@ if(NOT MINGW)
57+
else()
58+
install(
59+
TARGETS libcodelite
60+
- RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}
61+
- LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}
62+
+ RUNTIME DESTINATION ${CL_INSTALL_BIN}
63+
+ LIBRARY DESTINATION ${CL_INSTALL_BIN}
64+
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
65+
endif()
66+
67+
diff --git a/DatabaseExplorer/CMakeLists.txt b/DatabaseExplorer/CMakeLists.txt
68+
index 306a645e4..f0d5fea50 100644
69+
--- a/DatabaseExplorer/CMakeLists.txt
70+
+++ b/DatabaseExplorer/CMakeLists.txt
71+
@@ -19,10 +19,10 @@ if(WITH_MYSQL)
72+
add_compile_definitions(DBL_USE_MYSQL=1)
73+
74+
if(MINGW)
75+
- install(FILES "${MSYS2_BASE}/clang64/bin/libmariadb.dll" DESTINATION "${CMAKE_INSTALL_PREFIX}")
76+
+ install(FILES "${MSYS2_BASE}/clang64/bin/libmariadb.dll" DESTINATION "${CL_INSTALL_BIN}")
77+
msys_list_deps(${MSYS2_BASE}/clang64/bin/libmariadb.dll LIBMARIA_DEPS)
78+
foreach(DEP ${LIBMARIA_DEPS})
79+
- install(FILES "${DEP}" DESTINATION "${CMAKE_INSTALL_PREFIX}")
80+
+ install(FILES "${DEP}" DESTINATION "${CL_INSTALL_BIN}")
81+
endforeach()
82+
endif()
83+
unset(WITH_MYSQL CACHE)
84+
@@ -34,10 +34,10 @@ if(WITH_POSTGRES)
85+
add_compile_definitions(DBL_USE_POSTGRES=1)
86+
87+
if(MINGW)
88+
- install(FILES "${MSYS2_BASE}/clang64/bin/libpq.dll" DESTINATION "${CMAKE_INSTALL_PREFIX}")
89+
+ install(FILES "${MSYS2_BASE}/clang64/bin/libpq.dll" DESTINATION "${CL_INSTALL_BIN}")
90+
msys_list_deps(${MSYS2_BASE}/clang64/bin/libpq.dll LIBPOSTGRES_DEPS)
91+
foreach(DEP ${LIBPOSTGRES_DEPS})
92+
- install(FILES "${DEP}" DESTINATION "${CMAKE_INSTALL_PREFIX}")
93+
+ install(FILES "${DEP}" DESTINATION "${CL_INSTALL_BIN}")
94+
endforeach()
95+
endif()
96+
endif()
97+
diff --git a/Plugin/CMakeLists.txt b/Plugin/CMakeLists.txt
98+
index 95e75dda4..c1d1829b8 100644
99+
--- a/Plugin/CMakeLists.txt
100+
+++ b/Plugin/CMakeLists.txt
101+
@@ -113,7 +113,7 @@ if(NOT MINGW)
102+
else()
103+
install(
104+
TARGETS plugin
105+
- RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}
106+
- LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}
107+
+ RUNTIME DESTINATION ${CL_INSTALL_BIN}
108+
+ LIBRARY DESTINATION ${CL_INSTALL_BIN}
109+
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
110+
endif()
111+
diff --git a/sdk/wxsqlite3/CMakeLists.txt b/sdk/wxsqlite3/CMakeLists.txt
112+
index 3c260431f..6cf701365 100644
113+
--- a/sdk/wxsqlite3/CMakeLists.txt
114+
+++ b/sdk/wxsqlite3/CMakeLists.txt
115+
@@ -40,7 +40,7 @@ if(NOT MINGW)
116+
else()
117+
install(
118+
TARGETS wxsqlite3
119+
- RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}
120+
- LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}
121+
+ RUNTIME DESTINATION ${CL_INSTALL_BIN}
122+
+ LIBRARY DESTINATION ${CL_INSTALL_BIN}
123+
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
124+
endif()
125+
--
126+
2.48.1.windows.1
127+
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
From 910d3bee28f31210dfb4cf0f47ab3139f08e6f0b Mon Sep 17 00:00:00 2001
2+
From: Tim Stahlhut <[email protected]>
3+
Date: Mon, 27 Oct 2025 18:16:24 -0400
4+
Subject: Extend support of WITH_POSIX_LAYOUT
5+
6+
---
7+
CMakeLists.txt | 7 +++++--
8+
LiteEditor/app.cpp | 8 ++++++++
9+
wxcrafter/src/wxgui_bitmaploader.cpp | 5 +++++
10+
3 files changed, 18 insertions(+), 2 deletions(-)
11+
12+
diff --git a/CMakeLists.txt b/CMakeLists.txt
13+
index 8d53c4e1e..a4131647e 100644
14+
--- a/CMakeLists.txt
15+
+++ b/CMakeLists.txt
16+
@@ -344,10 +344,13 @@ if(MINGW)
17+
# MinGW
18+
if(WITH_POSIX_LAYOUT)
19+
set(MINGW_INSTALL_PLUGINS_DIR "${CMAKE_INSTALL_PREFIX}/lib/codelite")
20+
+ set(MINGW_INSTALL_BIN "${CMAKE_INSTALL_PREFIX}/bin")
21+
+ set(MINGW_INSTALL_RESOURCES_DIR "${CMAKE_INSTALL_PREFIX}/share/codelite")
22+
else()
23+
set(MINGW_INSTALL_PLUGINS_DIR "${CMAKE_INSTALL_PREFIX}/plugins")
24+
+ set(MINGW_INSTALL_BIN "${CMAKE_INSTALL_PREFIX}")
25+
+ set(MINGW_INSTALL_RESOURCES_DIR "${MINGW_INSTALL_BIN}")
26+
endif()
27+
- set(MINGW_INSTALL_BIN "${CMAKE_INSTALL_PREFIX}")
28+
endif()
29+
30+
if(APPLE)
31+
@@ -358,7 +361,7 @@ if(APPLE)
32+
elseif(MINGW)
33+
set(PLUGINS_DIR "${MINGW_INSTALL_PLUGINS_DIR}")
34+
set(CL_INSTALL_BIN "${MINGW_INSTALL_BIN}")
35+
- set(CL_RESOURCES_DIR "${MINGW_INSTALL_BIN}")
36+
+ set(CL_RESOURCES_DIR "${MINGW_INSTALL_RESOURCES_DIR}")
37+
else()
38+
# /usr/lib/codelite
39+
set(PLUGINS_DIR "${CL_PREFIX}/${CL_INSTALL_LIBDIR}/codelite")
40+
diff --git a/LiteEditor/app.cpp b/LiteEditor/app.cpp
41+
index 6ed2752c4..94b047cd4 100644
42+
--- a/LiteEditor/app.cpp
43+
+++ b/LiteEditor/app.cpp
44+
@@ -509,7 +509,15 @@ bool CodeLiteApp::OnInit()
45+
}
46+
homeDir = bd.GetPath();
47+
} else {
48+
+#ifdef USE_POSIX_LAYOUT
49+
+ wxFileName execfpath(clStandardPaths::Get().GetExecutablePath());
50+
+ if (execfpath.GetDirs().Last().IsSameAs("bin")) {
51+
+ execfpath.RemoveLastDir();
52+
+ }
53+
+ homeDir = execfpath.GetPath() + wxT("/share/codelite");
54+
+#else
55+
homeDir = wxFileName(wxStandardPaths::Get().GetExecutablePath()).GetPath();
56+
+#endif
57+
}
58+
clStandardPaths::Get().SetDataDir(homeDir);
59+
#endif
60+
diff --git a/wxcrafter/src/wxgui_bitmaploader.cpp b/wxcrafter/src/wxgui_bitmaploader.cpp
61+
index 17c70d930..9687f49af 100644
62+
--- a/wxcrafter/src/wxgui_bitmaploader.cpp
63+
+++ b/wxcrafter/src/wxgui_bitmaploader.cpp
64+
@@ -14,7 +14,12 @@ wxCrafter::ResourceLoader::ResourceLoader(const wxString& skin)
65+
{
66+
if(m_bitmaps.empty()) {
67+
wxString zipFile;
68+
+#ifdef USE_POSIX_LAYOUT
69+
+ zipFile << wxStandardPaths::Get().GetDataDir() << wxT(INSTALL_DIR) << wxFileName::GetPathSeparator() << skin
70+
+ << wxT(".zip");
71+
+#else
72+
zipFile << wxStandardPaths::Get().GetDataDir() << wxFileName::GetPathSeparator() << skin << wxT(".zip");
73+
+#endif
74+
clZipReader zip(zipFile);
75+
76+
std::unordered_map<wxString, clZipReader::Entry> entries;
77+
--
78+
2.48.1.windows.1
79+
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
From f0169381ea6d48f8e479533d95f1a1151554d530 Mon Sep 17 00:00:00 2001
2+
From: Tim Stahlhut <[email protected]>
3+
Date: Sun, 19 Oct 2025 06:14:37 -0400
4+
Subject: Guard WXWIN and other stuff with FOR_MSYS2_PACKAGE
5+
6+
---
7+
CMakeLists.txt | 18 ++++++++++--------
8+
CodeFormatter/CMakeLists.txt | 2 +-
9+
DatabaseExplorer/CMakeLists.txt | 4 ++--
10+
LanguageServer/CMakeLists.txt | 2 +-
11+
4 files changed, 14 insertions(+), 12 deletions(-)
12+
13+
diff --git a/CMakeLists.txt b/CMakeLists.txt
14+
index a4131647e..b8f36c4f8 100644
15+
--- a/CMakeLists.txt
16+
+++ b/CMakeLists.txt
17+
@@ -78,13 +78,15 @@ endif()
18+
if(MINGW)
19+
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install")
20+
set(CL_PREFIX "${CMAKE_INSTALL_PREFIX}")
21+
- if(NOT DEFINED ENV{MSYS2_BASE})
22+
- message(
23+
- FATAL_ERROR
24+
- "Set the environment variable MSYS2_BASE to point to the installation of your MSYS2. e.g. export MSYS2_BASE=C:/msys64"
25+
- )
26+
+ if(NOT FOR_MSYS2_PACKAGE)
27+
+ if(NOT DEFINED ENV{MSYS2_BASE})
28+
+ message(
29+
+ FATAL_ERROR
30+
+ "Set the environment variable MSYS2_BASE to point to the installation of your MSYS2. e.g. export MSYS2_BASE=C:/msys64"
31+
+ )
32+
+ endif()
33+
+ set(MSYS2_BASE $ENV{MSYS2_BASE})
34+
endif()
35+
- set(MSYS2_BASE $ENV{MSYS2_BASE})
36+
elseif(UNIX AND NOT APPLE)
37+
if(CL_PREFIX)
38+
# user provided CL_PREFIX -> use it instead of CMAKE_INSTALL_PREFIX
39+
@@ -496,7 +498,7 @@ if(UNIX AND NOT APPLE)
40+
endif(UNIX AND NOT APPLE)
41+
42+
# find wxWidgets once
43+
-if(MINGW)
44+
+if(MINGW AND NOT FOR_MSYS2_PACKAGE)
45+
if(NOT WXWIN)
46+
message(FATAL_ERROR "Missing -DWXWIN=<wxWidgets/root/install/dir>")
47+
endif()
48+
@@ -1198,7 +1200,7 @@ if(NOT WXC_APP)
49+
50+
endif()
51+
52+
-if(MINGW)
53+
+if(MINGW AND NOT FOR_MSYS2_PACKAGE)
54+
# determine MSYS2 path
55+
write_file(${CMAKE_BINARY_DIR}/msys2-environment "export WXWIN=${WXWIN}")
56+
write_file(${CMAKE_BINARY_DIR}/msys2-environment
57+
diff --git a/CodeFormatter/CMakeLists.txt b/CodeFormatter/CMakeLists.txt
58+
index 35443f1f5..d9331c834 100644
59+
--- a/CodeFormatter/CMakeLists.txt
60+
+++ b/CodeFormatter/CMakeLists.txt
61+
@@ -33,7 +33,7 @@ target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)
62+
63+
cl_install_plugin(${PLUGIN_NAME})
64+
65+
-if(MINGW)
66+
+if(MINGW AND NOT FOR_MSYS2_PACKAGE)
67+
# install clang-format
68+
msys_install_clang64_tool(clang-format.exe ${CL_INSTALL_BIN})
69+
endif()
70+
diff --git a/DatabaseExplorer/CMakeLists.txt b/DatabaseExplorer/CMakeLists.txt
71+
index f0d5fea50..17f065041 100644
72+
--- a/DatabaseExplorer/CMakeLists.txt
73+
+++ b/DatabaseExplorer/CMakeLists.txt
74+
@@ -18,7 +18,7 @@ if(WITH_MYSQL)
75+
endif(${LIBMYSQLCLIENT} STREQUAL "LIBMYSQLCLIENT-NOTFOUND")
76+
add_compile_definitions(DBL_USE_MYSQL=1)
77+
78+
- if(MINGW)
79+
+ if(MINGW AND NOT FOR_MSYS2_PACKAGE)
80+
install(FILES "${MSYS2_BASE}/clang64/bin/libmariadb.dll" DESTINATION "${CL_INSTALL_BIN}")
81+
msys_list_deps(${MSYS2_BASE}/clang64/bin/libmariadb.dll LIBMARIA_DEPS)
82+
foreach(DEP ${LIBMARIA_DEPS})
83+
@@ -33,7 +33,7 @@ if(WITH_POSTGRES)
84+
85+
add_compile_definitions(DBL_USE_POSTGRES=1)
86+
87+
- if(MINGW)
88+
+ if(MINGW AND NOT FOR_MSYS2_PACKAGE)
89+
install(FILES "${MSYS2_BASE}/clang64/bin/libpq.dll" DESTINATION "${CL_INSTALL_BIN}")
90+
msys_list_deps(${MSYS2_BASE}/clang64/bin/libpq.dll LIBPOSTGRES_DEPS)
91+
foreach(DEP ${LIBPOSTGRES_DEPS})
92+
diff --git a/LanguageServer/CMakeLists.txt b/LanguageServer/CMakeLists.txt
93+
index 0b6c27802..dee9919a2 100644
94+
--- a/LanguageServer/CMakeLists.txt
95+
+++ b/LanguageServer/CMakeLists.txt
96+
@@ -52,7 +52,7 @@ if(APPLE)
97+
PERMISSIONS ${EXE_PERM})
98+
endif()
99+
100+
-if(MINGW)
101+
+if(MINGW AND NOT FOR_MSYS2_PACKAGE)
102+
# install clangd
103+
msys_install_clang64_tool(clangd.exe ${CL_INSTALL_BIN})
104+
endif()
105+
--
106+
2.48.1.windows.1
107+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- codelite/cmake/Modules/FindClang.cmake.orig 2017-06-22 12:25:51.350745000 +0300
2+
+++ codelite/cmake/Modules/FindClang.cmake 2017-06-22 12:27:27.276231600 +0300
3+
@@ -62,7 +62,7 @@
4+
if (MINGW)
5+
set(CLANG_LDFLAGS "${CLANG_LDFLAGS} ${LLVM_SYSTEM_LIBS}")
6+
endif()
7+
-
8+
+ string(STRIP ${CLANG_LDFLAGS} CLANG_LDFLAGS)
9+
else (CLANG_FOUND)
10+
if (CLANG_FIND_REQUIRED)
11+
message(FATAL_ERROR "Could NOT find Clang")
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 507febbf9b2a0bf55c97272017d435b71799d2d8 Mon Sep 17 00:00:00 2001
2+
From: Tim Stahlhut <[email protected]>
3+
Date: Sun, 19 Oct 2025 07:57:56 -0400
4+
Subject: Reduce Clang compiler warnings likely wxWidgets related
5+
6+
---
7+
CMakeLists.txt | 3 +++
8+
1 file changed, 3 insertions(+)
9+
10+
diff --git a/CMakeLists.txt b/CMakeLists.txt
11+
index a9164f20d..b2964fafd 100644
12+
--- a/CMakeLists.txt
13+
+++ b/CMakeLists.txt
14+
@@ -187,6 +187,9 @@ write_file("${CMAKE_BINARY_DIR}/post_install.cmake"
15+
16+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations"
17+
)# Avoid very multiple warnings spam due to deprecated wx methods
18+
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
19+
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-command-line-argument")
20+
+endif()
21+
if(UNIX AND NOT APPLE)
22+
set(CMAKE_CXX_FLAGS
23+
"${CMAKE_CXX_FLAGS} -isystem /usr/include/harfbuzz -isystem /usr/local/include/harfbuzz"
24+
--
25+
2.48.1.windows.1
26+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
From 7b255457989492cb73e0757094b573f0a14b3b4a Mon Sep 17 00:00:00 2001
2+
From: Tim Stahlhut <[email protected]>
3+
Date: Sun, 26 Oct 2025 12:20:28 -0400
4+
Subject: Show command line help
5+
6+
---
7+
LiteEditor/app.cpp | 8 ++++----
8+
1 file changed, 4 insertions(+), 4 deletions(-)
9+
10+
diff --git a/LiteEditor/app.cpp b/LiteEditor/app.cpp
11+
index 840497b9f..9d5431a65 100644
12+
--- a/LiteEditor/app.cpp
13+
+++ b/LiteEditor/app.cpp
14+
@@ -1124,12 +1124,12 @@ void CodeLiteApp::AdjustPathForMSYSIfNeeded()
15+
16+
void CodeLiteApp::PrintUsage(const wxCmdLineParser& m_parser)
17+
{
18+
-#ifdef __WXMSW__
19+
- m_parser.Usage();
20+
-#else
21+
+//#ifdef __WXMSW__
22+
+ //m_parser.Usage();
23+
+//#else
24+
wxString usageString = m_parser.GetUsageString();
25+
std::cout << usageString.mb_str(wxConvUTF8).data() << std::endl;
26+
-#endif
27+
+//#endif
28+
}
29+
30+
void CodeLiteApp::OpenFolder(const wxString& path)
31+
--
32+
2.48.1.windows.1
33+

0 commit comments

Comments
 (0)