ユーザ用ツール

サイト用ツール


build_soda_english

Caution

  • This is a machine-translated translation from Japanese, so some parts may not make sense.
  • If you have any questions about the content, please ask via Discord/X (Twitter)/email, etc.

Overview

  • There is an application called Soda, which is a framework (or engine) for creating games using MiniScript.
  • This app is mainly made on Mac/Linux, so the build procedure on Windows is postponed.
  • Therefore, I created a procedure for building it myself.
  • Please note that the situation may change due to future pull requests, etc. (This description is as of 2025/02/11)
  • To make things easier, I will describe the steps to build a 64-bit environment only. If you want to build a 32-bit environment, please read the instructions separately.

Procedure

  1. Download soda source code and SDL peripheral development API set (SDL2, SDL2_image, SDL2_mixer)
    For SDL2/image/mixer, download the zip named “devel-2.x.x-yyyy.zip”.
    soda: https://github.com/JoeStrout/soda
    SDL2: https://github.com/libsdl-org/SDL/releases/tag/release-2.32.0
    SDL2_image: https://github.com/libsdl-org/SDL_image/releases/tag/release-2.8.5
    SDL2_mixer: https://github.com/libsdl-org/SDL_mixer/releases/tag/release-2.8.1
  2. Place the SDL2 include file and library file in the build tool's load folder.
    Note the following: (The reason will be explained later.)
    1. Create an SDL2 folder in the include folder that is in the cl path, and store the SDL2 include files in it.
    2. Store SDL2_image.h in the SDL2 folder in a.
    3. Store SDL2_mixer.h in the SDL2 folder in a.
    4. Store all lib folders related to SDL2/SDL2_image/SDL2_mixer in the “x64” folder in the library folder that is in the cl path.
      Store in the “x64” folder if compiling in 64bit.
  3. Modify the source code (see commit B5294F6)
    1. Modify the SDL_image loading folder
      This is because SDL2_image is assumed to be loaded directly. If you specify a path, this h description is fine, but since “SDL2_image.h attempts to load under the assumption that SDL2.h is in the same folder,” prioritize this and modify the source code on the SODA side.
      Line 13 of SdlUtils.h, change it to “#include <SDL2/SDL_image.h>”.
      (If there are differences between the Linux environment and library construction, consider splitting it with directives.)
    2. Fixed the incorrect calculation for division in PixelDisplay
      Line 90 of PixelDisplay.cpp, change it to “if (denom == 0.0f) return 0.0f ;”.
      I plan to submit a pull request for this later.
    1. start VS Developer Prompt.
      Enter the following command.
cd soda
cd src
cl -I . -I MiniScript -I compiledData -I SDL2 /EHsc /wd4068 /source-charset:utf-8 /execution-charset:utf-8 ./*.cpp ./MiniScript/*.cpp ./compiledData/*.c /Fesoda.exe SDL2.lib SDL2main.lib SDL2_image.lib SDL2_mixer.lib Shell32.lib /link /SUBSYSTEM:console

Problem

build_soda_english.txt · 最終更新: 2025/02/20 21:41 by machiaworx