Page 1 of 2

Getting SMBX to work under Linux with Wine

Posted: Tue Jun 24, 2014 2:55 am
by Namyrr
So I found this while browsing the old forums under the WayBackMachine. Dunno if it's helpful at all, but I thought I'd repost it here. Credits to Wario from the original forums.

SMBX is only availible for Windows. And since it is written in Visual Basic 8, there is little hope that there will ever be a Linux or Mac OS X port. But it works with Wine. Yes, really. Even the sound does (sometimes). People tend to ask about running SMBX with Wine, so I thought I share with you how it's done. Just don't blame me if this guide doesn't work for you.

For those of you that hate reading, here is the short and ugly version:

Download SMBX (obviously) and unzip it.
Install wine and winetricks.
Run 'winetricks quartz vb6run'.
Run 'WINEDEBUG=-all wine smbx.exe &'
Enjoy
Keep in mind these steps should be performed one after the other. There's no point in moving onto the next step if the previous step fails for some reason, as you won't be able to run SMBX.

-------------------------------------------------------

Turbo Mode:

Thanks to matthewbauer, it is now super easy to install SMBX under Linux. It just takes the two following steps:

Get PlayOnLinux
Download and Run this script

And that's it. Now you can run SMBX from your menu. If not, run 'wine smbx' from the terminal.

-------------------------------------------------------

Long, detailed and boring version:

Step 1: What You Need!

You will need a running Linux system, of course. Since Ubuntu is by far the most common Linux distribution (on desktops), I'm just gonna assume you have a recent version of it installed.
Some basic knowledge about the terminal. This is important. If you don't know what I'm talking about, take a look at the Ubuntu documentation about using the terminal.

Step 2: Installation

To make things easier, lets create a directory in your $HOME where we will install SMBX. You can do this with nautilus, or from the console:
CODE: SELECT ALL
mkdir smbx

And change into it:
CODE: SELECT ALL
cd smbx/


Download the current version of SMBX here and save the file in the directory you just created.

If not installed, install unzip:
CODE: SELECT ALL
sudo apt-get install unzip

Don't worry. If unzip already was installed, this won't do any harm.

Extract the .zip file:
CODE: SELECT ALL
unzip smbx12.zip


Now, run:
CODE: SELECT ALL
sudo apt-get install wine

This will install Wine on your system. We will need the shell script "winetricks", wich Ubuntu already included in the just installed "wine" package. Winetricks is a shell script that downloads missing DLLs and fonts for you from the best known source. If you (for some reason) want to use the current version of Wine, read this and this for the latest version of winetricks.

In the next step, we'll use winetricks to download and install quartz.dll and the Visual Basic Runtime. But first, let's make sure you have cabextract installed, as winetricks will need this.
CODE: SELECT ALL
sudo apt-get install cabextract

Then run:
CODE: SELECT ALL
winetricks quartz vb6run

If you see something like: "winetricks done.", you're golden.

Step 3: Run SMBX

A simple
CODE: SELECT ALL
wine smbx.exe

should do it.

Be patient. SMBX takes a while to load, especially with Wine.

As SMBX runs, you should see a lot of output on the terminal you have started it from. Stuff like this:
CODE: SELECT ALL
fixme:ole:OleLoadPictureEx (0xf8cfe4,886,1,{00020400-0000-0000-c000-000000000046},x=0,y=0,f=0,0x33f70c), partially implemented.
fixme:ole:OleLoadPictureEx (0xf8cfd4,1125,1,{00020400-0000-0000-c000-000000000046},x=0,y=0,f=0,0x33f70c), partially implemented.
fixme:ole:OleLoadPictureEx (0xf8cfe4,886,1,{00020400-0000-0000-c000-000000000046},x=0,y=0,f=0,0x33f70c), partially implemented.
fixme:ole:OleLoadPictureEx (0xf8cfd4,1125,1,{00020400-0000-0000-c000-000000000046},x=0,y=0,f=0,0x33f70c), partially implemented.
...


