<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.jayscafe.net/index.php?action=history&amp;feed=atom&amp;title=SDL2_VICE_Cross_Compiling_on_Linux_for_Windows</id>
	<title>SDL2 VICE Cross Compiling on Linux for Windows - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.jayscafe.net/index.php?action=history&amp;feed=atom&amp;title=SDL2_VICE_Cross_Compiling_on_Linux_for_Windows"/>
	<link rel="alternate" type="text/html" href="https://wiki.jayscafe.net/index.php?title=SDL2_VICE_Cross_Compiling_on_Linux_for_Windows&amp;action=history"/>
	<updated>2026-04-08T12:37:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://wiki.jayscafe.net/index.php?title=SDL2_VICE_Cross_Compiling_on_Linux_for_Windows&amp;diff=230&amp;oldid=prev</id>
		<title>Jayctheriot: Created page with &quot;GARBAGE DOESN'T WORK - source documentation is more than 5 years old. &lt;p&gt;  Setting up the Mingw32 environment &lt;pre&gt; apt install gcc-mingw-w64-x86-64 build-essential vim-nox ex...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.jayscafe.net/index.php?title=SDL2_VICE_Cross_Compiling_on_Linux_for_Windows&amp;diff=230&amp;oldid=prev"/>
		<updated>2020-03-23T23:58:17Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;GARBAGE DOESN&amp;#039;T WORK - source documentation is more than 5 years old. &amp;lt;p&amp;gt;  Setting up the Mingw32 environment &amp;lt;pre&amp;gt; apt install gcc-mingw-w64-x86-64 build-essential vim-nox ex...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;GARBAGE DOESN'T WORK - source documentation is more than 5 years old.&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Setting up the Mingw32 environment&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install gcc-mingw-w64-x86-64 build-essential vim-nox exuberant-ctags \&lt;br /&gt;
bash-completion g++-mingw-w64-x86-64 binutils-mingw-w64 mingw-w64 \&lt;br /&gt;
automake autoconf-archive gnu-standards libtool gettext -y&lt;br /&gt;
&lt;br /&gt;
apt install autoconf build-essential byacc flex git subversion  \&lt;br /&gt;
  vim xa65 alien p7zip-full zip texinfo gawk* zip unzip mingw-w64 mingw-w64-tools \&lt;br /&gt;
