mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-23 16:05:09 +00:00
updating paths (DOCKER_SECURITY_ENABLE > ADDITIONAL_FEATURES)
This commit is contained in:
parent
a328ea9d25
commit
28f8f69bea
14
.gitattributes
vendored
14
.gitattributes
vendored
@ -1,10 +1,10 @@
|
|||||||
* text=auto eol=lf
|
* text=auto eol=lf
|
||||||
|
|
||||||
# Ignore all JavaScript files in a directory
|
# Ignore all JavaScript files in a directory
|
||||||
src/main/resources/static/pdfjs/* linguist-vendored
|
stirling-pdf/src/main/resources/static/pdfjs/* linguist-vendored
|
||||||
src/main/resources/static/pdfjs/** linguist-vendored
|
stirling-pdf/src/main/resources/static/pdfjs/** linguist-vendored
|
||||||
src/main/resources/static/pdfjs-legacy/* linguist-vendored
|
stirling-pdf/src/main/resources/static/pdfjs-legacy/* linguist-vendored
|
||||||
src/main/resources/static/pdfjs-legacy/** linguist-vendored
|
stirling-pdf/src/main/resources/static/pdfjs-legacy/** linguist-vendored
|
||||||
src/main/resources/static/css/bootstrap-icons.css linguist-vendored
|
stirling-pdf/src/main/resources/static/css/bootstrap-icons.css linguist-vendored
|
||||||
src/main/resources/static/css/bootstrap.min.css linguist-vendored
|
stirling-pdf/src/main/resources/static/css/bootstrap.min.css linguist-vendored
|
||||||
src/main/resources/static/css/fonts/* linguist-vendored
|
stirling-pdf/src/main/resources/static/css/fonts/* linguist-vendored
|
||||||
|
15
.github/labeler-config.yml
vendored
15
.github/labeler-config.yml
vendored
@ -29,22 +29,7 @@ Back End:
|
|||||||
|
|
||||||
Security:
|
Security:
|
||||||
- changed-files:
|
- changed-files:
|
||||||
# todo: fix these
|
|
||||||
- any-glob-to-any-file: 'src/main/java/stirling/software/spdf/config/security/**/*' # fixme
|
|
||||||
# todo: check if correct
|
|
||||||
- any-glob-to-any-file: 'proprietary/src/main/java/stirling/software/proprietary/security/**/*'
|
- any-glob-to-any-file: 'proprietary/src/main/java/stirling/software/proprietary/security/**/*'
|
||||||
# - any-glob-to-any-file: 'proprietary/src/main/java/stirling/software/proprietary/security/model/exception/**/*'
|
|
||||||
# - any-glob-to-any-file: 'proprietary/src/main/java/stirling/software/proprietary/security/controller/**/*'
|
|
||||||
# - any-glob-to-any-file: 'proprietary/src/main/java/stirling/software/proprietary/security/model/oauth2/provider/**/*'
|
|
||||||
# - any-glob-to-any-file: 'proprietary/src/main/java/stirling/software/proprietary/security/service/DatabaseServiceInterface.java'
|
|
||||||
# - any-glob-to-any-file: 'proprietary/src/main/java/stirling/software/proprietary/security/service/DatabaseService.java'
|
|
||||||
# - any-glob-to-any-file: 'proprietary/src/main/java/stirling/software/proprietary/security/model/api/Email.java'
|
|
||||||
# - any-glob-to-any-file: 'proprietary/src/main/java/stirling/software/proprietary/security/model/AuthenticationType.java'
|
|
||||||
# - any-glob-to-any-file: 'proprietary/src/main/java/stirling/software/proprietary/security/model/ApiKeyAuthenticationToken.java'
|
|
||||||
# - any-glob-to-any-file: 'proprietary/src/main/java/stirling/software/proprietary/security/model/AttemptCounter.java'
|
|
||||||
# - any-glob-to-any-file: 'proprietary/src/main/java/stirling/software/proprietary/security/model/Authority.java'
|
|
||||||
# - any-glob-to-any-file: 'proprietary/src/main/java/stirling/software/proprietary/security/model/PersistentLogin.java'
|
|
||||||
# - any-glob-to-any-file: 'proprietary/src/main/java/stirling/software/proprietary/security/model/SessionEntity.java'
|
|
||||||
- any-glob-to-any-file: 'scripts/download-security-jar.sh'
|
- any-glob-to-any-file: 'scripts/download-security-jar.sh'
|
||||||
- any-glob-to-any-file: '.github/workflows/dependency-review.yml'
|
- any-glob-to-any-file: '.github/workflows/dependency-review.yml'
|
||||||
- any-glob-to-any-file: '.github/workflows/scorecards.yml'
|
- any-glob-to-any-file: '.github/workflows/scorecards.yml'
|
||||||
|
2
.github/scripts/check_language_properties.py
vendored
2
.github/scripts/check_language_properties.py
vendored
@ -317,7 +317,7 @@ def check_for_differences(reference_file, file_list, branch, actor):
|
|||||||
report.append("## ❌ Overall Check Status: **_Failed_**")
|
report.append("## ❌ Overall Check Status: **_Failed_**")
|
||||||
report.append("")
|
report.append("")
|
||||||
report.append(
|
report.append(
|
||||||
f"@{actor} please check your translation if it conforms to the standard. Follow the format of [messages_en_GB.properties](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/src/main/resources/messages_en_GB.properties)"
|
f"@{actor} please check your translation if it conforms to the standard. Follow the format of [messages_en_GB.properties](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/stirling-pdf/src/main/resources/messages_en_GB.properties)"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
report.append("## ✅ Overall Check Status: **_Success_**")
|
report.append("## ✅ Overall Check Status: **_Success_**")
|
||||||
|
@ -200,11 +200,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
# Set security settings based on flags
|
# Set security settings based on flags
|
||||||
if [ "${{ needs.check-comment.outputs.enable_security }}" == "true" ]; then
|
if [ "${{ needs.check-comment.outputs.enable_security }}" == "true" ]; then
|
||||||
DOCKER_SECURITY="true"
|
ADDITIONAL_FEATURES="true"
|
||||||
LOGIN_SECURITY="true"
|
LOGIN_SECURITY="true"
|
||||||
SECURITY_STATUS="🔒 Security Enabled"
|
SECURITY_STATUS="🔒 Security Enabled"
|
||||||
else
|
else
|
||||||
DOCKER_SECURITY="false"
|
ADDITIONAL_FEATURES="false"
|
||||||
LOGIN_SECURITY="false"
|
LOGIN_SECURITY="false"
|
||||||
SECURITY_STATUS="Security Disabled"
|
SECURITY_STATUS="Security Disabled"
|
||||||
fi
|
fi
|
||||||
@ -223,7 +223,7 @@ jobs:
|
|||||||
- /stirling/PR-${{ needs.check-comment.outputs.pr_number }}/config:/configs:rw
|
- /stirling/PR-${{ needs.check-comment.outputs.pr_number }}/config:/configs:rw
|
||||||
- /stirling/PR-${{ needs.check-comment.outputs.pr_number }}/logs:/logs:rw
|
- /stirling/PR-${{ needs.check-comment.outputs.pr_number }}/logs:/logs:rw
|
||||||
environment:
|
environment:
|
||||||
ADDITIONAL_FEATURES: "${DOCKER_SECURITY}"
|
ADDITIONAL_FEATURES: "${ADDITIONAL_FEATURES}"
|
||||||
SECURITY_ENABLELOGIN: "${LOGIN_SECURITY}"
|
SECURITY_ENABLELOGIN: "${LOGIN_SECURITY}"
|
||||||
SYSTEM_DEFAULTLOCALE: en-GB
|
SYSTEM_DEFAULTLOCALE: en-GB
|
||||||
UI_APPNAME: "Stirling-PDF PR#${{ needs.check-comment.outputs.pr_number }}"
|
UI_APPNAME: "Stirling-PDF PR#${{ needs.check-comment.outputs.pr_number }}"
|
||||||
|
10
.github/workflows/check_properties.yml
vendored
10
.github/workflows/check_properties.yml
vendored
@ -4,7 +4,7 @@ on:
|
|||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
paths:
|
paths:
|
||||||
- "src/main/resources/messages_*.properties"
|
- "stirling-pdf/src/main/resources/messages_*.properties"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read # Allow read access to repository content
|
contents: read # Allow read access to repository content
|
||||||
@ -58,7 +58,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "Fetching PR changed files..."
|
echo "Fetching PR changed files..."
|
||||||
echo "Getting list of changed files from PR..."
|
echo "Getting list of changed files from PR..."
|
||||||
gh pr view ${{ steps.get-pr-data.outputs.pr_number }} --json files -q ".files[].path" | grep -E '^src/main/resources/messages_[a-zA-Z_]{2}_[a-zA-Z_]{2,7}\.properties$' > changed_files.txt # Filter only matching property files
|
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 # Filter only matching property files
|
||||||
|
|
||||||
- name: Determine reference file test
|
- name: Determine reference file test
|
||||||
id: determine-file
|
id: determine-file
|
||||||
@ -137,12 +137,12 @@ jobs:
|
|||||||
|
|
||||||
// Determine reference file
|
// Determine reference file
|
||||||
let referenceFilePath;
|
let referenceFilePath;
|
||||||
if (changedFiles.includes("src/main/resources/messages_en_GB.properties")) {
|
if (changedFiles.includes("stirling-pdf/src/main/resources/messages_en_GB.properties")) {
|
||||||
console.log("Using PR branch reference file.");
|
console.log("Using PR branch reference file.");
|
||||||
const { data: fileContent } = await github.rest.repos.getContent({
|
const { data: fileContent } = await github.rest.repos.getContent({
|
||||||
owner: prRepoOwner,
|
owner: prRepoOwner,
|
||||||
repo: prRepoName,
|
repo: prRepoName,
|
||||||
path: "src/main/resources/messages_en_GB.properties",
|
path: "stirling-pdf/src/main/resources/messages_en_GB.properties",
|
||||||
ref: branch,
|
ref: branch,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ jobs:
|
|||||||
const { data: fileContent } = await github.rest.repos.getContent({
|
const { data: fileContent } = await github.rest.repos.getContent({
|
||||||
owner: repoOwner,
|
owner: repoOwner,
|
||||||
repo: repoName,
|
repo: repoName,
|
||||||
path: "src/main/resources/messages_en_GB.properties",
|
path: "stirling-pdf/src/main/resources/messages_en_GB.properties",
|
||||||
ref: "main",
|
ref: "main",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
4
.github/workflows/licenses-update.yml
vendored
4
.github/workflows/licenses-update.yml
vendored
@ -54,7 +54,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Move and Rename License File
|
- name: Move and Rename License File
|
||||||
run: |
|
run: |
|
||||||
mv build/reports/dependency-license/index.json src/main/resources/static/3rdPartyLicenses.json
|
mv build/reports/dependency-license/index.json stirling-pdf/src/main/resources/static/3rdPartyLicenses.json
|
||||||
|
|
||||||
- name: Set up git config
|
- name: Set up git config
|
||||||
run: |
|
run: |
|
||||||
@ -63,7 +63,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run git add
|
- name: Run git add
|
||||||
run: |
|
run: |
|
||||||
git add src/main/resources/static/3rdPartyLicenses.json
|
git add stirling-pdf/src/main/resources/static/3rdPartyLicenses.json
|
||||||
git diff --staged --quiet || echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
|
git diff --staged --quiet || echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
|
10
.github/workflows/sync_files.yml
vendored
10
.github/workflows/sync_files.yml
vendored
@ -8,8 +8,8 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- "build.gradle"
|
- "build.gradle"
|
||||||
- "README.md"
|
- "README.md"
|
||||||
- "src/main/resources/messages_*.properties"
|
- "stirling-pdf/src/main/resources/messages_*.properties"
|
||||||
- "src/main/resources/static/3rdPartyLicenses.json"
|
- "stirling-pdf/src/main/resources/static/3rdPartyLicenses.json"
|
||||||
- "scripts/ignore_translation.toml"
|
- "scripts/ignore_translation.toml"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@ -78,7 +78,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Sync translation property files
|
- name: Sync translation property files
|
||||||
run: |
|
run: |
|
||||||
python .github/scripts/check_language_properties.py --reference-file "src/main/resources/messages_en_GB.properties" --branch main
|
python .github/scripts/check_language_properties.py --reference-file "stirling-pdf/src/main/resources/messages_en_GB.properties" --branch main
|
||||||
|
|
||||||
- name: Set up git config
|
- name: Set up git config
|
||||||
run: |
|
run: |
|
||||||
@ -87,7 +87,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run git add
|
- name: Run git add
|
||||||
run: |
|
run: |
|
||||||
git add src/main/resources/messages_*.properties
|
git add stirling-pdf/src/main/resources/messages_*.properties
|
||||||
git diff --staged --quiet || git commit -m ":memo: Sync translation files" || echo "no changes"
|
git diff --staged --quiet || git commit -m ":memo: Sync translation files" || echo "no changes"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@ -142,4 +142,4 @@ jobs:
|
|||||||
sign-commits: true
|
sign-commits: true
|
||||||
add-paths: |
|
add-paths: |
|
||||||
README.md
|
README.md
|
||||||
src/main/resources/messages_*.properties
|
stirling-pdf/src/main/resources/messages_*.properties
|
||||||
|
@ -20,7 +20,7 @@ repos:
|
|||||||
- --skip="./.*,*.csv,*.json,*.ambr"
|
- --skip="./.*,*.csv,*.json,*.ambr"
|
||||||
- --quiet-level=2
|
- --quiet-level=2
|
||||||
files: \.(html|css|js|py|md)$
|
files: \.(html|css|js|py|md)$
|
||||||
exclude: (.vscode|.devcontainer|src/main/resources|Dockerfile|.*/pdfjs.*|.*/thirdParty.*|bootstrap.*|.*\.min\..*|.*diff\.js)
|
exclude: (.vscode|.devcontainer|stirling-pdf/src/main/resources|Dockerfile|.*/pdfjs.*|.*/thirdParty.*|bootstrap.*|.*\.min\..*|.*diff\.js)
|
||||||
- repo: https://github.com/gitleaks/gitleaks
|
- repo: https://github.com/gitleaks/gitleaks
|
||||||
rev: v8.24.3
|
rev: v8.24.3
|
||||||
hooks:
|
hooks:
|
||||||
|
@ -332,7 +332,7 @@ Thymeleaf is a server-side Java HTML template engine. It is used in Stirling-PDF
|
|||||||
|
|
||||||
### Thymeleaf overview
|
### 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 `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 `stirling-pdf/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:
|
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)
|
### Adding a New Feature to the Backend (API)
|
||||||
|
|
||||||
1. **Create a New Controller:**
|
1. **Create a New Controller:**
|
||||||
- Create a new Java class in the `src/main/java/stirling/software/spdf/controller/api` directory.
|
- Create a new Java class in the `stirling-pdf/src/main/java/stirling/software/spdf/controller/api` directory.
|
||||||
- Annotate the class with `@RestController` and `@RequestMapping` to define the API endpoint.
|
- 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")`.
|
- 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)
|
2. **Define the Service Layer:** (Not required but often useful)
|
||||||
- Create a new service class in the `src/main/java/stirling/software/spdf/service` directory.
|
- Create a new service class in the `stirling-pdf/src/main/java/stirling/software/spdf/service` directory.
|
||||||
- Implement the business logic for the new feature.
|
- Implement the business logic for the new feature.
|
||||||
|
|
||||||
```java
|
```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)
|
### Adding a New Feature to the Frontend (UI)
|
||||||
|
|
||||||
1. **Create a New Thymeleaf Template:**
|
1. **Create a New Thymeleaf Template:**
|
||||||
- Create a new HTML file in the `src/main/resources/templates` directory.
|
- Create a new HTML file in the `stirling-pdf/src/main/resources/templates` directory.
|
||||||
- Use Thymeleaf attributes to dynamically generate content.
|
- 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.
|
- 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:**
|
2. **Create a New Controller for the UI:**
|
||||||
- Create a new Java class in the `src/main/java/stirling/software/spdf/controller/ui` directory.
|
- Create a new Java class in the `stirling-pdf/src/main/java/stirling/software/spdf/controller/ui` directory.
|
||||||
- Annotate the class with `@Controller` and `@RequestMapping` to define the UI endpoint.
|
- Annotate the class with `@Controller` and `@RequestMapping` to define the UI endpoint.
|
||||||
|
|
||||||
```java
|
```java
|
||||||
@ -537,7 +537,7 @@ This would generate n entries of tr for each person in exampleData
|
|||||||
|
|
||||||
3. **Update the Navigation Bar:**
|
3. **Update the Navigation Bar:**
|
||||||
- Add a link to the new feature page in the navigation bar.
|
- Add a link to the new feature page in the navigation bar.
|
||||||
- Update the `src/main/resources/templates/fragments/navbar.html` file.
|
- Update the `stirling-pdf/src/main/resources/templates/fragments/navbar.html` file.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
@ -551,7 +551,7 @@ When adding a new feature or modifying existing ones in Stirling-PDF, you'll nee
|
|||||||
|
|
||||||
### 1. Locate Existing Language Files
|
### 1. Locate Existing Language Files
|
||||||
|
|
||||||
Find the existing `messages.properties` files in the `src/main/resources` directory. You'll see files like:
|
Find the existing `messages.properties` files in the `stirling-pdf/src/main/resources` directory. You'll see files like:
|
||||||
|
|
||||||
- `messages.properties` (default, usually English)
|
- `messages.properties` (default, usually English)
|
||||||
- `messages_en_GB.properties`
|
- `messages_en_GB.properties`
|
||||||
|
@ -4,7 +4,7 @@ FROM alpine:3.21.3@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff45
|
|||||||
# Copy necessary files
|
# Copy necessary files
|
||||||
COPY scripts /scripts
|
COPY scripts /scripts
|
||||||
COPY pipeline /pipeline
|
COPY pipeline /pipeline
|
||||||
COPY src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/
|
COPY stirling-pdf/src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/
|
||||||
#COPY src/main/resources/static/fonts/*.otf /usr/share/fonts/opentype/noto/
|
#COPY src/main/resources/static/fonts/*.otf /usr/share/fonts/opentype/noto/
|
||||||
COPY build/libs/*.jar app.jar
|
COPY build/libs/*.jar app.jar
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ FROM alpine:3.21.3@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff45
|
|||||||
# Copy necessary files
|
# Copy necessary files
|
||||||
COPY scripts /scripts
|
COPY scripts /scripts
|
||||||
COPY pipeline /pipeline
|
COPY pipeline /pipeline
|
||||||
COPY src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/
|
COPY stirling-pdf/src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/noto/
|
||||||
COPY --from=build /app/build/libs/*.jar app.jar
|
COPY --from=build /app/build/libs/*.jar app.jar
|
||||||
|
|
||||||
ARG VERSION_TAG
|
ARG VERSION_TAG
|
||||||
|
@ -10,7 +10,7 @@ Fork Stirling-PDF and create a new branch out of `main`.
|
|||||||
|
|
||||||
Then add a reference to the language in the navbar by adding a new language entry to the dropdown:
|
Then add a reference to the language in the navbar by adding a new language entry to the dropdown:
|
||||||
|
|
||||||
- Edit the file: [languages.html](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/src/main/resources/templates/fragments/languages.html)
|
- Edit the file: [languages.html](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/stirling-pdf/src/main/resources/templates/fragments/languages.html)
|
||||||
|
|
||||||
|
|
||||||
For example, to add Polish, you would add:
|
For example, to add Polish, you would add:
|
||||||
@ -25,7 +25,7 @@ The `data-bs-language-code` is the code used to reference the file in the next s
|
|||||||
|
|
||||||
Start by copying the existing English property file:
|
Start by copying the existing English property file:
|
||||||
|
|
||||||
- [messages_en_GB.properties](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/src/main/resources/messages_en_GB.properties)
|
- [messages_en_GB.properties](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/stirling-pdf/src/main/resources/messages_en_GB.properties)
|
||||||
|
|
||||||
Copy and rename it to `messages_{your data-bs-language-code here}.properties`. In the Polish example, you would set the name to `messages_pl_PL.properties`.
|
Copy and rename it to `messages_{your data-bs-language-code here}.properties`. In the Polish example, you would set the name to `messages_pl_PL.properties`.
|
||||||
|
|
||||||
|
18
build.gradle
18
build.gradle
@ -57,7 +57,7 @@ sourceSets {
|
|||||||
|
|
||||||
test {
|
test {
|
||||||
java {
|
java {
|
||||||
if (System.getenv('DOCKER_ENABLE_SECURITY') == 'false') {
|
if (System.getenv('ADDITIONAL_FEATURES') == 'false') {
|
||||||
exclude 'stirling/software/proprietary/security/**'
|
exclude 'stirling/software/proprietary/security/**'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ jpackage {
|
|||||||
appVersion = project.version
|
appVersion = project.version
|
||||||
vendor = "Stirling PDF Inc"
|
vendor = "Stirling PDF Inc"
|
||||||
appDescription = "Stirling PDF - Your Local PDF Editor"
|
appDescription = "Stirling PDF - Your Local PDF Editor"
|
||||||
icon = "src/main/resources/static/favicon.ico"
|
icon = "stirling-pdf/src/main/resources/static/favicon.ico"
|
||||||
verbose = true
|
verbose = true
|
||||||
// mainClass = "org.springframework.boot.loader.launch.JarLauncher"
|
// mainClass = "org.springframework.boot.loader.launch.JarLauncher"
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ jpackage {
|
|||||||
// MacOS-specific configuration
|
// MacOS-specific configuration
|
||||||
mac {
|
mac {
|
||||||
appVersion = getMacVersion(project.version.toString())
|
appVersion = getMacVersion(project.version.toString())
|
||||||
icon = "src/main/resources/static/favicon.icns"
|
icon = "stirling-pdf/src/main/resources/static/favicon.icns"
|
||||||
type = "dmg"
|
type = "dmg"
|
||||||
macPackageIdentifier = "Stirling PDF"
|
macPackageIdentifier = "Stirling PDF"
|
||||||
macPackageName = "Stirling PDF"
|
macPackageName = "Stirling PDF"
|
||||||
@ -230,7 +230,7 @@ jpackage {
|
|||||||
// Linux-specific configuration
|
// Linux-specific configuration
|
||||||
linux {
|
linux {
|
||||||
appVersion = project.version
|
appVersion = project.version
|
||||||
icon = "src/main/resources/static/favicon.png"
|
icon = "stirling-pdf/src/main/resources/static/favicon.png"
|
||||||
type = "deb" // Can also use "rpm" for Red Hat-based systems
|
type = "deb" // Can also use "rpm" for Red Hat-based systems
|
||||||
|
|
||||||
// Debian package configuration
|
// Debian package configuration
|
||||||
@ -307,7 +307,7 @@ tasks.register('jpackageMacX64') {
|
|||||||
'--main-class', 'org.springframework.boot.loader.launch.JarLauncher',
|
'--main-class', 'org.springframework.boot.loader.launch.JarLauncher',
|
||||||
'--runtime-image', file(jrePath + "/zulu-17.jre/Contents/Home"),
|
'--runtime-image', file(jrePath + "/zulu-17.jre/Contents/Home"),
|
||||||
'--dest', 'build/jpackage/x86_64',
|
'--dest', 'build/jpackage/x86_64',
|
||||||
'--icon', 'src/main/resources/static/favicon.icns',
|
'--icon', 'stirling-pdf/src/main/resources/static/favicon.icns',
|
||||||
'--app-version', getMacVersion(project.version.toString()),
|
'--app-version', getMacVersion(project.version.toString()),
|
||||||
'--mac-package-name', 'Stirling PDF (x86_64)',
|
'--mac-package-name', 'Stirling PDF (x86_64)',
|
||||||
'--mac-package-identifier', 'Stirling PDF (x86_64)',
|
'--mac-package-identifier', 'Stirling PDF (x86_64)',
|
||||||
@ -392,7 +392,7 @@ tasks.register('cleanTempJre') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
launch4j {
|
launch4j {
|
||||||
icon = "${projectDir}/src/main/resources/static/favicon.ico"
|
icon = "${projectDir}/stirling-pdf/src/main/resources/static/favicon.ico"
|
||||||
|
|
||||||
outfile="Stirling-PDF.exe"
|
outfile="Stirling-PDF.exe"
|
||||||
|
|
||||||
@ -443,9 +443,9 @@ sonar {
|
|||||||
property "sonar.projectKey", "Stirling-Tools_Stirling-PDF"
|
property "sonar.projectKey", "Stirling-Tools_Stirling-PDF"
|
||||||
property "sonar.organization", "stirling-tools"
|
property "sonar.organization", "stirling-tools"
|
||||||
|
|
||||||
property "sonar.exclusions", "**/build-wrapper-dump.json, src/main/java/org/apache/**, src/main/resources/static/pdfjs/**, src/main/resources/static/pdfjs-legacy/**, src/main/resources/static/js/thirdParty/**"
|
property "sonar.exclusions", "**/build-wrapper-dump.json, **/src/main/java/org/apache/**, **/src/main/resources/static/pdfjs/**, **/src/main/resources/static/pdfjs-legacy/**, **/src/main/resources/static/js/thirdParty/**"
|
||||||
property "sonar.coverage.exclusions", "src/main/java/org/apache/**, src/main/resources/static/pdfjs/**, src/main/resources/static/pdfjs-legacy/**, src/main/resources/static/js/thirdParty/**"
|
property "sonar.coverage.exclusions", "**/src/main/java/org/apache/**, **/src/main/resources/static/pdfjs/**, **/src/main/resources/static/pdfjs-legacy/**, **/src/main/resources/static/js/thirdParty/**"
|
||||||
property "sonar.cpd.exclusions", "src/main/java/org/apache/**, src/main/resources/static/pdfjs/**, src/main/resources/static/pdfjs-legacy/**, src/main/resources/static/js/thirdParty/**"
|
property "sonar.cpd.exclusions", "**/src/main/java/org/apache/**, **/src/main/resources/static/pdfjs/**, **/src/main/resources/static/pdfjs-legacy/**, **/src/main/resources/static/js/thirdParty/**"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public class AppConfig {
|
|||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public boolean activeSecurity() {
|
public boolean activeSecurity() {
|
||||||
return env.getProperty("DOCKER_SECURITY_ENABLED", Boolean.class, true);
|
return env.getProperty("ADDITIONAL_FEATURES", Boolean.class, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean(name = "appName")
|
@Bean(name = "appName")
|
||||||
|
@ -29,7 +29,7 @@ sourceSets {
|
|||||||
|
|
||||||
test {
|
test {
|
||||||
java {
|
java {
|
||||||
if (System.getenv('DOCKER_ENABLE_SECURITY') == 'false') {
|
if (System.getenv('ADDITIONAL_FEATURES') == 'false') {
|
||||||
exclude 'stirling/software/proprietary/security/**'
|
exclude 'stirling/software/proprietary/security/**'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
echo "Running Stirling PDF with ADDITIONAL_FEATURES=${ADDITIONAL_FEATURES} and VERSION_TAG=${VERSION_TAG}"
|
echo "Running Stirling PDF with ADDITIONAL_FEATURES=${ADDITIONAL_FEATURES} and VERSION_TAG=${VERSION_TAG}"
|
||||||
# Check for ADDITIONAL_FEATURES and download the appropriate JAR if required
|
# Check for ADDITIONAL_FEATURES and download the appropriate JAR if required
|
||||||
if [ "$ADDITIONAL_FEATURES" = "true" ] && [ "$VERSION_TAG" != "alpha" ]; then
|
if [ "ADDITIONAL_FEATURES" = "true" ] && [ "$VERSION_TAG" != "alpha" ]; then
|
||||||
if [ ! -f app-security.jar ]; then
|
if [ ! -f app-security.jar ]; then
|
||||||
echo "Trying to download from: https://files.stirlingpdf.com/v$VERSION_TAG/Stirling-PDF-with-login.jar"
|
echo "Trying to download from: https://files.stirlingpdf.com/v$VERSION_TAG/Stirling-PDF-with-login.jar"
|
||||||
curl -L -o app-security.jar https://files.stirlingpdf.com/v$VERSION_TAG/Stirling-PDF-with-login.jar
|
curl -L -o app-security.jar https://files.stirlingpdf.com/v$VERSION_TAG/Stirling-PDF-with-login.jar
|
||||||
|
Loading…
x
Reference in New Issue
Block a user