Open Axis4s opened 3 months ago
Would be pretty helpful!
That's not how github works.
Happy to be proven wrong though.
That's not how github works.
What do you mean? GitHub supports automatically building through Actions if you have that set up, but there's also no reason that a guide on how to build the SC-55 emu manually shouldn't be posted
That's not how github works.
What do you mean? GitHub supports automatically building through Actions if you have that set up, but there's also no reason that a guide on how to build the SC-55 emu manually shouldn't be posted
This is not the place. But I find github as a whole, not user friendly.
Linus said it best. https://youtu.be/MreyOrYItr4
What is the place for it then, if not the repo you’re trying to build? A lot of projects have build guides and I’d say they fit pretty well in the repo.
I can't into cmake, so here is the windows user baby duck syndrome way!
https://gist.github.com/pachuco/d24929fbaa0f3c54589ba8b990ea2edd
Bug: If application shows window for fraction of a second and then goes black, becomes unc;losable, you have to use earlier SDL2.x version.
What is the place for it then, if not the repo you’re trying to build? A lot of projects have build guides and I’d say they fit pretty well in the repo.
I was referring to my issue with github as a whole.
What pachuco posted above I'm all for and appreciate. Yet I fail to understand it, but I'm sure, if I knew a few basic things it would be a sufficient guide.
That was what my first post was about, github is not about learning how to compile in general. It's assumed you know this.
I assumed knowledge of how to compile software in general was already there, but build guides list specific dependecies for compiling like what pachuco gave, not just a general “how 2 use compile” kinda thing.
Build on Windows with MSYS2 download the latest version and install, Then in Start Menu MSYS2 MinGW 64-bit.
In the window that pops up copy and paste this and press Enter: (This will ask you to restart the program when it is done just press Enter)
pacman -Suy
Then copy and paste this and press enter:
pacman -S make gettext base-devel libtool pkg-config git cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-toolchain mingw-w64-x86_64-gcc-libs
Then again copy and paste the following:
git clone --recursive https://github.com/nukeykt/Nuked-SC55.git
cd Nuked-SC55
mkdir build
cd build
cmake .. -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" -DBUILD_SHARED_LIBS=OFF -DCMAKE_EXE_LINKER_FLAGS="-static" -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles"
cmake --build .
Build on Windows with MSYS2 download the latest version and install, Then in Start Menu MSYS2 MinGW 64-bit.
In the window that pops up copy and paste this and press Enter: (This will ask you to restart the program when it is done just press Enter)
pacman -Suy
Then copy and paste this and press enter:
pacman -S make gettext base-devel libtool pkg-config git mingw-w64-x86_64-cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-toolchain
Then again copy and paste the following:
git clone --recursive https://github.com/nukeykt/Nuked-SC55.git cd ./Nuked-SC55 cmake . -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" cmake --build .
This was helpful. I got it to build and everything. But, 3 dlls were missing sdl2, libgcc_s_seh-1 and libwinpthread-1. Adding these in, the program crash on boot.... wait, I see something odd here. The sc-55.exe I built is 8487kB in size, but the release version is 97kB.
Build on Windows with MSYS2 download the latest version and install, Then in Start Menu MSYS2 MinGW 64-bit. In the window that pops up copy and paste this and press Enter: (This will ask you to restart the program when it is done just press Enter)
pacman -Suy
Then copy and paste this and press enter:pacman -S make gettext base-devel libtool pkg-config git mingw-w64-x86_64-cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-toolchain
Then again copy and paste the following:git clone --recursive https://github.com/nukeykt/Nuked-SC55.git cd ./Nuked-SC55 cmake . -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" cmake --build .
This was helpful. I got it to build and everything. But, 3 dlls were missing sdl2, libgcc_s_seh-1 and libwinpthread-1. Adding these in, the program crash on boot.... wait, I see something odd here. The sc-55.exe I built is 8487kB in size, but the release version is 97kB.
You also seem to forget that this repo is updated here n there, adding new features and bug fixes. Never expect the manually built executable file size to be always the same as the release build
Build on Windows with MSYS2 download the latest version and install, Then in Start Menu MSYS2 MinGW 64-bit. In the window that pops up copy and paste this and press Enter: (This will ask you to restart the program when it is done just press Enter)
pacman -Suy
Then copy and paste this and press enter:pacman -S make gettext base-devel libtool pkg-config git mingw-w64-x86_64-cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-toolchain
Then again copy and paste the following:git clone --recursive https://github.com/nukeykt/Nuked-SC55.git cd ./Nuked-SC55 cmake . -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" cmake --build .
This was helpful. I got it to build and everything. But, 3 dlls were missing sdl2, libgcc_s_seh-1 and libwinpthread-1. Adding these in, the program crash on boot.... wait, I see something odd here. The sc-55.exe I built is 8487kB in size, but the release version is 97kB.
I see, I forgot to add this run this in MSYS2:
pacman -S mingw-w64-x86_64-gcc-libs
I updated the instructions. You still need SDL2.dll but you can get that from the the zip from the 0.1.1 release.
Build on Windows with MSYS2 download the latest version and install, Then in Start Menu MSYS2 MinGW 64-bit. In the window that pops up copy and paste this and press Enter: (This will ask you to restart the program when it is done just press Enter)
pacman -Suy
Then copy and paste this and press enter:pacman -S make gettext base-devel libtool pkg-config git mingw-w64-x86_64-cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-toolchain
Then again copy and paste the following:git clone --recursive https://github.com/nukeykt/Nuked-SC55.git cd ./Nuked-SC55 cmake . -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" cmake --build .
This was helpful. I got it to build and everything. But, 3 dlls were missing sdl2, libgcc_s_seh-1 and libwinpthread-1. Adding these in, the program crash on boot.... wait, I see something odd here. The sc-55.exe I built is 8487kB in size, but the release version is 97kB.
I see, I forgot to add this run this in MSYS2:
pacman -S mingw-w64-x86_64-gcc-libs
I updated the instructions. You still need SDL2.dll but you can get that from the the zip from the 0.1.1 release.
you also seemed to forget about including cmake? the command isn't running
downloaded cmake too, got a another error:
Build on Windows with MSYS2 download the latest version and install, Then in Start Menu MSYS2 MinGW 64-bit. In the window that pops up copy and paste this and press Enter: (This will ask you to restart the program when it is done just press Enter)
pacman -Suy
Then copy and paste this and press enter:pacman -S make gettext base-devel libtool pkg-config git mingw-w64-x86_64-cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-toolchain
Then again copy and paste the following:git clone --recursive https://github.com/nukeykt/Nuked-SC55.git cd ./Nuked-SC55 cmake . -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" cmake --build .
This was helpful. I got it to build and everything. But, 3 dlls were missing sdl2, libgcc_s_seh-1 and libwinpthread-1. Adding these in, the program crash on boot.... wait, I see something odd here. The sc-55.exe I built is 8487kB in size, but the release version is 97kB.
I see, I forgot to add this run this in MSYS2:
pacman -S mingw-w64-x86_64-gcc-libs
I updated the instructions. You still need SDL2.dll but you can get that from the the zip from the 0.1.1 release.you also seemed to forget about including cmake? the command isn't running
You're right it's there but it's the wrong package try this, I'll fix it.
pacman -S cmake
Build on Windows with MSYS2 download the latest version and install, Then in Start Menu MSYS2 MinGW 64-bit. In the window that pops up copy and paste this and press Enter: (This will ask you to restart the program when it is done just press Enter)
pacman -Suy
Then copy and paste this and press enter:pacman -S make gettext base-devel libtool pkg-config git mingw-w64-x86_64-cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-toolchain
Then again copy and paste the following:git clone --recursive https://github.com/nukeykt/Nuked-SC55.git cd ./Nuked-SC55 cmake . -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" cmake --build .
This was helpful. I got it to build and everything. But, 3 dlls were missing sdl2, libgcc_s_seh-1 and libwinpthread-1. Adding these in, the program crash on boot.... wait, I see something odd here. The sc-55.exe I built is 8487kB in size, but the release version is 97kB.
I see, I forgot to add this run this in MSYS2:
pacman -S mingw-w64-x86_64-gcc-libs
I updated the instructions. You still need SDL2.dll but you can get that from the the zip from the 0.1.1 release.you also seemed to forget about including cmake? the command isn't running
You're right it's there but it's the wrong package try this, I'll fix it.
pacman -S cmake
i just updaded my comment, check it again 😅
Are you running MSYS2 MinGW 64-bit or just MSYS2?
Are you running MSYS2 MinGW 64-bit or just MSYS2?
ah i see, i was running MSYS2, i should be running MinGW right?
Are you running MSYS2 MinGW 64-bit or just MSYS2?
ah i see, i was running MSYS2, i should be running MinGW right?
Yes the MinGW 64-bit one.
Are you running MSYS2 MinGW 64-bit or just MSYS2?
ah i see, i was running MSYS2, i should be running MinGW right?
Yes the MinGW 64-bit one.
so got it built, still getting issues, i followed all of the steps you laid out
Okay try this make sure you are in the Nuked-SC55 directory then try running this:
git clean -d -f
cmake . -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles"
cmake --build .
Okay try this make sure you are in the Nuked-SC55 directory then try running this:
git clean -d -f cmake . -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" cmake --build .
did it, looks like this
Does it run?
I don't have this issue because MSYS2 is set in my path. To tell the truth I'm still learning how to use all of this myself.
Does it run?
even after putting the stuff in, nope hm, lemme check if msys2 is in my PATH
Does it run?
I don't have this issue because MSYS2 is set in my path. To tell the truth I'm still learning how to use all of this myself.
yep, even when adding msys2 to my PATH, it still wont work, damn compiling on windows is so complicated
i used linux few times here n there, its wayy less complicated it feels like it was built to compile stuff
Here try this build: test.zip
Okay I edited the CMakeLists.txt file and added these lines after the line that says "set(CMAKE_CXX_STANDARD 11)":
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") set(BUILD_SHARED_LIBS OFF) set(CMAKE_EXE_LINKER_FLAGS "-static")
You can do this in the MSYS2 command line instead, I updated the build instruction in case of an update.
Okay I edited the CMakeLists.txt file and added these lines after the line that says "set(CMAKE_CXX_STANDARD 11)":
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") set(BUILD_SHARED_LIBS OFF) set(CMAKE_EXE_LINKER_FLAGS "-static")
You can do this in the MSYS2 command line instead, I updated the build instruction in case of an update.
It worked!
Build on Windows with MSYS2 download the latest version and install, Then in Start Menu MSYS2 MinGW 64-bit.
In the window that pops up copy and paste this and press Enter: (This will ask you to restart the program when it is done just press Enter)
pacman -Suy
Then copy and paste this and press enter:
pacman -S make gettext base-devel libtool pkg-config git cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-toolchain mingw-w64-x86_64-gcc-libs
Then again copy and paste the following:
git clone --recursive https://github.com/nukeykt/Nuked-SC55.git cd Nuked-SC55 mkdir build cd build cmake .. -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" -DBUILD_SHARED_LIBS=OFF -DCMAKE_EXE_LINKER_FLAGS="-static" -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" cmake --build .
It says "Enter a selection". What should I choose?
Here try this build: test.zip
By the way, I've found the bug: sometimes in E1M1 guitars bug out and get sustained.
Everyone, you copied those instructions quoted from a post of mine and they are incomplete, as is pointed out: you need to build 32-bit.
64-bit release builds have a hanging note bug. 64-bit debug builds have a stutter bug.
32-bit release works as intended.
right now, I'm using a file called nukedbuild-release32.sh
, placed in the MSYS2 home-directory (~
) with following content:
#/bin/sh
rm -rf ./Nuked-SC55.old
mkdir ./Nuked-SC55.old
mv ./Nuked-SC55 ./Nuked-SC55.old/Nuked-SC55
git clone --recursive https://github.com/nukeykt/Nuked-SC55.git
cd Nuked-SC55
cmake . -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -G "MinGW Makefiles"
mingw32-make
mkdir ./release
cp ./nuked-sc55.exe ./release/sc55emu.exe
cp ./back.data ./release/back.data
cp ./README.md ./release/README.md
cp /mingw32/bin/libgcc_s_dw2-1.dll ./release/libgcc_s_dw2-1.dll
cp /mingw32/bin/libstdc++-6.dll ./release/libstdc++-6.dll
cp /mingw32/bin/SDL2.dll ./release/SDL2.dll
start release
cd ..
To use it, open MSYS2 MinGW32
first update with
pacman -Syu
pacman -Syu
(run this command until it has nothing to update anymore)
Then get everything required to build with (use "copy"-button, it's a long line):
pacman -S base-devel libtool pkg-config make gettext gcc git cmake ninja mingw-w64-x86_64-ninja mingw-w64-i686-ninja mingw-w64-i686-gcc mingw-w64-x86_64-gcc mingw-w64-i686-cmake mingw-w64-x86_64-cmake mingw-w64-i686-pkg-config mingw-w64-x86_64-pkg-config mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_mixer mingw-w64-i686-SDL2_image mingw-w64-i686-SDL2_ttf mingw-w64-i686-SDL2_net mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_mixer mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-SDL2_ttf mingw-w64-x86_64-SDL2_net
Note: you are asked twice to make a selection - just press "Return"/"Enter" to select all
and run the script:
sh ./nukedbuild-release32.sh
=> release-folder opens in explorer
Almost. the dll files gets copied, but no exe is made.
Almost. the dll files gets copied, but no exe is made.
you are missing gcc, so it can't really. if you installed the dependencies, you should have it. I make a new VM and see if I can reproduce this behavior
Almost. the dll files gets copied, but no exe is made.
you are missing gcc, so it can't really. if you installed the dependencies, you should have it. I make a new VM and see if I can reproduce this behavior
ran part of the required code again. as you can see, It re install gcc, did not help though.
ran part of the required code again. as you can see, It re install gcc, did not help though.
BTW did you copy the full line of dependencies?
pacman -S base-devel libtool pkg-config make gettext gcc git cmake mingw-w64-i686-gcc mingw-w64-x86_64-gcc mingw-w64-i686-cmake mingw-w64-x86_64-cmake mingw-w64-i686-pkg-config mingw-w64-x86_64-pkg-config mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_mixer mingw-w64-i686-SDL2_image mingw-w64-i686-SDL2_ttf mingw-w64-i686-SDL2_net mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_mixer mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-SDL2_ttf mingw-w64-x86_64-SDL2_net
if that still doesn't work you can try adding
pacman -S ninja mingw-w64-x86_64-ninja mingw-w64-i686-ninja
(I just now added them in the requirements as a precaution)
With Visual Studio 2022, the emulator compiles without errors (with some warnings) by adding /ENTRY:WinMainCRTStartup
to the linker flags of "nuked-sc55".
@nukeykt Hi, will there be build instructions for macOS and/or will there be macOS binaries made available in the future?
will there be build instructions for macOS and/or will there be macOS binaries made available in the future?
First, clone repo with submodules - eg.:
$ git clone --recurse-submodules https://github.com/nukeykt/Nuked-SC55.git
Then, you can either use cmake to build the app directly:
$ cd Nuked-SC55
$ mkdir build && cd build
$ cmake ..
$ cmake --build .
$ ./nuked-sc55
...however, it looks like proper optimizations aren't put in place,
it doesn't seem to matter if I pass the -DCMAKE_BUILD_TYPE=release
flag.
I suspect the script isn't properly set up for macOS, though I'm a total cmake noob.
A better solution (for me at least) is having cmake create an Xcode project:
$ cd Nuked-SC55
$ cmake -G Xcode .
Then, open that Xcode project and run it.
Preferably with the Run Build Configuration set to Release (Product->Scheme->Edit Scheme).
For the Xcode way, make sure to copy the data/back.data
file to the same directory as the executable.
For both ways, also copy the necessary rom files to the same directory as well.
For what it is worth, For Linux x64 the included cmake build-configuration produces a small executable (130 kB). Seems OK. In line with the official Windows x64 release binary.
The Native MinGW32 cmake builds are somehow around 9MB, most of it being a big zero-filled "Data" section in the executable. Weird. The Cross-Compile MinGW32 cmake builds (on Linux for windows) refuses to set the "console application" bit. So they don't work unless I hex edit them. Same large size.
Thus, For MinGW32 I dropped the whole cmake setup, and instead made a Code::Blocks project manually. Now I get a 815kB executable. Plus I can easily toggle compiler+linker options. Downside is, that it is not cross-platform.
First, clone repo with submodules - eg.:
$ git clone --recurse-submodules https://github.com/nukeykt/Nuked-SC55.git
$ cd Nuked-SC55 $ cmake -G Xcode .
Hi, i installed git, cmake and SDL through homebrew and Xcode 15.3 and cloned the repo. I'm getting the following cmake error:
alex@Minivonlexander Nuked-SC55 % ls 3rdparty LICENSE cmake mcu1.png pcm_tracing.jpg CMakeLists.txt README.md data mcu2.png src alex@Minivonlexander Nuked-SC55 % cmake -G Xcode . -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:2 (project): No CMAKE_CXX_COMPILER could be found.
-- Configuring incomplete, errors occurred!
@Burrito78 Have you opened Xcode? You might need to accept an agreement, and then wait for it to install its command line tools and stuff. Alternatively, try one or more of these:
$ xcode-select --install
$ xcodebuild -license
$ xcodebuild runFirstLaunch
@eivindbohler Yes, i've opened Xcode once and accepted the agreement and set it up for macOS app builds.
Here is the ouput of the commands you suggested:
alex@Mac-mini-von-Alexander Nuked-SC55 % xcode-select --install
xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates
alex@Mac-mini-von-Alexander Nuked-SC55 % xcodebuild -license
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
alex@Mac-mini-von-Alexander Nuked-SC55 % xcodebuild runFirstLaunch
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
@Burrito78 seems like the currently active developer directory isn't pointing to Xcode then. Try this:
$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
@eivindbohler OK, that did the trick, cmake is happy now.
alex@Mac-mini-von-Alexander Nuked-SC55 % cmake -G Xcode .
-- The CXX compiler identification is AppleClang 15.0.0.15000309
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /opt/homebrew/bin/pkg-config (found version "0.29.2")
-- Looking for fstatat
-- Looking for fstatat - found
-- Configuring done (9.0s)
-- Generating done (0.7s)
-- Build files have been written to: /Users/alex/Downloads/Nuked-SC55
When i do a Product -> Build i get the message "Build Succeded" but i can't find any binary.
@Burrito78 you need to select the proper scheme first. Product -> Scheme -> nuked-sc55. Then, Product -> Scheme -> Edit Scheme. Select "Run" from the left-side menu and make sure "Build Configuration" is set to "Release". Now you can run the app directly or just build it. It'll be in the Release/ folder where the project file is located (or Debug/ should you choose that, obviously).
@000MDK Please add the following to the Xcode instructions:
brew install pkg-config
Point the currently active developer directory to Xcode
$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Select the proper scheme: Product -> Scheme -> nuked-sc55
Then, Product -> Scheme -> Edit Scheme. Select "Run" from the left-side menu and make sure "Build Configuration" is set to "Release".
@eivindbohler Sorry to bug you once more, the build went through smoothly on my Mac mini but failed on my Macbook. This is the error i'm getting:
Any ideas? Maybe the mini had a dependency installed already that isn't listed in the guide yet?
alex@MacBook-Air-von-Alexander ~ % brew list
==> Formulae
boost git libassuan pcre2 xz
cmake icu4c libgpg-error pinentry-mac zstd
gettext innoextract lz4 sdl2
@eivindbohler OK, from my above cmake -G Xcode .
log I noticed that I was missing pkg-config
!
After another brew install pkg-config
the build succeeded also on this machine.
added linux build here:
Would be pretty helpful!