mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-26 15:14:13 +08:00
buildxp
This commit is contained in:
parent
2072333615
commit
660a926bc4
6
.github/scripts/build_lunahook.py
vendored
6
.github/scripts/build_lunahook.py
vendored
@ -66,10 +66,8 @@ cmake --build ../build/x64_{lang} --config Release --target ALL_BUILD -j 14
|
||||
|
||||
def build_langx_xp(lang):
|
||||
url = "https://github.com/Chuyu-Team/YY-Thunks/releases/download/v1.0.7/YY-Thunks-1.0.7-Binary.zip"
|
||||
target = "YY-Thunks/objs/X86/YY_Thunks_for_WinXP.obj"
|
||||
if os.path.exists(target) == False:
|
||||
os.system(rf"curl -SLo YY-Thunks-1.0.7-Binary.zip " + url)
|
||||
os.system(rf"7z x -y YY-Thunks-1.0.7-Binary.zip -o../YY-Thunks")
|
||||
os.system(rf"curl -SLo YY-Thunks-1.0.7-Binary.zip " + url)
|
||||
os.system(rf"7z x -y YY-Thunks-1.0.7-Binary.zip -o../../libs/YY-Thunks")
|
||||
os.system("dir")
|
||||
with open("do.bat", "w") as ff:
|
||||
ff.write(
|
||||
|
16
.github/scripts/build_lunatranslator.py
vendored
16
.github/scripts/build_lunatranslator.py
vendored
@ -205,7 +205,7 @@ def buildPlugins(arch):
|
||||
f"cmake --build ../build/x86 --config Release --target ALL_BUILD -j 14"
|
||||
)
|
||||
# subprocess.run(f"python copytarget.py 1")
|
||||
else:
|
||||
elif arch=='x64':
|
||||
subprocess.run(
|
||||
f'cmake ../CMakeLists.txt -G "Visual Studio 17 2022" -A x64 -T host=x64 -B ../build/x64 -DCMAKE_SYSTEM_VERSION=10.0.26621.0'
|
||||
)
|
||||
@ -213,8 +213,20 @@ def buildPlugins(arch):
|
||||
f"cmake --build ../build/x64 --config Release --target ALL_BUILD -j 14"
|
||||
)
|
||||
# subprocess.run(f"python copytarget.py 0")
|
||||
elif arch=='xp':
|
||||
url = "https://github.com/Chuyu-Team/YY-Thunks/releases/download/v1.0.7/YY-Thunks-1.0.7-Binary.zip"
|
||||
os.system(rf"curl -SLo YY-Thunks-1.0.7-Binary.zip " + url)
|
||||
os.system(rf"7z x -y YY-Thunks-1.0.7-Binary.zip -o../libs/YY-Thunks")
|
||||
with open("do.bat", "w") as ff:
|
||||
ff.write(
|
||||
rf"""
|
||||
|
||||
|
||||
cmake -DWINXP=ON ../CMakeLists.txt -G "Visual Studio 16 2019" -A win32 -T v141_xp -B ../build/x86_xp
|
||||
cmake --build ../build/x86_xp --config Release --target ALL_BUILD -j 14
|
||||
call dobuildxp.bat
|
||||
"""
|
||||
)
|
||||
os.system(f"cmd /c do.bat")
|
||||
def downloadsomething():
|
||||
pass
|
||||
# shutil.rmtree(rootDir + "\\files\\LunaTranslator_qss\\.git")
|
||||
|
15
.github/workflows/buildluna.yml
vendored
15
.github/workflows/buildluna.yml
vendored
@ -2,6 +2,21 @@ name: buildluna
|
||||
on:
|
||||
workflow_call:
|
||||
jobs:
|
||||
build_cpp_xp:
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
|
||||
with:
|
||||
sdk-version: 22621
|
||||
|
||||
- run: python .github/scripts/build_lunatranslator.py cpp xp
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cpp_xp
|
||||
path: cpp/builds
|
||||
hook_xp:
|
||||
runs-on: windows-2019
|
||||
permissions:
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -46,5 +46,5 @@ cpp/libs/onnxruntime-static.zip
|
||||
cpp/libs/onnxruntime-static/onnxruntime-static.7z
|
||||
cpp/libs/opencv-static/opencv-static.7z
|
||||
cpp/LunaHook/.vscode/settings.json
|
||||
cpp/LunaHook/YY-Thunks
|
||||
cpp/LunaHook/scripts/YY-Thunks-1.0.7-Binary.zip
|
||||
cpp/libs/YY-Thunks
|
||||
|
@ -40,10 +40,8 @@ option(WINXP "WINXP" OFF)
|
||||
|
||||
if(WINXP)
|
||||
set(WINXPAPP "_winxp")
|
||||
set(YY_Thunks_for_WinXP ${CMAKE_CURRENT_LIST_DIR}/YY-Thunks/objs/X86/YY_Thunks_for_WinXP.obj)
|
||||
else()
|
||||
set(WINXPAPP "")
|
||||
set(YY_Thunks_for_WinXP)
|
||||
endif()
|
||||
|
||||
add_definitions(-DLANGUAGE=${LANGUAGE})
|
||||
|
@ -14,7 +14,7 @@ set(OpenCV_STATIC ON)
|
||||
find_package(OpenCV REQUIRED)
|
||||
|
||||
add_library(LunaOCR SHARED OCR.cpp ${versioninfo})
|
||||
target_link_libraries(LunaOCR ${OnnxRuntime_LIBS} ${OpenCV_LIBS} Clipper2Lib)
|
||||
target_link_libraries(LunaOCR ${OnnxRuntime_LIBS} ${OpenCV_LIBS} Clipper2Lib ${YY_Thunks_for_WinXP})
|
||||
target_precompile_headers(LunaOCR REUSE_FROM pch)
|
||||
|
||||
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
|
||||
|
@ -18,8 +18,15 @@ set(sources PyStand.cpp luna.rc ${versioninfo})
|
||||
add_executable(LunaTranslator_debug ${sources})
|
||||
target_compile_definitions(LunaTranslator_debug PRIVATE PYSTAND_CONSOLE)
|
||||
add_executable(LunaTranslator WIN32 ${sources})
|
||||
if(not WINXP)
|
||||
add_executable(LunaTranslator_admin WIN32 ${sources})
|
||||
set_target_properties(LunaTranslator_admin PROPERTIES LINK_FLAGS " /MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\" ")
|
||||
target_precompile_headers(LunaTranslator_debug REUSE_FROM pch)
|
||||
target_precompile_headers(LunaTranslator_admin REUSE_FROM pch)
|
||||
target_precompile_headers(LunaTranslator REUSE_FROM pch)
|
||||
endif()
|
||||
target_precompile_headers(LunaTranslator REUSE_FROM pch)
|
||||
target_precompile_headers(LunaTranslator_debug REUSE_FROM pch)
|
||||
|
||||
if(WINXP)
|
||||
target_link_libraries(LunaTranslator ${YY_Thunks_for_WinXP})
|
||||
target_link_libraries(LunaTranslator_debug ${YY_Thunks_for_WinXP})
|
||||
endif()
|
@ -44,4 +44,11 @@ set(OpenCV_DIR ${CMAKE_CURRENT_LIST_DIR}/opencv-static/windows-x86)
|
||||
set(OpenCV_ARCH x86)
|
||||
endif()
|
||||
set(OpenCV_RUNTIME vc16)
|
||||
endif()
|
||||
|
||||
option(WINXP "WINXP" OFF)
|
||||
if(WINXP)
|
||||
set(YY_Thunks_for_WinXP ${CMAKE_CURRENT_LIST_DIR}/YY-Thunks/objs/X86/YY_Thunks_for_WinXP.obj)
|
||||
else()
|
||||
set(YY_Thunks_for_WinXP)
|
||||
endif()
|
@ -28,6 +28,6 @@ if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
|
||||
set_target_properties(shareddllproxy PROPERTIES OUTPUT_NAME "shareddllproxy64")
|
||||
else()
|
||||
target_precompile_headers(voiceroid2 REUSE_FROM pch)
|
||||
target_link_libraries(shareddllproxy nlohmann Mfplat mfuuid voiceroid2 Detours)
|
||||
target_link_libraries(shareddllproxy nlohmann Mfplat mfuuid voiceroid2 Detours ${YY_Thunks_for_WinXP})
|
||||
set_target_properties(shareddllproxy PROPERTIES OUTPUT_NAME "shareddllproxy32")
|
||||
endif()
|
@ -25,6 +25,6 @@ if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
|
||||
target_link_libraries(wcocr ${CMAKE_SOURCE_DIR}/libs/wechat-ocr/spt/x64/libprotobuf-lite.lib ${CMAKE_SOURCE_DIR}/libs/wechat-ocr/spt/x64/mmmojo_64.lib)
|
||||
target_link_options(wcocr PRIVATE "/DELAYLOAD:mmmojo_64.dll")
|
||||
else()
|
||||
target_link_libraries(wcocr ${CMAKE_SOURCE_DIR}/libs/wechat-ocr/spt/x86/libprotobuf-lite.lib ${CMAKE_SOURCE_DIR}/libs/wechat-ocr/spt/x86/mmmojo.lib)
|
||||
target_link_libraries(wcocr ${CMAKE_SOURCE_DIR}/libs/wechat-ocr/spt/x86/libprotobuf-lite.lib ${CMAKE_SOURCE_DIR}/libs/wechat-ocr/spt/x86/mmmojo.lib ${YY_Thunks_for_WinXP})
|
||||
target_link_options(wcocr PRIVATE "/DELAYLOAD:mmmojo.dll")
|
||||
endif()
|
||||
|
@ -14,7 +14,7 @@ add_library(winsharedutils MODULE mp3enc.cpp webview2_extra.cpp AreoAcrylic.cpp
|
||||
applicationloopbackaudio/runer.cpp applicationloopbackaudio/LoopbackCapture.cpp
|
||||
SimpleBrowser.cpp MWebBrowser.cpp icon.cpp ${versioninfo})
|
||||
target_precompile_headers(winsharedutils REUSE_FROM pch)
|
||||
target_link_libraries(winsharedutils tinymp3 Shcore rapidfuzz wil webview2 Mfplat mfuuid Mmdevapi)
|
||||
target_link_libraries(winsharedutils tinymp3 Shcore rapidfuzz wil webview2 Mfplat mfuuid Mmdevapi ${YY_Thunks_for_WinXP})
|
||||
target_link_options(winsharedutils PRIVATE "/DELAYLOAD:Mmdevapi.dll")
|
||||
target_link_options(winsharedutils PRIVATE "/DELAYLOAD:Mfplat.dll")
|
||||
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
|
||||
|
Loading…
x
Reference in New Issue
Block a user