Skip to content

Commit 8eb232a

Browse files
committed
MacOS: set minimum target to OSX 12. Fix About menu not working.
The modification to Forms.cpp is temporary until we find a better approach
1 parent 19fa1f8 commit 8eb232a

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

src/Build/build_veracrypt_macosx.sh

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ SOURCEPATH=$(cd "$(dirname "$SCRIPTPATH/../.")"; pwd)
1313
PARENTDIR=$(cd "$(dirname "$SCRIPTPATH/../../../.")"; pwd)
1414

1515
# the sources of wxWidgets 3.1.2 must be extracted to the parent directory (for night mode)
16-
export WX_ROOT=$PARENTDIR/wxWidgets-3.1.2
16+
export WX_ROOT=$PARENTDIR/wxWidgets-3.2.2.1
1717
echo "Using wxWidgets sources in $WX_ROOT"
1818

1919
# this will be the temporary wxWidgets directory
20-
export WX_BUILD_DIR=$PARENTDIR/wxBuild-3.1.2
20+
export WX_BUILD_DIR=$PARENTDIR/wxBuild-3.2.2.1
2121

2222
# define the SDK version to use and OSX minimum target. We target 10.9 by default
23-
export VC_OSX_TARGET=10.9
24-
export VC_OSX_SDK=11.3
23+
export VC_OSX_TARGET=12
24+
export VC_OSX_SDK=13
2525
echo "Using MacOSX SDK $VC_OSX_SDK with target set to $VC_OSX_TARGET"
2626

2727
cd $SOURCEPATH
@@ -30,4 +30,5 @@ echo "Building VeraCrypt"
3030
make WXSTATIC=FULL wxbuild && make WXSTATIC=FULL clean && make WXSTATIC=FULL && make WXSTATIC=FULL package
3131

3232
# Uncomment below and comment line above to reuse existing wxWidgets build
33-
# make WXSTATIC=FULL clean && make WXSTATIC=FULL && make WXSTATIC=FULL package
33+
# make WXSTATIC=FULL clean && make WXSTATIC=FULL && make WXSTATIC=FULL package
34+

src/Main/Forms/Forms.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,13 @@ MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& t
438438
SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnDefaultKeyfilesMenuItemSelected ), this, DefaultKeyfilesMenuItem->GetId());
439439
SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnDefaultMountParametersMenuItemSelected ), this, DefaultMountParametersMenuItem->GetId());
440440
SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnSecurityTokenPreferencesMenuItemSelected ), this, SecurityTokenPreferencesMenuItem->GetId());
441+
#ifdef TC_MACOSX
442+
this->Connect( PreferencesMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnPreferencesMenuItemSelected ) );
443+
this->Connect( UserGuideMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnUserGuideMenuItemSelected ) );
444+
#else
441445
SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnPreferencesMenuItemSelected ), this, PreferencesMenuItem->GetId());
442446
HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnUserGuideMenuItemSelected ), this, UserGuideMenuItem->GetId());
447+
#endif
443448
HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnOnlineHelpMenuItemSelected ), this, OnlineHelpMenuItem->GetId());
444449
HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnBeginnersTutorialMenuItemSelected ), this, BeginnersTutorialMenuItem->GetId());
445450
HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnFaqMenuItemSelected ), this, FaqMenuItem->GetId());
@@ -450,7 +455,11 @@ MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& t
450455
HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnDonateMenuItemSelected ), this, DonateMenuItem->GetId());
451456
HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnContactMenuItemSelected ), this, ContactMenuItem->GetId());
452457
HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnLegalNoticesMenuItemSelected ), this, LegalNoticesMenuItem->GetId());
458+
#ifdef TC_MACOSX
459+
this->Connect( AboutMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnAboutMenuItemSelected ) );
460+
#else
453461
HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnAboutMenuItemSelected ), this, AboutMenuItem->GetId());
462+
#endif
454463
SlotListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( MainFrameBase::OnListItemActivated ), NULL, this );
455464
SlotListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( MainFrameBase::OnListItemDeselected ), NULL, this );
456465
SlotListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEventHandler( MainFrameBase::OnListItemRightClick ), NULL, this );
@@ -472,6 +481,11 @@ MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& t
472481
MainFrameBase::~MainFrameBase()
473482
{
474483
// Disconnect Events
484+
#ifdef TC_MACOSX
485+
this->Disconnect( wxID_PREFERENCES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnPreferencesMenuItemSelected ) );
486+
this->Disconnect( wxID_HELP, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnUserGuideMenuItemSelected ) );
487+
this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnAboutMenuItemSelected ) );
488+
#endif
475489
this->Disconnect( wxEVT_ACTIVATE, wxActivateEventHandler( MainFrameBase::OnActivate ) );
476490
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MainFrameBase::OnClose ) );
477491
SlotListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( MainFrameBase::OnListItemActivated ), NULL, this );

src/Setup/MacOSX/veracrypt.pkgproj

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<?xml version="1.0" encoding="UTF-8"?>
32
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
43
<plist version="1.0">
54
<dict>
@@ -756,7 +755,7 @@
756755
<key>IC_REQUIREMENT_OS_DISTRIBUTION_TYPE</key>
757756
<integer>0</integer>
758757
<key>IC_REQUIREMENT_OS_MINIMUM_VERSION</key>
759-
<integer>100900</integer>
758+
<integer>120001</integer>
760759
</dict>
761760
<key>IC_REQUIREMENT_CHECK_TYPE</key>
762761
<integer>0</integer>
@@ -768,13 +767,13 @@
768767
<key>LANGUAGE</key>
769768
<string>English</string>
770769
<key>VALUE</key>
771-
<string>VeraCrypt requires MacOSX 10.9 and above.</string>
770+
<string>VeraCrypt requires MacOSX 12 and above.</string>
772771
</dict>
773772
<dict>
774773
<key>LANGUAGE</key>
775774
<string>French</string>
776775
<key>VALUE</key>
777-
<string>VeraCrypt nécessite MacOSX 10.9 et supérieur.</string>
776+
<string>VeraCrypt nécessite MacOSX 12 et supérieur.</string>
778777
</dict>
779778
</array>
780779
<key>NAME</key>

0 commit comments

Comments
 (0)