Open newcworld001 opened 3 years ago
I am not aware that a cross-compile suit for arm64 exist (msys2 or mxe.cc). Hence we can't build it automatically.
Adding support would be fantastic. Yeah all those raspberry-pis and surfaces will rock then!!!
arm works fine under linux
I have built texstudio for Windows ARM4 with MSVC. The binary files and compiling instructions can be found here: https://github.com/minnyres/texstudio-windows-arm64.
It is natively built on a Windows ARM64 device, but cross compiling from Windows x64 is also possible.
It would need to build automatically via github actions. There will not be any manual builds.
It is possible to build automatically via github actions.
Native build on ARM64 machines certainly works, but there is currently no GitHub-hosted Windows ARM64 runner, so a self-hosted runner is required. That is how MSYS2 project build the ARM64 packages.
To use GitHub-hosted runners, it can be cross compiled on Windows x64 with MSVC or llvm-mingw toolchain, where the latter also work on Linux. The third-party libraries can be built with vcpkg. It is worth a try though we may met some problems when building Qt.
Some more comments to Windows packaging
add_compile_options(-Wno-deprecated-declarations)
in cmakelist.txt
needs to be removed when compiling with MSVCmaybe to clarify a way forward. I will not put effort in building win/arm builds. (no hardware to test, so would be completely blind) You can fork texstudio and set up an action which builds txs/win on arm. If that works, we can discuss how to merge, if desired.
It is tested that texstudio for win on arm64 can be built with this workflow. Later I will try to package and test the build.
jobs:
build-windows-arm64:
name: Windows on ARM64 build (cross compile with MSVC)
if: github.event_name == 'push'
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Fetch tag annotations
run: git fetch --tags --force
- name: Set up MSVC develop environment
uses: ilammy/msvc-dev-cmd@v1.4.1
with:
arch: amd64_arm64
- name: Build dependencies with vcpkg
uses: johnwason/vcpkg-action@v3
with:
pkgs: zlib tiff openjpeg libpng liblzma libjpeg-turbo libiconv freetype bzip2 brotli lcms icu boost-winapi boost-type-traits boost-type-traits boost-throw-exception boost-static-assert boost-preprocessor boost-predef boost-move boost-intrusive boost-integer boost-detail boost-core boost-container-hash boost-container boost-config boost-assert
triplet: arm64-windows
- name: Install Qt (host x64)
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==2.1.*'
version: '6.4.1'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
modules: 'qt5compat'
dir: '${{ github.workspace }}'
set-env: 'false'
- name: Install Qt (arm64)
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==2.1.*'
version: '6.4.1'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_arm64'
modules: 'qtimageformats qt5compat'
dir: '${{ github.workspace }}'
set-env: 'false'
- name: Build poppler
run: |
$work_dir = '${{ github.workspace }}'
$pattern = '[\\]'
$work_dir = $work_dir -replace $pattern, '/'
$poppler_ver = "22.11.0"
$poppler_url = "https://poppler.freedesktop.org/poppler-$poppler_ver.tar.xz"
Invoke-WebRequest -Uri $poppler_url -OutFile poppler-$poppler_ver.tar.xz
7z.exe x poppler-$poppler_ver.tar.xz
tar -xf poppler-$poppler_ver.tar
Set-Location poppler-$poppler_ver
cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX="$work_dir/poppler" -DCMAKE_BUILD_TYPE=Release -DENABLE_QT5=OFF -DENABLE_QT6=ON -DCMAKE_TOOLCHAIN_FILE="$work_dir/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=arm64-windows -DCMAKE_PREFIX_PATH="$work_dir/Qt/6.4.1/msvc2019_arm64" -DQT_HOST_PATH="$work_dir/Qt/6.4.1/msvc2019_64".
cmake --build .
cmake --install .
- name: Build TeXstudio
run: |
$work_dir = '${{ github.workspace }}'
$pattern = '[\\]'
$work_dir = $work_dir -replace $pattern, '/'
Set-Content -Path ".\CMakeLists.txt" -Value (get-content -Path ".\CMakeLists.txt" | Select-String -Pattern 'Wno-deprecated-declarations' -NotMatch)
New-Item -ItemType Directory -Path ./build
Set-Location build
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$work_dir/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=arm64-windows -DCMAKE_PREFIX_PATH="$work_dir/Qt/6.4.1/msvc2019_arm64;$work_dir/poppler" -DQT_HOST_PATH="$work_dir/Qt/6.4.1/msvc2019_64" ..
cmake --build .
A pull request is made for adding a workflow to build for windows on arm64
Currently for Windows there is only the x64 version, and it can't run on ARM64 devices such as Surface Pro X. Adding support would be fantastic.