These fixme: lines are debug messages, kind of reminders for the Wine developers. We don't need them, so we're gonna deactivate them. Simply prefix "WINEDEBUG=-all". The resulting command should look like this:
CODE: SELECT ALL
WINEDEBUG=-all wine smbx.exe

This should improve performance a little bit.

And that's it. Enjoy!

To do: Write section about sound. I'm sure it's just my configuration / my system.

Changelog:
6/4/2010:
- Replaced downloading msvbvm60.dll manually with 'winetricks vb6run' as matthewbauer pointed it out to me.
- Added a "Turbo Mode" section for the PlayOnLinux way.
- Removed some typos and added some colors.


So, what else does work?

The editor runs, but I haven't tested anything yet.
One-player and two-player modes run perfectly fine. No glitches here.
Sound works, even if a little buggy. Sometimes the music won't play. Need to investigate.

Conclusion

I didn't think I would try running SMBX with Wine again, after my failed attempts last year. In fact, I almost had forgotten about SMBX until joystiq blogged about the version 1.2 trailer (hence the traffic here in the last 2 days). But here I am, writing this insanely long guide. Redigit, your work is awesome. Let's all hope Nintendo won't sue us to death.

Also: To be honest, I don't actually use Ubuntu, but another Linux distribution named "Arch Linux". The software is the same, so i guess this won't make any difference. It would be great if those of you running Ubuntu would try running SMBX with this guide and tell me if it worked.

I will try to keep this post up to date, but I can't promise it.

If you encounter any problems, or have questions or suggestions, please post them in this thread.

Re: Getting SMBX to work under Linux with Wine

Posted: Wed Jun 25, 2014 12:49 pm
by HenryRichard
Yay! You found it! Now I can install it on my linux! Thanks a lot!

Re: Getting SMBX to work under Linux with Wine

Posted: Wed Jun 25, 2014 5:13 pm
by Raster
Winetricks returned an error in the terminal and the script in the second guide is probably lost forever. I recommend installing Windows on a virtual disk instead of using WINE, since results can be pretty disappointing.

Re: Getting SMBX to work under Linux with Wine

Posted: Thu Jun 26, 2014 1:43 am
by Namyrr
Topic stickied because I guess the topic isn't as dusty and outdated as I thought.

Re: Getting SMBX to work under Linux with Wine

Posted: Thu Jun 26, 2014 5:52 am
by Raster
And since it is written in Visual Basic 8...
SMBX was written in Visual Basic 6.

Re: Getting SMBX to work under Linux with Wine

Posted: Wed Jul 02, 2014 7:47 am
by SuperWingedYoshi
Ahhhhh, this is THE tutorial I needed. I've already tried earlier on to make SMBX work on Linux, but failed for some reason. The missing Visual Basic and quartz.dll are probably the reason why. Gotta try the things in the first post out. Thanks a lot!

Re: Getting SMBX to work under Linux with Wine

Posted: Mon Jul 07, 2014 8:48 am
by Axiom
SMBX was written in Visual Basic 6.
Second of all, I tried the SMBX PlayOnLinux script a while back on a fairly recent version of Ubuntu and it didn't work. This guide is kinda eh now that Wohl's editor is around anyway.
Good find though

Re: Getting SMBX to work under Linux with Wine

Posted: Wed Jul 09, 2014 10:47 am
by Raster
Yeah, sorry but it's not going to work that way. SMBX is incompatible with WINE and the only way to play it on Linux is to install a Windows VM (I've had problems with XP, but I managed to get it working). To set up a Windows Virtual Machine simply get VirtualBox from Oracle's website and create a new Virtual Machine, then install Windows on it. You might not be able to install recent versions of Windows on a VM in case your CPU is old, however, as the new versions require additional things for virtualization.

Re: Getting SMBX to work under Linux with Wine

Posted: Sat Jul 12, 2014 8:57 pm
by Blck_Guy
SMBX was made with Visual Basic 6 not 8....Now only if we could have the Source Code fro Andrew we could.....

