Skip to content

ARM64プラットフォームへの対応#2046

Draft
beru wants to merge 3 commits intosakura-editor:masterfrom
beru:ARM64
Draft

ARM64プラットフォームへの対応#2046
beru wants to merge 3 commits intosakura-editor:masterfrom
beru:ARM64

Conversation

@beru
Copy link
Contributor

@beru beru commented Apr 27, 2025

PR対象

  • 全体的に

カテゴリ

  • 追加

PR の背景

#2042

仕様・動作説明

PR の影響範囲

テスト内容

関連 issue, PR

#2042

参考資料

@beru beru added the arm64 arm64対応 label Apr 27, 2025
7z e %BRON_ZIP% -o%platform%\%configuration% -y x64/%BREGONIG_DLL%
) else if "%platform%" == "arm6464" (
@rem provisional
7z e %BRON_ZIP% -o%platform%\%configuration% -y x64/%BREGONIG_DLL%
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あってます? x64と同じに見えます。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

とりあえず暫定的にこの記述にしてます。

arm64用の bregonig.dll をビルドする手順は分かってビルド出来るようにMRも作成しましたが、公式サイト でarm64用の bregonig.dll が配布されるようになるかは不明ですね。なので自前でビルドしたファイルを使うしかないかもです。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

高田さんの公式サイトが見えなくなったので(一時的なのか恒久的なのか不明)自前でビルドしたファイルをsakuraエディタのリポジトリに追加しようと思います。

arm64用のバイナリを作る際に一部変更が必要だったので k-takata/bregonig#3 を立てましたが反応が無いので、sakura-editor側でforkするのもありかもしれません。

余談ですが鬼車は開発終了したようです。bregonig.dll は鬼車を使っているのか鬼雲を使っているのかまだ調べてなくてよくわかってません。まぁ何か変更する予定があるわけではないし問題無いと思いますが。

# /*.vcxproj
/Win32
/x64
/ARM64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

対応不要なはず。逆に /x64 とか /Win32 を削るべきかも。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

そうなんですか?この記述がないとVS CodeのSource ControlのChangesに余計なフォルダが出てしまうような?

まぁでもこれ以外に色々なのが表示されてしまうのできりがないですかね。

Details

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

それの対策は /.gitignore ですね。

こう言うの紛らわしいからサブフォルダに ignore-list 置くの嫌い。(個人的見解。)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

おぉなるほど。.gitignoresakura/.gitignore のパスの違いを認識できてなかったです。

<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="FuncCode">
<HeaderMake>..\Win32\$(Configuration)\HeaderMake.exe</HeaderMake>
<HeaderMake>..\$(Platform)\$(Configuration)\HeaderMake.exe</HeaderMake>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここはGCC風のクロスコンパイル構成で言うところの host に当たる部分です。

この修正の方向で行くと、「ARM64版をビルドするにはARM64端末が必要」になります。

Win32向けのexeは x64環境 でも動くのでややこしいことになってます。

このへん、vcpkg検討では host 構成を x64-windows に固定して対処してます。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

むむむ、なるほど。Arm64版Windowsではx86(Win32)/x64向けのexeをバイナリ変換して動かせるようにしてるので(link)それを考えると HeaderMake.exe は x86(Win32)固定にした方が良いのかもしれないですね。

x86(Win32)/x64版WindowsでArm64向けのexeをバイナリ変換して動かす事は出来ないのが気になりますがそもそもこれにはニーズが無いのでMSも開発コスト掛けたくないんでしょうね。

beru and others added 3 commits May 24, 2025 07:09
Co-authored-by: berryzplus <berryzplus@gmail.com>
Co-authored-by: berryzplus <berryzplus@gmail.com>
@beru beru mentioned this pull request Nov 9, 2025
@namoen0301
Copy link

I have a snapdragon based laptop so if windows arm64 binary is available I can test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arm64 arm64対応

4 participants