頑張って自力でONScripterをコンパイル・ビルドするページです。
まだ不具合(文字が出ない、一部の音が再生されないなど)があります。有力な情報をお持ちの方は下記の連絡先までご連絡ください。
偉大なる先人たちに感謝。
この手順で「開く」というのは、特に指定のない限り「Terapadなどのテキストエディタで開く」ことを意味します。
また、行数が出てくることがありますが、あくまで目安です。環境によっては行数が微妙に合わないこともあります。
ざっくりとした説明です。
注:最近筆者は WSL しか使っていないので、今はできないかもしれません。
『Cygwin』 から「setup-x86.exe」をダウンロード(「setup-x86_64.exe」ではありません!)し、実行します。
Root directory を C:\cygwin とします。
Choose A Download site と聞かれるので、一覧から ftp://ftp.jaist.ac.jp を選択します。
Select Packeges で wget, tar, patch, autogen, autoconf, make, gperf, autopoint を選択し、 Install にセットします。
すべて終わったら、説明の都合上、ホームディレクトリを /home/user に移します。
C:\cygwin\etc\nsswitch.conf を開きます。11行目にある、
# db_home: /home/%U
を
db_home: /home/user
に書き換えます。そしてCygwinを開きます。
コンパイラをダウンロードします。Cygwinを起動し、
wget https://github.com/HO-0520-IT/cegcc-build/releases/download/20200430/cegcc_mingw32ce_cygwin_20200430.tar.gz
を実行します。400MBほどあるので少し時間がかかります。終了したら、ファイルを展開するため、
tar xzvf cegcc_mingw32ce_cygwin_20200430.tar.gz
を実行します。展開されたファイルは /home/user/cegcc にあります。
/home/user/cegcc を /usr/arm-mingw32ce に移動させます。
mv /home/user/cegcc /usr/arm-mingw32ce
こちらもざっくりとした説明です。
Windows のパスが WSL に入ると嫌なので、 /etc/wsl.conf を開いて、以下のようにしてください。
(これを実行すると code コマンドが使えなくなります。筆者は VS Code 側でフォルダ指定して開いているのでそんなに問題ありませんが…)
[interop]
appendWindowsPath = false
また、 usermod コマンドを使ってユーザー名とホームディレクトリを変更しておくと、後々楽です。
Brain Wiki の CeGCC のページ を見るのが早いです。
cegcc.sh をダウンロードしてきて、ホームディレクトリに置きます。
そして、
source cegcc.sh
を実行します。
(注:コンパイルフラグに -O3 -g0 を入れています。デバッグがしにくいので、デバッグしたい場合は適宜変更してください。)
必要なものはすべて HO-0520-IT のリポジトリ にあります。
最後に -wce とつくリポジトリを(今のところは全部) git clone して、その中身を /home/user/ に移動させます。
以下はリポジトリ内の各ツールのビルド手順です。
./autogen.sh
./configure --prefix=/usr/arm-mingw32ce --host=arm-mingw32ce --disable-shared
make
make install
./configure --prefix=/usr/arm-mingw32ce
patch -p1 < makefile.patch
make
./configure --prefix=/usr/arm-mingw32ce --host=arm-mingw32ce --disable-shared
make
make install
./configure --prefix=/usr/arm-mingw32ce --host=arm-mingw32ce --disable-shared --disable-tools --disable-tests
./configure --prefix=/usr/arm-mingw32ce --host=arm-mingw32ce --disable-shared
patch -p1 < makefile.patch
make
sudo make install
./configure --prefix=/usr/arm-mingw32ce --host=arm-mingw32ce --disable-shared
make
sudo make install
./autogen.sh
./configure --prefix=/usr/arm-mingw32ce --host=arm-mingw32ce --disable-shared
make
sudo make install
make libbzip2.a
sudo make install-lib
./autogen.sh
./configure --prefix=/usr/arm-mingw32ce --host=arm-mingw32ce --disable-shared --with-harfbuzz=no --enable-freetype-config
make
sudo make install
./autogen.sh
./configure --prefix=/usr/arm-mingw32ce --host=arm-mingw32ce --disable-shared --with-sdl-prefix=/usr/arm-mingw32ce --with-ft-prefix=/usr/arm-mingw32ce --disable-sdltest
patch -p1 < makefile.patch
make
sudo make install
./autogen.sh
./configure --prefix=/usr/arm-mingw32ce --host=arm-mingw32ce --disable-static --disable-shared --with-sdl-prefix=/usr/arm-mingw32ce --disable-png-shared --disable-jpg-shared --disable-webp --disable-webp-shared --disable-tif --disable-tif-shared --enable-jpg=yes --enable-png=yes
patch -p1 < makefile.patch
make
sudo make install
./autogen.sh
./configure --prefix=/usr/arm-mingw32ce --host=arm-mingw32ce --disable-shared --with-sdl-prefix=/usr/arm-mingw32ce --disable-music-midi --disable-music-timidity-midi --disable-music-native-midi --enable-music-ogg-tremor --disable-music-ogg-shared --disable-music-mp3 --disable-music-mp3-shared --disable-smpegtest --enable-music-mp3-mad-gpl --disable-sdltest
patch -p1 < makefile.patch
make
sudo make install
make -f Makefile.WinCE