readme + license + tweaks for template generator

This commit is contained in:
Dmitry
2022-05-21 14:20:04 +03:00
parent 5b76d02bd8
commit a9148a7325
4 changed files with 67 additions and 2 deletions
+10
View File
@@ -2,6 +2,16 @@
name = "fyrox-template"
version = "0.1.0"
edition = "2021"
authors = ["Dmitry Stepanov <[email protected]>"]
license = "MIT"
description = "Project template generator for Fyrox engine"
keywords = ["fyrox", "game", "project"]
categories = ["game-development"]
include = ["/src/**/*", "/Cargo.toml", "/LICENSE", "/README.md"]
homepage = "https://fyrox.rs"
repository = "https://github.com/FyroxEngine/Fyrox"
readme = "README.md"
rust-version = "1.56"
[dependencies]
clap = { version="3.1.18", features = ["derive"]}
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Dmitry Stepanov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+34
View File
@@ -0,0 +1,34 @@
# Fyrox Engine Project Template Generator
This tiny utility handles project generation for Fyrox Game Engine. It creates a workspace with three projects:
- Game - your game project (library)
- Editor - the editor with your game attached as a plugin
- Executor - the "runner" for your game.
It also populates each project with boilerplate code. The main purpose of the project is to reduce amount of time
that is needed to set up a new project.
## Usage
Install it via `cargo` first:
```shell
cargo install fyrox-template
```
Navigate to a folder and call:
```shell
fyrox-template <project_name>
```
It will create a new folder with `<project_name>` and it will contain three projects, runnable only two of them:
- `cargo run --package editor --release` - to run your game inside the editor.
- `cargo run --package executor --release` - to run your game as a standalone project. It will also produce final
binary of your game, that can be shipped to a store.
## Tips
There is nothing special in generated project, so you can tweak them as you wish.
+2 -2
View File
@@ -210,7 +210,7 @@ fn main() {{
);
}
fn init_workspace(base_path: &Path, args: &Args) {
fn init_workspace(base_path: &Path) {
Command::new("cargo")
.args(&["init", "--vcs", "git"])
.arg(base_path)
@@ -242,7 +242,7 @@ fn main() {
let base_path = Path::new(&args.name);
init_workspace(&base_path, &args);
init_workspace(&base_path);
init_game(&base_path, &args);
init_editor(&base_path, &args);
init_executor(&base_path, &args);