mirror of
https://github.com/fergalmoran/flameshot.git
synced 2025-12-22 09:51:06 +00:00
5
.github/workflows/Linux-pack.yml
vendored
5
.github/workflows/Linux-pack.yml
vendored
@@ -418,8 +418,9 @@ jobs:
|
||||
mkdir -p ${APPIMAGE_DST_PATH}
|
||||
|
||||
cd $GITHUB_WORKSPACE
|
||||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DUSE_LAUNCHER_ABSOLUTE_PATH:BOOL=OFF
|
||||
make -j$(nproc) DESTDIR=${APPIMAGE_DST_PATH} install
|
||||
cmake -S -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr/"${APPIMAGE_DST_PATH}" -DUSE_LAUNCHER_ABSOLUTE_PATH:BOOL=OFF
|
||||
cmake --build build --target install --config RelWithDebInfo -- -j$(nproc)
|
||||
|
||||
|
||||
$GITHUB_WORKSPACE/appimagetool -s deploy ${APPIMAGE_DST_PATH}/usr/share/applications/org.flameshot.Flameshot.desktop
|
||||
|
||||
|
||||
9
.github/workflows/MacOS-pack.yml
vendored
9
.github/workflows/MacOS-pack.yml
vendored
@@ -52,15 +52,12 @@ jobs:
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
mkdir -p "${DIR_BULD}"
|
||||
cd "${DIR_BULD}"
|
||||
rm -rf ./src/flameshot.dmg ./src/flameshot.app/
|
||||
cmake .. -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5 -DUSE_MONOCHROME_ICON=True
|
||||
rm -rf "${DIR_BULD}"/src/flameshot.dmg "${DIR_BULD}"/src/flameshot.app/
|
||||
cmake -S . -B "${DIR_BULD}" -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5 -DUSE_MONOCHROME_ICON=True
|
||||
|
||||
- name: Compile
|
||||
run: |
|
||||
cd "${DIR_BULD}"
|
||||
make
|
||||
cmake --build "${DIR_BULD}"
|
||||
|
||||
- name: Create key-chain and import certificate
|
||||
run: |
|
||||
|
||||
13
README.md
13
README.md
@@ -471,29 +471,26 @@ brew install cmake
|
||||
After installing all the dependencies, finally run the following commands in the sources root directory:
|
||||
|
||||
```shell
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../
|
||||
make
|
||||
cmake -S . -B build && cmake --build build
|
||||
```
|
||||
|
||||
NOTE: for macOS you should replace command
|
||||
|
||||
```shell
|
||||
cmake ../
|
||||
cmake -S . -B build
|
||||
```
|
||||
|
||||
to
|
||||
|
||||
```shell
|
||||
cmake ../ -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5
|
||||
cmake -S . -B build -DQt5_DIR=$(brew --prefix qt5)/lib/cmake/Qt5
|
||||
```
|
||||
|
||||
When `make` command completed you can launch flameshot from `project_folder/build/src` folder
|
||||
When `cmake --build build` command completed you can launch flameshot from `project_folder/build/src` folder
|
||||
|
||||
### Install
|
||||
|
||||
Simply use `make install` with privileges.
|
||||
Simply use `cmake --install build` with privileges.
|
||||
Note: If you install from source, there is no uninstaller, you will need to manually remove the files. Consider using [CMAKE_INSTALL_PREFIX](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html) to install to a custom location for easy removal.
|
||||
|
||||
### FAQ
|
||||
|
||||
10
appveyor.yml
10
appveyor.yml
@@ -9,19 +9,17 @@ environment:
|
||||
build_script:
|
||||
- cmd: >-
|
||||
|
||||
mkdir build
|
||||
|
||||
cd build
|
||||
|
||||
set QTDIR=%Qt5_INSTALL_DIR%
|
||||
|
||||
set "VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC"
|
||||
|
||||
set "OPENSSL_ROOT_DIR=C:/OpenSSL-v111-Win64"
|
||||
|
||||
cmake c:\projects\source -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE:STRING=Release -DENABLE_OPENSSL=ON -DRUN_IN_PLACE=OFF
|
||||
cmake -S c:\projects\source -B build -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE:STRING=Release -DENABLE_OPENSSL=ON -DRUN_IN_PLACE=OFF
|
||||
|
||||
cmake --build . --parallel 2 --config "Release"
|
||||
cmake --build build --parallel 2 --config "Release"
|
||||
|
||||
cd build
|
||||
|
||||
cpack -G WIX -B package
|
||||
|
||||
|
||||
@@ -20,42 +20,36 @@ set(CMAKE_AUTOUIC ON)
|
||||
|
||||
# set application icon
|
||||
if (APPLE)
|
||||
set(FLAMESHOT_ICONSET ${CMAKE_BINARY_DIR}/flameshot.iconset)
|
||||
set(FLAMESHOT_ICNS ${CMAKE_BINARY_DIR}/flameshot.icns)
|
||||
|
||||
# generate iconset
|
||||
execute_process(
|
||||
COMMAND bash "-c" "mkdir -p flameshot.iconset"
|
||||
)
|
||||
execute_process(
|
||||
COMMAND bash "-c" "sips -z 16 16 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome.png --out flameshot.iconset/icon_16x16.png"
|
||||
COMMAND bash "-c" "sips -z 32 32 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome.png --out flameshot.iconset/icon_16x16@2x.png"
|
||||
COMMAND bash "-c" "sips -z 32 32 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome.png --out flameshot.iconset/icon_32x32.png"
|
||||
COMMAND bash "-c" "sips -z 64 64 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome.png --out flameshot.iconset/icon_32x32@2x.png"
|
||||
COMMAND bash "-c" "sips -z 64 64 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome.png --out flameshot.iconset/icon_64x64x.png"
|
||||
COMMAND bash "-c" "sips -z 128 128 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome.png --out flameshot.iconset/icon_64x64@2.png"
|
||||
COMMAND bash "-c" "sips -z 128 128 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome-1024.png --out flameshot.iconset/icon_128x128.png"
|
||||
COMMAND bash "-c" "sips -z 256 256 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome-1024.png --out flameshot.iconset/icon_128x128@2x.png"
|
||||
COMMAND bash "-c" "sips -z 256 256 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome-1024.png --out flameshot.iconset/icon_256x256.png"
|
||||
COMMAND bash "-c" "sips -z 512 512 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome-1024.png --out flameshot.iconset/icon_256x256@2x.png"
|
||||
COMMAND bash "-c" "sips -z 512 512 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome-1024.png --out flameshot.iconset/icon_512x512.png"
|
||||
COMMAND bash "-c" "sips -z 1024 1024 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome-1024.png --out flameshot.iconset/icon_512x512@2x.png"
|
||||
|
||||
|
||||
COMMAND bash "-c" "iconutil -c icns flameshot.iconset"
|
||||
COMMAND bash "-c" "mkdir -p \"${FLAMESHOT_ICONSET}\""
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND bash "-c" "rm -R flameshot.iconset"
|
||||
)
|
||||
COMMAND bash "-c" "sips -z 16 16 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome.png --out \"${FLAMESHOT_ICONSET}\"/icon_16x16.png"
|
||||
COMMAND bash "-c" "sips -z 32 32 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome.png --out \"${FLAMESHOT_ICONSET}\"/icon_16x16@2x.png"
|
||||
COMMAND bash "-c" "sips -z 32 32 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome.png --out \"${FLAMESHOT_ICONSET}\"/icon_32x32.png"
|
||||
COMMAND bash "-c" "sips -z 64 64 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome.png --out \"${FLAMESHOT_ICONSET}\"/icon_32x32@2x.png"
|
||||
COMMAND bash "-c" "sips -z 64 64 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome.png --out \"${FLAMESHOT_ICONSET}\"/icon_64x64x.png"
|
||||
COMMAND bash "-c" "sips -z 128 128 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome.png --out \"${FLAMESHOT_ICONSET}\"/icon_64x64@2.png"
|
||||
COMMAND bash "-c" "sips -z 128 128 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome-1024.png --out \"${FLAMESHOT_ICONSET}\"/icon_128x128.png"
|
||||
COMMAND bash "-c" "sips -z 256 256 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome-1024.png --out \"${FLAMESHOT_ICONSET}\"/icon_128x128@2x.png"
|
||||
COMMAND bash "-c" "sips -z 256 256 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome-1024.png --out \"${FLAMESHOT_ICONSET}\"/icon_256x256.png"
|
||||
COMMAND bash "-c" "sips -z 512 512 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome-1024.png --out \"${FLAMESHOT_ICONSET}\"/icon_256x256@2x.png"
|
||||
COMMAND bash "-c" "sips -z 512 512 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome-1024.png --out \"${FLAMESHOT_ICONSET}\"/icon_512x512.png"
|
||||
COMMAND bash "-c" "sips -z 1024 1024 \"${CMAKE_SOURCE_DIR}\"/data/img/app/flameshot.monochrome-1024.png --out \"${FLAMESHOT_ICONSET}\"/icon_512x512@2x.png"
|
||||
|
||||
execute_process(
|
||||
# copy icon from cache generated on the localhost if generation on CI failed
|
||||
COMMAND bash "-c" "[[ -r 'flameshot.icns' ]] || cp \"${CMAKE_SOURCE_DIR}\"/packaging/macos/flameshot.icns ./"
|
||||
COMMAND bash "-c" "iconutil -o \"${FLAMESHOT_ICNS}\" -c icns ${FLAMESHOT_ICONSET}"
|
||||
)
|
||||
|
||||
# Set application icon
|
||||
set(MACOSX_BUNDLE_ICON_FILE flameshot.icns)
|
||||
|
||||
# And this part tells CMake where to find and install the file itself
|
||||
set(APP_ICON_MACOSX ${CMAKE_BINARY_DIR}/flameshot.icns)
|
||||
set(APP_ICON_MACOSX ${FLAMESHOT_ICNS})
|
||||
set_source_files_properties(${APP_ICON_MACOSX} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||
|
||||
add_executable(flameshot MACOSX_BUNDLE main.cpp ${APP_ICON_MACOSX})
|
||||
|
||||
Reference in New Issue
Block a user