This pipeline will cross-compile a mod for Windows, Mac and Linux.
You can find a download here. Also you can just clone the whole repository.
SDVCrosscompile doesn't need any configuration to work. But you can
change settings like build parameters in
There are two ways to use SDVCrosscompile:
- Extract it into the same folder as the *.sln file
- Extract it somewhere else and let it run in your project directory
Running from command line
If you extracted SDVCrosscompile into the same folder as your solution, just open a command line and run
python xbuild.py (Windows) or
Integrate into your IDE
- Open the project settings
- Go to Build -> Custom Commands
- Set the type of the custom command to "Custom Command"
- Name it as you wish
- Set the working directory to the solution dir (
- You can find the command in the "Project" menu
- Open Tools -> External Tools
- Add a new tool
- Set the title as you want
- Set initial directory to the solution dir (
- If you don't want a separate CMD window, check "Use Output Window"
Command line parameters
You can customize the behavior of SDVCrosscompile with command line parameters:
./xcompile[.bat|.sh|.py] [--no-silverplum] [--auto-silverplum] [--no-graphics] [--no-zip] [--keep-dependencies] [--output <output directory>] [--lib-<platform> <lib directory>] [--build-targetdir-<platform> <directory>] [--build-args-<platform> <arg1> <arg2> ...] [--sln <solution file 1> <solution file 2> ...]
||Defines the solutions to be built. If not
||Asks for input with CLI instead of dialogs|
||Disables automatic packing into archives.|
||Keeps the depencies from the
||Sets the output directory.
||Sets the directory containing the Windows build dependencies. Default is
||Sets the directory containing the binaries. Relative to the project directory. Default is
||Sets the arguments for
||Sets the current platform the script is running in. Must be
For SDVCrosscompile to work, you need to provide all dependency files for all systems
lib-mac folders. Just copy all the files.
Linux and Mac are known to be compatible with each other, so just making a copy will suffice.
XNA libraries must be searched within the Windows directory. Use WINE on Linux or Mac.
If you download the binary distribution of this tool, the libraries will be included by default.
. ├── lib-linux │ ├── Lidgren.Network.dll │ ├── MonoGame.Framework.dll │ ├── Newtonsoft.Json.dll │ ├── StardewModdingAPI.exe │ ├── StardewValley.exe │ └── xTile.dll ├── lib-mac │ ├── Lidgren.Network.dll │ ├── MonoGame.Framework.dll │ ├── Newtonsoft.Json.dll │ ├── StardewModdingAPI.exe │ ├── StardewValley.exe │ └── xTile.dll └── lib-windows ├── Lidgren.Network.dll ├── Microsoft.Xna.Framework.dll ├── Microsoft.Xna.Framework.Game.dll ├── Microsoft.Xna.Framework.Graphics.dll ├── Microsoft.Xna.Framework.Net.dll ├── Microsoft.Xna.Framework.Video.dll ├── Microsoft.Xna.Framework.Xact.dll ├── StardewModdingAPI.exe ├── Stardew Valley.exe └── xTile.dll