mirror of
https://github.com/Neo-Desktop/WindowsXPKg
synced 2025-12-08 11:15:14 +02:00
macOS icon + diff placeholder
This commit is contained in:
17
.github/workflows/macos.yml
vendored
17
.github/workflows/macos.yml
vendored
@@ -65,6 +65,23 @@ jobs:
|
|||||||
echo "OPENSSL_INCLUDE_DIR=/opt/homebrew/opt/openssl@3/include" >> $GITHUB_ENV
|
echo "OPENSSL_INCLUDE_DIR=/opt/homebrew/opt/openssl@3/include" >> $GITHUB_ENV
|
||||||
echo "PKG_CONFIG_PATH=/opt/homebrew/opt/openssl@3/lib/pkgconfig" >> $GITHUB_ENV
|
echo "PKG_CONFIG_PATH=/opt/homebrew/opt/openssl@3/lib/pkgconfig" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Convert PNG to ICNS
|
||||||
|
run: |
|
||||||
|
mkdir -p build/icon.iconset
|
||||||
|
# Generate required icon sizes
|
||||||
|
sips -z 16 16 src/macos/icon.png --out build/icon.iconset/icon_16x16.png
|
||||||
|
sips -z 32 32 src/macos/icon.png --out build/icon.iconset/icon_16x16@2x.png
|
||||||
|
sips -z 32 32 src/macos/icon.png --out build/icon.iconset/icon_32x32.png
|
||||||
|
sips -z 64 64 src/macos/icon.png --out build/icon.iconset/icon_32x32@2x.png
|
||||||
|
sips -z 128 128 src/macos/icon.png --out build/icon.iconset/icon_128x128.png
|
||||||
|
sips -z 256 256 src/macos/icon.png --out build/icon.iconset/icon_128x128@2x.png
|
||||||
|
sips -z 256 256 src/macos/icon.png --out build/icon.iconset/icon_256x256.png
|
||||||
|
sips -z 512 512 src/macos/icon.png --out build/icon.iconset/icon_256x256@2x.png
|
||||||
|
sips -z 512 512 src/macos/icon.png --out build/icon.iconset/icon_512x512.png
|
||||||
|
sips -z 1024 1024 src/macos/icon.png --out build/icon.iconset/icon_512x512@2x.png
|
||||||
|
# Convert to icns
|
||||||
|
iconutil -c icns build/icon.iconset -o build/umskt.icns
|
||||||
|
|
||||||
- name: Configure and build UMSKT
|
- name: Configure and build UMSKT
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
|
|||||||
@@ -252,8 +252,27 @@ ELSE()
|
|||||||
TARGET_LINK_DIRECTORIES(_umskt PUBLIC ${UMSKT_LINK_DIRS})
|
TARGET_LINK_DIRECTORIES(_umskt PUBLIC ${UMSKT_LINK_DIRS})
|
||||||
TARGET_LINK_LIBRARIES(_umskt ${OPENSSL_CRYPTO_LIBRARIES} fmt ${UMSKT_LINK_LIBS})
|
TARGET_LINK_LIBRARIES(_umskt ${OPENSSL_CRYPTO_LIBRARIES} fmt ${UMSKT_LINK_LIBS})
|
||||||
|
|
||||||
|
# Set up macOS bundle icon
|
||||||
|
if(APPLE)
|
||||||
|
set(MACOSX_BUNDLE_ICON_FILE umskt.icns)
|
||||||
|
set(APP_ICON_MACOSX ${CMAKE_BINARY_DIR}/umskt.icns)
|
||||||
|
set_source_files_properties(${APP_ICON_MACOSX} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||||
|
endif()
|
||||||
|
|
||||||
### UMSKT executable compilation
|
### UMSKT executable compilation
|
||||||
ADD_EXECUTABLE(umskt src/main.cpp src/cli.cpp ${UMSKT_EXE_WINDOWS_EXTRA})
|
ADD_EXECUTABLE(umskt src/main.cpp src/cli.cpp ${UMSKT_EXE_WINDOWS_EXTRA} ${APP_ICON_MACOSX})
|
||||||
|
if(APPLE)
|
||||||
|
set_target_properties(umskt PROPERTIES
|
||||||
|
MACOSX_BUNDLE TRUE
|
||||||
|
MACOSX_BUNDLE_BUNDLE_NAME "UMSKT"
|
||||||
|
MACOSX_BUNDLE_GUI_IDENTIFIER "com.umskt.app"
|
||||||
|
MACOSX_BUNDLE_ICON_FILE "umskt.icns"
|
||||||
|
MACOSX_BUNDLE_INFO_STRING "UMSKT"
|
||||||
|
MACOSX_BUNDLE_LONG_VERSION_STRING "1.0.0"
|
||||||
|
MACOSX_BUNDLE_SHORT_VERSION_STRING "1.0"
|
||||||
|
MACOSX_BUNDLE_BUNDLE_VERSION "1.0.0"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
TARGET_INCLUDE_DIRECTORIES(umskt PUBLIC ${OPENSSL_INCLUDE_DIR})
|
TARGET_INCLUDE_DIRECTORIES(umskt PUBLIC ${OPENSSL_INCLUDE_DIR})
|
||||||
TARGET_LINK_LIBRARIES(umskt _umskt ${OPENSSL_CRYPTO_LIBRARIES} ${ZLIB_LIBRARIES} fmt nlohmann_json::nlohmann_json umskt::rc ${UMSKT_LINK_LIBS})
|
TARGET_LINK_LIBRARIES(umskt _umskt ${OPENSSL_CRYPTO_LIBRARIES} ${ZLIB_LIBRARIES} fmt nlohmann_json::nlohmann_json umskt::rc ${UMSKT_LINK_LIBS})
|
||||||
TARGET_LINK_DIRECTORIES(umskt PUBLIC ${UMSKT_LINK_DIRS})
|
TARGET_LINK_DIRECTORIES(umskt PUBLIC ${UMSKT_LINK_DIRS})
|
||||||
|
|||||||
BIN
src/macos/icon.png
Normal file
BIN
src/macos/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 138 KiB |
Reference in New Issue
Block a user