forked from zrisher/se_mod_builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
898 additions
and
862 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,14 @@ | ||
# project-specific | ||
config.yml | ||
build.yml | ||
|
||
# pyinstaller | ||
/build | ||
/dist | ||
|
||
# Python | ||
*.pyc | ||
.cache | ||
|
||
# Generic | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,82 @@ | ||
# SE Mod Builder | ||
This package assists with the deployment of Space Engineers mods from their | ||
development locations to the SE mods directory for testing and | ||
publishing. | ||
This package assists with the deployment of Space Engineers mods. | ||
|
||
It provides for basic SE mod deployment: | ||
* Runs SE asset building tasks (Mwm Builder) | ||
* Deploys all assets and code distributed through Steam to the SE mods dir | ||
|
||
As well as for deploying with [Load-ARMS](https://github.com/Rynchodon/Load-ARMS): | ||
* Places git-based revision number in the assembly version | ||
* Stops ARMS-Loader and SE before running ARMS-Loader | ||
* Runs deployment and release tasks via ARMS-Loader | ||
* Restarts SE in development | ||
|
||
Once you have installed SE Mod Builder and configured your project, | ||
you will be able to launch it in SE for development or release it to users by | ||
simply selecting your configuration in Visual Studio and clicking "Build". | ||
|
||
|
||
## Requirements | ||
* Python 2.7 or greater | ||
* Conda (Miniconda or Anaconda) | ||
* [Git](https://git-scm.com/downloads) - for releasing and versioning | ||
* [Load-ARMS](https://github.com/Rynchodon/Load-ARMS) - ensure you've installed | ||
and configured it following the readme, including setting the Steam plugin flag | ||
and providing a local oAuth token for git. | ||
* [Conda](https://conda.io/docs/) - if you'd like to build SEMB from source | ||
|
||
**When we deploy this to an exe the above requirements will be removed.** | ||
|
||
## Installation | ||
* Copy build_config.example.yml to the top-level directory of your mod | ||
* Remove the ".example" from its name and fill in your own configuration details | ||
* Run `conda env create` in the se_mod_builder dir | ||
* If PyYaml fails to install: | ||
* Download the relevant installer from [pypi](https://pypi.python.org/pypi/PyYAML). | ||
* Run the installer | ||
* Copy the install files from `..\Miniconda\Lib\site-packages` to `..\Miniconda\envs\se_mod_builder\Lib\site-packages` | ||
* `conda env update` | ||
|
||
##### Installing a pre-build release | ||
Simply download and run the latest installer from [the releases page](https://github.com/zrisher/se_mod_builder/releases). | ||
|
||
##### Building from source | ||
* Fork and clone the repo | ||
* Run `conda env create` to create the environment | ||
* Run `conda activate se_mod_builder` to load the environment | ||
* Run `python se_mod_builder.py args` to use it via python | ||
* Run `pyinstaller se_mod_builder.spec -y` to generate the executable | ||
* Add the executable to your path | ||
|
||
|
||
## Configuration | ||
|
||
##### Global | ||
If you have non-standard paths to Git or SE, copy `config.example.yml` to | ||
`config.yml` in SE Mod Builder's install directory and edit it to provide | ||
your paths. | ||
|
||
##### Project | ||
Run `se_mod_builder example_config` from your project root to generate an | ||
example `build.yml` project config file there. | ||
Edit it to provide any changes specific to your project. | ||
|
||
##### Visual Studio | ||
For each project in your solution, set the pre-build event to: | ||
|
||
`se_mod_builder pre-build --src="../to/root" --env $(ConfigurationName)` | ||
|
||
And the post-build event to: | ||
|
||
`se_mod_builder post-build --src="../to/root" --env $(ConfigurationName)` | ||
|
||
|
||
## Usage | ||
``` | ||
cd Path/To/se_mod_builder | ||
activate se_mod_builder | ||
python build.py path/to/mod_source | ||
``` | ||
|
||
### File Structure | ||
The build script can work with either a module-based structure or a flat one. | ||
|
||
A fully-deployed SE mod will have the file structure: | ||
|
||
``` | ||
ModName | ||
- Data | ||
- Scripts | ||
- *.cs | ||
- *.sbc | ||
- Models | ||
- ... various levels and folders ... | ||
- *.mwm | ||
- Textures | ||
- ... various levels and folders ... | ||
- *.dds | ||
``` | ||
|
||
With this script, you can use either: | ||
|
||
``` | ||
ModName | ||
- Data | ||
- Scripts | ||
- Models | ||
- Textures | ||
``` | ||
|
||
Or (using config option has_modules = true): | ||
|
||
``` | ||
ModSourceFolder | ||
- Module1 | ||
- Data | ||
- Scripts | ||
- Textures | ||
- Module2 | ||
- Data | ||
- Textures | ||
... etc ... | ||
``` | ||
|
||
##### Developing | ||
Simply edit your code and assets, set your configuration to anything besides | ||
`release`, and click "Build" to deploy all changes to the SE mods folder and | ||
ARMS-Loader. SE will start automatically when finished deploying. | ||
|
||
##### Releasing | ||
When your code is ready to release: | ||
* Bump the version in Properties/VersionInfo for each project and commit. | ||
* Push your code to github and ensure it's merged into master. | ||
* Change your build to "release" and click "Build". This will publish your | ||
changes to Load-ARMS. | ||
* If you've changed your steam-shipped code, publish it using SE. | ||
|
||
|
||
## Contributing | ||
All changes should be kept on your own fork of SE Mod Builder. | ||
|
||
Run tests and linting with `pytest --pep8`. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# | ||
# SE Mod Builder project configuration file | ||
# | ||
|
||
# All variables have defaults. If the default isn't correct, provide it below. | ||
# Relative path variables are resolved relative to project dir. | ||
|
||
# audio_dir: 'Audio' | ||
# data_dir: 'Data' | ||
# load_arms_build_dir: 'Scripts/bin/x64' | ||
# load_arms_src_paths: | ||
# - project_name.dll | ||
# models_dir: 'Models' | ||
# properties_dir: 'Scripts/Properties' | ||
# project_name: 'the name of this directory' | ||
# repo_name: 'project_name' | ||
# repo_owner: 'the author of the first commit to this repo' | ||
# steam_scripts_dir: 'Scripts/Steam' | ||
# textures_dir: 'Textures' |
Oops, something went wrong.