mirror
Go to file
2024-11-23 19:58:24 +01:00
.github/workflows Install required i386 deps on runner 2024-11-22 19:09:55 +00:00
crash_printer more utf-8 with std::filesystem 2024-06-30 03:18:39 +03:00
dev.notes note on how to add orphan branches as submodules 2024-08-18 04:49:19 +03:00
dll added more debug for http 2024-11-21 20:09:55 +01:00
game_overlay_renderer_lib * new stub dll GameOverlayRenderer for the experiemntal steamclient setup 2024-03-21 00:50:58 +02:00
helpers Merge pull request #7 from otavepto/patch-game-stats-csv 2024-08-18 20:53:05 +02:00
libs re-written sources.txt and fix anchor tag markdown 2024-08-19 00:59:47 +02:00
networking_sockets_lib networkingsocketslib: use new logger 2024-06-30 03:18:39 +03:00
overlay_experimental Update steam_overlay.cpp 2024-11-17 23:17:02 +01:00
post_build * deprecate lazy_load_achievements_icons in favor of paginated_achievements_icons 2024-08-21 23:56:52 +03:00
resources more utf-8 with std::filesystem 2024-06-30 03:18:39 +03:00
sdk Update to latest overlay build 2024-11-17 18:33:21 +01:00
steamclient fix msbuild warnings 2024-08-24 19:57:23 +02:00
third-party update build win too 2024-11-17 21:44:59 +01:00
tools access duplicated keys in VDF correctly 2024-11-23 19:58:24 +01:00
z_original_repo_files for generate_emu_config: new options -de and -cve to generate some disable_xxx files, or enable some convenient features 2024-04-01 19:23:55 +02:00
.editorconfig added .editorconfig for compatible IDEs 2024-08-25 11:31:51 +02:00
.gitignore updated .gitignore 2024-08-25 11:30:57 +02:00
.gitmodules removed first line of .gitmodules 2024-08-25 11:30:38 +02:00
build_linux_premake.sh * ColdClientLoader for Windows: don't fail and close the loader if patching the registery key HKLM failed, this key exists only if Steam was installed 2024-07-28 20:36:09 +03:00
build_win_premake_deps.bat improved build_win_premake.bat and package_win.bat 2024-08-18 11:08:23 +02:00
build_win_premake.bat improved build_win_premake.bat, package_win.bat, rebuild_win.bat and recreate_venv_win.bat and and fixed a sign_helper error that didn't find the input file 2024-08-25 11:30:19 +02:00
CHANGELOG.md Fixing Steam Datagram Error. 2024-07-25 15:14:09 +02:00
CREDITS.md updated sdk readme and added source to CREDITS.md 2024-08-25 09:55:37 +02:00
generate_credits.bat removed /s option from del command in .bat files 2024-08-25 11:37:01 +02:00
LICENSE Add license file. 2019-04-13 14:09:03 -04:00
package_linux.sh update changelog/date + copy credits.md too 2024-06-17 11:09:08 +03:00
package_win_debug.bat improved build_win_premake.bat and package_win.bat 2024-08-18 11:08:23 +02:00
package_win_release.bat improved build_win_premake.bat and package_win.bat 2024-08-18 11:08:23 +02:00
package_win.bat removed /s option from del command in .bat files 2024-08-25 11:37:01 +02:00
premake5-deps.lua Fix building on Linux 2024-11-22 15:43:48 +00:00
premake5.lua Link linux experimental with X11 2024-11-22 17:33:09 +00:00
README.md update readme and common deps 2024-11-17 21:42:38 +01:00

🔶 This is a fork

Fork of https://gitlab.com/Mr_Goldberg/goldberg_emulator

Fork originally make by wizark952.

This is a latest version of his work.

Feel free to make a PR.


🔴

This fork is not a takeover, not a resurrection of the original project, and not a replacement.
This is just a fork, don't take it seriously.
You are highly encouraged to fork/clone it and do whatever you want with it.

🔴


Compatibility

This fork is incompatible with the original repo, lots of things has changed and might be even broken.
If something doesn't work, feel free to create a pull request with the appropriate fix, otherwise ignore this fork and use the original emu.


Credits

Thanks to everyone contributing to this project in any way possible, we try to keep the CHANGELOG.md updated with all the changes and their authors.

This project depends on many third-party libraries and tools, credits to them for their amazing work, you can find their listing here in CREDITS.md.


How to use the emu

  • Always generate the interfaces file using the generate_interfaces tool.
  • Generate the proper app configuration using the generate_emu_config tool.
  • If things don't work, try the ColdClientLoader setup.

You can find helper guides, scripts, and tools here:

(These guides, scripts, and tools are maintained by their authors.)

You can also find instructions here in README.release.md




Compiling

One time setup

Cloning the repo

Disable automatic CRLF handling:
Locally

