Disable the update check on non-apple, non windows systems by default

This commit is contained in:
Marek Roszko 2024-01-03 19:32:05 -05:00
parent 9004a5920f
commit 9195de9849
4 changed files with 26 additions and 0 deletions

View File

@ -64,6 +64,11 @@ else()
set( UNIX_NOT_APPLE OFF ) set( UNIX_NOT_APPLE OFF )
endif() endif()
if( APPLE OR WIN32 )
set( APPLE_OR_WIN32 ON )
else()
set( APPLE_OR_WIN32 OFF )
endif()
# #
# KiCad build options should be added below. # KiCad build options should be added below.
@ -101,6 +106,11 @@ option( KICAD_SCRIPTING_WXPYTHON
ON ) ON )
mark_as_advanced( KICAD_SCRIPTING_WXPYTHON ) mark_as_advanced( KICAD_SCRIPTING_WXPYTHON )
cmake_dependent_option( KICAD_UPDATE_CHECK
"Build in update check"
ON "APPLE_OR_WIN32"
OFF )
# EGL is only needed on Linux with Wayland # EGL is only needed on Linux with Wayland
cmake_dependent_option( KICAD_USE_EGL cmake_dependent_option( KICAD_USE_EGL
"Build KiCad with EGL backend support for Wayland." "Build KiCad with EGL backend support for Wayland."
@ -252,6 +262,7 @@ add_compile_definitions( $<$<BOOL:${KICAD_SIGNAL_INTEGRITY}>:KICAD_SIGNAL_INTEGR
add_compile_definitions( $<$<BOOL:${KICAD_USE_VALGRIND}>:KICAD_USE_VALGRIND> ) add_compile_definitions( $<$<BOOL:${KICAD_USE_VALGRIND}>:KICAD_USE_VALGRIND> )
add_compile_definitions( $<$<BOOL:${KICAD_GAL_PROFILE}>:KICAD_GAL_PROFILE> ) add_compile_definitions( $<$<BOOL:${KICAD_GAL_PROFILE}>:KICAD_GAL_PROFILE> )
add_compile_definitions( $<$<BOOL:${KICAD_WIN32_VERIFY_CODESIGN}>:KICAD_WIN32_VERIFY_CODESIGN> ) add_compile_definitions( $<$<BOOL:${KICAD_WIN32_VERIFY_CODESIGN}>:KICAD_WIN32_VERIFY_CODESIGN> )
add_compile_definitions( $<$<BOOL:${KICAD_UPDATE_CHECK}>:KICAD_UPDATE_CHECK> )
if( KICAD_USE_EGL ) if( KICAD_USE_EGL )
message( STATUS "Configuring KiCad for the wxGLCanvas EGL backend" ) message( STATUS "Configuring KiCad for the wxGLCanvas EGL backend" )

View File

@ -36,6 +36,12 @@ PANEL_PACKAGES_AND_UPDATES::PANEL_PACKAGES_AND_UPDATES( wxWindow* parent ) :
int minWidth = m_libPrefix->GetTextExtent( wxT( "XXX.XXX" ) ).GetWidth(); int minWidth = m_libPrefix->GetTextExtent( wxT( "XXX.XXX" ) ).GetWidth();
m_libPrefix->SetMinSize( wxSize( minWidth, minSize.GetHeight() ) ); m_libPrefix->SetMinSize( wxSize( minWidth, minSize.GetHeight() ) );
#ifndef KICAD_UPDATE_CHECK
m_generalLabel->Hide();
m_staticline3->Hide();
m_cbKicadUpdate->Hide();
#endif
} }
@ -44,7 +50,9 @@ bool PANEL_PACKAGES_AND_UPDATES::TransferDataToWindow()
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager(); SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
KICAD_SETTINGS* settings = mgr.GetAppSettings<KICAD_SETTINGS>(); KICAD_SETTINGS* settings = mgr.GetAppSettings<KICAD_SETTINGS>();
#ifndef KICAD_UPDATE_CHECK
m_cbKicadUpdate->SetValue( settings->m_KiCadUpdateCheck ); m_cbKicadUpdate->SetValue( settings->m_KiCadUpdateCheck );
#endif
m_cbPcmUpdate->SetValue( settings->m_PcmUpdateCheck ); m_cbPcmUpdate->SetValue( settings->m_PcmUpdateCheck );
m_libAutoAdd->SetValue( settings->m_PcmLibAutoAdd ); m_libAutoAdd->SetValue( settings->m_PcmLibAutoAdd );
m_libAutoRemove->SetValue( settings->m_PcmLibAutoRemove ); m_libAutoRemove->SetValue( settings->m_PcmLibAutoRemove );

View File

@ -30,6 +30,9 @@
DIALOG_UPDATE_CHECK_PROMPT::DIALOG_UPDATE_CHECK_PROMPT( wxWindow* aWindow ) : DIALOG_UPDATE_CHECK_PROMPT::DIALOG_UPDATE_CHECK_PROMPT( wxWindow* aWindow ) :
DIALOG_UPDATE_CHECK_PROMPT_BASE( aWindow ) DIALOG_UPDATE_CHECK_PROMPT_BASE( aWindow )
{ {
#ifndef KICAD_UPDATE_CHECK
m_cbKiCadUpdates->Hide();
#endif
} }
@ -39,7 +42,9 @@ bool DIALOG_UPDATE_CHECK_PROMPT::TransferDataFromWindow()
KICAD_SETTINGS* settings = mgr.GetAppSettings<KICAD_SETTINGS>(); KICAD_SETTINGS* settings = mgr.GetAppSettings<KICAD_SETTINGS>();
settings->m_PcmUpdateCheck = m_cbPCMUpdates->GetValue(); settings->m_PcmUpdateCheck = m_cbPCMUpdates->GetValue();
#ifndef KICAD_UPDATE_CHECK
settings->m_KiCadUpdateCheck = m_cbKiCadUpdates->GetValue(); settings->m_KiCadUpdateCheck = m_cbKiCadUpdates->GetValue();
#endif
return true; return true;
} }

View File

@ -963,11 +963,13 @@ void KICAD_MANAGER_FRAME::OnIdle( wxIdleEvent& aEvent )
m_pcm->RunBackgroundUpdate(); m_pcm->RunBackgroundUpdate();
} }
#ifdef KICAD_UPDATE_CHECK
if( !m_updateManager && settings->m_KiCadUpdateCheck ) if( !m_updateManager && settings->m_KiCadUpdateCheck )
{ {
m_updateManager = std::make_unique<UPDATE_MANAGER>(); m_updateManager = std::make_unique<UPDATE_MANAGER>();
m_updateManager->CheckForUpdate( this ); m_updateManager->CheckForUpdate( this );
} }
#endif
} }