From f256bc56e18be333f2cf33569d78dae70659de6b Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 19 May 2024 15:53:56 +0800 Subject: [PATCH] Update build script --- .appveyor.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 10898a6..80cace8 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -36,13 +36,13 @@ environment: NSIS_EXE: c:\Program Files (x86)\NSIS\makensis.exe - SQLITE_URL: https://www.sqlite.org/2024/sqlite-amalgamation-3450000.zip - - LIBCHEWING_TAG: v0.6.0 + SQLITE_URL: https://www.sqlite.org/2024/sqlite-amalgamation-3450300.zip CMAKE_GEN_X86: -G "Visual Studio 17 2022" -A "Win32" CMAKE_GEN_X64: -G "Visual Studio 17 2022" -A "x64" + RUSTUP_URL: https://win.rustup.rs/x86_64 + SOL_FILE: windows-chewing-tsf.sln MSBUILD_CMD_X86: /maxcpucount /property:Configuration=Release,Platform=Win32 /target:ChewingPreferences,ChewingTextService,all_static_data,data MSBUILD_CMD_X64: /maxcpucount /property:Configuration=Release,Platform=x64 /target:ChewingTextService @@ -62,25 +62,34 @@ clone_depth: 1 before_build: # git submodules - 'cd "%REPO_DIR%"' - - 'git submodule update --init --remote --recursive' - - 'git -C libchewing checkout %LIBCHEWING_TAG%' + - 'git submodule update --init --remote --recursive || cd .' # updating sqlite-amalgamation - 'cd \' - 'appveyor DownloadFile "%SQLITE_URL%" -FileName "sqlite.zip"' - '7z e -y "sqlite.zip" -o"%REPO_DIR%\libchewing\thirdparty\sqlite-amalgamation"' + # install Rust + - 'cd \' + - 'appveyor DownloadFile "%RUSTUP_URL%" -FileName "rustup-init.exe"' + - 'rustup-init.exe -y --default-toolchain none' + - 'set PATH=%PATH%;%USERPROFILE%\.cargo\bin' + - 'rustup toolchain install stable-i686-pc-windows-msvc stable-x86_64-pc-windows-msvc' + - 'rustup show -v' + # to run your custom scripts instead of automatic MSBuild build_script: # build start - 'mkdir "%BUILD_DIR%"' # build x86 + - 'rustup default stable-i686-pc-windows-msvc' - 'cd "%BUILD_DIR%" && mkdir "x86" && cd "x86"' - 'cmake %CMAKE_GEN_X86% "%REPO_DIR%"' - 'msbuild %SOL_FILE% %MSBUILD_CMD_X86%' # build x64 + - 'rustup default stable-x86_64-pc-windows-msvc' - 'cd "%BUILD_DIR%" && mkdir "x64" && cd "x64"' - 'cmake %CMAKE_GEN_X64% "%REPO_DIR%"' - 'msbuild %SOL_FILE% %MSBUILD_CMD_X64%'