Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
62 changes: 2 additions & 60 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Java CI with Gradle

on:
# push:
# branches: [ "master", "v4" ]
pull_request:
branches: [ "master", "v4" ]
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -36,61 +36,3 @@ jobs:
with:
name: v1.8.9
path: v1.8.9/build/libs/

- name: Upload artifact
run: |
cd v1.8.9

plain_version=$(awk -F'=' '/^version[[:space:]]*=/ {print $2}' gradle.properties | tr -d '[:space:]')
sha=$(git rev-parse --short=6 HEAD)
version="${plain_version}-${sha}"

mkdir -p build/libs
cd build/libs

export JAR=$(find . -name "*.jar")
mkdir -p zip
cp "$JAR" zip/fpsmaster.jar
cd zip
zip -r fpsmaster.zip *

# 创建存储目录
RESPONSE=$(curl --location --request POST "https://api.kstore.space/api/v1/file/create" \
--header "X-GitHub-Event: workflow_run" \
--header "User-Agent: Apifox/1.0.0 (https://apifox.com)" \
--form "access_token=${{ secrets.OSS }}" \
--form "fileId=0" \
--form "name=action-${{ github.event.head_commit.id }}")

DIR_ID=$(echo "$RESPONSE" | jq -r '.data.id')
echo "DirectoryId: $DIR_ID"

# 上传文件
UPLOAD_RESPONSE=$(curl --location --request POST "https://upload.kstore.space/upload/$DIR_ID?access_token=${{ secrets.OSS }}" \
-F "file=@fpsmaster.zip")

DOWNLOAD_URL=$(echo "$UPLOAD_RESPONSE" | jq -r '.data.downloadUrl')
FILE_ID=$(echo "$UPLOAD_RESPONSE" | jq -r '.data.id')

echo "FileId: $FILE_ID"
echo "URL: $DOWNLOAD_URL"

# 设为直接下载
RESPONSE=$(curl --location --request POST "https://api.kstore.cc/api/v1/file/direct?access_token=${{ secrets.OSS }}" \
--form "fileId=$FILE_ID" \
--form "isDirect=1")

echo "$RESPONSE"

echo "$(date -u +%Y-%m-%dT%H:%M:%SZ)"

# 版本推送
curl --get \
--data-urlencode "key=${{ secrets.API_KEY }}" \
--data-urlencode "commit=${{ github.sha }}" \
--data-urlencode "branch=${{ github.ref }}" \
--data-urlencode "version=$version" \
--data-urlencode "date=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
--data-urlencode "link=$DOWNLOAD_URL" \
--data-urlencode "release=false" \
"https://service.fpsmaster.top/api/github/push"
6 changes: 3 additions & 3 deletions docs/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ FPSMaster v4将会在此列表任务大部分完成后发布
- [x] 迁移优化代码
- [x] HitMarker
- [ ] 优化代码结构
- [ ] 重构MusicPlayer界面
- [x] 重构MusicPlayer界面
- [ ] 支持播放无损/VIP音乐
- [ ] 添加界面自动对齐
- [ ] 添加翻译功能
- [ ] Waypoint
- [ ] 攻击音效
- [ ] 组件更加自定义化(按键显示等)
- [ ] 修改notification,添加更多样式和自定义
- [ ] RawInput兼容和优化
- [x] RawInput兼容和优化
- [ ] FPS Hurt Cam
- [ ] World Color
- [ ] 跨版本框架
- [ ] 自定义客户端字体
- [ ] 自定义动画速率、曲线等
- [ ] 全局搜索
- [ ] 新的OOBE
- [x] 新的OOBE
- [ ] 功能完整的饰品界面
- [ ] AutoText
- [ ] 饱和度显示
Expand Down
9 changes: 9 additions & 0 deletions shared/java/top/fpsmaster/Constants.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package top.fpsmaster;

