Changelog: v0.3.12

This commit is contained in:
notify 2023-11-07 21:31:07 +08:00
parent 4b1c43f4c9
commit 2ecaefb642
11 changed files with 93 additions and 22 deletions

View File

@ -30,7 +30,7 @@ jobs:
with:
aqtversion: '==3.1.*'
py7zrversion: '>=0.20.2'
version: '6.4.2'
version: '6.5.3'
host: 'linux'
target: 'desktop'
arch: 'gcc_64'
@ -41,7 +41,7 @@ jobs:
with:
aqtversion: '==3.1.*'
py7zrversion: '>=0.20.2'
version: '6.4.2'
version: '6.5.3'
host: 'linux'
target: 'android'
arch: 'android_arm64_v8a'
@ -59,7 +59,7 @@ jobs:
cd ../FreeKill
cp -r ../openssl-1.1.1t/include/openssl ./include
- name: Setup Android for Qt 6.4.x
- name: Setup Android for Qt
run: |
cd ..
mkdir android
@ -67,10 +67,10 @@ jobs:
wget --quiet https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
unzip commandlinetools-linux-9477386_latest.zip
yes | ./cmdline-tools/bin/sdkmanager --sdk_root=$(pwd) \
"platforms;android-31" \
"platforms;android-33" \
"platform-tools" \
"build-tools;31.0.0" \
"ndk;23.1.7779620"
"build-tools;33.0.0" \
"ndk;25.1.8937393"
- name: Copy android assets
run: |
@ -92,7 +92,7 @@ jobs:
run: |
export QT_HOST_PATH=${Qt6_DIR}/../gcc_64/
export ANDROID_SDK_ROOT=$(pwd)/../android
export ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/23.1.7779620
export ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/25.1.8937393
sed -i "s/LinguistTools/Linguist/g" CMakeLists.txt
${Qt6_DIR}/bin/qt-cmake -S . -B ./build -DCMAKE_BUILD_TYPE=MinSizeRel
@ -104,7 +104,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: apk
path: build/android-build/build/outputs/apk/debug/android-build-debug.apk
path: build/android-build/build/outputs/apk/release/android-build-release-unsigned.apk
release:
name: Release APK
@ -139,7 +139,7 @@ jobs:
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
env:
# override default build-tools version (29.0.3) -- optional
BUILD_TOOLS_VERSION: "31.0.0"
BUILD_TOOLS_VERSION: "33.0.0"
- name: Rename APK
run: |

View File