Re: Getting SMBX to work under Linux with Wine

Posted: Mon Jul 14, 2014 2:51 pm
by Axiom
Raster wrote:Winetricks returned an error in the terminal and the script in the second guide is probably lost forever. I recommend installing Windows on a virtual disk instead of using WINE, since results can be pretty disappointing.
The script isn't lost forever, a bit of googling turned it up so I forked and updated to use the newest version. Going to test it now
https://raw.githubusercontent.com/Luigi ... r/smbx.pol

If it works, I'll submit to PlayOnLinux I guess.

Re: Getting SMBX to work under Linux with Wine

Posted: Mon Jul 14, 2014 4:34 pm
by Axiom
Double post, but it's for a good cause
I spent most of the afternoon getting this to work with PlayOnLinux and I fully intend to submit this to them later on.

The script: https://raw.githubusercontent.com/Luigi ... r/smbx.pol

And now, the following.
  • Install PlayOnLinux via your package manager. or just "sudo apt-get install playonlinux" should be the package name.
  • Download the script and save it anywhere
  • Start up PlayOnLinux and let it do its thing
  • Click Tools>Run A Local Script
  • Select the smbx.pol (smbx.pol.txt will work fine too) script for it to run and agree to let it run
  • Afterwards, launch via the shortcut provided. Preferrably run it in debug mode and send the logs to me so I can help debug them.
What works
Game loads and I was able to play a couple levels
Level editor loads
I could load a level in the editor
Fullscreen (kinda, use maximize button not in game fullscreen)

What doesn't work
Music, as of right now it only plays when you're off screen which is kind of useless and probably just something I'm missing in wine
Sound is kind of buggy
Sometimes levels take FOREVER to load

