kicad: update to 8.0.0

This commit is contained in:
Hernan Martinez 2024-03-03 21:17:11 -07:00 committed by GitHub
parent 305dded65b
commit 36bf69ba4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 44 additions and 191 deletions

View File

@ -1,140 +0,0 @@
From a44ced74c7d0252b7d2615fc9f3911f9e0f87488 Mon Sep 17 00:00:00 2001
From: jean-pierre charras <jp.charras@wanadoo.fr>
Date: Tue, 18 Jul 2023 11:19:52 +0200
Subject: Kicad manager: build the PLUGIN_CONTENT_MANAGER only on request, not
in KICAD_MANAGER_FRAME Ctor. Two advantages:
- it is built after the splash screen is dismissed.
- if there are issues when creating the PLUGIN_CONTENT_MANAGER, this is more
easy to debug
Patch Edited by Tim Stahlhut
---
kicad/kicad_manager_frame.cpp | 56 +++++++++++++++++----------
kicad/kicad_manager_frame.h | 2 +
kicad/tools/kicad_manager_control.cpp | 3 ++
3 files changed, 40 insertions(+), 21 deletions(-)
diff --git a/kicad/kicad_manager_frame.cpp b/kicad/kicad_manager_frame.cpp
index 984b2d77ef..9d29f6e3f0 100644
--- a/kicad/kicad_manager_frame.cpp
+++ b/kicad/kicad_manager_frame.cpp
@@ -167,25 +167,6 @@ KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& titl
m_pcmButton = nullptr;
m_pcmUpdateCount = 0;
- m_pcm = std::make_shared<PLUGIN_CONTENT_MANAGER>(
- [this]( int aUpdateCount )
- {
- m_pcmUpdateCount = aUpdateCount;
- CallAfter(
- [this]()
- {
- updatePcmButtonBadge();
- } );
- },
- [this]( const wxString aText )
- {
- CallAfter(
- [aText, this]()
- {
- SetStatusText( aText, 1 );
- } );
- } );
- m_pcm->SetRepositoryList( kicadSettings()->m_PcmRepositories );
// Left window: is the box which display tree project
m_leftWin = new PROJECT_TREE_PANE( this );
@@ -269,7 +250,8 @@ KICAD_MANAGER_FRAME::~KICAD_MANAGER_FRAME()
if( m_toolManager )
m_toolManager->ShutdownAllTools();
- m_pcm->StopBackgroundUpdate();
+ if( m_pcm )
+ m_pcm->StopBackgroundUpdate();
delete m_actions;
delete m_toolManager;
@@ -279,6 +261,35 @@ KICAD_MANAGER_FRAME::~KICAD_MANAGER_FRAME()
}
+void KICAD_MANAGER_FRAME::CreatePCM()
+{
+ // creates the PLUGIN_CONTENT_MANAGER, if not exists
+ if( m_pcm )
+ return;
+
+ m_pcm = std::make_shared<PLUGIN_CONTENT_MANAGER>(
+ [this]( int aUpdateCount )
+ {
+ m_pcmUpdateCount = aUpdateCount;
+ CallAfter(
+ [this]()
+ {
+ updatePcmButtonBadge();
+ } );
+ },
+ [this]( const wxString aText )
+ {
+ CallAfter(
+ [aText, this]()
+ {
+ SetStatusText( aText, 1 );
+ } );
+ } );
+
+ m_pcm->SetRepositoryList( kicadSettings()->m_PcmRepositories );
+}
+
+
void KICAD_MANAGER_FRAME::setupTools()
{
// Create the manager
@@ -754,7 +765,7 @@ void KICAD_MANAGER_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTex
{
EDA_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
- if( aEnvVarsChanged )
+ if( m_pcm && aEnvVarsChanged )
{
m_pcm->ReadEnvVar();
}
@@ -920,6 +931,9 @@ void KICAD_MANAGER_FRAME::OnIdle( wxIdleEvent& aEvent )
if( KIPLATFORM::POLICY::GetPolicyBool( POLICY_KEY_PCM ) != KIPLATFORM::POLICY::PBOOL::DISABLED
&& settings->m_PcmUpdateCheck )
{
+ if( !m_pcm )
+ CreatePCM();
+
m_pcm->RunBackgroundUpdate();
}
}
diff --git a/kicad/kicad_manager_frame.h b/kicad/kicad_manager_frame.h
index a74aea651c..b3a82bdec1 100644
--- a/kicad/kicad_manager_frame.h
+++ b/kicad/kicad_manager_frame.h
@@ -153,6 +153,8 @@ public:
void SetPcmButton( BITMAP_BUTTON* aButton );
+ void CreatePCM(); // creates the PLUGIN_CONTENT_MANAGER
+
DECLARE_EVENT_TABLE()
protected:
diff --git a/kicad/tools/kicad_manager_control.cpp b/kicad/tools/kicad_manager_control.cpp
index ec727f957b..52ff75cda9 100644
--- a/kicad/tools/kicad_manager_control.cpp
+++ b/kicad/tools/kicad_manager_control.cpp
@@ -900,6 +900,9 @@ int KICAD_MANAGER_CONTROL::ShowPluginManager( const TOOL_EVENT& aEvent )
m_frame->SetFocus();
wxSafeYield();
+ if( !m_frame->GetPcm() )
+ m_frame->CreatePCM();
+
DIALOG_PCM pcm( m_frame, m_frame->GetPcm() );
pcm.ShowModal();
--

View File

@ -0,0 +1,24 @@
--- a/CMakeLists.txt 2024-02-22 23:58:13.000000000 +0100
+++ b/CMakeLists.txt 2024-03-02 02:02:04.941995000 +0100
@@ -762,6 +762,9 @@
include_directories( SYSTEM ${GLEW_INCLUDE_DIR} )
endif()
+
+find_package( FMT REQUIRED )
+include_directories( SYSTEM ${FMT_INCLUDE_DIR} )
#
# Find GLM library, required
#
--- a/thirdparty/CMakeLists.txt 2024-02-22 23:58:13.000000000 +0100
+++ b/thirdparty/CMakeLists.txt 2024-03-02 02:00:19.038784100 +0100
@@ -40,7 +40,7 @@
add_subdirectory( delaunator )
add_subdirectory( dxflib_qcad )
set( FMT_INSTALL OFF )
-add_subdirectory( fmt )
+# add_subdirectory( fmt )
add_subdirectory( gzip-hpp )
add_subdirectory( lemon )
add_subdirectory( libcontext )

View File

@ -1,38 +1,13 @@
From 2b4ae291540672252941d02d0cb367a6f3d7d645 Mon Sep 17 00:00:00 2001
From: Tim Stahlhut <stahta01@gmail.com>
Date: Wed, 27 Apr 2022 15:10:14 -0400
Subject: Rewrite kiwin32.rc logic to work with clang
---
CMakeLists.txt | 3 +++
resources/msw/kiwin32.rc | 30 ++++++++++++------------------
2 files changed, 15 insertions(+), 18 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b4bae56761..2a4c9d2ddd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -379,6 +379,9 @@ if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
# include dir to allow getting the version header
list(APPEND mingw_resource_compiler_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ )
list(APPEND mingw_resource_compiler_DEFINES KICAD_BUILD_ARCH=${KICAD_BUILD_ARCH} )
+ if( KICAD_BUILD_ARCH_X86 )
+ list(APPEND mingw_resource_compiler_DEFINES KICAD_BUILD_ARCH_X86=1 )
+ endif()
if( KICAD_WIN32_DPI_AWARE )
list(APPEND mingw_resource_compiler_DEFINES KICAD_WIN32_DPI_AWARE=1 )
endif()
diff --git a/resources/msw/kiwin32.rc b/resources/msw/kiwin32.rc
index 84f9566ca4..6f04120862 100644
--- a/resources/msw/kiwin32.rc
+++ b/resources/msw/kiwin32.rc
@@ -11,24 +11,18 @@
diff -bur kicad-8.0.0-orig/resources/msw/kiwin32.rc kicad-8.0.0/resources/msw/kiwin32.rc
--- kicad-8.0.0-orig/resources/msw/kiwin32.rc 2024-03-03 10:48:49.488479500 -0700
+++ kicad-8.0.0/resources/msw/kiwin32.rc 2024-03-03 11:04:32.244300400 -0700
@@ -36,24 +36,10 @@
#endif
#if !defined( KICAD_WIN32_DPI_AWARE ) || KICAD_WIN32_DPI_AWARE == 0
-#define MANIFEST_SUFFIX .manifest
-#define MANIFEST_NAME basic.manifest
-#else
-#define MANIFEST_SUFFIX _dpi_aware_pmv2.manifest
-#define MANIFEST_NAME dpi_aware_pmv2.manifest
-#endif
-
-//MSYS2
@ -43,24 +18,15 @@ index 84f9566ca4..6f04120862 100644
-#define RC_CONCAT2( a, b, c ) a##b##c
-
-#ifdef __GNUC__
-#define MANIFEST_FILE "manifests/" RC_STR( KICAD_BUILD_ARCH ) RC_STR( MANIFEST_SUFFIX )
-#define MANIFEST_FILE "manifests/" RC_STR( MANIFEST_NAME )
-#else
-//Do not try and quote the first part, it won't work, also make sure the IDE doesn't reformat it with spaces between slashes
-#define MANIFEST_FILE RC_CONCAT( manifests/, KICAD_BUILD_ARCH, MANIFEST_SUFFIX )
-#define MANIFEST_FILE RC_CONCAT( manifests/, MANIFEST_NAME )
-#endif
+# ifdef KICAD_BUILD_ARCH_X86
+# define MANIFEST_FILE "manifests/x86.manifest"
+# else // KICAD_BUILD_ARCH_X86
+# define MANIFEST_FILE "manifests/x64.manifest"
+# endif // KICAD_BUILD_ARCH_X86
+# define MANIFEST_FILE "manifests/basic.manifest"
+#else // !defined( KICAD_WIN32_DPI_AWARE ) || KICAD_WIN32_DPI_AWARE == 0
+# ifdef KICAD_BUILD_ARCH_X86
+# define MANIFEST_FILE "manifests/x64_dpi_aware_pmv2.manifest"
+# else // KICAD_BUILD_ARCH_X86
+# define MANIFEST_FILE "manifests/x64_dpi_aware_pmv2.manifest"
+# endif // KICAD_BUILD_ARCH_X86
+# define MANIFEST_FILE "manifests/dpi_aware_pmv2.manifest"
+#endif // !defined( KICAD_WIN32_DPI_AWARE ) || KICAD_WIN32_DPI_AWARE == 0
MANIFEST_ID RT_MANIFEST MANIFEST_FILE
--

View File

@ -8,7 +8,7 @@ _realname=kicad
_wx_basever=3.2
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=7.0.10
pkgver=8.0.0
pkgrel=1
pkgdesc="Software for the creation of electronic schematic diagrams and printed circuit board artwork (mingw-w64)"
arch=(any)
@ -46,6 +46,8 @@ makedepends=(
"${MINGW_PACKAGE_PREFIX}-pkgconf"
"${MINGW_PACKAGE_PREFIX}-doxygen"
"${MINGW_PACKAGE_PREFIX}-swig"
"${MINGW_PACKAGE_PREFIX}-libgit2"
"${MINGW_PACKAGE_PREFIX}-fmt"
"${MINGW_PACKAGE_PREFIX}-wxwidgets${_wx_basever}-msw"
"git"
)
@ -59,18 +61,18 @@ for _doclang in ${_doc[@]}; do
done
source=(
"https://gitlab.com/kicad/code/kicad/-/archive/${pkgver}/kicad-${pkgver}.tar.bz2"
'001-Kicad-manager-build-the-PLUGIN_CONTENT_MANAGER-only-on-request.patch'
'002-ki-6.0-cmake-fixes-for-MINGW-CLANG.patch'
'003-ki-6.0-code-fixes-for-GNUC-CLANG.patch'
'004-fix-loading-ngspice-dll.patch'
'005-clang-fmt-workaround.patch'
'006-ki-6.0-rewrite-kiwin32_rc_for_clang.patch'
)
sha256sums=('7af2315dd79a05724ef41c25e2af4e05433be29bbeb8b58b3004a97304f49180'
'a7c41a4f9e04926f0103dbe6702e42681ed1e59ceadca1ec116a8af081597a2a'
sha256sums=('aee1630aac44ab181cedd293a54c339f623361cb6d5b374c27ca5389f80a28b6'
'2924a86849c02aecd21cded0bd2069353fca33c3364f9b41f9bfdd80e19085cf'
'd8d5f4bdd0aa6d8a907710c523f6f95840636cb2ef69e5275c6ed4966f134353'
'f35a96c2393c21c266dbcd42616df64f9ee13b2423478bf6de029a3ad4e0ee8a'
'e03dbb58409145c8fb54991d8259f14bc0ba6b21abca24f9b914ec354c9df89c')
'bc7ad66d81d56dcfc237dfffe31fff58addff98622f65f64c45df11f70088c37'
'3155b9515ec7c094221441ce337c566c346bf76bb7aa42e86660cfdfb599e307')
# Helper macros to help make tasks easier #
apply_patch_with_msg() {
@ -84,13 +86,14 @@ apply_patch_with_msg() {
prepare() {
cd ${_realname}-${pkgver}
# https://gitlab.com/kicad/code/kicad/-/commit/aa3e2988
apply_patch_with_msg \
001-Kicad-manager-build-the-PLUGIN_CONTENT_MANAGER-only-on-request.patch
#apply_patch_with_msg \
# 001-Kicad-manager-build-the-PLUGIN_CONTENT_MANAGER-only-on-request.patch
apply_patch_with_msg \
002-ki-6.0-cmake-fixes-for-MINGW-CLANG.patch \
003-ki-6.0-code-fixes-for-GNUC-CLANG.patch \
004-fix-loading-ngspice-dll.patch \
005-clang-fmt-workaround.patch \
006-ki-6.0-rewrite-kiwin32_rc_for_clang.patch
}