refactor: rename binary and artifacts to negative-converter

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Christoph K.
2026-03-15 09:54:47 +01:00
parent 4e4e19e80d
commit 93c19df257
5 changed files with 38 additions and 38 deletions

View File

@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.20)
project(photo-converter
project(negative-converter
VERSION 0.1.0
DESCRIPTION "Analog film negative to digital positive converter"
LANGUAGES CXX
@@ -95,40 +95,40 @@ target_compile_options(converter_core PRIVATE
# Main executable
# ──────────────────────────────────────────────
if(BUILD_GUI)
qt_add_executable(photo-converter
qt_add_executable(negative-converter
src/main.cpp
src/gui/MainWindow.cpp
src/gui/MainWindow.h
)
target_link_libraries(photo-converter PRIVATE
target_link_libraries(negative-converter PRIVATE
converter_core
Qt6::Widgets
)
target_include_directories(photo-converter PRIVATE
target_include_directories(negative-converter PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
)
else()
# CLI-only build (no Qt)
add_executable(photo-converter
add_executable(negative-converter
src/main.cpp
)
target_link_libraries(photo-converter PRIVATE
target_link_libraries(negative-converter PRIVATE
converter_core
)
target_compile_definitions(photo-converter PRIVATE NO_GUI=1)
target_compile_definitions(negative-converter PRIVATE NO_GUI=1)
target_include_directories(photo-converter PRIVATE
target_include_directories(negative-converter PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
)
endif()
# Windows: link against winsock / windows socket libraries needed by OpenCV
if(PHOTOCONV_WINDOWS)
target_link_libraries(photo-converter PRIVATE ws2_32)
target_link_libraries(negative-converter PRIVATE ws2_32)
endif()
# ──────────────────────────────────────────────
@@ -136,7 +136,7 @@ endif()
# ──────────────────────────────────────────────
include(GNUInstallDirs)
install(TARGETS photo-converter
install(TARGETS negative-converter
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
@@ -148,25 +148,25 @@ install(FILES config.ini
# ──────────────────────────────────────────────
# CPack packaging
# ──────────────────────────────────────────────
set(CPACK_PACKAGE_NAME "photo-converter")
set(CPACK_PACKAGE_VENDOR "photo-converter project")
set(CPACK_PACKAGE_NAME "negative-converter")
set(CPACK_PACKAGE_VENDOR "negative-converter project")
set(CPACK_PACKAGE_DESCRIPTION_SHORT "${PROJECT_DESCRIPTION}")
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "photo-converter")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "negative-converter")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" )
if(PHOTOCONV_WINDOWS)
# NSIS installer for Windows
set(CPACK_GENERATOR "NSIS;ZIP")
set(CPACK_NSIS_DISPLAY_NAME "Photo Converter ${PROJECT_VERSION}")
set(CPACK_NSIS_PACKAGE_NAME "photo-converter")
set(CPACK_NSIS_PACKAGE_NAME "negative-converter")
set(CPACK_NSIS_MODIFY_PATH ON)
set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/assets/icon.ico")
set(CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/assets/icon.ico")
else()
# TGZ + DEB for Linux / ZIP for macOS
set(CPACK_GENERATOR "TGZ;DEB")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "photo-converter project")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "negative-converter project")
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libopencv-core4.10 | libopencv4-java, libraw23, libqt6widgets6")
endif()

View File

@@ -1,5 +1,5 @@
# ─────────────────────────────────────────────────────────────────────────────
# photo-converter — Multi-Stage Build Image
# negative-converter — Multi-Stage Build Image
#
# Stages:
# base — Gemeinsame Tools (cmake, ninja, gcc)
@@ -7,8 +7,8 @@
# windows-builder — Windows Cross-Compilation via MXE + MinGW-w64
#
# Verwendung:
# docker build --target linux-builder -t photo-converter:linux .
# docker build --target windows-builder -t photo-converter:windows .
# docker build --target linux-builder -t negative-converter:linux .
# docker build --target windows-builder -t negative-converter:windows .
# ─────────────────────────────────────────────────────────────────────────────
# Ubuntu 22.04 LTS für Linux-Build
@@ -66,7 +66,7 @@ RUN cmake -B build -G Ninja \
&& cmake --build build --parallel "$(nproc)" \
&& ctest --test-dir build --output-on-failure
ENTRYPOINT ["./build/photo-converter"]
ENTRYPOINT ["./build/negative-converter"]
CMD ["--batch", "--config", "config.ini"]
# ─────────────────────────────────────────────────────────────────────────────
@@ -131,5 +131,5 @@ RUN cmake -B build-windows -G Ninja \
&& cmake --build build-windows --parallel "$(nproc)" \
&& cmake --install build-windows
# Ergebnis: /project/dist-windows/bin/photo-converter.exe
# Ergebnis: /project/dist-windows/bin/negative-converter.exe
ENTRYPOINT ["/bin/bash"]

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# build-all.sh — Kompiliert alle Targets des photo-converter Projekts
# build-all.sh — Kompiliert alle Targets des negative-converter Projekts
#
# Verwendung:
# ./scripts/build-all.sh [--release|--debug] [--clean] [--no-gui] [--no-tests]
@@ -60,7 +60,7 @@ BUILD_PATH="$PROJECT_DIR/$BUILD_DIR"
cd "$PROJECT_DIR"
echo ""
log_info "photo-converter Build"
log_info "negative-converter Build"
log_info " Typ: $BUILD_TYPE"
log_info " Pfad: $BUILD_PATH"
log_info " GUI: $BUILD_GUI"
@@ -114,7 +114,7 @@ log_ok "Build erfolgreich"
# ── Ergebnisse auflisten ──────────────────────────────────────────────────────
echo ""
log_info "Erzeugte Binaries:"
find "$BUILD_PATH" -maxdepth 3 -type f \( -name "photo-converter" -o -name "test_*" \) \
find "$BUILD_PATH" -maxdepth 3 -type f \( -name "negative-converter" -o -name "test_*" \) \
| sort \
| while read -r f; do
size=$(du -sh "$f" 2>/dev/null | cut -f1)
@@ -133,4 +133,4 @@ if [[ "$BUILD_TESTS" == "ON" ]]; then
fi
echo ""
log_ok "Fertig. Starten mit: $BUILD_PATH/photo-converter --batch --config config.ini"
log_ok "Fertig. Starten mit: $BUILD_PATH/negative-converter --batch --config config.ini"

View File

@@ -2,8 +2,8 @@
# ─────────────────────────────────────────────────────────────────────────────
# build-windows.sh
#
# Cross-compiles photo-converter for Windows (x86_64) using MinGW-w64.
# Produces a self-contained directory with photo-converter.exe and all
# Cross-compiles negative-converter for Windows (x86_64) using MinGW-w64.
# Produces a self-contained directory with negative-converter.exe and all
# required DLLs ready for distribution.
#
# Prerequisites (Ubuntu/Debian):
@@ -39,7 +39,7 @@ DIST_DIR="${PROJECT_ROOT}/dist-windows"
TOOLCHAIN="${PROJECT_ROOT}/cmake/toolchain-mingw64.cmake"
echo "========================================================"
echo " photo-converter Windows Cross-Compilation"
echo " negative-converter Windows Cross-Compilation"
echo "========================================================"
echo " Project root : ${PROJECT_ROOT}"
echo " Build dir : ${BUILD_DIR}"
@@ -131,7 +131,7 @@ fi
if [[ "${BUILD_TYPE}" == "Release" ]]; then
echo ""
echo "Stripping debug symbols from release binaries..."
x86_64-w64-mingw32-strip --strip-all "${BIN_DIR}/photo-converter.exe" 2>/dev/null || true
x86_64-w64-mingw32-strip --strip-all "${BIN_DIR}/negative-converter.exe" 2>/dev/null || true
find "${BIN_DIR}" -name "*.dll" -exec x86_64-w64-mingw32-strip --strip-unneeded {} \; 2>/dev/null || true
fi
@@ -139,7 +139,7 @@ fi
cp -v "${PROJECT_ROOT}/config.ini" "${DIST_DIR}/config.ini.example"
# ── Create ZIP archive ────────────────────────────────────────────────────────
ARCHIVE="${PROJECT_ROOT}/photo-converter-windows-x64-${BUILD_TYPE}.zip"
ARCHIVE="${PROJECT_ROOT}/negative-converter-windows-x64-${BUILD_TYPE}.zip"
if command -v zip &>/dev/null; then
(cd "${PROJECT_ROOT}" && zip -r "${ARCHIVE}" "dist-windows/")
echo ""
@@ -152,5 +152,5 @@ echo ""
echo "========================================================"
echo " Build complete!"
echo " Output: ${DIST_DIR}"
echo " Run: wine ${BIN_DIR}/photo-converter.exe --help"
echo " Run: wine ${BIN_DIR}/negative-converter.exe --help"
echo "========================================================"

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# docker-build.sh — Baut photo-converter in Docker
# docker-build.sh — Baut negative-converter in Docker
#
# Verwendung:
# ./scripts/docker-build.sh [linux|windows|all] [--no-cache] [--run]
@@ -43,10 +43,10 @@ command -v docker &>/dev/null || log_error "Docker nicht gefunden. Installieren:
mkdir -p output dist-windows
build_linux() {
log_info "Baue Linux-Image (photo-converter:linux) ..."
log_info "Baue Linux-Image (negative-converter:linux) ..."
docker build $NO_CACHE \
--target linux-builder \
-t photo-converter:linux \
-t negative-converter:linux \
-f docker/Dockerfile \
.
log_ok "Linux-Image gebaut"
@@ -57,27 +57,27 @@ build_linux() {
-v "$PROJECT_ROOT/import:/project/import:ro" \
-v "$PROJECT_ROOT/output:/project/output" \
-v "$PROJECT_ROOT/config.ini:/project/config.ini:ro" \
photo-converter:linux \
negative-converter:linux \
--batch --config config.ini
log_ok "Konvertierung abgeschlossen. Ergebnisse in: output/"
fi
}
build_windows() {
log_info "Baue Windows-Cross-Compilation-Image (photo-converter:windows-builder) ..."
log_info "Baue Windows-Cross-Compilation-Image (negative-converter:windows-builder) ..."
log_info "Hinweis: Erster Build lädt ~3 GB MXE-Pakete herunter (~20-30 Min)"
docker build $NO_CACHE \
--target windows-builder \
-t photo-converter:windows-builder \
-t negative-converter:windows-builder \
-f docker/Dockerfile \
.
log_ok "Windows-Builder-Image gebaut"
log_info "Extrahiere photo-converter.exe ..."
log_info "Extrahiere negative-converter.exe ..."
mkdir -p dist-windows
docker run --rm \
-v "$PROJECT_ROOT/dist-windows:/project/dist-windows" \
photo-converter:windows-builder \
negative-converter:windows-builder \
-c "cp -r /project/dist-windows/. /project/dist-windows/ && echo 'Fertig'"
log_ok "Windows-Build abgeschlossen: dist-windows/"