macOSのNXTビルドを現在のWine環境に対応#65
Open
supurazako wants to merge 6 commits into
Open
Conversation
jtFuruhata
requested changes
Apr 26, 2026
jtFuruhata
left a comment
Member
There was a problem hiding this comment.
プルリクありがとうございます、マージには下記の点を解決したいです:
-
Issue #56 で仕掛けを説明した通り、scripts/(fake)cygpathはバグが潜んでいない限りそのまま使ってください、Windowsも含めた全環境がBASH上で動作していて、WindowsパスではなくPOSIXパスを統一して使っていますから、変換する必要がないのです。
-
またMacだけではなくLinuxもWineを利用していることに配慮していただけるとありがたいです。この環境ではsg.exeの実行にしかWineを利用しておらず、これはwin32アプリケーションですから、wine64に配慮する必要はなく、使うのはwineだけで問題ないです。
-
あとはあれですね、libusbのインストールチェックにバージョン番号をハードコードするのはちょっと避けたい感じです
Contributor
Author
|
返信ありがとうございます。
すみません、理解不足でした。動作確認したところ問題なさそうでしたので、既存の scripts/(fake)cygpath を使う形に戻します。
おっしゃる通りです。特定のバージョンに依存しない形に修正します。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
macOS環境におけるNXT向けビルドで、現在のWine環境に対応するよう修正しました。
関連issue
closes #56
背景
現在のmacOS環境では、従来利用していた
gcenx/wine/wine-crossoverを前提としたインストール処理が利用できなくなっています。ref: Gcenx/homebrew-wine@f201026
変更内容
gcenx/wine/game-porting-toolkitに変更wine/wine64の存在を$HOMEBREW_PREFIX/bin配下で確認するよう修正wine64を使ってsg.exeを実行するようecrobot.mak/ecrobot++.makの生成処理を調整sgの呼び出しをsg.exeに置換する処理を修正sg.exe実行後にkernel_cfg.c/kernel_id.hが生成されているか確認する処理を追加cygpathラッパーとしてscripts/maccygpathを追加maccygpathをcygpathとして配置するよう修正lsusb/libusb関連の存在確認をHomebrew配下のファイル確認に変動作確認
make sampleでbuildが成功すること補足
macOS環境におけるNXT向けビルド対応を目的とした修正です。
Linux / Windows向けの処理には大きな影響が出ないよう、macOS向けの分岐を中心に変更しています。
NXT向けビルドでは、
sg.exeの実行やMakefile内でのパス変換にcygpathが利用されています。従来は、Cygwin環境(Windows)を前提として
cygpathコマンドが利用可能であることを前提にしていましたが、macOS環境ではcygpathは標準では存在しません。そのため、Wine上でsg.exeを実行する際にパス変換が正しく行われず、ビルドに失敗する可能性がありました。本PRでは、macOS環境向けに
cygpath相当の処理を行うラッパー(maccygpath)を追加し、cygpathの代替として利用するようにしています。これにより、macOS上でもWindows形式のパス変換を適切に行い、sg.exeの実行およびビルド処理が正常に動作するようになります。