Skip to content

Commit

Permalink
Update build script
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobo1 committed May 20, 2024
1 parent f787f11 commit f256bc5
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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%'
Expand Down

0 comments on commit f256bc5

Please sign in to comment.