Skip to content

Commit

Permalink
新版 i4j launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghost-chu committed Dec 2, 2024
1 parent 692f3b4 commit ec0d34a
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 16 deletions.
7 changes: 4 additions & 3 deletions install4j/lang/custom.utf8
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
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=注册为系统服务(除非你知道这是做什么的,否则不要选中)
Expand Down
7 changes: 4 additions & 3 deletions install4j/lang/en-US.utf8
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
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)
Expand Down
7 changes: 4 additions & 3 deletions install4j/lang/zh-CN.utf8
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
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 客户端辅助工具
32 changes: 25 additions & 7 deletions install4j/project.install4j
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@
<dirEntry mountPoint="24" file="${compiler:librariesPath}" entryMode="subdir" subDirectory="libraries" />
<variableEntry mountPoint="24" name="jarPath" />
</entries>
<components>
<component name="IPFS Kubo Client" id="229" downloadable="true" />
</components>
</files>
<launchers>
<launcher name="PeerBanHelper" id="26" checkUpdater="true">
<launcher name="PeerBanHelper" id="26" menuName="${i18n:launcher.peerbanhelper.gui}" checkUpdater="true">
<executable name="PeerBanHelper-GUI" iconSet="true" executableDir="." redirectStdout="true" executableMode="gui" changeWorkingDirectory="false" singleInstance="true" checkConsoleParameter="true">
<versionInfo include="true" fileDescription="${i18n:peerbanhelper.description}" legalCopyright="PBH-BTN Community - Licensed under GPLv3 licenses. https://www.gnu.org/licenses/quick-guide-gplv3.en.html" internalName="peerbanhelper" />
</executable>
Expand All @@ -42,7 +39,7 @@
<file path="./icon.png" />
</iconImageFiles>
</launcher>
<launcher name="PeerBanHelper GUI Silent" id="66" checkUpdater="true">
<launcher name="PeerBanHelper GUI Silent" id="66" menuName="${i18n:launcher.peerbanhelper.silent}" checkUpdater="true">
<executable name="PeerBanHelper-GUI-Silent" iconSet="true" executableDir="." redirectStdout="true" executableMode="gui" singleInstance="true" checkConsoleParameter="true">
<versionInfo include="true" fileDescription="${i18n:peerbanhelper.description}" legalCopyright="PBH-BTN Community - Licensed under GPLv3 licenses. https://www.gnu.org/licenses/quick-guide-gplv3.en.html" internalName="peerbanhelper" />
</executable>
Expand All @@ -56,7 +53,7 @@
<file path="./icon.png" />
</iconImageFiles>
</launcher>
<launcher name="PeerBanHelper NoGUI" id="28" swtApp="true" checkUpdater="true">
<launcher name="PeerBanHelper NoGUI" id="28" menuName="${i18n:launcher.peerbanhelper.nogui}" swtApp="true" checkUpdater="true">
<executable name="PeerBanHelper-NoGUI" iconSet="true" executableDir="." redirectStderr="false" executableMode="console" singleInstance="true" checkConsoleParameter="true">
<versionInfo include="true" fileDescription="${i18n:peerbanhelper.description}" legalCopyright="PBH-BTN Community - Licensed under GPLv3 licenses. https://www.gnu.org/licenses/quick-guide-gplv3.en.html" internalName="peerbanhelper" />
</executable>
Expand Down Expand Up @@ -84,6 +81,21 @@
<file path="./icon.png" />
</iconImageFiles>
</launcher>
<launcher name="PeerBanHelper-Updater" id="235" menuName="${i18n:launcher.peerbanhelper.updater}">
<executable name="PeerBanHelper-Updater" iconSet="true" executableDir="." failOnStderrOutput="false" executableMode="gui" singleInstance="true" checkConsoleParameter="true">
<versionInfo include="true" fileDescription="${i18n:peerbanhelper.description}" legalCopyright="PBH-BTN Community - Licensed under GPLv3 licenses. https://www.gnu.org/licenses/quick-guide-gplv3.en.html" internalName="peerbanhelper" />
</executable>
<java mainClass="com.ghostchu.peerbanhelper.MainEmpty" vmParameters="-Xmx512M -Xss512k -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ShrinkHeapInSteps -Dfile.encoding=UTF-8 -Dpbh.usePlatformConfigLocation=true -Dpbh.release=install4j -Dlauncher.directory=${launcher:sys.launcherDirectory}">
<classPath>
<scanDirectory location="libraries" failOnError="false" />
<archive location="PeerBanHelper.jar" failOnError="false" />
</classPath>
</java>
<iconImageFiles>
<file path="" />
<file path="./updater.png" />
</iconImageFiles>
</launcher>
</launchers>
<installerGui autoUpdateDescriptorUrl="https://pbh-files.pbh-btn.com/updates/latest/updates.xml">
<applications>
Expand Down Expand Up @@ -721,7 +733,7 @@ file.getParent() != null || (file.getName().endsWith(".app") &amp;&amp; director
</screen>
</startup>
</application>
<application name="Standalone update downloader" id="167" beanClass="com.install4j.runtime.beans.applications.CustomApplication" launchInNewProcess="false">
<application name="Standalone update downloader" id="167" beanClass="com.install4j.runtime.beans.applications.CustomApplication" automaticLauncherIntegration="true" launchMode="startupSync" launchInNewProcess="false" launchSchedule="always" allLaunchers="false">
<serializedBean>
<property name="customIconImageFiles">
<add>
Expand Down Expand Up @@ -754,6 +766,9 @@ file.getParent() != null || (file.getName().endsWith(".app") &amp;&amp; director
<property name="useCustomIcon" type="boolean" value="true" />
<property name="windowTitle" type="string">${i18n:updater.WindowTitle("${compiler:sys.fullName}")}</property>
</serializedBean>
<launcherIds>
<launcher id="235" />
</launcherIds>
<startup>
<screen id="168" beanClass="com.install4j.runtime.beans.screens.StartupScreen" rollbackBarrierExitCode="0" />
</startup>
Expand Down Expand Up @@ -1589,4 +1604,7 @@ return true;</property>
<jreBundle platform="alpine-linux-aarch64" installOnlyIfNecessary="true" />
</unixInstaller>
</mediaSets>
<buildIds>
<mediaSet refId="38" />
</buildIds>
</install4j>
Binary file added install4j/updater.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/main/java/com/ghostchu/peerbanhelper/MainEmpty.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.ghostchu.peerbanhelper;

public class MainEmpty {
public static void main(String[] args) {
// 什么都不做直接退出
}
}

0 comments on commit ec0d34a

Please sign in to comment.