Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ jobs:
working-directory: "${{ github.workspace }}/build"
run: |
cpack -G "DEB"
mv scantailor*.deb scantailor.deb
mv scantailor*.deb scantailor-advanced.deb

- name: Create RPM package
working-directory: "${{ github.workspace }}/build"
run: |
cpack -G "RPM"
mv scantailor*.rpm scantailor.rpm
mv scantailor*.rpm scantailor-advanced.rpm

- name: Create AppImage package
working-directory: "${{ github.workspace }}/build"
Expand All @@ -62,32 +62,32 @@ jobs:
chmod +x linuxdeploy-x86_64.AppImage
./linuxdeploy-x86_64.AppImage \
--appdir AppDir \
--desktop-file "${{ github.workspace }}/build/scantailor.desktop" \
--icon-file "${{ github.workspace }}/src/resources/ScanTailor.png" \
--executable scantailor \
--desktop-file "${{ github.workspace }}/build/scantailor-advanced.desktop" \
--icon-file "${{ github.workspace }}/src/resources/scantailor-advanced.png" \
--executable scantailor-advanced \
--output appimage
mv ScanTailor*.AppImage scantailor.AppImage
mv ScanTailor*.AppImage scantailor-advanced.AppImage

- name: Upload Linux bin
uses: actions/upload-artifact@v6
with:
name: scantailor-linux-ubuntu-latest-qt5
path: build/scantailor
path: build/scantailor-advanced

- name: Upload Linux DEB
uses: actions/upload-artifact@v6
with:
name: scantailor-linux-ubuntu-latest-qt5-deb
path: build/scantailor.deb
path: build/scantailor-advanced.deb

- name: Upload Linux RPM
uses: actions/upload-artifact@v6
with:
name: scantailor-linux-ubuntu-latest-qt5-rpm
path: build/scantailor.rpm
path: build/scantailor-advanced.rpm

- name: Upload Linux AppImage
uses: actions/upload-artifact@v6
with:
name: scantailor-linux-appimage
path: build/scantailor.AppImage
path: build/scantailor-advanced.AppImage
22 changes: 12 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)

set(target_name scantailor-advanced)

# Disable in-source builds.
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(FATAL_ERROR
Expand Down Expand Up @@ -284,7 +286,7 @@ option(PORTABLE_VERSION "Whether to build the portable version." ON)
if (PORTABLE_VERSION)
set(PORTABLE_CONFIG_DIR "config")
endif()
set(APPLICATION_NAME "scantailor-advanced")
set(APPLICATION_NAME "${target_name}")
if (WIN32)
set(TRANSLATION_DIRS ".:translations")
set(PLUGIN_DIRS ".")
Expand Down Expand Up @@ -331,14 +333,14 @@ set(SCANTAILOR_RESOURCES_DIR "${CMAKE_SOURCE_DIR}/src/resources")
set(SCANTAILOR_TRANSLATIONS_DIR "${CMAKE_SOURCE_DIR}/src/translations")

configure_file(
"${SCANTAILOR_RESOURCES_DIR}/unix/scantailor.desktop.in"
"${CMAKE_BINARY_DIR}/scantailor.desktop"
"${SCANTAILOR_RESOURCES_DIR}/unix/${target_name}.desktop.in"
"${CMAKE_BINARY_DIR}/${target_name}.desktop"
@ONLY)

add_subdirectory(src)

# Translations
file(GLOB translation_files "${SCANTAILOR_TRANSLATIONS_DIR}/scantailor_*.ts")
file(GLOB translation_files "${SCANTAILOR_TRANSLATIONS_DIR}/${target_name}_*.ts")

finalize_translations(scantailor ${translation_files})
update_translations_target(update_translations scantailor)
Expand Down Expand Up @@ -459,11 +461,11 @@ if (WIN32)
endif()

if (UNIX)
install(FILES "${CMAKE_BINARY_DIR}/scantailor.desktop"
install(FILES "${CMAKE_BINARY_DIR}/${target_name}.desktop"
DESTINATION "share/applications")
install(FILES "${SCANTAILOR_RESOURCES_DIR}/appicon.svg"
DESTINATION "share/icons/hicolor/scalable/apps"
RENAME "ScanTailor.svg")
RENAME "${target_name}.svg")
install(FILES "${SCANTAILOR_RESOURCES_DIR}/unix/mime/scantailor-project.xml"
DESTINATION "share/mime/packages")
endif()
Expand All @@ -483,17 +485,17 @@ set(CPACK_PACKAGE_VENDOR "4lex4 <4lex49@zoho.com>")
set(CPACK_PACKAGE_CONTACT "${CPACK_PACKAGE_VENDOR}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Interactive post-processing tool for scanned pages.")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_EXECUTABLES "scantailor;${CMAKE_PROJECT_NAME}")
set(CPACK_CREATE_DESKTOP_LINKS "scantailor")
set(CPACK_PACKAGE_EXECUTABLES "${target_name};${CMAKE_PROJECT_NAME}")
set(CPACK_CREATE_DESKTOP_LINKS "${target_name}")
if (WIN32)
set(CPACK_NSIS_INSTALLED_ICON_NAME "scantailor.exe")
set(CPACK_NSIS_INSTALLED_ICON_NAME "${target_name}.exe")
set(CPACK_NSIS_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_NSIS_DISPLAY_NAME "${CMAKE_PROJECT_NAME} ${VERSION}")
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
set(CPACK_NSIS_EXECUTABLES_DIRECTORY "${CMAKE_BINARY_DIR}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CMAKE_PROJECT_NAME}")
set(CPACK_NSIS_CREATE_ICONS_EXTRA
"CreateShortCut \\\"$DESKTOP\\\\${CMAKE_PROJECT_NAME}.lnk\\\" \\\"$INSTDIR\\\\scantailor.exe\\\"")
"CreateShortCut \\\"$DESKTOP\\\\${CMAKE_PROJECT_NAME}.lnk\\\" \\\"$INSTDIR\\\\${target_name}.exe\\\"")
set(CPACK_NSIS_DELETE_ICONS_EXTRA
"Delete \\\"$DESKTOP\\\\${CMAKE_PROJECT_NAME}.lnk\\\"")
endif()
Expand Down
16 changes: 9 additions & 7 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)