&lt;br /&gt;
mkdir rpm&lt;br /&gt;
cd rpm&lt;br /&gt;
vim files.txt&lt;br /&gt;
cat files.txt | while read f; do wget -r -l1 --no-parent --no-directories -A &amp;quot;${f}*.rpm&amp;quot; -R &amp;quot;*-static-*&amp;quot; -R &amp;quot;*-tools-*&amp;quot; https://download-ib01.fedoraproject.org/pub/fedora-secondary/releases/30/Everything/i386/os/Packages/m/; done;&lt;br /&gt;
ls&lt;br /&gt;
rm mingw64-atkmm-2.24.2-7.fc30.noarch.rpm mingw64-cairomm-1.12.0-7.fc30.noarch.rpm&lt;br /&gt;
mingw64-pangomm-2.40.1-6.fc30.noarch.rpm mingw64-pcre2-10.32-2.fc30.noarch.rpm&lt;br /&gt;
mkdir ~/deb&lt;br /&gt;
cd&lt;br /&gt;
for f in rpm/*.rpm; do alien --to-deb $f; done&lt;br /&gt;
mv *.deb deb/&lt;br /&gt;
cd deb&lt;br /&gt;
ls&lt;br /&gt;
for f in deb/*.deb; do dpkg -i $f; done&lt;br /&gt;
cd ..&lt;br /&gt;
for f in deb/*.deb; do dpkg -i $f; done&lt;br /&gt;
ls -l deb | wc -l&lt;br /&gt;
ls -l rpm | wc -l&lt;br /&gt;
ls -l deb&lt;br /&gt;
dir deb&lt;br /&gt;
dir rpm&lt;br /&gt;
cp -R /usr/x86_64-w64-mingw32/sys-root/mingw/* /usr/x86_64-w64-mingw32/&lt;br /&gt;
cd /usr/x86_64-w64-mingw32/lib/pkgconfig&lt;br /&gt;
for pc in *.pc; do     echo &amp;quot;$pc&amp;quot;;     cp &amp;quot;$pc&amp;quot; &amp;quot;$pc.bak&amp;quot;;     sed -i 's@/sys-root/mingw@@' &amp;quot;$pc&amp;quot;;   done&lt;br /&gt;
ln -s /usr/lib/x86_64-linux-gnu/glib-2.0/glib-compile-resources     /usr/bin/glib-compile-resources&lt;br /&gt;
ln -s /usr/lib/x86_64-linux-gnu/glib-2.0/glib-compile-schemas     /usr/bin/glib-compile-schemas&lt;br /&gt;
ln -s /usr/x86_64-w64-mingw32/bin/glib-genmarshal     /usr/bin/glib-genmarshal&lt;br /&gt;
&lt;br /&gt;
ln -s /usr/x86_64-w64-mingw32/bin/glib-mkenums     /usr/bin/glib-mkenums&lt;br /&gt;
cd /usr/x86_64-w64-mingw32/share/glib-2.0/schemas&lt;br /&gt;
glib-compile-schemas&lt;br /&gt;
cd&lt;br /&gt;
svn checkout https://svn.code.sf.net/p/vice-emu/code/trunk vice-trunk&lt;br /&gt;
cd ~/vice-trunk/vice&lt;br /&gt;
./autogen.sh&lt;br /&gt;
cd ..&lt;br /&gt;
mkdir gtk3-win64-build&lt;br /&gt;
cd gtk3-win64-build&lt;br /&gt;
../vice/configure --enable-native-gtk3ui --host=x86_64-w64-mingw32&lt;br /&gt;
../vice/configure --enable-native-gtk3ui --enable-x64 --host=x86_64-w64-mingw32&lt;br /&gt;
make -j 6 2&amp;gt;&amp;amp;1 | tee build.log&lt;br /&gt;
updatedb&lt;br /&gt;
locate glib-compile-resources&lt;br /&gt;
cd /usr/x86_64-w64-mingw32/share/glib-2.0/schemas&lt;br /&gt;
glib-compile-schemas .&lt;br /&gt;
cd&lt;br /&gt;
ln -s /usr/lib/x86_64-linux-gnu/glib-2.0/glib-compile-resources   \&lt;br /&gt;
  /usr/bin/glib-compile-resources&lt;br /&gt;
ls -lh /usr/bin/glib-compile-resources&lt;br /&gt;
ln -lh /usr/lib/glib-compile-schemas&lt;br /&gt;
ls -lh /usr/lib/glib-compile-schemas&lt;br /&gt;
ls -lh /usr/bin/glib-compile*&lt;br /&gt;
apt-cache search glib-compile-resources&lt;br /&gt;
apt install libglib2.0-bin&lt;br /&gt;
ls -lh /usr/bin/glib-compile*&lt;br /&gt;
updatedb&lt;br /&gt;
locate glib-compile-resources&lt;br /&gt;
glib-complie-resources&lt;br /&gt;
apt install libglib2.0-dev-bin&lt;br /&gt;
ls -lh /usr/bin/glib-compile*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
apt install autoconf bash-completion build-essential byacc flex git subversion&lt;br /&gt;
    vim xa65 alien p7zip-full zip texinfo gawk* zip unzip mingw-w64 mingw-w64-tools&lt;br /&gt;
&lt;br /&gt;
../vice/configure --enable-native-gtk3ui --enable-x64 --disable-arch\&lt;br /&gt;
 --host=x86_64-w64-mingw32 --disable-hwscale host_alias=x86_64-w64-mingw32 \&lt;br /&gt;
 --no-create --no-recursion&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Setup the SDL 2.x Libraries&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/usr/bin/env bash&lt;br /&gt;
#&lt;br /&gt;
# SDL Cross-Build Download Script v 1.0&lt;br /&gt;
# =====================================&lt;br /&gt;
# (c) 2006 Dana Olson &amp;lt;dolson@icculus.org&amp;gt;&lt;br /&gt;
# Updated 20080617 by Saul D.&lt;br /&gt;
# Updated 2020 by Jay C. Theriot to use SDL2 libraries&lt;br /&gt;
#&lt;br /&gt;
# SDL 1.2 - http://www.libsdl.org/download-1.2.php&lt;br /&gt;
# SDL_image - http://www.libsdl.org/projects/SDL_image/&lt;br /&gt;
# SDL_mixer - http://www.libsdl.org/projects/SDL_mixer/&lt;br /&gt;
# SDL_net - http://www.libsdl.org/projects/SDL_net/&lt;br /&gt;
# SDL_ttf - http://www.libsdl.org/projects/SDL_ttf/&lt;br /&gt;
&lt;br /&gt;
# Path to install to. Default is /opt/SDL-2.0.12&lt;br /&gt;
INSTPATH=$1&lt;br /&gt;
if [ &amp;quot;$1&amp;quot; == &amp;quot;&amp;quot; ] ; then&lt;br /&gt;
	INSTPATH=/opt/SDL-2.0.12&lt;br /&gt;
        echo Install path not specified\; using default.&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Check and warn if destination exists.&lt;br /&gt;
if [ -e &amp;quot;$INSTPATH&amp;quot; ] ; then&lt;br /&gt;
  echo WARNING!!! Install path already exists!&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
# Allow user to confirm install.&lt;br /&gt;
echo SDL libraries will be installed to $INSTPATH.&lt;br /&gt;
echo Press Enter to continue, ^C to abort.&lt;br /&gt;
read junk&lt;br /&gt;
&lt;br /&gt;
# Create the patch and subdirectory.&lt;br /&gt;
mkdir -p $INSTPATH/archives/&lt;br /&gt;
&lt;br /&gt;
# Make sure the directory could be created.&lt;br /&gt;
if [ ! -e &amp;quot;$INSTPATH/archives&amp;quot; ] ; then&lt;br /&gt;
  echo Couldn\'t create install path. Aborting.&lt;br /&gt;
  exit 1&lt;br /&gt;
fi&lt;br /&gt;
echo Installing...&lt;br /&gt;
&lt;br /&gt;
# Download the SDL archives. Add to this list if you want more libraries.&lt;br /&gt;
cd $INSTPATH/archives/&lt;br /&gt;
for i in \&lt;br /&gt;
https://www.libsdl.org/release/SDL2-devel-2.0.12-mingw.tar.gz \&lt;br /&gt;
https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.5-VC.zip \&lt;br /&gt;
https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-devel-2.0.4-VC.zip \&lt;br /&gt;
https://www.libsdl.org/projects/SDL_net/release/SDL2_net-devel-2.0.1-VC.zip \&lt;br /&gt;
https://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-devel-2.0.11-VC.zip&lt;br /&gt;
  do wget -c $i&lt;br /&gt;
done&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
# Extract the main SDL archive.&lt;br /&gt;
tar zxf archives/SDL2-devel-2.0.12-mingw.tar.gz&lt;br /&gt;
&lt;br /&gt;
# Extract the addon archives.&lt;br /&gt;
for i in archives/*.zip&lt;br /&gt;
  do unzip $i&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
# Make a directory to hold the SDL runtime for Win32.&lt;br /&gt;
mkdir SDL-2.0.12/runtime/&lt;br /&gt;
&lt;br /&gt;
# Move all the DLLs and README file into here.&lt;br /&gt;
mv */*/*.dll SDL-2.0.12/runtime/&lt;br /&gt;
mv SDL-1.2.13/README-SDL.txt SDL-1.2.13/runtime/&lt;br /&gt;
&lt;br /&gt;
# Move all the addon libraries into the lib dir.&lt;br /&gt;
mv SDL_*/*/*.lib SDL-2.0.12/lib/&lt;br /&gt;
&lt;br /&gt;
# Move all the addon headers into the include dir.&lt;br /&gt;
mv SDL_*/*/*.h SDL-2.0.12/include/&lt;br /&gt;
&lt;br /&gt;
# Remove unneeded directories.&lt;br /&gt;
rm -rf SDL_*/&lt;br /&gt;
&lt;br /&gt;
# Make a symlink, so that the sdl-config can be found.&lt;br /&gt;
cd SDL-2.0.12/bin/&lt;br /&gt;
ln -s sdl-config i586-mingw32msvc-sdl-config&lt;br /&gt;
&lt;br /&gt;
# Patch the sdl-config script to point to install path.&lt;br /&gt;
echo &amp;quot;--- i586-mingw32msvc-sdl-config&amp;quot; &amp;gt; sdlcfgfix.patch&lt;br /&gt;
echo &amp;quot;+++ i586-mingw32msvc-sdl-config.fix&amp;quot; &amp;gt;&amp;gt; sdlcfgfix.patch&lt;br /&gt;
echo &amp;quot;@@ -1,6 +1,6 @@&amp;quot; &amp;gt;&amp;gt; sdlcfgfix.patch&lt;br /&gt;
echo &amp;quot; #!/bin/sh&amp;quot; &amp;gt;&amp;gt; sdlcfgfix.patch&lt;br /&gt;
echo &amp;quot; &amp;quot; &amp;gt;&amp;gt; sdlcfgfix.patch&lt;br /&gt;
echo &amp;quot;-prefix=/Users/hercules/tmp/SDL-1.2.13&amp;quot; &amp;gt;&amp;gt; sdlcfgfix.patch&lt;br /&gt;
echo &amp;quot;+prefix=$INSTPATH&amp;quot; &amp;gt;&amp;gt; sdlcfgfix.patch&lt;br /&gt;
echo &amp;quot; exec_prefix=\${prefix}&amp;quot; &amp;gt;&amp;gt; sdlcfgfix.patch&lt;br /&gt;
echo &amp;quot; exec_prefix_set=no&amp;quot; &amp;gt;&amp;gt; sdlcfgfix.patch&lt;br /&gt;
echo &amp;quot; &amp;quot; &amp;gt;&amp;gt; sdlcfgfix.patch&lt;br /&gt;
patch &amp;lt; sdlcfgfix.patch&lt;br /&gt;
mv sdlcfgfix.patch ../../archives/&lt;br /&gt;
&lt;br /&gt;
# Set proper permissions on some files.&lt;br /&gt;
cd ../../&lt;br /&gt;
chmod -x SDL-1.2.13/lib/* SDL-1.2.13/runtime/*&lt;br /&gt;
&lt;br /&gt;
# Move everything into install dir.&lt;br /&gt;
mv SDL-1.2.13/ tempsdlinstalldir129&lt;br /&gt;
mv tempsdlinstalldir129/* ./&lt;br /&gt;
rm -r tempsdlinstalldir129/&lt;br /&gt;
&lt;br /&gt;
# Done!&lt;br /&gt;
echo&lt;br /&gt;
echo Everything is done! SDL was installed in $INSTPATH.&lt;br /&gt;
echo This line should work to cross-compile:&lt;br /&gt;
echo PATH=$INSTPATH/bin:\$PATH ./configure --target=i586-mingw32msvc --host=i586-mingw32msvc --build=i586-linux&lt;br /&gt;
echo&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jayctheriot</name></author>
	</entry>
</feed>