@ -27,7 +27,7 @@ jobs:
with:
aqtversion: '==3.1.*'
py7zrversion: '>=0.20.2'
version: '6.4.2'
version: '6.5.3'
host: 'windows'
target: 'desktop'
arch: 'win64_mingw'
@ -73,7 +73,7 @@ jobs:
cp lib/win/* FreeKill-release
cp build/zh_CN.qm FreeKill-release
cp build/en_US.qm FreeKill-release
cp ../Qt/6.4.2/mingw_64/bin/li*.dll FreeKill-release
cp ../Qt/6.5.3/mingw_64/bin/li*.dll FreeKill-release
cp '/c/Program Files/OpenSSL/bin/libcrypto-1_1-x64.dll' FreeKill-release
7z a -t7z FreeKill-release.7z FreeKill-release -r -mx=9 -m0=LZMA2 -ms=10m -mf=on -mhc=on -mmt=on

View File

@ -2,6 +2,29 @@
___
## v0.3.12
Qt框架升级到Qt 6.5.3 LTS版本安卓告别触控bug。
1. 现在本体支持英文了
2. 修复了prompt看不见extra_data的bug
3. 添加askForChooseBoth用以选择多牌多角色的情况
4. 拆分Util以方便开发插件识别
5. 大招不再显示武将卡面信息
6. 添加勾选框askForCheck用以提供多选项多选
7. 头像界面更换头像和密码增加计时器
8. 武将界面增加设为头像,搜索框文字输入栏微调
9. 整理手牌将不同的pile分开
10. askForCard(s)Chosen自由prompt
11. 开大动画区分主将副将,特化语音
12. 观星框显示卡牌标记
13. 禁止打出修复
14. random_ai禁止技修复
15. 记录器整局游戏修复
16. 禁止亮将修复封杀已亮的将
___
## v0.3.11
没什么大变化,都是优化

View File

@ -2,7 +2,7 @@
cmake_minimum_required(VERSION 3.16)
project(FreeKill VERSION 0.3.11)
project(FreeKill VERSION 0.3.12)
add_definitions(-DFK_VERSION=\"${CMAKE_PROJECT_VERSION}\")
find_package(Qt6 REQUIRED COMPONENTS

View File

@ -55,6 +55,7 @@ Item {
fillMode: Image.PreserveAspectCrop
}
/*
MediaPlayer {
id: bgm
source: config.bgmFile
@ -68,10 +69,11 @@ Item {
volume: config.bgmVolume / 100
}
}
*/
onIsStartedChanged: {
if (isStarted) {
bgm.play();
// bgm.play();
canKickOwner = false;
kickOwnerTimer.stop();
} else {
@ -517,7 +519,9 @@ Item {
onCardSelected: function(card) {
Logic.enableTargets(card);
if (typeof card === "number" && card !== -1 && roomScene.state === "playing") {
if (typeof card === "number" && card !== -1 && roomScene.state === "playing"
&& JSON.parse(Backend.callLuaFunction("GetPlayerHandcards", [Self.id])).includes(card)) {
const skills = JSON.parse(Backend.callLuaFunction("GetCardSpecialSkills", [card]));
if (JSON.parse(Backend.callLuaFunction("CanUseCard", [card, Self.id]))) {
skills.unshift("_normal_use");

View File

@ -3,8 +3,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.notify.FreeKill"
android:installLocation="preferExternal"
android:versionCode="311"
android:versionName="0.3.11">
android:versionCode="312"
android:versionName="0.3.12">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

View File

@ -31,6 +31,7 @@ mkdir assets/res/server
cp ../server/init.sql assets/res/server
cp ../LICENSE assets/res
cp ../zh_CN.qm assets/res
cp ../en_US.qm assets/res
cp ../fk_ver assets/res
cp ../waiting_tips.txt assets/res

View File

@ -2,10 +2,13 @@
package org.notify.FreeKill;
import java.util.*;
import android.provider.Settings;
import android.app.Activity;
import android.view.View;
import android.view.WindowManager;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import org.qtproject.qt.android.QtNative;
public class Helper {
@ -55,4 +58,26 @@ public class Helper {
Settings.Secure.ANDROID_ID
);
}
public static String GetLocaleCode() {
return java.util.Locale.getDefault().toString();
}
public static void PlaySound(String path) {
MediaPlayer mp = new MediaPlayer();
mp.setOnCompletionListener(new OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
mp.reset();
mp.release();
}
});
try {
mp.setDataSource(path);
mp.prepare();
mp.start();
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@ -183,7 +183,7 @@ FreeKill使用的是libgit2的C API与此同时使用Git完成拓展包的下
["Death audio"] = "阵亡",
["$WelcomeToLobby"] = "欢迎进入新月杀游戏大厅!",
["GameMode"] = "游戏模式",
["GameMode"] = "游戏模式",
["LuckCardNum"] = "手气卡次数:",
["ResponseTime"] = "出手时间:",
["GeneralBoxNum"] = "选将框数:",
@ -296,9 +296,11 @@ FreeKill使用的是libgit2的C API与此同时使用Git完成拓展包的下
["Resume"] = "继续",
["Bulletin Info"] = [==[
## v0.3.11
## v0.3.12
bug
BGMAPP播放BGM
bug
]==],
}

View File

@ -191,9 +191,6 @@ int main(int argc, char *argv[]) {
QCoreApplication::setApplicationName("FreeKill");
QCoreApplication::setApplicationVersion(FK_VERSION);
QLocale l = QLocale::system();
auto localeName = l.name();
#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
prepareForLinux();
#endif
@ -274,6 +271,13 @@ int main(int argc, char *argv[]) {
splash.showMessage(msg, Qt::AlignHCenter | Qt::AlignBottom);
#ifdef Q_OS_ANDROID
// 投降喵设为android根本无效
// 直接改用Android原生Mediaplayer了不用你Qt家的
// qputenv("QT_MEDIA_BACKEND", "android");
// 安卓获取系统语言需要使用Java才行
QString localeName = QJniObject::callStaticObjectMethod("org/notify/FreeKill/Helper", "GetLocaleCode", "()Ljava/lang/String;").toString();
// 安卓:先切换到我们安装程序的那个外部存储目录去
QJniObject::callStaticMethod<void>("org/notify/FreeKill/Helper", "InitView",
"()V");
@ -290,7 +294,14 @@ int main(int argc, char *argv[]) {
splash.showFullScreen();
SHOW_SPLASH_MSG("Copying resources...");
installFkAssets("assets:/res", QDir::currentPath());
info_log = freopen("freekill.server.info.log", "w+", info_log);
err_log = freopen("freekill.server.error.log", "w+", err_log);
#else
// 不是安卓使用QLocale获得系统语言
QLocale l = QLocale::system();
auto localeName = l.name();
// 不是安卓,那么直接启动欢迎界面,也就是不复制东西了
QSplashScreen splash(QPixmap("image/splash.jpg"));
splash.show();

View File

@ -322,6 +322,10 @@ void QmlBackend::playSound(const QString &name, int index) {
if (!QFile::exists(fname))
return;
#ifdef Q_OS_ANDROID
QJniObject::callStaticMethod<void>("org/notify/FreeKill/Helper", "PlaySound",
"(Ljava/lang/String;)V", QJniObject::fromString(fname).object<jstring>());
#else
auto player = new QMediaPlayer;
auto output = new QAudioOutput;
player->setAudioOutput(output);
@ -334,6 +338,7 @@ void QmlBackend::playSound(const QString &name, int index) {
}
});
player->play();
#endif
}
void QmlBackend::copyToClipboard(const QString &s) {