public final class Constants {
public static final String EDITION = "1.8.9";
public static final String VERSION = "v1.8.9";

private Constants() {
}
}
48 changes: 5 additions & 43 deletions shared/java/top/fpsmaster/FPSMaster.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,24 @@
import top.fpsmaster.features.impl.interfaces.ClientSettings;
import top.fpsmaster.features.manager.ModuleManager;
import top.fpsmaster.font.FontManager;
import top.fpsmaster.modules.account.AccountManager;
import top.fpsmaster.modules.client.ClientUsersManager;
import top.fpsmaster.modules.client.thread.ClientThreadPool;
import top.fpsmaster.modules.config.ConfigManager;
import top.fpsmaster.modules.i18n.Language;
import top.fpsmaster.modules.logger.ClientLogger;
import top.fpsmaster.modules.lua.LuaManager;
import top.fpsmaster.modules.music.MusicPlayer;
import top.fpsmaster.modules.music.netease.NeteaseApi;
import top.fpsmaster.ui.click.music.MusicPanel;
import top.fpsmaster.ui.click.music.NewMusicPanel;
import top.fpsmaster.ui.custom.ComponentsManager;
import top.fpsmaster.ui.screens.oobe.OOBEScreen;
import top.fpsmaster.utils.GitInfo;
import top.fpsmaster.utils.os.FileUtils;
import top.fpsmaster.utils.os.HttpRequest;
import top.fpsmaster.utils.thirdparty.github.UpdateChecker;
import top.fpsmaster.websocket.client.WsClient;
import top.fpsmaster.wrapper.Constants;

import java.io.File;

public class FPSMaster {

public boolean hasOptifine;
public boolean loggedIn;
public WsClient wsClient;

public static final String phase = "pre-release";
public static final String SERVICE_API = "https://service.fpsmaster.top";

public static final String EDITION = Constants.EDITION;
public static final String COPYRIGHT = "Copyright ©2020-2025 FPSMaster Team All Rights Reserved.";
Expand All @@ -49,9 +37,6 @@ public class FPSMaster {
public static ModuleManager moduleManager = new ModuleManager();
public static FontManager fontManager = new FontManager();
public static ConfigManager configManager = new ConfigManager();
public static OOBEScreen oobeScreen = new OOBEScreen();
public static AccountManager accountManager = new AccountManager();
public static ClientUsersManager clientUsersManager = new ClientUsersManager();
public static GlobalListener submitter = new GlobalListener();
public static CommandManager commandManager = new CommandManager();
public static ComponentsManager componentsManager = new ComponentsManager();
Expand Down Expand Up @@ -81,8 +66,7 @@ private void initializeFonts() {
// add more fonts and add fallback font
File file = new File(FileUtils.fonts, "harmony_bold.ttf");
if (!file.exists()) {
ClientLogger.info("Downloading Fonts...");
HttpRequest.downloadFile("https://13430.kstore.space/harmony_bold.ttf", file.getAbsolutePath());
ClientLogger.warn("Missing font file: " + file.getAbsolutePath());
}

fontManager.load();
Expand All @@ -102,9 +86,6 @@ private void initializeConfigures() throws Exception {
configManager.loadConfig("default");
MusicPlayer.setVolume(Float.parseFloat(configManager.configure.getOrCreate("volume", "1")));
NeteaseApi.cookies = FileUtils.readTempValue("cookies");
MusicPanel.nickname = FileUtils.readTempValue("nickname");
NewMusicPanel.nickname = FileUtils.readTempValue("nickname");
accountManager.autoLogin();
}

private void initializeMusic() {
Expand Down Expand Up @@ -157,25 +138,9 @@ private void checkOptifine() {
}

private void checkUpdate() {
if (development) {
isLatest = true;
return;
}
async.runnable(() -> {
String s = UpdateChecker.getLatestVersion();
if (s == null || s.isEmpty()) {
s = UpdateChecker.getLatestVersion();
if (s == null || s.isEmpty()) {
isLatest = false;
updateFailed = true;
ClientLogger.error("获取最新版本信息失败");
return;
}
}
s = s.trim();
latest = s;
isLatest = GitInfo.getCommitId().equals(s);
});
isLatest = true;
updateFailed = false;
latest = GitInfo.getCommitId();
}

public void initialize() {
Expand All @@ -200,11 +165,8 @@ public void shutdown() {
try {
ClientLogger.info("Saving configs");
configManager.saveConfig("default");
if (wsClient != null && wsClient.isOpen()) {
wsClient.close(200, "Shutdown");
}
} catch (FileException e) {
throw new RuntimeException(e);
}
}
}
}
55 changes: 0 additions & 55 deletions shared/java/top/fpsmaster/api/APIProvider.java

This file was deleted.

Loading
Loading