Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Soda is a command-line program written in C++ and using SDL. On most systems th
1. Make sure you have a C++ toolchain installed. Currently, the Linux/Mac makefile assumes this is accessed via a `gcc` command. You can use `gcc -v` to verify that such a compiler is installed, and check the version number. On Windows, install the [Visual Studio Command-Line Tools](https://docs.microsoft.com/en-us/cpp/build/walkthrough-compiling-a-native-cpp-program-on-the-command-line?view=vs-2019).

2. Install the **SDL2** , **SDL2_image** and **SDL2_mixer** development libraries. For details, see:
- https://wiki.libsdl.org/Installation
- https://wiki.libsdl.org/SDL2/Installation
- https://github.com/libsdl-org/SDL_image
- https://github.com/libsdl-org/SDL_mixer

Expand All @@ -22,15 +22,27 @@ Soda is a command-line program written in C++ and using SDL. On most systems th

## Build Steps (Windows)

0. Run the **Developer Command Prompt for VS**.
1. `cd soda` to change to the _soda_ subdirectory (next to this document).
2. `build_win.bat` to do the build.
1. Install build tools .
2. Please store the SDL include file and library file in a location that is compatible with the DeveloperCommandPrompt.
This procedure depends on the environment of the person building it, so I can't go into detail.
However, here are some hints:
If you store the SDL files in the storage location for include files and library files associated with the environment variable "VCToolsInstallDir", they will be recognized.
Alternatively, you may want to store your include and library files in "soda/src".
In either case, the include files should be placed in the SDL2 folder.
3. Launch **DeveloperCommandPrompt for VC 20xx**
4. command `cd soda` to change to the _soda_ subdirectory (next to this document).
5. command `build_win.bat`
6. The executable file will be written into the soda folder.

When you run this program, it will display the execution location of the tool
and the bitness of the exe file it will generate.
If an include or library cannot be loaded during the build,
look at the message that is displayed and check whether the library
or include file exists in the folder associated with the executable file.

### Launch Soda
Place SDL2.dll, SDL2_image.dll, and SDL2_mixer.dll in the same folder as the executable file and launch either soda_x86.exe or soda_x64.exe.

### Warning.
That should do it _if_ the SDL paths are all sorted out.
Which they probably aren't. This is a work in progress.
2 changes: 2 additions & 0 deletions soda/build_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ if defined VSCMD_ARG_TGT_ARCH (
echo this prompt calls %VSCMD_ARG_TGT_ARCH% build applications.
echo If you are told that a library or include file does not exist,
echo please check the "include" and "lib" folders in the above path.
echo Alternatively, you may want to store your include and library files in "soda/src".
echo In either case, the include files should be placed in the SDL2 folder.

echo -------- move folder. --------
rem move to src folder.
Expand Down