set(target_name scantailor-advanced)

set(resource_files
resources.qrc
dark_scheme/dark_scheme.qrc
Expand Down Expand Up @@ -68,26 +70,26 @@ if (WIN32)
endif()

add_executable(
scantailor WIN32 ${gui_only_sources} ${gui_only_ui_files}
${target_name} WIN32 ${gui_only_sources} ${gui_only_ui_files}
${resource_files} ${win32_resource_file})
target_link_libraries(
scantailor
${target_name}
PRIVATE core ${EXTRA_LIBS})
target_include_directories(
scantailor
${target_name}
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}"
"$<TARGET_PROPERTY:TIFF::TIFF,INTERFACE_INCLUDE_DIRECTORIES>")
install(TARGETS scantailor RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(TARGETS ${target_name} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")

if (Qt6_FOUND AND WIN32)
#manage plugins with windeployqt.
add_custom_command(
TARGET scantailor
TARGET ${target_name}
POST_BUILD
COMMAND ${QT_BINDIR}/windeployqt $<TARGET_FILE:scantailor>
COMMAND ${QT_BINDIR}/windeployqt $<TARGET_FILE:${target_name}>
COMMENT "deploy qt files alongside binary (e.g. plugins)"
)
install(CODE "execute_process(COMMAND \"${QT_BINDIR}/windeployqt\" \"\$\{CMAKE_INSTALL_PREFIX\}\")")
endif()

translation_sources(scantailor ${gui_only_sources} ${gui_only_ui_files})
translation_sources(${target_name} ${gui_only_sources} ${gui_only_ui_files})
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Version=1.0
X-ScanTailor-Advanced-Version=@VERSION@
Name=ScanTailor Advanced
Comment=Interactive post-processing tool for scanned pages
Exec=scantailor %f
Icon=ScanTailor
Exec=scantailor-advanced %f
Icon=scantailor-advanced
Terminal=false
X-MultipleArgs=false
Type=Application
Expand Down
6 changes: 3 additions & 3 deletions src/resources/win32/resources.rc.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <windows.h>

IDI_ICON1 ICON DISCARDABLE "@SCANTAILOR_WIN_DIR_NATIVE@\\scantailor.ico"
IDI_ICON1 ICON DISCARDABLE "@SCANTAILOR_WIN_DIR_NATIVE@\\scantailor-advanced.ico"

VS_VERSION_INFO VERSIONINFO
FILEVERSION @APPLICATION_VERSION_MAJOR@,@APPLICATION_VERSION_MINOR@,@APPLICATION_VERSION_PATCH@,0
Expand All @@ -23,8 +23,8 @@ VS_VERSION_INFO VERSIONINFO
VALUE "FileDescription", "ScanTailor Advanced\0"
VALUE "FileVersion", "@VERSION@.0\0"
VALUE "LegalCopyright", "Copyright (C) Joseph Artsimovich, 4lex4\0"
VALUE "OriginalFilename", "scantailor.exe\0"
VALUE "ProductName", "ScanTailor\0"
VALUE "OriginalFilename", "scantailor-advanced.exe\0"
VALUE "ProductName", "ScanTailor-Advanced\0"
VALUE "ProductVersion", "@VERSION@\0"
END
END
Expand Down
2 changes: 1 addition & 1 deletion version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef SCANTAILOR_VERSION_H_
#define SCANTAILOR_VERSION_H_

#define VERSION "1.1.1"
#define VERSION "1.1.3"
#define VERSION_QUAD "" // Must be "x.x.x.x" or an empty string.
#define PROJECT_VERSION 3

Expand Down