From 9643aaeb4b3ec7a5008182d95cead936f1c14b13 Mon Sep 17 00:00:00 2001 From: Marcel Van Hassel Date: Tue, 19 Nov 2024 17:37:03 +0100 Subject: [PATCH] Switched launchers --- .github/workflows/rest-guide-validator-release.yml | 2 +- cli/buildinfo.md | 2 +- cli/package/cli-launcher.properties | 1 + cli/package/clickable-launcher.properties | 2 -- cli/pom.xml | 2 +- .../belgif/rest/guide/validator/cli/BelgifRestGuideCli.java | 2 +- readme.md | 2 +- 7 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 cli/package/cli-launcher.properties delete mode 100644 cli/package/clickable-launcher.properties diff --git a/.github/workflows/rest-guide-validator-release.yml b/.github/workflows/rest-guide-validator-release.yml index 4e351cc..c96a583 100644 --- a/.github/workflows/rest-guide-validator-release.yml +++ b/.github/workflows/rest-guide-validator-release.yml @@ -65,7 +65,7 @@ jobs: - name: Package Windows Installer run: | jlink --add-modules java.base,java.naming,java.xml,java.desktop --output ./target/custom-jre --strip-debug --no-header-files --no-man-pages --verbose - jpackage --input ./target --name belgif-validate-openapi --main-jar belgif-rest-guide-validator-cli-$env:RELEASED_VERSION.jar --type msi --app-version $env:RELEASED_VERSION --description "Validate OpenApi to Belgif guidelines" --vendor "Belgif" --icon ./package/belgif.ico --win-console --resource-dir "./package/windows" --runtime-image ./target/custom-jre --dest ./target --install-dir belgif-rest-guide-validator --add-launcher launch-belgif-rest-guide-validator="./package/clickable-launcher.properties" --win-per-user-install --verbose + jpackage --input ./target --name launch-belgif-rest-guide-validator --main-jar belgif-rest-guide-validator-cli-$env:RELEASED_VERSION.jar --type msi --app-version $env:RELEASED_VERSION --description "Validate OpenApi to Belgif guidelines" --vendor "Belgif" --icon ./package/belgif.ico --win-console --resource-dir "./package/windows" --runtime-image ./target/custom-jre --dest ./target --install-dir belgif-rest-guide-validator --file-associations package\file-associations\FAyaml.properties --file-associations package\file-associations\FAjson.properties --add-launcher belgif-validate-openapi="./package/cli-launcher.properties" --win-per-user-install --verbose ren target\belgif-validate-openapi-$env:RELEASED_VERSION.msi belgif-rest-guide-validator-$env:RELEASED_VERSION.msi - id: upload-windows-installer name: Upload Windows Installer diff --git a/cli/buildinfo.md b/cli/buildinfo.md index fb8526e..edbd57f 100644 --- a/cli/buildinfo.md +++ b/cli/buildinfo.md @@ -12,5 +12,5 @@ jlink --add-modules java.base,java.naming,java.xml,java.desktop --output custom- To build the installer with a custom JRE (for windows) use: ```bash -jpackage --input . --name belgif-validate-openapi --main-jar belgif-rest-guide-validator-cli-latest.jar --type msi --app-version 2.2.0 --description "Validate OpenApi to Belgif guidelines" --vendor "Belgif" --icon ../package/belgif.ico --win-console --resource-dir "../package/windows" --runtime-image custom-jre --install-dir belgif-rest-guide-validator --add-launcher launch-belgif-rest-guide-validator="../package/clickable-launcher.properties" --win-per-user-install +jpackage --input . --name launch-belgif-rest-guide-validator --main-jar belgif-rest-guide-validator-cli-latest.jar --type msi --app-version 2.2.0 --description "Validate OpenApi to Belgif guidelines" --vendor "Belgif" --icon ../package/belgif.ico --win-console --resource-dir "../package/windows" --runtime-image custom-jre --install-dir belgif-rest-guide-validator --file-associations ..\package\file-associations\FAyaml.properties --file-associations ..\package\file-associations\FAjson.properties --add-launcher belgif-validate-openapi="../package/cli-launcher.properties" --win-per-user-install ``` \ No newline at end of file diff --git a/cli/package/cli-launcher.properties b/cli/package/cli-launcher.properties new file mode 100644 index 0000000..f501679 --- /dev/null +++ b/cli/package/cli-launcher.properties @@ -0,0 +1 @@ +main-class=io.github.belgif.rest.guide.validator.cli.BelgifRestGuideCli \ No newline at end of file diff --git a/cli/package/clickable-launcher.properties b/cli/package/clickable-launcher.properties deleted file mode 100644 index dde8fc5..0000000 --- a/cli/package/clickable-launcher.properties +++ /dev/null @@ -1,2 +0,0 @@ -main-class=io.github.belgif.rest.guide.validator.cli.BelgifRestGuideValidator -file-associations="../package/file-associations/FAyaml.properties" "../package/file-associations/FAjson.properties" \ No newline at end of file diff --git a/cli/pom.xml b/cli/pom.xml index 56e0787..acaee17 100644 --- a/cli/pom.xml +++ b/cli/pom.xml @@ -92,7 +92,7 @@ true libs - io.github.belgif.rest.guide.validator.cli.BelgifRestGuideCli + io.github.belgif.rest.guide.validator.cli.BelgifRestGuideValidator diff --git a/cli/src/main/java/io/github/belgif/rest/guide/validator/cli/BelgifRestGuideCli.java b/cli/src/main/java/io/github/belgif/rest/guide/validator/cli/BelgifRestGuideCli.java index 2e4056c..8d1057c 100644 --- a/cli/src/main/java/io/github/belgif/rest/guide/validator/cli/BelgifRestGuideCli.java +++ b/cli/src/main/java/io/github/belgif/rest/guide/validator/cli/BelgifRestGuideCli.java @@ -96,7 +96,7 @@ private void printPostInstall() { log.info("belgif-rest-guide-validator-{} successfully installed!", VersionProvider.getValidatorVersion()); log.info("\nUse command: 'belgif-validate-openapi' followed by a file name or path to start."); log.info("Use 'belgif-validate-openapi --help' for all options."); - log.info("\nRight click on an openapi or swagger file and open with 'Validate OpenApi according to Belgif guidelines'"); + log.info("\nRight click on an openapi or swagger file and open with 'Validate OpenApi to Belgif guidelines'"); log.info("In some cases you'll have to set this up manually by selecting 'Choose another app' -> 'Choose an app on your PC' -> navigate to belgif-rest-guide-validator folder in C:\\Users\\user-name\\AppData\\Local\\ -> 'launch-belgif-rest-guide-validator.exe'"); log.info("\n\n========================"); log.info("\nPress Enter to exit..."); diff --git a/readme.md b/readme.md index d47661d..5925b38 100644 --- a/readme.md +++ b/readme.md @@ -247,7 +247,7 @@ For all options use: belgif-validate-openapi --help ``` -You could also right-click on an openapi or swagger file and open with: 'Validate OpenApi according to Belgif guidelines' +You could also right-click on an openapi or swagger file and open with: 'Validate OpenApi to Belgif guidelines' In some cases you'll have to set this up manually by selecting 'Choose another app' -> 'Choose an app on your PC' -> navigate to belgif-rest-guide-validator folder in C:\Users\user-name\AppData\Local\ -> 'launch-belgif-rest-guide-validator.exe' ## Building