Skip to content

Commit 6687500

Browse files
committed
Compile osx manager with vcpkg
1 parent 7cc54fc commit 6687500

File tree

13 files changed

+340
-3
lines changed

13 files changed

+340
-3
lines changed

.github/workflows/osx.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,12 @@ jobs:
126126
path: deploy/macos_apps_arm64.7z
127127

128128
cmake-build:
129-
name: cmake-build
129+
name: ${{matrix.type}}-build
130130
runs-on: macos-latest
131+
strategy:
132+
matrix:
133+
type: [manager-vcpkg, libs-cmake]
134+
fail-fast: false
131135
steps:
132136
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd
133137
with:
@@ -146,8 +150,17 @@ jobs:
146150
echo "VCPKG_BINARY_SOURCES=clear;x-aws-config,no-sign-request;x-aws,s3://vcpkg.cache.boinc/,read" >> $GITHUB_ENV
147151
148152
- name: libs cmake
153+
if: matrix.type == 'libs-cmake'
149154
run: osx/ci_build_libs_cmake.sh
150155

156+
- name: install vcpkg dependencies
157+
if: matrix.type == 'manager-vcpkg'
158+
run: ./osx/build_vcpkg_3rdparty_for_manager.sh
159+
160+
- name: vcpkg make manager
161+
if: success() && matrix.type == 'manager-vcpkg'
162+
run: ./mac_build/buildMacBOINC-CI.sh --no_shared_headers --cache_dir $(pwd)/3rdParty/osx/mac_vcpkg --vcpkg
163+
151164
- name: Prepare logs on failure
152165
if: ${{ failure() }}
153166
run: python3 ./deploy/prepare_deployment.py logs
@@ -156,5 +169,5 @@ jobs:
156169
if: ${{ failure() }}
157170
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
158171
with:
159-
name: osx_logs_cmake-build_${{ github.event.pull_request.head.sha }}
172+
name: osx_logs_${{ matrix.type }}_${{ github.event.pull_request.head.sha }}
160173
path: deploy/logs.7z
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "boinc-manager",
3+
"dependencies":
4+
[
5+
"ftgl",
6+
{
7+
"name": "curl",
8+
"features": ["openssl","c-ares"],
9+
"default-features": false
10+
},
11+
{
12+
"name": "wxwidgets",
13+
"default-features": false
14+
}
15+
]
16+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
diff --git a/include/wx/osx/choice.h b/include/wx/osx/choice.h
2+
index 37486f8a7c..d80bf53766 100644
3+
--- a/include/wx/osx/choice.h
4+
+++ b/include/wx/osx/choice.h
5+
@@ -73,6 +73,7 @@ public:
6+
virtual int FindString(const wxString& s, bool bCase = false) const wxOVERRIDE;
7+
virtual wxString GetString(unsigned int n) const wxOVERRIDE;
8+
virtual void SetString(unsigned int pos, const wxString& s) wxOVERRIDE;
9+
+ void SetItemBitmap(unsigned int n, const wxBitmap& bitmap);
10+
// osx specific event handling common for all osx-ports
11+
12+
virtual bool OSXHandleClicked(double timestampsec) wxOVERRIDE;
13+
diff --git a/include/wx/osx/core/private.h b/include/wx/osx/core/private.h
14+
index 429c8f7401..cae9f9eebe 100644
15+
--- a/include/wx/osx/core/private.h
16+
+++ b/include/wx/osx/core/private.h
17+
@@ -820,6 +820,7 @@ public :
18+
}
19+
20+
virtual void SetItem(int pos, const wxString& item) = 0;
21+
+ virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap) = 0;
22+
};
23+
24+
25+
diff --git a/src/osx/choice_osx.cpp b/src/osx/choice_osx.cpp
26+
index 6df17b34e5..1fcb2a5fc4 100644
27+
--- a/src/osx/choice_osx.cpp
28+
+++ b/src/osx/choice_osx.cpp
29+
@@ -217,6 +217,13 @@ wxString wxChoice::GetString(unsigned int n) const
30+
return m_strings[n] ;
31+
}
32+
33+
+void wxChoice::SetItemBitmap(unsigned int n, const wxBitmap& bitmap)
34+
+{
35+
+ wxCHECK_RET( IsValid(n), wxT("wxChoice::SetItemBitmap(): invalid index") );
36+
+
37+
+ dynamic_cast<wxChoiceWidgetImpl*>(GetPeer())->SetItemBitmap(n, bitmap);
38+
+}
39+
+
40+
// ----------------------------------------------------------------------------
41+
// client data
42+
// ----------------------------------------------------------------------------
43+
diff --git a/src/osx/cocoa/choice.mm b/src/osx/cocoa/choice.mm
44+
index 2f0eb4ba51..52eb85c17d 100644
45+
--- a/src/osx/cocoa/choice.mm
46+
+++ b/src/osx/cocoa/choice.mm
47+
@@ -93,6 +93,12 @@ public:
48+
m_popUpMenu->FindItemByPosition( pos )->SetItemLabel( s ) ;
49+
}
50+
51+
+ void SetItemBitmap(unsigned int n, const wxBitmap& bitmap)
52+
+ {
53+
+ if ( bitmap.Ok() )
54+
+ m_popUpMenu->FindItemByPosition( n )->SetBitmap( bitmap ); ;
55+
+ }
56+
+
57+
private:
58+
wxMenu* m_popUpMenu;
59+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake
2+
index 0584ecaeb5..3e0f5feb3e 100644
3+
--- a/build/cmake/init.cmake
4+
+++ b/build/cmake/init.cmake
5+
@@ -18,6 +18,9 @@ else()
6+
# CMAKE_CXX_STANDARD not defined.
7+
endif()
8+
9+
+set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
10+
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
11+
+
12+
if(MSVC)
13+
# Determine MSVC runtime library flag
14+
set(MSVC_LIB_USE "/MD")
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/pcre2/vcpkg.json b/pcre2/vcpkg.json
2+
--- a/pcre2/vcpkg.json
3+
+++ b/pcre2/vcpkg.json
4+
@@ -14,11 +14,8 @@
5+
"name": "vcpkg-cmake-config",
6+
"host": true
7+
}
8+
],
9+
- "default-features": [
10+
- "platform-default-features"
11+
- ],
12+
"features": {
13+
"jit": {
14+
"description": "Enable support for Just-In-Time compiling regex matchers",
15+
"supports": "!emscripten"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
diff --git a/wxwidgets/portfile.cmake b/wxwidgets/portfile.cmake
2+
index f812fd8c5..27e289f2b 100644
3+
--- a/wxwidgets/portfile.cmake
4+
+++ b/wxwidgets/portfile.cmake
5+
@@ -12,6 +12,8 @@ vcpkg_from_github(
6+
fix-pcre2.patch
7+
gtk3-link-libraries.patch
8+
sdl2.patch
9+
+ boinc_SetItemBitmap.patch
10+
+ boinc_SetVisibilityHidden.patch
11+
)
12+
13+
vcpkg_check_features(
14+
@@ -75,6 +77,10 @@ vcpkg_cmake_configure(
15+
-DwxUSE_UIACTIONSIMULATOR=OFF
16+
-DCMAKE_DISABLE_FIND_PACKAGE_GSPELL=ON
17+
-DCMAKE_DISABLE_FIND_PACKAGE_MSPACK=ON
18+
+ -DwxBUILD_MONOLITHIC=ON
19+
+ -DwxUSE_DIALUP_MANAGER=ON
20+
+ -DwxUSE_UNICODE=ON
21+
+ -DwxUSE_UNICODE_UTF8=ON
22+
${OPTIONS}
23+
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
24+
# The minimum cmake version requirement for Cotire is 2.8.12.

3rdParty/vcpkg_ports/ports/mac/.gitkeep

Whitespace-only changes.

3rdParty/vcpkg_ports/triplets/ci/arm64-osx.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/../../vcpkg_root_find.cmake)
1919
include(${VCPKG_ROOT}/triplets/arm64-osx.cmake)
2020

2121
set(VCPKG_BUILD_TYPE release)
22+
set(VCPKG_OSX_DEPLOYMENT_TARGET 10.13)
23+
set(VCPKG_C_FLAGS -mmacosx-version-min=10.13)
24+
set(VCPKG_CXX_FLAGS -mmacosx-version-min=10.13)

3rdParty/vcpkg_ports/triplets/ci/x64-osx.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/../../vcpkg_root_find.cmake)
1919
include(${VCPKG_ROOT}/triplets/x64-osx.cmake)
2020

2121
set(VCPKG_BUILD_TYPE release)
22+
set(VCPKG_OSX_DEPLOYMENT_TARGET 10.13)
23+
set(VCPKG_C_FLAGS -mmacosx-version-min=10.13)
24+
set(VCPKG_CXX_FLAGS -mmacosx-version-min=10.13)

ci_tools/trailing_whitespaces_check.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ def check(directory, exclude_dirs, exclude_extensions, exclude_files, fix_errors
153153
".nib",
154154
".o",
155155
".odp",
156+
".patch",
156157
".pdb",
157158
".pdf",
158159
".pdn",

0 commit comments

Comments
 (0)