Merge branch '46-package-macos-binary' into 'master'
Prepare futher macOS packaging See merge request libreweb/browser!26master
|
@ -12,13 +12,13 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
brew install \
|
||||
cmake \
|
||||
curl \
|
||||
gtkmm3 \
|
||||
gtk-mac-integration \
|
||||
ninja
|
||||
|
||||
# Workaround for now, we create our own features.h file (macos image either is missing this file, or some include folder is missing during the build)
|
||||
|
@ -33,19 +33,10 @@ jobs:
|
|||
EOF
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DDOXYGEN:BOOL=FALSE ..
|
||||
ninja
|
||||
run: ./scripts/build-macos-prod.sh
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: macOS-binary
|
||||
path: build/src/libreweb-browser
|
||||
name: macOS-dmg-package
|
||||
path: build_prod_macos/libreweb-browser-v*.dmg
|
||||
|
||||
# TODO: Packaging using CPack and PackageMaker
|
||||
|
||||
#xcodebuild \
|
||||
# -project "libreweb-browser.xcodeproj" \
|
||||
# -scheme libreweb-browser \
|
||||
# -configuration Debug
|
||||
|
|
|
@ -70,8 +70,9 @@ Thumbs.db
|
|||
# --------
|
||||
*.dll
|
||||
*.exe
|
||||
# Allow ipfs.exe and the binaries in the packaging folder
|
||||
!go-ipfs/ipfs.exe
|
||||
!packaging_win/*
|
||||
!misc/packaging_win/bin/*
|
||||
|
||||
# Build folders
|
||||
build/
|
||||
|
|
|
@ -65,10 +65,16 @@ endif()
|
|||
|
||||
# Additional install files
|
||||
if(WIN32)
|
||||
# Windows specific
|
||||
install(DIRECTORY packaging_win/ DESTINATION .)
|
||||
# Microsoft Windows specific
|
||||
install(DIRECTORY misc/packaging_generic/ DESTINATION .)
|
||||
install(DIRECTORY misc/packaging_win/ DESTINATION .)
|
||||
install(PROGRAMS go-ipfs/ipfs.exe DESTINATION bin)
|
||||
else()
|
||||
elseif(APPLE)
|
||||
# Apple macOS specific
|
||||
install(DIRECTORY misc/packaging_generic/ DESTINATION .)
|
||||
install(DIRECTORY misc/packaging_macos/ DESTINATION .)
|
||||
install(PROGRAMS go-ipfs/ipfs-darwin DESTINATION bin)
|
||||
elseif(UNIX)
|
||||
# UNIX specific
|
||||
install(FILES misc/libreweb-browser.desktop DESTINATION share/applications)
|
||||
install(PROGRAMS go-ipfs/ipfs DESTINATION bin)
|
||||
|
|
|
@ -219,6 +219,7 @@ For more info, see also: [Windows readme file](windows.md).
|
|||
* CMake (brew: `cmake`)
|
||||
* Libcurl (brew: `curl`)
|
||||
* Gtk3/Gtkmm3 (brew: `gtkmm3`)
|
||||
* GTK Mac Integration (brew: `gtk-mac-integration`)
|
||||
* Ninja (brew: `ninja`)
|
||||
|
||||
#### MacOS Build
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Example 1: https://github.com/MariaDB/server/tree/10.8/cmake
|
||||
# Example 2: https://gitlab.com/inkscape/inkscape/blob/master/CMakeScripts/ConfigCPack.cmake
|
||||
#set(CPACK_PACKAGE_NAME "LibreWeb Browser")
|
||||
# Example 3: https://github.com/rcaelers/workrave/blob/main/ui/app/toolkits/gtkmm/dist/macos/CMakeLists.txt
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LibreWeb Browser - Decentralized Web-Browser")
|
||||
set(CPACK_PACKAGE_VENDOR "Melroy van den Berg")
|
||||
set(CPACK_PACKAGE_CONTACT "Melroy van den Berg <info@libreweb.org>")
|
||||
|
@ -12,6 +12,10 @@ set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_TARGET}-${CPACK_PACKAGE_VERSION}")
|
|||
set(CPACK_DEBIAN_PACKAGE_SECTION "web")
|
||||
set(CPACK_RPM_PACKAGE_GROUP "Applications/Internet")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-v${CPACK_PACKAGE_VERSION}") # Without '-Linux' or '-Win' suffix
|
||||
# macOS specific options - Used for DragNDrop bundle generator
|
||||
set(CPACK_BUNDLE_NAME "${PROJECT_NAME}-v${CPACK_PACKAGE_VERSION}")
|
||||
set(CPACK_BUNDLE_PLIST "${CMAKE_SOURCE_DIR}/misc/Info.plist")
|
||||
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/images/icons/libreweb-browser.icns")
|
||||
# Windows specific options - GUI Installer (NSIS generator)
|
||||
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/images/browser_logo_small.bmp")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "LibreWeb")
|
||||
|
|
|
@ -5,14 +5,6 @@ set(LIBARY_NAME ${PROJECT_NAME})
|
|||
# Create static library
|
||||
add_library(${LIBARY_NAME} STATIC whereami.c whereami.h)
|
||||
|
||||
# Add X/Open definition for realpath
|
||||
target_compile_definitions(${LIBARY_NAME} PUBLIC _XOPEN_SOURCE=500)
|
||||
|
||||
# MacOS specific compile flag
|
||||
if(APPLE)
|
||||
target_compile_definitions(${LIBARY_NAME} PUBLIC _DARWIN_C_SOURCE)
|
||||
endif()
|
||||
|
||||
# Use PUBLIC iso INTERFACE, so the library itself also finds it's own header file
|
||||
target_include_directories(
|
||||
${LIBARY_NAME}
|
||||
|
|
|
@ -12,6 +12,15 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || defined(__CYGWIN__)
|
||||
#undef _DEFAULT_SOURCE
|
||||
#define _DEFAULT_SOURCE
|
||||
#elif defined(__APPLE__)
|
||||
#undef _DARWIN_C_SOURCE
|
||||
#define _DARWIN_C_SOURCE
|
||||
#define _DARWIN_BETTER_REALPATH
|
||||
#endif
|
||||
|
||||
#if !defined(WAI_MALLOC) || !defined(WAI_FREE) || !defined(WAI_REALLOC)
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
@ -360,7 +369,6 @@ int WAI_PREFIX(getModulePath)(char* out, int capacity, int* dirname_length)
|
|||
|
||||
#elif defined(__APPLE__)
|
||||
|
||||
#define _DARWIN_BETTER_REALPATH
|
||||
#include <mach-o/dyld.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>libreweb-browser</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>libreweb-browser.icns</string>
|
||||
</dict>
|
||||
</plist>
|
Before Width: | Height: | Size: 276 B After Width: | Height: | Size: 276 B |
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 249 B After Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 188 B After Width: | Height: | Size: 188 B |
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 195 B |
Before Width: | Height: | Size: 197 B After Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 177 B After Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 236 B |
Before Width: | Height: | Size: 194 B After Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 195 B |
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 179 B |
Before Width: | Height: | Size: 138 B After Width: | Height: | Size: 138 B |
Before Width: | Height: | Size: 291 B After Width: | Height: | Size: 291 B |
Before Width: | Height: | Size: 144 B After Width: | Height: | Size: 144 B |
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 218 B After Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 107 B After Width: | Height: | Size: 107 B |
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 220 B |
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 171 B |
Before Width: | Height: | Size: 173 B After Width: | Height: | Size: 173 B |
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 136 B |
Before Width: | Height: | Size: 166 B After Width: | Height: | Size: 166 B |
Before Width: | Height: | Size: 197 B After Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 199 B |
Before Width: | Height: | Size: 193 B After Width: | Height: | Size: 193 B |
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 249 B After Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 247 B |
Before Width: | Height: | Size: 266 B After Width: | Height: | Size: 266 B |
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 172 B After Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 159 B After Width: | Height: | Size: 159 B |
Before Width: | Height: | Size: 145 B After Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 128 B |
Before Width: | Height: | Size: 159 B After Width: | Height: | Size: 159 B |
Before Width: | Height: | Size: 172 B After Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 246 B |
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 282 B |
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 194 B After Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 121 B After Width: | Height: | Size: 121 B |
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 125 B |
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 125 B |
Before Width: | Height: | Size: 121 B After Width: | Height: | Size: 121 B |
Before Width: | Height: | Size: 88 B After Width: | Height: | Size: 88 B |
Before Width: | Height: | Size: 81 B After Width: | Height: | Size: 81 B |
Before Width: | Height: | Size: 88 B After Width: | Height: | Size: 88 B |
Before Width: | Height: | Size: 88 B After Width: | Height: | Size: 88 B |
Before Width: | Height: | Size: 139 B After Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 169 B After Width: | Height: | Size: 169 B |
Before Width: | Height: | Size: 176 B After Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 118 B After Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 141 B After Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 146 B |
Before Width: | Height: | Size: 139 B After Width: | Height: | Size: 139 B |
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 165 B After Width: | Height: | Size: 165 B |
Before Width: | Height: | Size: 208 B After Width: | Height: | Size: 208 B |
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 175 B After Width: | Height: | Size: 175 B |
Before Width: | Height: | Size: 165 B After Width: | Height: | Size: 165 B |
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 109 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 109 B |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 145 B After Width: | Height: | Size: 145 B |
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 136 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 206 B |
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 84 B After Width: | Height: | Size: 84 B |
Before Width: | Height: | Size: 117 B After Width: | Height: | Size: 117 B |
Before Width: | Height: | Size: 79 B After Width: | Height: | Size: 79 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 213 B |
Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 213 B |
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 192 B After Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 174 B After Width: | Height: | Size: 174 B |
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 155 B |
Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 210 B After Width: | Height: | Size: 210 B |
Before Width: | Height: | Size: 127 B After Width: | Height: | Size: 127 B |