From 8ed82557dff65c5053f56f0c934cd7325a151512 Mon Sep 17 00:00:00 2001 From: Ludy87 Date: Sat, 12 Jul 2025 19:11:05 +0200 Subject: [PATCH] more rename --- .gitattributes | 14 ++++---- .github/labeler-config-srvaroa.yml | 36 ++++++++++---------- .github/scripts/check_language_properties.py | 8 ++--- .github/workflows/check_properties.yml | 12 +++---- .github/workflows/licenses-update.yml | 4 +-- .github/workflows/multiOSReleases.yml | 2 +- Dockerfile | 18 +++++----- Dockerfile.dev | 12 +++---- Dockerfile.fat | 20 +++++------ Dockerfile.ultra-lite | 16 ++++----- build.gradle | 14 ++++---- core/.gitignore | 4 +-- devGuide/DeveloperGuide.md | 14 ++++---- devGuide/HowToAddNewLanguage.md | 12 +++---- scripts/counter_translation.py | 2 +- scripts/init-without-ocr.sh | 8 ++--- scripts/init.sh | 8 ++--- testing/test.sh | 34 +++++++++--------- 18 files changed, 119 insertions(+), 119 deletions(-) diff --git a/.gitattributes b/.gitattributes index f72c204bd..4dd213e6b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,10 +1,10 @@ * text=auto eol=lf # Ignore all JavaScript files in a directory -stirling-pdf/src/main/resources/static/pdfjs/* linguist-vendored -stirling-pdf/src/main/resources/static/pdfjs/** linguist-vendored -stirling-pdf/src/main/resources/static/pdfjs-legacy/* linguist-vendored -stirling-pdf/src/main/resources/static/pdfjs-legacy/** linguist-vendored -stirling-pdf/src/main/resources/static/css/bootstrap-icons.css linguist-vendored -stirling-pdf/src/main/resources/static/css/bootstrap.min.css linguist-vendored -stirling-pdf/src/main/resources/static/css/fonts/* linguist-vendored +core/src/main/resources/static/pdfjs/* linguist-vendored +core/src/main/resources/static/pdfjs/** linguist-vendored +core/src/main/resources/static/pdfjs-legacy/* linguist-vendored +core/src/main/resources/static/pdfjs-legacy/** linguist-vendored +core/src/main/resources/static/css/bootstrap-icons.css linguist-vendored +core/src/main/resources/static/css/bootstrap.min.css linguist-vendored +core/src/main/resources/static/css/fonts/* linguist-vendored diff --git a/.github/labeler-config-srvaroa.yml b/.github/labeler-config-srvaroa.yml index b2324fbe3..7fdfd587d 100644 --- a/.github/labeler-config-srvaroa.yml +++ b/.github/labeler-config-srvaroa.yml @@ -36,34 +36,34 @@ labels: - label: 'Translation' files: - - 'stirling-pdf/src/main/resources/messages_[a-zA-Z_]{2}_[a-zA-Z_]{2,7}.properties' + - 'core/src/main/resources/messages_[a-zA-Z_]{2}_[a-zA-Z_]{2,7}.properties' - 'scripts/ignore_translation.toml' - - 'stirling-pdf/src/main/resources/templates/fragments/languages.html' + - 'core/src/main/resources/templates/fragments/languages.html' - '.github/scripts/check_language_properties.py' - label: 'Front End' files: - - 'stirling-pdf/src/main/resources/templates/.*' + - 'core/src/main/resources/templates/.*' - 'proprietary/src/main/resources/templates/.*' - - 'stirling-pdf/src/main/resources/static/.*' + - 'core/src/main/resources/static/.*' - 'proprietary/src/main/resources/static/.*' - - 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/web/.*' - - 'stirling-pdf/src/main/java/stirling/software/SPDF/UI/.*' + - 'core/src/main/java/stirling/software/SPDF/controller/web/.*' + - 'core/src/main/java/stirling/software/SPDF/UI/.*' - 'proprietary/src/main/java/stirling/software/proprietary/security/controller/web/.*' - label: 'Java' files: - 'common/src/main/java/.*.java' - 'proprietary/src/main/java/.*.java' - - 'stirling-pdf/src/main/java/.*.java' + - 'core/src/main/java/.*.java' - label: 'Back End' files: - - 'stirling-pdf/src/main/java/stirling/software/SPDF/config/.*' - - 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/.*' - - 'stirling-pdf/src/main/resources/settings.yml.template' - - 'stirling-pdf/src/main/resources/application.properties' - - 'stirling-pdf/src/main/resources/banner.txt' + - 'core/src/main/java/stirling/software/SPDF/config/.*' + - 'core/src/main/java/stirling/software/SPDF/controller/.*' + - 'core/src/main/resources/settings.yml.template' + - 'core/src/main/resources/application.properties' + - 'core/src/main/resources/banner.txt' - 'scripts/png_to_webp.py' - 'split_photos.py' - 'application.properties' @@ -77,10 +77,10 @@ labels: - label: 'API' files: - - 'stirling-pdf/src/main/java/stirling/software/SPDF/config/OpenApiConfig.java' - - 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/web/MetricsController.java' - - 'stirling-pdf/src/main/java/stirling/software/SPDF/controller/api/.*' - - 'stirling-pdf/src/main/java/stirling/software/SPDF/model/api/.*' + - 'core/src/main/java/stirling/software/SPDF/config/OpenApiConfig.java' + - 'core/src/main/java/stirling/software/SPDF/controller/web/MetricsController.java' + - 'core/src/main/java/stirling/software/SPDF/controller/api/.*' + - 'core/src/main/java/stirling/software/SPDF/model/api/.*' - 'proprietary/src/main/java/stirling/software/proprietary/security/controller/api/.*' - 'scripts/png_to_webp.py' - 'split_photos.py' @@ -121,7 +121,7 @@ labels: files: - 'common/src/test/.*' - 'proprietary/src/test/.*' - - 'stirling-pdf/src/test/.*' + - 'core/src/test/.*' - 'testing/.*' - '.github/workflows/scorecards.yml' - 'exampleYmlFiles/test_cicd.yml' @@ -139,4 +139,4 @@ labels: - 'build.gradle' - 'common/build.gradle' - 'proprietary/build.gradle' - - 'stirling-pdf/build.gradle' + - 'core/build.gradle' diff --git a/.github/scripts/check_language_properties.py b/.github/scripts/check_language_properties.py index 659ff7027..4918ac6d1 100644 --- a/.github/scripts/check_language_properties.py +++ b/.github/scripts/check_language_properties.py @@ -197,7 +197,7 @@ def check_for_differences(reference_file, file_list, branch, actor): if len(file_list) == 1: file_arr = file_list[0].split() base_dir = os.path.abspath( - os.path.join(os.getcwd(), "stirling-pdf", "src", "main", "resources") + os.path.join(os.getcwd(), "core", "src", "main", "resources") ) for file_path in file_arr: @@ -219,13 +219,13 @@ def check_for_differences(reference_file, file_list, branch, actor): # only local windows command not file_normpath.startswith( os.path.join( - "", "stirling-pdf", "src", "main", "resources", "messages_" + "", "core", "src", "main", "resources", "messages_" ) ) and not file_normpath.startswith( os.path.join( os.getcwd(), - "stirling-pdf", + "core", "src", "main", "resources", @@ -389,7 +389,7 @@ if __name__ == "__main__": file_list = glob.glob( os.path.join( os.getcwd(), - "stirling-pdf", + "core", "src", "main", "resources", diff --git a/.github/workflows/check_properties.yml b/.github/workflows/check_properties.yml index 7e6c43cbd..801afe0d1 100644 --- a/.github/workflows/check_properties.yml +++ b/.github/workflows/check_properties.yml @@ -4,7 +4,7 @@ on: pull_request_target: types: [opened, synchronize, reopened] paths: - - "stirling-pdf/src/main/resources/messages_*.properties" + - "core/src/main/resources/messages_*.properties" permissions: contents: read # Allow read access to repository content @@ -67,7 +67,7 @@ jobs: exit 1 fi # Get changed files and filter for properties files, handle case where no matches are found - gh pr view ${{ steps.get-pr-data.outputs.pr_number }} --json files -q ".files[].path" | grep -E '^stirling-pdf/src/main/resources/messages_[a-zA-Z_]{2}_[a-zA-Z_]{2,7}\.properties$' > changed_files.txt || echo "No matching properties files found in PR" + gh pr view ${{ steps.get-pr-data.outputs.pr_number }} --json files -q ".files[].path" | grep -E '^core/src/main/resources/messages_[a-zA-Z_]{2}_[a-zA-Z_]{2,7}\.properties$' > changed_files.txt || echo "No matching properties files found in PR" # Check if any files were found if [ ! -s changed_files.txt ]; then echo "No properties files changed in this PR" @@ -117,7 +117,7 @@ jobs: const changedFiles = files .filter(file => file.status !== "removed" && - /^stirling-pdf\/src\/main\/resources\/messages_[a-zA-Z_]{2}_[a-zA-Z_]{2,7}\.properties$/.test(file.filename) + /^core\/src\/main\/resources\/messages_[a-zA-Z_]{2}_[a-zA-Z_]{2,7}\.properties$/.test(file.filename) ) .map(file => file.filename); @@ -157,12 +157,12 @@ jobs: // Determine reference file let referenceFilePath; - if (changedFiles.includes("stirling-pdf/src/main/resources/messages_en_GB.properties")) { + if (changedFiles.includes("core/src/main/resources/messages_en_GB.properties")) { console.log("Using PR branch reference file."); const { data: fileContent } = await github.rest.repos.getContent({ owner: prRepoOwner, repo: prRepoName, - path: "stirling-pdf/src/main/resources/messages_en_GB.properties", + path: "core/src/main/resources/messages_en_GB.properties", ref: branch, }); @@ -174,7 +174,7 @@ jobs: const { data: fileContent } = await github.rest.repos.getContent({ owner: repoOwner, repo: repoName, - path: "stirling-pdf/src/main/resources/messages_en_GB.properties", + path: "core/src/main/resources/messages_en_GB.properties", ref: "main", }); diff --git a/.github/workflows/licenses-update.yml b/.github/workflows/licenses-update.yml index 0cff27a96..7daac1622 100644 --- a/.github/workflows/licenses-update.yml +++ b/.github/workflows/licenses-update.yml @@ -57,11 +57,11 @@ jobs: - name: Move and rename license file run: | - mv build/reports/dependency-license/index.json stirling-pdf/src/main/resources/static/3rdPartyLicenses.json + mv build/reports/dependency-license/index.json core/src/main/resources/static/3rdPartyLicenses.json - name: Commit changes run: | - git add stirling-pdf/src/main/resources/static/3rdPartyLicenses.json + git add core/src/main/resources/static/3rdPartyLicenses.json git diff --staged --quiet || echo "CHANGES_DETECTED=true" >> $GITHUB_ENV - name: Create Pull Request diff --git a/.github/workflows/multiOSReleases.yml b/.github/workflows/multiOSReleases.yml index cdd8c6580..5cee12e4e 100644 --- a/.github/workflows/multiOSReleases.yml +++ b/.github/workflows/multiOSReleases.yml @@ -86,7 +86,7 @@ jobs: run: | mkdir ./binaries mv ./build/launch4j/Stirling-PDF.exe ./binaries/win-Stirling-PDF-portable-Server${{ matrix.file_suffix }}.exe - mv ./stirling-pdf/build/libs/stirling-pdf-${{ needs.read_versions.outputs.version }}.jar ./binaries/Stirling-PDF${{ matrix.file_suffix }}.jar + mv ./core/build/libs/stirling-pdf-${{ needs.read_versions.outputs.version }}.jar ./binaries/Stirling-PDF${{ matrix.file_suffix }}.jar - name: Upload build artifacts uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 diff --git a/Dockerfile b/Dockerfile index 84dddd1dc..69228e530 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,8 @@ FROM alpine:3.22.0@sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be02 # Copy necessary files COPY scripts /scripts COPY pipeline /pipeline -COPY stirling-pdf/src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/ -COPY stirling-pdf/build/libs/*.jar app.jar +COPY core/src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/ +COPY core/build/libs/*.jar app.jar ARG VERSION_TAG @@ -34,10 +34,10 @@ ENV DISABLE_ADDITIONAL_FEATURES=true \ UNO_PATH=/usr/lib/libreoffice/program \ URE_BOOTSTRAP=file:///usr/lib/libreoffice/program/fundamentalrc \ PATH=$PATH:/opt/venv/bin \ - STIRLING_TEMPFILES_DIRECTORY=/tmp/stirling-pdf \ - TMPDIR=/tmp/stirling-pdf \ - TEMP=/tmp/stirling-pdf \ - TMP=/tmp/stirling-pdf + STIRLING_TEMPFILES_DIRECTORY=/tmp/core \ + TMPDIR=/tmp/core \ + TEMP=/tmp/core \ + TMP=/tmp/core # JDK for app @@ -85,7 +85,7 @@ RUN echo "@main https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/a ln -s /usr/lib/libreoffice/program/unohelper.py /opt/venv/lib/python3.12/site-packages/ && \ ln -s /usr/lib/libreoffice/program /opt/venv/lib/python3.12/site-packages/LibreOffice && \ mv /usr/share/tessdata /usr/share/tessdata-original && \ - mkdir -p $HOME /configs /logs /customFiles /pipeline/watchedFolders /pipeline/finishedFolders /tmp/stirling-pdf && \ + mkdir -p $HOME /configs /logs /customFiles /pipeline/watchedFolders /pipeline/finishedFolders /tmp/core && \ # Configure URW Base 35 fonts ln -s /usr/share/fontconfig/conf.avail/69-urw-*.conf /etc/fonts/conf.d/ && \ fc-cache -f -v && \ @@ -93,11 +93,11 @@ RUN echo "@main https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/a chmod +x /scripts/init.sh && \ # User permissions addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \ - chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/stirling-pdf && \ + chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/core && \ chown stirlingpdfuser:stirlingpdfgroup /app.jar EXPOSE 8080/tcp # Set user and run command ENTRYPOINT ["tini", "--", "/scripts/init.sh"] -CMD ["sh", "-c", "java -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/tmp/stirling-pdf -jar /app.jar & /opt/venv/bin/unoserver --port 2003 --interface 127.0.0.1"] +CMD ["sh", "-c", "java -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/tmp/core -jar /app.jar & /opt/venv/bin/unoserver --port 2003 --interface 127.0.0.1"] diff --git a/Dockerfile.dev b/Dockerfile.dev index 78460115f..a1bc2757f 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -28,10 +28,10 @@ RUN apt-get update && apt-get install -y \ # Setze die Environment Variable für setuptools ENV SETUPTOOLS_USE_DISTUTILS=local \ - STIRLING_TEMPFILES_DIRECTORY=/tmp/stirling-pdf \ - TMPDIR=/tmp/stirling-pdf \ - TEMP=/tmp/stirling-pdf \ - TMP=/tmp/stirling-pdf + STIRLING_TEMPFILES_DIRECTORY=/tmp/core \ + TMPDIR=/tmp/core \ + TEMP=/tmp/core \ + TMP=/tmp/core # Installation der benötigten Python-Pakete RUN python3 -m venv --system-site-packages /opt/venv \ @@ -44,10 +44,10 @@ ENV PATH="/opt/venv/bin:$PATH" COPY . /workspace -RUN mkdir -p /tmp/stirling-pdf \ +RUN mkdir -p /tmp/core \ && fc-cache -f -v \ && adduser --disabled-password --gecos '' devuser \ - && chown -R devuser:devuser /home/devuser /workspace /tmp/stirling-pdf + && chown -R devuser:devuser /home/devuser /workspace /tmp/core RUN echo "devuser ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/devuser \ && chmod 0440 /etc/sudoers.d/devuser diff --git a/Dockerfile.fat b/Dockerfile.fat index 4053cd97f..fd7a3335b 100644 --- a/Dockerfile.fat +++ b/Dockerfile.fat @@ -5,7 +5,7 @@ COPY build.gradle . COPY settings.gradle . COPY gradlew . COPY gradle gradle/ -COPY stirling-pdf/build.gradle stirling-pdf/. +COPY core/build.gradle core/. COPY common/build.gradle common/. COPY proprietary/build.gradle proprietary/. RUN ./gradlew build -x spotlessApply -x spotlessCheck -x test -x sonarqube || return 0 @@ -27,8 +27,8 @@ FROM alpine:3.22.0@sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be02 # Copy necessary files COPY scripts /scripts COPY pipeline /pipeline -COPY stirling-pdf/src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/ -COPY --from=build /app/stirling-pdf/build/libs/*.jar app.jar +COPY core/src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/ +COPY --from=build /app/core/build/libs/*.jar app.jar ARG VERSION_TAG @@ -47,10 +47,10 @@ ENV DISABLE_ADDITIONAL_FEATURES=true \ UNO_PATH=/usr/lib/libreoffice/program \ URE_BOOTSTRAP=file:///usr/lib/libreoffice/program/fundamentalrc \ PATH=$PATH:/opt/venv/bin \ - STIRLING_TEMPFILES_DIRECTORY=/tmp/stirling-pdf \ - TMPDIR=/tmp/stirling-pdf \ - TEMP=/tmp/stirling-pdf \ - TMP=/tmp/stirling-pdf + STIRLING_TEMPFILES_DIRECTORY=/tmp/core \ + TMPDIR=/tmp/core \ + TEMP=/tmp/core \ + TMP=/tmp/core # JDK for app @@ -97,7 +97,7 @@ RUN echo "@main https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/a ln -s /usr/lib/libreoffice/program/unohelper.py /opt/venv/lib/python3.12/site-packages/ && \ ln -s /usr/lib/libreoffice/program /opt/venv/lib/python3.12/site-packages/LibreOffice && \ mv /usr/share/tessdata /usr/share/tessdata-original && \ - mkdir -p $HOME /configs /logs /customFiles /pipeline/watchedFolders /pipeline/finishedFolders /tmp/stirling-pdf && \ + mkdir -p $HOME /configs /logs /customFiles /pipeline/watchedFolders /pipeline/finishedFolders /tmp/core && \ # Configure URW Base 35 fonts ln -s /usr/share/fontconfig/conf.avail/69-urw-*.conf /etc/fonts/conf.d/ && \ fc-cache -f -v && \ @@ -105,10 +105,10 @@ RUN echo "@main https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/a chmod +x /scripts/init.sh && \ # User permissions addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \ - chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/stirling-pdf && \ + chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/core && \ chown stirlingpdfuser:stirlingpdfgroup /app.jar EXPOSE 8080/tcp # Set user and run command ENTRYPOINT ["tini", "--", "/scripts/init.sh"] -CMD ["sh", "-c", "java -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/tmp/stirling-pdf -jar /app.jar & /opt/venv/bin/unoserver --port 2003 --interface 127.0.0.1"] +CMD ["sh", "-c", "java -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/tmp/core -jar /app.jar & /opt/venv/bin/unoserver --port 2003 --interface 127.0.0.1"] diff --git a/Dockerfile.ultra-lite b/Dockerfile.ultra-lite index 283d3c983..7dcb1002c 100644 --- a/Dockerfile.ultra-lite +++ b/Dockerfile.ultra-lite @@ -12,17 +12,17 @@ ENV DISABLE_ADDITIONAL_FEATURES=true \ PUID=1000 \ PGID=1000 \ UMASK=022 \ - STIRLING_TEMPFILES_DIRECTORY=/tmp/stirling-pdf \ - TMPDIR=/tmp/stirling-pdf \ - TEMP=/tmp/stirling-pdf \ - TMP=/tmp/stirling-pdf + STIRLING_TEMPFILES_DIRECTORY=/tmp/core \ + TMPDIR=/tmp/core \ + TEMP=/tmp/core \ + TMP=/tmp/core # Copy necessary files COPY scripts/download-security-jar.sh /scripts/download-security-jar.sh COPY scripts/init-without-ocr.sh /scripts/init-without-ocr.sh COPY scripts/installFonts.sh /scripts/installFonts.sh COPY pipeline /pipeline -COPY stirling-pdf/build/libs/*.jar app.jar +COPY core/build/libs/*.jar app.jar # Set up necessary directories and permissions RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/apk/repositories && \ @@ -39,10 +39,10 @@ RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /et su-exec \ openjdk21-jre && \ # User permissions - mkdir -p /configs /logs /customFiles /usr/share/fonts/opentype/noto /tmp/stirling-pdf && \ + mkdir -p /configs /logs /customFiles /usr/share/fonts/opentype/noto /tmp/core && \ chmod +x /scripts/*.sh && \ addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \ - chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /configs /customFiles /pipeline /tmp/stirling-pdf && \ + chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /configs /customFiles /pipeline /tmp/core && \ chown stirlingpdfuser:stirlingpdfgroup /app.jar # Set environment variables @@ -52,4 +52,4 @@ EXPOSE 8080/tcp # Run the application ENTRYPOINT ["tini", "--", "/scripts/init-without-ocr.sh"] -CMD ["java", "-Dfile.encoding=UTF-8", "-Djava.io.tmpdir=/tmp/stirling-pdf", "-jar", "/app.jar"] \ No newline at end of file +CMD ["java", "-Dfile.encoding=UTF-8", "-Djava.io.tmpdir=/tmp/core", "-jar", "/app.jar"] diff --git a/build.gradle b/build.gradle index a0d198c3a..8eedacfbd 100644 --- a/build.gradle +++ b/build.gradle @@ -228,14 +228,14 @@ static def getMacVersion(String version) { jpackage { dependsOn(":stirling-pdf:bootJar") - input = layout.projectDirectory.dir("stirling-pdf/build/libs") + input = layout.projectDirectory.dir("core/build/libs") destination = layout.projectDirectory.dir("build/jpackage") mainJar = "Stirling-PDF-${project.version}.jar" appName = "Stirling PDF" appVersion = project.version vendor = "Stirling PDF Inc" appDescription = "Stirling PDF - Your Local PDF Editor" - icon = layout.projectDirectory.file("stirling-pdf/src/main/resources/static/favicon.ico") + icon = layout.projectDirectory.file("core/src/main/resources/static/favicon.ico") verbose = true // mainClass = "org.springframework.boot.loader.launch.JarLauncher" @@ -277,7 +277,7 @@ jpackage { // MacOS-specific configuration mac { appVersion = getMacVersion(project.version.toString()) - icon = layout.projectDirectory.file("stirling-pdf/src/main/resources/static/favicon.icns") + icon = layout.projectDirectory.file("core/src/main/resources/static/favicon.icns") type = ImageType.DMG macPackageIdentifier = "Stirling PDF" macPackageName = "Stirling PDF" @@ -299,7 +299,7 @@ jpackage { // Linux-specific configuration linux { appVersion = project.version - icon = layout.projectDirectory.file("stirling-pdf/src/main/resources/static/favicon.png") + icon = layout.projectDirectory.file("core/src/main/resources/static/favicon.png") type = ImageType.DEB // Can also use "rpm" for Red Hat-based systems // Debian package configuration @@ -371,12 +371,12 @@ tasks.register('jpackageMacX64') { commandLine 'jpackage', '--type', 'dmg', '--name', 'Stirling PDF (x86_64)', - '--input', 'stirling-pdf/build/libs', + '--input', 'core/build/libs', '--main-jar', "Stirling-PDF-${project.version}.jar", '--main-class', 'org.springframework.boot.loader.launch.JarLauncher', '--runtime-image', file(jrePath + "/zulu-17.jre/Contents/Home"), '--dest', 'build/jpackage/x86_64', - '--icon', 'stirling-pdf/src/main/resources/static/favicon.icns', + '--icon', 'core/src/main/resources/static/favicon.icns', '--app-version', getMacVersion(project.version.toString()), '--mac-package-name', 'Stirling PDF (x86_64)', '--mac-package-identifier', 'Stirling PDF (x86_64)', @@ -462,7 +462,7 @@ tasks.register('cleanTempJre') { } launch4j { - icon = "${projectDir}/stirling-pdf/src/main/resources/static/favicon.ico" + icon = "${projectDir}/core/src/main/resources/static/favicon.ico" outfile="Stirling-PDF.exe" diff --git a/core/.gitignore b/core/.gitignore index 3861a89a3..138244dfe 100644 --- a/core/.gitignore +++ b/core/.gitignore @@ -124,7 +124,7 @@ SwaggerDoc.json *.rar *.db /build/* -/stirling-pdf/build/* +/core/build/* # Byte-compiled / optimized / DLL files __pycache__/ @@ -193,4 +193,4 @@ id_ed25519.pub **/jcef-bundle/ # node_modules -node_modules/ \ No newline at end of file +node_modules/ diff --git a/devGuide/DeveloperGuide.md b/devGuide/DeveloperGuide.md index c04b66dab..2e1f939bd 100644 --- a/devGuide/DeveloperGuide.md +++ b/devGuide/DeveloperGuide.md @@ -332,7 +332,7 @@ Thymeleaf is a server-side Java HTML template engine. It is used in Stirling-PDF ### Thymeleaf overview -In Stirling-PDF, Thymeleaf is used to create HTML templates that are rendered on the server side. These templates are located in the `stirling-pdf/src/main/resources/templates` directory. Thymeleaf templates use a combination of HTML and special Thymeleaf attributes to dynamically generate content. +In Stirling-PDF, Thymeleaf is used to create HTML templates that are rendered on the server side. These templates are located in the `core/src/main/resources/templates` directory. Thymeleaf templates use a combination of HTML and special Thymeleaf attributes to dynamically generate content. Some examples of this are: @@ -384,7 +384,7 @@ This would generate n entries of tr for each person in exampleData ### Adding a New Feature to the Backend (API) 1. **Create a New Controller:** - - Create a new Java class in the `stirling-pdf/src/main/java/stirling/software/SPDF/controller/api` directory. + - Create a new Java class in the `core/src/main/java/stirling/software/SPDF/controller/api` directory. - Annotate the class with `@RestController` and `@RequestMapping` to define the API endpoint. - Ensure to add API documentation annotations like `@Tag(name = "General", description = "General APIs")` and `@Operation(summary = "Crops a PDF document", description = "This operation takes an input PDF file and crops it according to the given coordinates. Input:PDF Output:PDF Type:SISO")`. @@ -411,7 +411,7 @@ This would generate n entries of tr for each person in exampleData ``` 2. **Define the Service Layer:** (Not required but often useful) - - Create a new service class in the `stirling-pdf/src/main/java/stirling/software/SPDF/service` directory. + - Create a new service class in the `core/src/main/java/stirling/software/SPDF/service` directory. - Implement the business logic for the new feature. ```java @@ -463,7 +463,7 @@ This would generate n entries of tr for each person in exampleData ### Adding a New Feature to the Frontend (UI) 1. **Create a New Thymeleaf Template:** - - Create a new HTML file in the `stirling-pdf/src/main/resources/templates` directory. + - Create a new HTML file in the `core/src/main/resources/templates` directory. - Use Thymeleaf attributes to dynamically generate content. - Use `extract-page.html` as a base example for the HTML template, which is useful to ensure importing of the general layout, navbar, and footer. @@ -507,7 +507,7 @@ This would generate n entries of tr for each person in exampleData ``` 2. **Create a New Controller for the UI:** - - Create a new Java class in the `stirling-pdf/src/main/java/stirling/software/SPDF/controller/ui` directory. + - Create a new Java class in the `core/src/main/java/stirling/software/SPDF/controller/ui` directory. - Annotate the class with `@Controller` and `@RequestMapping` to define the UI endpoint. ```java @@ -537,7 +537,7 @@ This would generate n entries of tr for each person in exampleData 3. **Update the Navigation Bar:** - Add a link to the new feature page in the navigation bar. - - Update the `stirling-pdf/src/main/resources/templates/fragments/navbar.html` file. + - Update the `core/src/main/resources/templates/fragments/navbar.html` file. ```html