Modding:Setting up your Development Environment/ru: Difference between revisions

From Vintage Story Wiki
Updating to match new version of source page
(Created page with "{{Navbox/modding/ru|Vintage Story}}")
(Updating to match new version of source page)
Line 7: Line 7:


* [https://www.visualstudio.com/en/vs/community/ Visual Studio Community] is a free and very powerful development environment and covered in below guide. This is also the tool the Vintage Story Team uses to build the game. It also has a [https://www.visualstudio.com/vs/mac/ MacOS Version].
* [https://www.visualstudio.com/en/vs/community/ Visual Studio Community] is a free and very powerful development environment and covered in below guide. This is also the tool the Vintage Story Team uses to build the game. It also has a [https://www.visualstudio.com/vs/mac/ MacOS Version].
* [https://www.jetbrains.com/rider/ Jetbrains Rider] is a freemium and modern development environment with seamless support for Visual Studio projects, keybindings and layouts. It is an enterprise product and some features are locked behind a license (code duplication checking, web dev tools), but the features that you need for VS mod development are all free. The indexing / go to reference features and built-in decompiling features are very powerful, as you are able to click on a method Vintage Story uses and it'll show you the code behind it. Do note that it currently has one bug + workaround documented [https://github.com/anegostudios/vsmodexamples/issues/11 here].


* [https://code.visualstudio.com/ Visual Studio Code] is very a lightweight version of Visual Studio. Our precious community member [https://twitter.com/koppeh?lang=en copygirl] is using this tool and also [https://github.com/copygirl/howto-example-mod wrote a set up guide on github]
* [https://code.visualstudio.com/ Visual Studio Code] is very a lightweight version of Visual Studio. Our precious community member [https://twitter.com/koppeh?lang=en copygirl] is using this tool and also [https://github.com/copygirl/howto-example-mod wrote a set up guide on github]
Line 16: Line 18:
== Install Development Tool ==
== Install Development Tool ==


VintageStory is developed in C#. Choose one of the above IDEs or other alternatives. We suggest using '''Visual Studio Community''' for Windows. For Linux you may want to use '''MonoDevelop''' or '''Visual Studio Code'''.
VintageStory is developed in C#. Choose one of the above IDEs or other alternatives. We suggest using '''Visual Studio Community''' for Windows. For Linux you may want to use '''Visual Studio Code''', '''Rider''' or '''MonoDevelop'''.
 
After you download an IDE, you can now either get the [https://github.com/anegostudios/vsmodtemplate mod template] project or manually set up a mod project. The mod template offers a convenience tool to set up multiple mod projects and to quickly pack up and have a ready-to-ship mod.
 
=== Installation Guide on Windows / macOS with Visual Studio ===
 
{| class="wikitable"
|-
! scope="col"| OS
! scope="col"| Repo
! scope="col"| Command
|-
| Windows
| [https://visualstudio.microsoft.com/downloads/ download exe]
| Run downloaded file
|-
| macOS
| [https://visualstudio.microsoft.com/downloads/ download dmg]
| Run downloaded file
|}
 
=== Installation Guide on Linux / macOS with MonoDevelop ===


=== Installation Guide on Linux with MonoDevelop ===
You can use the MonoDevelop IDE to make VS mods on Linux. The download instructions are below, choose your distro and follow the link to add the repo, then run the install command.


'''1. Install FlatPak'''
{| class="wikitable"
|-
! scope="col"| OS
! scope="col"| Repo
! scope="col"| Command
|-
| Debian 8-10
| [https://www.monodevelop.com/download/#fndtn-download-lin-debian repo]
| <code>sudo apt-get install monodevelop</code>
|-
| Ubuntu 14.04-20.04
| [https://www.monodevelop.com/download/#fndtn-download-lin-ubuntu repo]
| <code>sudo apt-get install monodevelop</code>
|-
| CentOS / RedHat
| [https://www.monodevelop.com/download/#fndtn-download-lin-centos repo]
| <code>yum install monodevelop</code>
|-
| Using Flatpak
| [http://flatpak.org/getting.html Download Flatpak]
| <code>flatpak install --user --from https://download.mono-project.com/repo/monodevelop.flatpakref</code>
|-
| macOS
| [https://www.monodevelop.com/developers/building-monodevelop/ build guide]
| Use Visual Studio or build from source
|-
| Other
| [https://github.com/mono/monodevelop compile from source]
| Follow the instructions to compile from source
|}


It is required to install MonoDevelop so if you already have FlatPak then you can skip this step. FlatPak have their own guides of how to install it for many distributions [http://flatpak.org/getting.html here].
=== Installation Guide on Linux / macOS with Visual Studio Code ===


'''2. Install MonoDevelop'''
You can use Visual Studio Code to make VS mods on Linux. The download instructions are below, choose your distro and follow the link to add the repo, then run the install command.


Simply open up a terminal and run the following command:
{| class="wikitable"
<code>flatpak install --user --from https://download.mono-project.com/repo/monodevelop.flatpakref</code>
|-
<br>
! scope="col"| OS
This might take a few minutes depending on your internet connection. (The latest version at the time of writing was around 275MB.)
! scope="col"| Repo
To open up MonoDevelop enter <code>flatpak run com.xamarin.MonoDevelop</code> in the terminal.
! scope="col"| Command
|-
| Debian 8-10
| [https://code.visualstudio.com/download download deb]
| <code>sudo dpkg -i /path/to/vscode/file.deb && sudo apt-get install -f</code>
|-
| Ubuntu 18.04-20.04
| [https://code.visualstudio.com/download download deb]
| <code>sudo apt install /path/to/vscode/file.deb</code>
|-
| CentOS / RedHat / Fedora / SUSE
| [https://code.visualstudio.com/download download rpm]
| <code>rpm -ih /path/to/vscode/file.rpm</code>
|-
| Arch
| [https://aur.archlinux.org/packages/visual-studio-code-bin package]
| <code>yay -S visual-studio-code-bin</code>
|-
| Using Snap
| [https://snapcraft.io/docs/installing-snapd Download <code>snapd</code>]
| <code>sudo snap install code --classic</code>
|-
| macOS
| [https://code.visualstudio.com/download download zip]
| Run downloaded file
|-
| Other
| [https://github.com/microsoft/vscode compile from source]
| Follow the instructions to compile from source
|}


=== Installation Guide on Windows with Visual Studio ===
=== Installation Guide on Windows / Linux / macOS with JetBrains Rider ===  


1. Go to https://visualstudio.microsoft.com/vs/community/ and install Visual Studio Community. It is free and fully functional.
You can use Jetbrains Rider to make VS mods on Linux. The download instructions are below, choose your distro and follow the link to add the repo, then run the install command.


2. You can now either get the mod template project or manually set up a mod project. The mod template offers a convenience tool to set up multiple mod projects and to quickly pack up and have a ready-to-ship mod.
{| class="wikitable"
|-
! scope="col"| OS
! scope="col"| Repo
! scope="col"| Command
|-
| Windows
| [https://www.jetbrains.com/rider/download/#section=windows download exe]
| Run downloaded file
|-
| Arch
| [https://aur.archlinux.org/packages/rider package]
| <code>yay -S rider mono mono-msbuild</code>
|-
| Using Toolbox
| [https://www.jetbrains.com/help/idea/installation-guide.html#toolbox Download Toolbox]
| Follow the given instructions for your OS
|-
| Using Snap
| [https://snapcraft.io/docs/installing-snapd Download <code>snapd</code>]
| <code>sudo snap install rider --classic</code>
|-
| macOS
| [https://www.jetbrains.com/rider/download/#section=mac download dmg]
| Run downloaded file
|-
| Other
| [https://www.jetbrains.com/rider/download/#section=linux download <code>.tar.gz</code>]
| <code>sudo tar -xzf ideaIU.tar.gz -C /opt && cd /opt/idea-dir-edit-me && sudo ./idea.sh</code>
|}


== Mod templates ==
== Mod templates ==
43,402

edits