diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..273fff0a80 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "maven" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" diff --git a/.github/workflows/build_installers.yml b/.github/workflows/build_installers.yml index f7beb68b06..b6e6a6eb98 100644 --- a/.github/workflows/build_installers.yml +++ b/.github/workflows/build_installers.yml @@ -24,11 +24,14 @@ jobs: - name: Make installers run: | /opt/install4j/bin/install4jc -L ${{ secrets.INSTALL4J_LICENSE }} -r ${{ steps.java_info.outputs.project_version }} -g -d target/media -D librariesPath=$(pwd)/target/libraries install4j/project.install4j + - name: Delete garbages + run: | + rm -rf target/media/debug* # jarPath=$(pwd) 是必须的,install4jc 不知道什么毛病,不支持相对路径,这太诡异了 - name: Upload build artifacts uses: actions/upload-artifact@v4 with: name: installer-dist path: | - target/media/PeerBanHelper_* - id: project \ No newline at end of file + target/media/* + id: project diff --git a/.github/workflows/delete_old_s3_objects.yml b/.github/workflows/delete_old_s3_objects.yml new file mode 100644 index 0000000000..14bf061217 --- /dev/null +++ b/.github/workflows/delete_old_s3_objects.yml @@ -0,0 +1,28 @@ +name: Empty S3 directory + +on: + workflow_call: + secrets: + S3_ACCESS_KEY: + required: true + S3_SECRET_KEY: + required: true + S3_ENDPOINT: + required: true + S3_BUCKET: + required: true +jobs: + delete-files-from-s3: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Remove from S3 + uses: vitorsgomes/s3-rm-action@master + with: + args: --recursive + env: + AWS_S3_BUCKET: ${{ secrets.S3_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }} + AWS_S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }} + PATH_TO_DELETE: updates/latest diff --git a/.github/workflows/flush_cloudflare_cache.yml b/.github/workflows/flush_cloudflare_cache.yml new file mode 100644 index 0000000000..7102abf178 --- /dev/null +++ b/.github/workflows/flush_cloudflare_cache.yml @@ -0,0 +1,20 @@ +name: Flush CloudFlare Update Cache + +on: + workflow_call: + secrets: + FILES_CLOUDFLARE_ZONE: + required: true + FILES_CLOUDFLARE_TOKEN: + required: true +jobs: + purge-cloudflare-cache: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Purge cache + uses: jakejarvis/cloudflare-purge-action@master + env: + # Zone is required by both authentication methods + CLOUDFLARE_ZONE: ${{ secrets.FILES_CLOUDFLARE_ZONE }} + CLOUDFLARE_TOKEN: ${{ secrets.FILES_CLOUDFLARE_TOKEN }} diff --git a/.github/workflows/jvm-ci.yml b/.github/workflows/jvm-ci.yml index 94c09d2bd8..770fc5576f 100644 --- a/.github/workflows/jvm-ci.yml +++ b/.github/workflows/jvm-ci.yml @@ -50,7 +50,7 @@ jobs: password: ${{ secrets.DOCKER_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v5.5.1 + uses: docker/metadata-action@v5.6.1 with: images: ghostchu/peerbanhelper-snapshot tags: | @@ -63,7 +63,7 @@ jobs: type=raw,ci type=sha - name: Build and push Docker image - uses: docker/build-push-action@v6.9.0 + uses: docker/build-push-action@v6.10.0 with: context: . file: ./Dockerfile diff --git a/.github/workflows/jvm-release.yml b/.github/workflows/jvm-release.yml index 00336a5640..5475c336a3 100644 --- a/.github/workflows/jvm-release.yml +++ b/.github/workflows/jvm-release.yml @@ -44,7 +44,33 @@ jobs: Build_Portable: needs: Build_Executable uses: ./.github/workflows/build_portable.yml + Empty_Old_S3_Files: + needs: [Build_Executable, Build_Installers, Build_SPK, Build_DEB, Build_PKG, Build_Portable] + uses: ./.github/workflows/delete_old_s3_objects.yml + secrets: inherit + Upload_Updates_To_S3: + needs: [Build_Executable, Build_Installers, Build_SPK, Build_DEB, Build_PKG, Build_Portable, Empty_Old_S3_Files] + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v4 + with: + name: installer-dist + path: target/media + - uses: shallwefootball/s3-upload-action@master + with: + aws_key_id: ${{ secrets.S3_ACCESS_KEY }} + aws_secret_access_key: ${{ secrets.S3_SECRET_KEY }} + aws_bucket: ${{ secrets.S3_BUCKET }} + endpoint: ${{ secrets.S3_ENDPOINT }} + source_dir: 'target/media' + destination_dir: 'updates/latest' + Clear_CloudFlare_Updates: + needs: [Upload_Updates_To_S3] + uses: ./.github/workflows/flush_cloudflare_cache.yml + secrets: inherit Upload_Artifacts: + continue-on-error: true + if: github.event_name != 'workflow_dispatch' needs: [Build_Executable, Build_Installers, Build_SPK, Build_DEB, Build_PKG, Build_Portable] permissions: contents: write @@ -91,6 +117,7 @@ jobs: with: asset_paths: '["target/media/PeerBanHelper_*", "target/media/peerbanhelper_*", "target/media/peerbanhelper-*"]' Build_Docker: + if: github.event_name != 'workflow_dispatch' permissions: contents: write checks: write @@ -119,7 +146,7 @@ jobs: password: ${{ secrets.DOCKER_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v5.5.1 + uses: docker/metadata-action@v5.6.1 with: images: ghostchu/peerbanhelper tags: | @@ -132,7 +159,7 @@ jobs: type=raw,latest type=sha - name: Build and push Docker image - uses: docker/build-push-action@v6.9.0 + uses: docker/build-push-action@v6.10.0 with: context: . file: ./Dockerfile @@ -157,7 +184,7 @@ jobs: password: ${{ secrets.ALIYUN_ACR_PASSWORD }} - name: Extract metadata (tags, labels) for Aliyun ACR id: meta-acr - uses: docker/metadata-action@v5.5.1 + uses: docker/metadata-action@v5.6.1 with: images: registry.cn-hangzhou.aliyuncs.com/ghostchu/peerbanhelper tags: | @@ -170,7 +197,7 @@ jobs: type=raw,latest type=sha - name: Build and push Aliyun ACR - uses: docker/build-push-action@v6.9.0 + uses: docker/build-push-action@v6.10.0 with: context: . file: ./Dockerfile-Release diff --git a/README.EN.md b/README.EN.md index 29f13db833..691e546d5b 100644 --- a/README.EN.md +++ b/README.EN.md @@ -13,11 +13,11 @@ Following function are provided by PeerBanHelper: - [IP/GeoIP/IP type Blacklist](https://docs.pbh-btn.com/en/docs/module/ip-address-blocker) - [Fake progress checker (heuristic client detection)](https://docs.pbh-btn.com/en/docs/module/progress-cheat-blocker) - [Auto range ban](https://docs.pbh-btn.com/en/docs/module/auto-range-ban) -- [Multi-dail ban](https://docs.pbh-btn.com/en/docs/module/multi-dial) +- [Multi-dial ban](https://docs.pbh-btn.com/en/docs/module/multi-dial) - Peer ID/Client Name camouflage check, powered by [AviatorScript Engine](https://docs.pbh-btn.com/en/docs/module/expression-engine) - [Active monitoring(data analysis)](https://docs.pbh-btn.com/en/docs/module/active-monitoring) - [IP set subscribe](https://docs.pbh-btn.com/en/docs/module/ip-address-blocker-rules) -- a mordern WebUI +- A modern WebUI In addition, PeerBanHelper downloads the GeoIP library at startup, and supports the following functions once it successful loaded: - View IP address attribution, AS information (ASN, ISP, AS name, etc.), network type information (broadband, base station, IoT, data center, etc.) in the blocking list. @@ -34,8 +34,8 @@ In addition, PeerBanHelper downloads the GeoIP library at startup, and supports - BiglyBT([plugin](https://github.com/PBH-BTN/PBH-Adapter-BiglyBT) is required) - Deluge([plugin](https://github.com/PBH-BTN/PBH-Adapter-Deluge) is required) - Azureus(Vuze)([plugin](https://github.com/PBH-BTN/PBH-Adapter-Azureus) is required) -- Transmission **(deprected;3.00-20 or higher)** -- BitComet **v2.10 Beta6 [20240928] or higher** +- Transmission **(deprecated;3.00-20 or higher)** +- BitComet **v2.10 Beta6 [20240928] or higher** (P2SP LTSeed mode is not supported) # Screenshots @@ -51,7 +51,7 @@ Please read the [docs](https://docs.pbh-btn.com/en/docs/category/%E5%AE%89%E8%A3 ## FAQ -Before submit issue, please read the [FAQ](https://docs.pbh-btn.com/en/docs/faq) +Before submitting an issue, please read the [FAQ](https://docs.pbh-btn.com/en/docs/faq) ## Support Consider join our [Telegram](https://t.me/+_t3Nt5GZ6bJmYjBl) group. @@ -68,6 +68,12 @@ Any consequences caused by the user's use of this software are borne by the user [![Star History Chart](https://api.star-history.com/svg?repos=PBH-BTN/PeerBanHelper&type=Date)](https://star-history.com/#PBH-BTN/PeerBanHelper&Date) +### Install4j + +PeerBanHelper use [Install4j multi-platform installer builder](https://www.ej-technologies.com/products/install4j/overview.html) to build its multi-platform installer. Thanks the open-source license provided by ej-technolgies. Click the link or the image below to download install4j. + +[![Install4j](https://www.ej-technologies.com/images/product_banners/install4j_large.png)](https://www.ej-technologies.com/products/install4j/overview.html) + ## Credit ### Backend @@ -85,15 +91,16 @@ Any consequences caused by the user's use of this software are borne by the user - [GeoIP2](https://dev.maxmind.com/geoip) - [ormlite](https://ormlite.com/) - [SimpleReloadLib](https://github.com/Ghost-chu/SimpleReloadLib) +- [java-ipfs-http-client](https://github.com/ipfs-shipyard/java-ipfs-http-client) +- [java-multiaddr](https://github.com/multiformats/java-multiaddr) +- [portmapper](https://github.com/offbynull/portmapper) +- [xz](https://github.com/tukaani-project/xz-java) +- [commonmark](https://github.com/commonmark/commonmark-java) +- [oshi](https://github.com/oshi/oshi) +- [semver4j](https://github.com/vdurmont/semver4j) ### WebUI - [Vue](https://vuejs.org/) - [ArcoDesign](https://arco.design/) - [ECharts](https://echarts.apache.org/en/index.html) - -### Install4j - -PeerBanHelper use [Install4j multi-platform installer builder](https://www.ej-technologies.com/products/install4j/overview.html) to build its multi-platform installer. Thanks the open-source license provided by ej-technolgies. Click the link or the image below to download install4j. - -[![Install4j](https://www.ej-technologies.com/images/product_banners/install4j_large.png)](https://www.ej-technologies.com/products/install4j/overview.html) diff --git a/README.md b/README.md index 4bd2e93521..279e552fc0 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,9 @@ PeerBanHelper 主要由以下几个功能模块组成: - Deluge(需要安装[插件](https://github.com/PBH-BTN/PBH-Adapter-Deluge)) - Azureus(Vuze)(需要安装[插件](https://github.com/PBH-BTN/PBH-Adapter-Azureus)) - Transmission **(不建议使用;3.00-20 或更高版本)** -- BitComet **v2.10 Beta6 [20240928] 或更高版本** +- BitComet **v2.10 Beta6 [20240928] 或更高版本** (不支持 P2SP LTSeed 长效种子反吸血,因为 BitComet 暂时无法封禁长效连接) +PeerBanHelper 仅支持对传统 IPv4 或 IPv6 地址的反吸血,如遇 I2P 或者 Tor 连接将主动忽略。 # 截图 @@ -49,7 +50,6 @@ PeerBanHelper 主要由以下几个功能模块组成: 查看 [PeerBanHelper 文档](https://docs.pbh-btn.com/docs/category/%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2) - ## 常见问题 在报告问题前,请先检查 [常见问题列表](https://docs.pbh-btn.com/docs/faq) @@ -69,6 +69,13 @@ PeerBanHelper 主要由以下几个功能模块组成: [![Star History Chart](https://api.star-history.com/svg?repos=PBH-BTN/PeerBanHelper&type=Date)](https://star-history.com/#PBH-BTN/PeerBanHelper&Date) + +### Install4j + +PeerBanHelper 使用 [Install4j multi-platform installer builder](https://www.ej-technologies.com/products/install4j/overview.html) 打包多平台安装程序。感谢 ej-technolgies 的开放源代码许可证。点击链接或者下面的图片下载 install4j。 + +[![Install4j](https://www.ej-technologies.com/images/product_banners/install4j_large.png)](https://www.ej-technologies.com/products/install4j/overview.html) + ## Credit ### Backend @@ -86,6 +93,13 @@ PeerBanHelper 主要由以下几个功能模块组成: - [GeoIP2](https://dev.maxmind.com/geoip) - [ormlite](https://ormlite.com/) - [SimpleReloadLib](https://github.com/Ghost-chu/SimpleReloadLib) +- [java-ipfs-http-client](https://github.com/ipfs-shipyard/java-ipfs-http-client) +- [java-multiaddr](https://github.com/multiformats/java-multiaddr) +- [portmapper](https://github.com/offbynull/portmapper) +- [xz](https://github.com/tukaani-project/xz-java) +- [commonmark](https://github.com/commonmark/commonmark-java) +- [oshi](https://github.com/oshi/oshi) +- [semver4j](https://github.com/vdurmont/semver4j) ### WebUI @@ -93,8 +107,3 @@ PeerBanHelper 主要由以下几个功能模块组成: - [ArcoDesign](https://arco.design/) - [ECharts](https://echarts.apache.org/en/index.html) -### Install4j - -PeerBanHelper 使用 [Install4j multi-platform installer builder](https://www.ej-technologies.com/products/install4j/overview.html) 打包多平台安装程序。感谢 ej-technolgies 的开放源代码许可证。点击链接或者下面的图片下载 install4j。 - -[![Install4j](https://www.ej-technologies.com/images/product_banners/install4j_large.png)](https://www.ej-technologies.com/products/install4j/overview.html) diff --git a/docker-compose.yml b/docker-compose.yml index 193d45f678..2698072c94 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,15 +1,10 @@ -version: "3.9" services: peerbanhelper: - image: "ghostchu/peerbanhelper:<最新版本号>" + image: "ghostchu/peerbanhelper:<填写版本号>" restart: unless-stopped container_name: "peerbanhelper" volumes: - ./:/app/data ports: - "9898:9898" - environment: - - PUID=0 - - PGID=0 - - TZ=UTC - stop_grace_period: 30s \ No newline at end of file + stop_grace_period: 30s diff --git a/install4j/lang/custom.utf8 b/install4j/lang/custom.utf8 index 02b2552258..5f79af16ff 100644 --- a/install4j/lang/custom.utf8 +++ b/install4j/lang/custom.utf8 @@ -1,8 +1,11 @@ launcher.peerbanhelper.gui=PeerBanHelper -launcher.peerbanhelper.gui.swing=PeerBanHelper(兼容模式) -launcher.peerbanhelper.nogui=PeerBanHelper(无GUI, 控制台) -launcher.peerbanhelper.service=PeerBanHelper(服务) +launcher.peerbanhelper.silent=PeerBanHelper (静默启动) +launcher.peerbanhelper.nogui=PeerBanHelper (无GUI, 控制台) +launcher.peerbanhelper.service=PeerBanHelper (服务) +launcher.peerbanhelper.updater=PeerBanHelper 检查更新 checkbox.followsystemstartup=登录时自动启动到系统托盘 peerbanhelper.description=PeerBanHelper checkbox.registersystemservice=注册为系统服务(除非你知道这是做什么的,否则不要选中) -systemservice.note=将 PeerBanHelper 安装为系统服务时,Windows 系统下配置文件将被存储在 C:\Windows\System32\config\systemprofile\AppData\Local\PeerBanHelper 位置,访问此位置需要您拥有管理员权限。\nPeerBanHelper 将在系统启动时自动启动。 \ No newline at end of file +systemservice.note=将 PeerBanHelper 安装为系统服务时,Windows 系统下配置文件将被存储在 C:\Windows\System32\config\systemprofile\AppData\Local\PeerBanHelper 位置,访问此位置需要您拥有管理员权限。\nPeerBanHelper 将在系统启动时自动启动。 +components.peerbanhelper=PeerBanHelper +components.peerbanhelper.description=PeerBanHelper 的核心主程序,包含了主程序代码和必要的运行文件 \ No newline at end of file diff --git a/install4j/lang/en-US.utf8 b/install4j/lang/en-US.utf8 index d306b0afb1..2b2b66cf42 100644 --- a/install4j/lang/en-US.utf8 +++ b/install4j/lang/en-US.utf8 @@ -1,8 +1,11 @@ launcher.peerbanhelper.gui=PeerBanHelper -launcher.peerbanhelper.gui.swing=PeerBanHelper(Compatibility Mode) -launcher.peerbanhelper.nogui=PeerBanHelper(NoGUI, Console) -launcher.peerbanhelper.service=PeerBanHelper(Service) +launcher.peerbanhelper.gui.swing=PeerBanHelper (Compatibility Mode) +launcher.peerbanhelper.nogui=PeerBanHelper (NoGUI, Console) +launcher.peerbanhelper.service=PeerBanHelper (Service) +launcher.peerbanhelper.updater=PeerBanHelper Updater checkbox.followsystemstartup=Boot automatically to the system tray when logged in peerbanhelper.description=PeerBanHelper checkbox.registersystemservice=Register as system service (DO NOT CHECK UNLESS YOU KNOW WHAT YOU'RE DOING) -systemservice.note=When you install PeerBanHelper as system service,under Windows operation system, the configuration and files will store at C:\Windows\System32\config\systemprofile\AppData\Local\PeerBanHelper. Access this location will require Administrator privileges. \ No newline at end of file +systemservice.note=When you install PeerBanHelper as system service,under Windows operation system, the configuration and files will store at C:\Windows\System32\config\systemprofile\AppData\Local\PeerBanHelper. Access this location will require Administrator privileges. +components.peerbanhelper=PeerBanHelper +components.peerbanhelper.description=PeerBanHelper core program, including main program code and necessary runtime files \ No newline at end of file diff --git a/install4j/lang/zh-CN.utf8 b/install4j/lang/zh-CN.utf8 index 6206ed964d..c7dea51ac4 100644 --- a/install4j/lang/zh-CN.utf8 +++ b/install4j/lang/zh-CN.utf8 @@ -1,6 +1,9 @@ launcher.peerbanhelper.gui=PeerBanHelper -launcher.peerbanhelper.gui.swing=PeerBanHelper(兼容模式) -launcher.peerbanhelper.nogui=PeerBanHelper(无GUI, 控制台) -launcher.peerbanhelper.service=PeerBanHelper(服务) +launcher.peerbanhelper.silent=PeerBanHelper (静默启动) +launcher.peerbanhelper.nogui=PeerBanHelper (无GUI, 控制台) +launcher.peerbanhelper.service=PeerBanHelper (服务) +launcher.peerbanhelper.updater=PeerBanHelper 检查更新 checkbox.followsystemstartup=登录到桌面时自动启动 -peerbanhelper.description=一个能够自动封禁不受欢迎、吸血和异常的 Peers,并支持自定义规则的 BT 客户端辅助工具 \ No newline at end of file +peerbanhelper.description=一个能够自动封禁不受欢迎、吸血和异常的 Peers,并支持自定义规则的 BT 客户端辅助工具 +components.peerbanhelper=PeerBanHelper +components.peerbanhelper.description=PeerBanHelper 的核心主程序,包含了主程序代码和必要的运行文件 \ No newline at end of file diff --git a/install4j/project.install4j b/install4j/project.install4j index c196918a63..6cf0908b19 100644 --- a/install4j/project.install4j +++ b/install4j/project.install4j @@ -1,7 +1,7 @@ - + @@ -23,13 +23,21 @@ + + + ${i18n:components.peerbanhelper.description} + + + + + - + - + @@ -39,11 +47,11 @@ - + - + @@ -53,11 +61,11 @@ - + - + @@ -71,7 +79,7 @@ - + @@ -81,8 +89,22 @@ + + + + + + + + + + + + + + - + @@ -353,12 +375,27 @@ return true; + + + + 26 + + context.getBooleanVariable("executeLauncherAction") && (!context.isUnattended()) + + ${form:finishedMessage} + + + ${i18n:RunEntryExec("${compiler:sys.fullName}")} + + executeLauncherAction + + @@ -426,6 +463,881 @@ return console.askYesNo(message, true); + + + + + + ${compiler:sys.install4jHome}/resource/updater_16.png + + + + + ${compiler:sys.install4jHome}/resource/updater_32.png + + + + + ${compiler:sys.install4jHome}/resource/updater_48.png + + + + + ${compiler:sys.install4jHome}/resource/updater_128.png + + + + + ${compiler:sys.install4jHome}/resource/updater_256.png + + + + bgupdater + + -Dapple.awt.UIElement=true + ${compiler:sys.fullName} + + + + + + + + + import java.nio.file.*; + +Path dir = context.getInstallationDirectory().toPath(); +// quit if the current installation is on a read only file system, for example a disk image on macOS +// or if the directory is not writeable on Linux/Unix. +// If there is no "Request privileges" action in the installer, the condition should also +// check Files.isWritable(dir) +return !Files.getFileStore(dir).isReadOnly() && ((Util.isWindows() && !Util.isArchive()) || Util.isMacOS() || (Util.isLinux() && !Util.isArchive())); + + + + + + + + ${installer:updatesUrl?:${compiler:sys.updatesUrl}} + updateDescriptor + + + + + + + + UpdateDescriptorEntry entry = ((UpdateDescriptor)context.getVariable("updateDescriptor")).getPossibleUpdateEntry(); + +if (entry == null) { + return null; +} else if (entry.isArchive() && !entry.isSingleBundle()) { + // only installers and single bundle archives on macOS are supported + return null; +} else if (entry.isDownloaded()) { + // update has been downloaded already + return null; +} else { + return entry; +} + + + updateDescriptorEntry + + + + + + + context.getVariable("updateDescriptorEntry") != null + + + + + + + + + ((UpdateDescriptorEntry)context.getVariable("updateDescriptorEntry")).getNewVersion() + + + updaterNewVersion + + + + + + + ((UpdateDescriptorEntry)context.getVariable("updateDescriptorEntry")).getURL().toExternalForm() + + + updaterDownloadUrl + + + + + + + context.getVariable("sys.updateStorageDir") + File.separator + ((UpdateDescriptorEntry)context.getVariable("updateDescriptorEntry")).getFileName() + + + updaterDownloadFile + + + + + + + ${installer:updaterDownloadFile} + + + ${installer:updaterDownloadUrl} + + + + + + + !((UpdateDescriptorEntry)context.getVariable("updateDescriptorEntry")).isArchive() + + + + + + + + + + ${installer:updaterDownloadFile} + + + + 755 + + + + + + + ${installer:updaterDownloadFile} + + + ${installer:updaterNewVersion} + + + + + + + + + ((UpdateDescriptorEntry)context.getVariable("updateDescriptorEntry")).isArchive() + + + + + + + + + String dirName = context.getVariable("updaterDownloadFile") + "_dir"; +new File(dirName).mkdirs(); +return dirName; + + + updaterStagingDir + + + + + + + + + ${installer:updaterStagingDir} + + + + + + new File((String)context.getVariable("updaterStagingDir")).exists() + + + + + + ${installer:updaterDownloadFile} + + + + + ${installer:updaterStagingDir} + + + + + // only extract app bundle, no other top level files + +import com.install4j.api.unix.UnixFileSystem; + +File realFile = new File(dmgMountPoint, file.getPath()); + +return file.getParent() != null || (file.getName().endsWith(".app") && realFile.isDirectory() && !UnixFileSystem.getFileInformation(realFile).isLink()); + + + + ((String)context.getVariable("updaterDownloadFile")).endsWith(".dmg") + + + + + + ${installer:updaterDownloadFile} + + + + + ${installer:updaterStagingDir} + + + + + // only extract app bundle, no other top level files +file.getParent() != null || (file.getName().endsWith(".app") && directory) + + + + !((String)context.getVariable("updaterDownloadFile")).endsWith(".dmg") + + + + + + ${installer:updaterStagingDir} + + + ${installer:updaterNewVersion} + + + + + + + + + ${installer:updaterDownloadFile} + + + + + + + + + + + + + + + + + + + ${compiler:sys.install4jHome}/resource/updater_16.png + + + + + ${compiler:sys.install4jHome}/resource/updater_32.png + + + + + ${compiler:sys.install4jHome}/resource/updater_48.png + + + + + ${compiler:sys.install4jHome}/resource/updater_128.png + + + + + ${compiler:sys.install4jHome}/resource/updater_256.png + + + + updater + + ${i18n:updater.WindowTitle("${compiler:sys.fullName}")} + + + + + + + + + + + ${i18n:updater.WelcomeTitle("${compiler:sys.fullName}")} + + + + + + ${i18n:updater.WelcomeInfoText("${compiler:sys.fullName}")} + + !context.isConsole() + + labelText + + + + + + + ${i18n:updater.CheckForUpdateSubtitle} + ${i18n:updater.CheckForUpdateTitle} + + context.getWizardContext().setControlButtonVisible(ControlButtonType.NEXT, false); +context.getWizardContext().setControlButtonVisible(ControlButtonType.PREVIOUS, false); +context.goForward(1, true, true); + + + + + + + + + + ${installer:updatesUrl?:${compiler:sys.updatesUrl}} + updateDescriptor + + + + + + + + ((UpdateDescriptor)context.getVariable("updateDescriptor")).getPossibleUpdateEntry() + + + updateDescriptorEntry + + + + + + + context.getVariable("updateDescriptorEntry") != null + + + + + + + + + ((UpdateDescriptorEntry)context.getVariable("updateDescriptorEntry")).getNewVersion() + + + updaterNewVersion + + + + + + + ((UpdateDescriptorEntry)context.getVariable("updateDescriptorEntry")).getFileSizeVerbose() + + + updaterDownloadSize + + + + + + + ((UpdateDescriptorEntry)context.getVariable("updateDescriptorEntry")).getComment() + + + updaterComment + + + + + + + ((UpdateDescriptorEntry)context.getVariable("updateDescriptorEntry")).getURL().toExternalForm() + + + updaterDownloadUrl + + + + + + + ((UpdateDescriptorEntry)context.getVariable("updateDescriptorEntry")).isArchive() ? Boolean.TRUE : Boolean.FALSE + + + isArchive + + + + + + + ((UpdateDescriptorEntry)context.getVariable("updateDescriptorEntry")).getFileName().toLowerCase().endsWith(".dmg") + + + isDmg + + + + + + + + + ${i18n:updater.CheckForUpdateLabel} + + + statusVisible + initialStatusMessage + + + + + + + + + context.getVariable("updateDescriptorEntry") == null + + + + + + + ${i18n:updater.UpToDateTitle} + + + + + + ${i18n:updater.UpToDateInfoText("${compiler:sys.fullName}")} + + !context.isConsole() + + labelText + + + + + + + + + + + context.getVariable("updateDescriptorEntry") != null + + + + + + + ${i18n:updater.NewVersionAvailableSubtitle("${compiler:sys.fullName}")} + ${i18n:updater.NewVersionAvailableTitle} + + !context.getBooleanVariable("skipNewVersionAvailable") + + + + ${i18n:updater.CurrentVersionLabel} + + + 128 + 0 + 0 + 255 + + + + + ${installer:sys.version} + + + + + + + ${i18n:updater.NewVersionLabel} + + + 0 + 128 + 0 + 255 + + + + + ${installer:updaterNewVersion} + + + + + + + context.goForward(1, false, false); + + + ${i18n:updater.ShowComments} + + ((String)context.getVariable("updaterComment")).length() > 0 + + + + + + + ${i18n:updater.DownloadLocationLabel} + + + + + ${installer:sys.downloadsDir} + ${i18n:updater.DownloadToLabel} + + updaterDownloadLocation + + + + + ${i18n:updater.DownloadSizeLabel} + ${installer:updaterDownloadSize} + + + + + + + + ${i18n:updater.CommentsSubTitle} + ${i18n:updater.CommentsTitle} + + false // This screen is only shown if the user clicks the "Show comments" hyperlink label in the previous screen. + + if (context.isConsole()) { + context.goBackInHistory(1); +} +return true; + WizardContext wizardContext = context.getWizardContext(); +wizardContext.setControlButtonVisible(ControlButtonType.NEXT, false); +wizardContext.setControlButtonVisible(ControlButtonType.CANCEL, false); + + + + + ${i18n:updater.CommentsLabel} + + !context.isConsole() + + labelText + + + + + ${installer:updaterComment} + + + + + textSource + displayedText + displayedTextFile + variableName + + + + + + + console.waitForEnter(); +return true; + + + + + + + + + + ${i18n:updater.DownloadSubTitle} + ${i18n:updater.DownloadTitle} + + context.getWizardContext().setControlButtonVisible(ControlButtonType.NEXT, false); +context.getWizardContext().setControlButtonVisible(ControlButtonType.PREVIOUS, false); +context.goForward(1, true, true); + + + + + + + context.getVariable("updaterDownloadLocation") + File.separator + ((UpdateDescriptorEntry)context.getVariable("updateDescriptorEntry")).getFileName() + + + updaterDownloadFile + + + + + + + ${installer:updaterDownloadFile} + + + ${installer:updaterDownloadUrl} + + + + + + + + ${installer:updaterDownloadFile} + + + + 755 + + + + + + + statusVisible + initialStatusMessage + + + + + + + + + ${i18n:updater.FinishTitle} + + !(context.getBooleanVariable("isArchive") && context.getBooleanVariable("isDmg")) + + + + + + !context.getBooleanVariable("isArchive") && ((Integer)context.getVariable("updaterLaunchSelection")).intValue() == 0 + + + + + + + + + List<String> args = new ArrayList<String>(); +String installationDirectory = context.getInstallationDirectory().getPath(); +if (context.isUnattended()) { + args.add("-q"); + args.add("-wait"); + args.add("20"); + ProgressInterface progressInterface = context.getProgressInterface(); + if (progressInterface.isUnattendedProgressDialog()) { + if (progressInterface.isAlertsShown()) { + args.add("-alerts"); + } + args.add("-splash"); + args.add("Installing"); + } +} else if (context.isConsole()) { + args.add("-c"); +} + args.add("-dir"); + args.add(installationDirectory); + + return args.toArray(new String[args.size()]); + + + + installerArguments + + + + + + + ${installer:installerArguments} + + + + ${installer:updaterDownloadFile} + + + + + ${installer:updaterDownloadLocation} + + + + + + + + + + + + + !context.isConsole() + + labelText + + + + + + ${i18n:updater.FinishInfoText("${compiler:sys.fullName}")} + + !context.isConsole() + + labelText + + + + + ${i18n:updater.LaunchUpdaterQuestion} + + + + + + + + + + + ${i18n:updater.LaunchUpdaterLabel} + ${i18n:updater.DoNotLaunchUpdaterLabel} + + updaterLaunchSelection + + !context.getBooleanVariable("isArchive") + + + + + + Util.showPath((String)context.getVariable("updaterDownloadFile")); + + + ${i18n:updater.OpenContainingFolderLabel} + + !context.isConsole() + + + + + + + + + + + + ${i18n:updater.FinishTitle} + + context.getBooleanVariable("isArchive") && context.getBooleanVariable("isDmg") + + + + + + context.getBooleanVariable("updaterOpenDmg") + + + + + + + + + + Util.showPath((String)context.getVariable("updaterDownloadFile")); +return true; + + + + + + + + + + + + + !context.isConsole() + + labelText + + + + + + ${i18n:updater.FinishInfoText("${compiler:sys.fullName}")} + + !context.isConsole() + + labelText + + + + + ${i18n:updater.LaunchUpdaterQuestion} + + + + + + + + + + ${i18n:updater.OpenContainingFolderLabel} + + updaterOpenDmg + + + + + + + + + + + + + + + + diff --git a/webui/src/components/changelogViewer.vue b/webui/src/components/changelogViewer.vue new file mode 100644 index 0000000000..1647bbe5fe --- /dev/null +++ b/webui/src/components/changelogViewer.vue @@ -0,0 +1,51 @@ + + + diff --git a/webui/src/components/iconFont.ts b/webui/src/components/iconFont.ts index cda2e1ef87..316ba3daa6 100644 --- a/webui/src/components/iconFont.ts +++ b/webui/src/components/iconFont.ts @@ -2,7 +2,7 @@ import { Icon } from '@arco-design/web-vue' import { defineComponent, h } from 'vue' const IconFont = Icon.addFromIconFontCn({ - src: 'https://at.alicdn.com/t/c/font_4646549_xrh0h0mmvwj.js' + src: 'https://at.alicdn.com/t/c/font_4646549_qn0pz8axvi.js' }) export function genIconComponent(type: string) { diff --git a/webui/src/components/markdown.vue b/webui/src/components/markdown.vue new file mode 100644 index 0000000000..df67a355ad --- /dev/null +++ b/webui/src/components/markdown.vue @@ -0,0 +1,43 @@ +