From 23b1636da7106dc792aff88631b6de942162f5b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Mon, 7 Oct 2024 22:49:09 +0800 Subject: [PATCH] fix --- LunaTranslator/LunaTranslator/myutils/localetools.py | 9 +++++++-- plugins/CMakeLists.txt | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/LunaTranslator/LunaTranslator/myutils/localetools.py b/LunaTranslator/LunaTranslator/myutils/localetools.py index fd2838db..9c3505e2 100644 --- a/LunaTranslator/LunaTranslator/myutils/localetools.py +++ b/LunaTranslator/LunaTranslator/myutils/localetools.py @@ -124,8 +124,13 @@ class le_internal(LEbase, settingxx): guids = self.profiles(config)[1] guid = config.get("leguid", None) if guid not in guids: - guids = guids[0] - arg = '"{}" -runas {} {}'.format(LEProc, guid, usearg) + guid = guids[0] + idx = guids.index(guid) + if idx <= 1: + arg = '"{}" -runas {} {}'.format(LEProc, guid, usearg) + else: + # 程序的配置运行 + arg = '"{}" -run {}'.format(LEProc, usearg) windows.CreateProcess( None, arg, diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 64f49153..185118a1 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -29,7 +29,7 @@ include(generate_product_version) set(VERSION_MAJOR 5) set(VERSION_MINOR 42) -set(VERSION_PATCH 2) +set(VERSION_PATCH 3) add_library(pch pch.cpp) target_precompile_headers(pch PUBLIC pch.h)