What I haven't tested
Gamepad
Online (but I assume this will never work)
LunaDLL (don't expect this to work either)

Screenshots: (i don't feel like individually doing each one so just look at the imgur link) http://imgur.com/a/JX9xA#0
Tested under Linux Mint 17. This is extremely buggy and I will keep trying with other versions of WINE to see which one works best with this.

Re: Getting SMBX to work under Linux with Wine

Posted: Sat Jan 03, 2015 11:14 am
by Wohlstand
Luigifan2010 wrote:Double post, but it's for a good cause
I spent most of the afternoon getting this to work with PlayOnLinux and I fully intend to submit this to them later on.

The script: https://raw.githubusercontent.com/Luigi ... r/smbx.pol

And now, the following.
  • Install PlayOnLinux via your package manager. or just "sudo apt-get install playonlinux" should be the package name.
  • Download the script and save it anywhere
  • Start up PlayOnLinux and let it do its thing
  • Click Tools>Run A Local Script
  • Select the smbx.pol (smbx.pol.txt will work fine too) script for it to run and agree to let it run
  • Afterwards, launch via the shortcut provided. Preferrably run it in debug mode and send the logs to me so I can help debug them.
What works
Game loads and I was able to play a couple levels
Level editor loads
I could load a level in the editor
Fullscreen (kinda, use maximize button not in game fullscreen)

What doesn't work
Music, as of right now it only plays when you're off screen which is kind of useless and probably just something I'm missing in wine
Sound is kind of buggy
Sometimes levels take FOREVER to load

What I haven't tested
Gamepad
Online (but I assume this will never work)
LunaDLL (don't expect this to work either)

Screenshots: (i don't feel like individually doing each one so just look at the imgur link) http://imgur.com/a/JX9xA#0
Tested under Linux Mint 17. This is extremely buggy and I will keep trying with other versions of WINE to see which one works best with this.
Try to apply this LunaDLL build which replacing MCI audio engine with SDL2_mixer http://www.smbxgame.com/forums/v ... =69&t=7427 and run SMBX again. SDL2_mixer should play MP3's anyway because it have INTERNAL decoder and doesn't using external codecs (which you usually haven't under Wine).

Re: Getting SMBX to work under Linux with Wine

Posted: Fri Mar 06, 2015 2:31 pm
by Wohlstand
My little test of working SMBX on the Linux Mint

Re: Getting SMBX to work under Linux with Wine

Posted: Tue Mar 31, 2015 3:47 pm
by Daltonk7
I was having a similar sound issue whilst running SMBX on mac using wine. I managed to fix it using the DirectPlay and DirectMusic winetricks (With vb6 too, but I assume you're already using that one). I am however having a common crash that says "Invalid Picture". If you know anything I can do to fix that I would greatly appreciate it.

Re: Getting SMBX to work under Linux with Wine

Posted: Wed Jul 08, 2015 5:45 am
by HeroLinik
Just a question: do these steps also apply when you're trying to get SMBX on the Mac? Because my cousin (the one who made Thisisnotmylevel.lvl a year ago) owns a Mac and can't get SMBX to run on it.

Re: Getting SMBX to work under Linux with Wine

Posted: Wed Jul 08, 2015 9:05 am
by Axiom
I'm not 100% sure about my pol script. I don't have a Mac to test on, all I have is a virtual machine with non-existent QE drivers (aka no OpenGL for video). But what I can say is that PlayOnMac is available. Maybe I'll do some research into getting the game to run on there?

EDIT: I just found this snippet regarding PlayOnMac
Your script will also be available under GNU/Linux using PlayOnLinux

It may be useful to clarify (for those who would not know) that PlayOnLinux and PlayOnMac are really the same software, sharing the same code. Only the name changes depending on the operating system.
When you submit a script, it will be automatically available to PlayOnLinux, since if your script works with Mac OS X, it will also work under GNU/Linux (the reverse is not always true).
While the reverse (Linux scripts -> Mac) may not always be true, I'd say it's still worth a shot. If that doesn't work then I will look into rewiring my script for OS X :) (but be warned, as I run an AMD computer the highest OS X version I can get is 10.8.3)

Re: Getting SMBX to work under Linux with Wine

Posted: Wed Jul 08, 2015 9:58 am
by Wohlstand
Luigifan2010 wrote:I'm not 100% sure about my pol script. I don't have a Mac to test on, all I have is a virtual machine with non-existent QE drivers (aka no OpenGL for video). But what I can say is that PlayOnMac is available. Maybe I'll do some research into getting the game to run on there?

EDIT: I just found this snippet regarding PlayOnMac
Your script will also be available under GNU/Linux using PlayOnLinux

It may be useful to clarify (for those who would not know) that PlayOnLinux and PlayOnMac are really the same software, sharing the same code. Only the name changes depending on the operating system.
When you submit a script, it will be automatically available to PlayOnLinux, since if your script works with Mac OS X, it will also work under GNU/Linux (the reverse is not always true).
While the reverse (Linux scripts -> Mac) may not always be true, I'd say it's still worth a shot. If that doesn't work then I will look into rewiring my script for OS X :) (but be warned, as I run an AMD computer the highest OS X version I can get is 10.8.3)
Are you tries clear SMBX or LunaLua based? LunaLua based version will work fine under wine but vanilla usually freezes

Re: Getting SMBX to work under Linux with Wine

Posted: Wed Jul 08, 2015 11:06 am
by Axiom
I just tried running your LunaLua version under Mint 17.1 with Wine 1.6.2 (just ran it through my POL script) and I got a crash on startup. I submitted it as your dialogue suggested.

Re: Getting SMBX to work under Linux with Wine

Posted: Wed Jul 08, 2015 11:10 am
by Wohlstand
Are you placed MSVC2013 libs?

Re: Getting SMBX to work under Linux with Wine

Posted: Wed Jul 08, 2015 1:07 pm
by Axiom
Wohlstand wrote:Are you placed MSVC2013 libs?
i grabbed the complete package and threw it in, do i need to manually place those libs in or is there a .msi i can install?