git config --local core.autocrlf false

Or globally/system wide

git config --system core.autocrlf false
git config --global core.autocrlf false

Clone the repo and its submodules recursively

git clone --recurse-submodules -j8 https://github.com/Detanup01/gbe_fork.git

The switch -j8 is optional, it allows Git to fetch up to 8 submodules

It is adviseable to always checkout submodules every now and then, to make sure they're up to date

git submodule update --init --recursive --remote

For Windows:

  • You need Windows 10 or 8.1 + WDK

  • Using Visual Studio, install Visual Studio 2022 Community: https://visualstudio.microsoft.com/vs/community/

    • Select the Workload Desktop development with C++
    • In the Individual componenets scroll to the buttom and select the latest version of Windows XX SDK (XX.X...)
      For example Windows 11 SDK (10.0.22621.0)
  • Using MSYS2 this is currently experimental and will not work due to ABI differences: https://www.msys2.org/

    steps
    • To build 64-bit binaries use either the environment UCRT64 or MINGW64 then install the GCC toolchain
      UCRT64
      pacman -S mingw-w64-ucrt-x86_64-gcc
      
      MINGW64
      pacman -S mingw-w64-i686-gcc
      
    • To build 32-bit binaries use the environment MINGW32 then install the GCC toolchain
      pacman -S mingw-w64-i686-gcc
      
  • Python 3.10 or above: https://www.python.org/downloads/windows/
    After installation, make sure it works

    python --version
    
  • (Optional) Install a GUI for Git like GitHub Desktop, or Sourcetree

For Linux:

  • Ubuntu 20.04 LTS: https://ubuntu.com/download/desktop
  • Ubuntu required packages:
    sudo apt update -y
    sudo apt install -y coreutils # echo, printf, etc...
    sudo apt install -y build-essential
    sudo apt install -y gcc-multilib # needed for 32-bit builds
    sudo apt install -y g++-multilib
    sudo apt install -y libglx-dev # needed for overlay build (header files   such as GL/glx.h)
    sudo apt install -y libgl-dev # needed for overlay build (header files   such as GL/gl.h)
    
    (Optional) Additional packages
    sudo apt install -y clang # clang compiler
    sudo apt install -y binutils # contains the tool 'readelf' mainly, and   other usefull binary stuff
    
  • Python 3.10 or above
    sudo apt update -y
    sudo apt install -y software-properties-common
    sudo add-apt-repository ppa:deadsnakes/ppa -y
    sudo apt update -y
    sudo apt install -y "python3.12"
    sudo apt install -y "python3.12-dev"
    sudo apt install -y "python3.12-venv"
    sudo apt install -y python3-dev
    
    # make sure it works
    python3.12 --version
    

Building dependencies

These are third party libraries needed to build the emu later, they are linked with the emu during its build process.
You don't need to build these dependencies every time, they rarely get updated.
The only times you'll need to rebuild them is either when their separete build folder was accedentally deleted, or when the dependencies were updated.


On Windows:

Open CMD in the repo folder, then run the following

  • To build using Visual Studio

    set "CMAKE_GENERATOR=Visual Studio 17 2022"
    third-party\common\win\premake\premake5.exe --file=premake5-deps.lua --64-build --32-build   --all-ext --all-build --verbose --os=windows vs2022
    
  • To build using MSYS2 this is currently experimental and will not work due to ABI differences

    steps

    (Optional) In both cases below, you can use Clang compiler instead of GCC by running these 2 commands in the same terminal instance

    export CC="clang"
    export CXX="clang++"
    
    • To build 64-bit binaries (UCRT64 or MINGW64)
    export CMAKE_GENERATOR="MSYS Makefiles"
    ./third-party/common/win/premake/premake5.exe --file=premake5-deps.lua --64-build --all-ext --all-build --verbose   --os=windows gmake2
    
    • To build 32-bit binaries (MINGW32)
    export CMAKE_GENERATOR="MSYS Makefiles"
    ./third-party/common/win/premake/premake5.exe --file=premake5-deps.lua --32-build --all-ext --all-build --verbose   --os=windows gmake2
    

This will:

  • Extract all third party dependencies from the folder third-party into the folder build\deps\win
  • Build all dependencies

On Linux:

Open a terminal in the repo folder (Optional) You can use Clang compiler instead of GCC by running these 2 commands in the current terminal instance

export CC="clang"
export CXX="clang++"

Then run the following

export CMAKE_GENERATOR="Unix Makefiles"
./third-party/common/linux/premake/premake5 --file=premake5-deps.lua --64-build --32-build --all-ext --all-build --verbose --os=linux gmake2

This will:

  • Extract all third party dependencies from the folder third-party into the folder build/deps/linux
  • Build all dependencies (32-bit and 64-bit)

Building the emu

On Windows:

