Login  •  Register


The time is now: Wed Jun 19, 2019 3:56 pm

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 5 posts ]
Print view Previous topic  |  Next topic
Author Message
PostPosted: Sun Jan 20, 2019 6:38 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1029
Here's a quick guide to building kanjitalk755's BasiliskII code in Windows. Tested in Windows 10.

1. Install MinGW

Go to this page:
https://osdn.net/projects/mingw/releases/

Download and run mingw-get-setup.exe

In the opening menu, accept all the default options and click Install.

Click Continue after Step 2 completes.

In the MinGW Installation Manager window, right-click and choose "Mark for installation" for these packages:

    mingw-developer-toolkit-bin
    msys-base-bin
    mingw32-gcc-g++-bin
    mingw32-base-bin (automatically marked when you select the first package on this list)

On the top-line Installation menu, click Apply Changes, then the Apply button.

When all the packages have been downloaded and installed, click Close.

Exit the MinGW Installation Manager.

In Explorer, navigate to:
C:\MinGW\msys\1.0\msys.bat

(I recommend creating a desktop shortcut to that batch file.)

Run that batch file.

At the MINGW32 prompt enter these lines:

Code:
mkdir src
start src

An Explorer window will open to the empty src folder. Keep that window open.

2. Download and install SDL2 and macemu-master

Go to this page:
https://www.libsdl.org/download-2.0.php

Under Source Code, download and open the zip file

Copy the directory inside the zip file (currently SDL2-2.0.9) into the src folder.

Leave the Explorer window open.

Close the zip file.

Go to this page:

https://github.com/kanjitalk755/macemu

Click Clone or Download and download the zip file.

Open the zip file and copy the macemu-master into the src folder window.

Close the zip file.

Close the Explorer window.

3. Build and install SDL2

At the MinGW prompt, enter

Code:
cd src/SDL2-2.0.9 (or whatever version you downloaded)
./autogen.sh
./configure --disable-shared
make
make install


4. Build BasiliskII

Still at the MinGW prompt, enter:

Code:
cd ~/src/macemu-master/BasiliskII/src/Windows
NO_CONFIGURE=1 ../Unix/autogen.sh
./configure
make
start .   [that's start, then a space, then a dot]
exit

The MinGW prompt will close, and an Explorer window will open, containing BasiliskII.exe and other files.

Copy into this folder a ROM file, a disk image, and a prefs file with the correct contents.

Run BasiliskII.exe.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Jan 20, 2019 10:00 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1029
Request: Can anyone give up-to-date instructions for building BasiliskIIGUI.exe in MinGW?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jan 22, 2019 6:13 pm 
Offline
Expert User
User avatar

Joined: Fri Feb 13, 2004 8:59 am
Posts: 4585
Location: Sittard, The Netherlands
The GUI hasn't seen any love for a long time. Most of the current instructions, however, still work. You need to install the gtk devel package in Windows, find a file called pixman-1.pc.in. Rename it to pixman-1.pc, edit it so at version there is not a variable string but some number (Version: 0.12.0)

The current content of pixman-1.pc file is below, so you can use that too:
prefix=/target
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
target=win32

Name: Pixman
Description: The pixman library (version 1)
Version: 0.12.0
Cflags: -I${includedir}/pixman-1 @DEP_CFLAGS@
Libs: -L${libdir} -lpixman-1 @DEP_LIBS@


My system variables are:
GTK_BASEPATH=C:\GTK

INCLUDE=C:\GTK\INCLUDE;C:\GTK\INCLUDE\GTK-2.0;C:\GTK\INCLUDE\GLIB-2.0;C:\GTK\INCLUDE\PANGO-1.0;C:\GTK\INCLUDE\CAIRO;C:\GTK\INCLUDE\ATK-1.0;C:\GTK\INCLUDE\GTKGLEXT-1.0;C:\GTK\LIB\GTK-2.0\INCLUDE;C:\GTK\LIB\GLIB-2.0\INCLUDE;C:\GTK\LIB\GTKGLEXT-1.0\INCLUDE;C:\GTK\INCLUDE\LIBGLADE-2.0;C:\GTK\INCLUDE\LIBXML2;C:\GTK\INCLUDE;C:\GTK\INCLUDE\GTK-2.0;C:\GTK\INCLUDE\GLIB-2.0;C:\GTK\INCLUDE\PANGO-1.0;C:\GTK\INCLUDE\CAIRO;C:\GTK\INCLUDE\ATK-1.0;C:\GTK\INCLUDE\GTKGLEXT-1.0;C:\GTK\LIB\GTK-2.0\INCLUDE;C:\GTK\LIB\GLIB-2.0\INCLUDE;C:\GTK\LIB\GTKGLEXT-1.0\INCLUDE;C:\GTK\INCLUDE\LIBGLADE-2.0;C:\GTK\INCLUDE\LIBXML2;

PKG_CONFIG_PATH=C:\GTK\Lib\pkgconfig\

Edit the src/Windows/Makefile:
WANT_GTK=YES
GTK_CFLAGS = -mms-bitfields -IC:/GTK/include/gtk-2.0 -IC:/GTK/lib/gtk-2.0/include -IC:/GTK/include/atk-1.0 -IC:/GTK/include/cairo -IC:/GTK/include/pango-1.0 -IC:/GTK/include/glib-2.0 -IC:/GTK/lib/glib-2.0/include -IC:/GTK/include/freetype2 -IC:/GTK/include
GTK_LIBS = -Wl,-luuid -LC:/GTK/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -limm32 -lshell32 -lole32 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lpangowin32-1.0 -lgdi32 -lfreetype -lz -lfontconfig -lpango-1.0 -lm -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl

(You can find the required GTK flags by issuing thefollowing commands in your mingw32 window:
pkg-config --cflags gtk+-win32-2.0
pkg-config --libs gtk+-win32-2.0

Remove all references to -mno-cygwin in the Makefile (2)

Finally configure and build the code and fail on some (I guess) C variant unicode issues:

prefs_editor_gtk.cpp:678:20: error: cannot convert 'char*' to 'LPCWSTR' {aka 'const wchar_t*'}
if (GetDriveType(rootdir) == DRIVE_CDROM)
^~~~~~~
In file included from d:\mingw\include\windows.h:44,
from sysdeps.h:50,
from prefs_editor_gtk.cpp:21:
d:\mingw\include\winbase.h:1708:39: note: initializing argument 1 of 'UINT GetDriveTypeW(LPCWSTR)'
WINBASEAPI UINT WINAPI GetDriveTypeW (LPCWSTR);
^~~~~~~
prefs_editor_gtk.cpp: In function 'void create_volumes_pane(GtkWidget*)':
prefs_editor_gtk.cpp:768:9: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
str = "";
^~

---many more of these errors---

Best,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Tue Jan 22, 2019 6:35 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1029
Well, that doesn't sound all that encouraging! Until there's a way to avoid fatal errors, I'll get along with my patched version of the old GUI program...


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Fri Mar 29, 2019 12:59 pm 
Offline
Forum All-Star

Joined: Tue Oct 14, 2008 12:12 am
Posts: 1029
Unfortunately, there doesn't seem to be a fix for this issue yet:

viewtopic.php?f=6&t=10023


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 1 of 1 [ 5 posts ]


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
 

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group