DarioSamo / sm64rt

Fork of https://github.com/sm64pc/sm64ex with raytracing support.
274 stars 13 forks source link

Building the Windows binaries on Linux #65

Open SpidFightFR opened 8 months ago

SpidFightFR commented 8 months ago

Alright, hey everyone ! I'm currently trying to build SM64RT (the Windows binaries, usable with Wine) on Linux. (see #15)

Context:

My postulate is simple: if a tool such as Msys2 can build sm64rt, with the required libs, and if Msys2 is based on archlinux, then any other archlinux install should be capable to build the same software with the same settings but without Msys2. We just need the right libs and tools to do so. The produced Windows binaries can then be exploited using wine.

What is the purpose ?

What i'll be using:

Config files:

Added this at the end of /etc/pacman.conf:

/etc/pacman.conf ``` [mingw32] Include = /etc/pacman.d/mirrorlist.custom [mingw64] Include = /etc/pacman.d/mirrorlist.custom [ucrt64] Include = /etc/pacman.d/mirrorlist.custom [clang64] Include = /etc/pacman.d/mirrorlist.custom [clang32] Include = /etc/pacman.d/mirrorlist.custom ```

Added the file /etc/pacman.d/mirrorlist.custom:

/etc/pacman.d/mirrorlist.custom ``` # See https://www.msys2.org/dev/mirrors ## Primary Server = https://mirror.msys2.org/mingw/$repo/ Server = https://repo.msys2.org/mingw/$repo/ ## Tier 1 Server = https://mirror.umd.edu/msys2/mingw/$repo/ Server = https://mirror.yandex.ru/mirrors/msys2/mingw/$repo/ Server = https://download.nus.edu.sg/mirror/msys2/mingw/$repo/ Server = https://ftp.acc.umu.se/mirror/msys2.org/mingw/$repo/ Server = https://ftp.nluug.nl/pub/os/windows/msys2/builds/mingw/$repo/ Server = https://ftp.osuosl.org/pub/msys2/mingw/$repo/ Server = https://mirror.internet.asn.au/pub/msys2/mingw/$repo/ Server = https://mirror.selfnet.de/msys2/mingw/$repo/ Server = https://mirrors.dotsrc.org/msys2/mingw/$repo/ Server = https://mirrors.bfsu.edu.cn/msys2/mingw/$repo/ Server = https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/$repo/ Server = https://mirrors.ustc.edu.cn/msys2/mingw/$repo/ Server = https://mirror.nju.edu.cn/msys2/mingw/$repo/ Server = https://repo.extreme-ix.org/msys2/mingw/$repo/ Server = https://mirrors.hit.edu.cn/msys2/mingw/$repo/ Server = https://mirror.clarkson.edu/msys2/mingw/$repo/ Server = https://quantum-mirror.hu/mirrors/pub/msys2/mingw/$repo/ Server = https://mirror2.sandyriver.net/pub/software/msys2/mingw/$repo/ Server = https://mirror.archlinux.tw/MSYS2/mingw/$repo/ ## Tier 2 Server = https://mirror.ufro.cl/msys2/mingw/$repo/ Server = https://fastmirror.pp.ua/msys2/mingw/$repo/ Server = https://ftp.cc.uoc.gr/mirrors/msys2/mingw/$repo/ Server = https://mirror.jmu.edu/pub/msys2/mingw/$repo/ Server = https://mirrors.piconets.webwerks.in/msys2-mirror/mingw/$repo/ Server = https://www2.futureware.at/~nickoe/msys2-mirror/mingw/$repo/ Server = https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/$repo/ Server = https://mirrors.bit.edu.cn/msys2/mingw/$repo/ Server = https://repo.casualgamer.ca/mingw/$repo/ Server = https://mirrors.aliyun.com/msys2/mingw/$repo/ Server = https://mirror.iscas.ac.cn/msys2/mingw/$repo/ Server = https://mirrors.tencent.com/msys2/mingw/$repo/ ```

That's it for the introduction !

SpidFightFR commented 8 months ago

A few things are needed nonetheless:

  1. linking windows.h to Windows.h (just in case the uppercase "W" breaks the process) - ln -s /mingw64/include/windows.h /mingw64/include/Windows.h
  2. The 1st commit to this pr: add a new path to the include line (Mingw64 libs aren't located natively like for Msys2).