HackerPoet / FractalSoundExplorer

Explore fractals in an audio-visual sandbox
MIT License
1.13k stars 132 forks source link

How to build this? #10

Open alextd opened 3 years ago

alextd commented 3 years ago

So, I cracked this open in Visual Studio and of course it doesn't just compile. What are the extra steps to get it to run?

I did manage, but it took some sleuthing to figure out. Should that have been easier? Anyway, here's what I needed to do:

1) I had to get SFML, and the correct version, which I figured out by checking the project properties, I got the 64-bit Visual C++ 14 (2015) from https://www.sfml-dev.org/download/sfml/2.5.1/. And of course I had to build for 64-bit.

-> I guess the actionable item here is to delete the x86 targets since they won't work in this project.

2) I had to change the Runtime library setting to DLL. I found that fix from https://stackoverflow.com/questions/14714877/mismatch-detected-for-runtimelibrary. It seems this project was specifically set up not to use that setting though. That seems to assume a different SFML version?

And a side note, when I open this up in Visual Studio 2019, it asks to update versions of things. If I don't, it asks me every time I open it. So I did, and it still works fine.

HackerPoet commented 3 years ago

I specifically had mine set up to compile with MT and all static libraries so that my executables don't need additional installers or runtimes. SFML did not have precompiled versions with MT so I compiled a custom SFML build from source.

You don't have to do that though, I would just get the most up-to-date SFML and Visual Studio and change the runtime library to MD.

Auios commented 3 years ago

I dont really understand what you just said. Would you be willing to write up a little build guide? Or maybe update this repo to be build ready?

Especially those of us who are unfamiliar with SFML. https://www.sfml-dev.org/download.php This page here shows its only supporting up to VS 2017. For those of us who use 2019, are we supposed to downgrade just to build this? Do we use GCC instead?

For the record, I did try SFML 2017 myself on 2019. I followed this guide here: https://www.sfml-dev.org/tutorials/2.5/start-vc.php

Step by step. I set my lib directory, my include directory, and I set the PreProcessors definitions to include "SFML_STATIC" just like that guide showed. It didn't work. I don't use SFML. I dont know why it's not working.

HackerPoet commented 3 years ago

The purpose of the program was to make the video (and for me to have fun with). This is not meant to be well-maintained cross-platform fully-working codebase. I don't have time to spend polishing up source code and making things work on every platform, it's too time consuming because I have a lot of other projects to work on. I just do whatever is fastest in my specific workflow, even if it's a little hacky or inconvenient for other platforms. But that's the beauty of open source; You or someone else can fork the repository and make those changes that I don't have time for. And in fact people already have for this repo: https://github.com/HackerPoet/FractalSoundExplorer/network

splatpope commented 3 years ago

On my own fork, I'm working on porting this to cmake (already done), heavily refactoring the code which is a mess (nearly done), and using libGamma for sound, which I believe will be a way more interesting way to generate meaningful sound (and even music)

Funnily, I'll probably have trouble making my code compile on windows <:)