Open CMD in the repo folder, then run the following

  • For Visual Studio 2022

    third-party\common\win\premake\premake5.exe --file=premake5.lua --genproto --os=windows vs2022
    

    You can then go to the folder build\project\vs2022\win and open the produced .sln file in Visual Studio.
    Or, if you prefer to do it from command line, open the Developer Command Prompt for VS 2022 inside the above folder, then:

    msbuild /nologo /v:n /p:Configuration=release,Platform=Win32 gbe.sln
    
    msbuild /nologo /v:n /p:Configuration=release,Platform=x64 gbe.sln
    
  • For MSYS2 this is currently experimental and will not work due to ABI differences

    steps
    ./third-party/common/win/premake/premake5.exe --file=premake5.lua --genproto --os=windows gmake2
    
    cd ./build/project/gmake2/win
    

    (Optional) You can use Clang compiler instead of GCC by running these 2 commands in the current terminal instance

    export CC="clang"
    export CXX="clang++"
    
    • 64-bit build (UCRT64 or MINGW64)
      make config=release_x64 -j 8 all
      
    • 32-bit build (MINGW32)
      make config=release_x32 -j 8 all
      

    To see all possible build targets

    make help
    

This will build a release version of the emu in the folder build\win\<toolchain>\release
An example script build_win_premake.bat is available, check it out


On Linux:

Open a terminal in the repo folder, then run the following

./third-party/common/linux/premake/premake5 --file=premake5.lua --genproto --os=linux gmake2
cd ./build/project/gmake2/linux

(Optional) You can use Clang compiler instead of GCC by running these 2 commands in the current terminal instance

export CC="clang"
export CXX="clang++"

Then run the following

make config=release_x32 -j 8 all
make config=release_x64 -j 8 all

To see all possible build targets

make help

This will build a release version of the emu in the folder build/linux/<toolchain>/release
An example script build_linux_premake.sh is available, check it out


Building the tool generate_emu_config

Navigate to the folder tools/generate_emu_config/ then

On Windows:

Open CMD then:

  1. Create python virtual environemnt and install the required packages/dependencies
    recreate_venv_win.bat
    
  2. Build the tool using pyinstaller
    rebuild_win.bat
    

This will build the tool inside bin\win

On Linux:

Open bash terminal then:

  1. Create python virtual environemnt and install the required packages/dependencies
    sudo ./recreate_venv_linux.sh
    
    You might need to edit this script to use a different python version.
    Find this line and change it:
    python_package="python3.12"
    
  2. Build the tool using pyinstaller
    ./rebuild_linux.sh
    

This will build the tool inside bin/linux


Using Github CI as a builder

This is really slow and mainly intended for the CI Workflow scripts, but you can use it as another outlet if you can't build locally.
You have to fork the repo first.

Initial setup

In your fork, open the Settings tab from the top, then:

  • From the left side panel select Actions -> General
  • In the section Actions permissions select Allow all actions and reusable workflows
  • Scroll down, and in the section Workflow permissions select Read and write permissions
  • (Optional) In the section Artifact and log retention, you can specify the amount of days to keep the build artifacts/archives.
    It is recommended to set a reasonable number like 3-4 days, otherwise you may consume your packages storage if you use Github as a builder frequently, more details here: https://docs.github.com/en/get-started/learning-about-github/githubs-plans

Manual trigger

  1. Go to the Actions tab in your fork
  2. Select the emu dependencies Workflow (ex: Emu third-party dependencies (Windows) ) and run it on the main branch (ex: dev).
    Dependencies not created on the main branch won't be recognized by other branches or subsequent runs
  3. Select one of the Workflow scripts from the left side panel, for example Build all emu variants (Windows)
  4. On the top-right, select Run workflow -> select the desired branch (for example dev) -> press the button Run workflow
  5. When it's done, many packages (called build artifacts) will be created for that workflow.
    Make sure to select the workflow again to view its history, then select the last run at the very top to view its artifacts

Important note:

When you build the dependencies workflows, they will be cached to decrease the build times of the next triggers and avoid unnecessary/wasteful build process.
This will cause a problem if at any time the third-party dependencies were updated, in that case you need to manually delete the cache, in your fork:

  1. Go to the Actions tab at the top
  2. Select Caches from the left side panel
  3. Delete the corresponding cache


(Optional) Packaging

This step is intended for Github CI/Workflow, but you can create a package locally.

On Windows:

Open CMD in the repos's directory, then run this script

package_win.bat <build_folder>

build_folder is any folder inside build\win, for example: vs2022\release
The above example will create a .7z archive inside build\package\win\

On Linux:

Open bash terminal in the repos's directory, then run this script

package_linux.sh <build_folder>

build_folder is any folder inside build/linux, for example: gmake2/release
The above example will create a compressed .tar archive inside build/package/linux/