From 49345a498a6271acf214e248939c38f97f91700e Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 5 Jan 2019 19:43:55 -0800 Subject: [PATCH] Updating README.md --- README.md | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..2aa4d30 --- /dev/null +++ b/README.md @@ -0,0 +1,105 @@ +# Lazarus # + +The Lazarus project aims to preserve [Diablo II](https://en.wikipedia.org/wiki/Diablo_II) by reimplementing the game +engine in the Go programming language. Lazarus is a drop-in replacement for the original game executable; the user is +responsible for supplying the game assets (namely the MPQ files) from the official game media. + +![](https://foosoft.net/projects/lazarus/img/viewer.png) + +## Building ## + +It is not currently possible to use `go get` to install all of the packages in the project in one step; some assembly is +required. Follow the instructions below to set up a build environment from a fresh install of your 64-bit operating +system of choice. + +### Linux ### + +Lazarus is primarily being developed on Fedora, but the required package names are also provided for Ubuntu. + +1. Install the required packages (for [Fedora](https://getfedora.org/) users): + ``` + # sudo dnf install golang gcc-c++ cmake make git SDL2-devel mesa-libGL-devel zlib-devel bzip2-devel + ``` + Install the required packages (for [Ubuntu](https://www.ubuntu.com/) users): + ``` + # sudo apt-get install golang g++ cmake make git libsdl2-dev libgl1-mesa-dev zlib1g-dev libbz2-dev + ``` +2. Build the [Dear ImGui](https://github.com/ocornut/imgui) wrapper package: + ``` + $ go get github.com/FooSoft/lazarus/platform/imgui + ``` + Go will fetch the code, but Cgo will fail to link the [cimgui](https://github.com/cimgui/cimgui) wrapper; + we need to configure and build it: + ``` + $ cd $GOPATH/src/github.com/FooSoft/lazarus/platform/imgui/cimgui + $ cmake -DIMGUI_STATIC="yes" . + $ make + ``` + You should now have a `cimgui.a` statically linked library in the `cimgui` directory. +3. Build the [StormLib](http://zezula.net/en/mpq/stormlib.html) wrapper package: + ``` + $ go get github.com/FooSoft/lazarus/formats/mpq + ``` + Go will fetch the code, but Cgo will fail to link the StormLib wrapper; + we need to configure and build it: + ``` + $ cd $GOPATH/src/github.com/FooSoft/lazarus/formats/mpq/stormlib + $ cmake . + $ make + ``` + You should now have a `libstorm.a` statically linked library in the `stormlib` directory. + +### Windows ### + +Lazarus is only tested on Windows 10, but should in theory run on anything newer than Windows XP. + +1. Download the latest 64-bit MSI installer for Go from the [official homepage](https://golang.org/dl/); install to the default directory. +2. Download and the latest 64-bit EXE installer for MSYS2 from the [official homepage](https://www.msys2.org/); install to the default directory. +3. Run MSYS2 MinGW and install the required packages: + ``` + $ pacman -S mingw-w64-x86_64-gcc cmake make git mingw-w64-x86_64-SDL2 zlib-devel libbz2-devel + ``` +4. Add `C:\msys64\usr\bin` and `C:\msys64\mingw64\bin` to your system's `PATH` environment variable. +5. Build the [Dear ImGui](https://github.com/ocornut/imgui) wrapper package: + ``` + $ go get github.com/FooSoft/lazarus/platform/imgui + ``` + Go will fetch the code, but Cgo will fail to link the [cimgui](https://github.com/cimgui/cimgui) wrapper; + we need to configure and build it: + ``` + $ cd %GOPATH%/src/github.com/FooSoft/lazarus/platform/imgui/cimgui + $ cmake -DIMGUI_STATIC="yes" . + $ make + ``` + You should now have a `cimgui.a` statically linked library in the `cimgui` directory. +6. Build the [StormLib](http://zezula.net/en/mpq/stormlib.html) wrapper package: + ``` + $ go get github.com/FooSoft/lazarus/formats/mpq + ``` + Go will fetch the code, but Cgo will fail to link the StormLib wrapper; + we need to configure and build it: + ``` + $ cd %GOPATH%/src/github.com/FooSoft/lazarus/formats/mpq/stormlib + $ cmake . + $ make + ``` + You should now have a `libstorm.a` statically linked library in the `stormlib` directory. + +## License ## + +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.