Update buildscript and readme
This commit is contained in:
parent
49663c9094
commit
06913a5217
55
README.md
55
README.md
@ -16,24 +16,57 @@ A multiplayer isometric game inspired by Oldschool RuneScape, built with Go and
|
||||
## Prerequisites
|
||||
|
||||
- Go 1.23 or higher
|
||||
- GCC (for CGO/SQLite support)
|
||||
- OpenGL development libraries
|
||||
- Raylib dependencies (see [raylib-go](https://github.com/gen2brain/raylib-go#requirements))
|
||||
|
||||
## Installation
|
||||
|
||||
1. Clone the repository:
|
||||
### Pre-built Binaries
|
||||
The easiest way to get started is to download the latest release from:
|
||||
```
|
||||
https://gitea.boner.be/bdnugget/goonscape/releases
|
||||
```
|
||||
Choose the appropriate zip file for your platform:
|
||||
- Windows: `goonscape-windows-amd64-v1.1.0.zip`
|
||||
- Linux: `goonscape-linux-amd64-v1.1.0.zip`
|
||||
|
||||
Extract the zip and run the executable.
|
||||
|
||||
### Quick Start
|
||||
For development:
|
||||
```bash
|
||||
# Run directly (recommended for development)
|
||||
go run main.go
|
||||
|
||||
# Run with local server
|
||||
go run main.go -local
|
||||
```
|
||||
|
||||
### Server Setup
|
||||
The server requires CGO for SQLite support:
|
||||
```bash
|
||||
# Enable CGO
|
||||
go env -w CGO_ENABLED=1
|
||||
|
||||
# Clone and build server
|
||||
git clone https://gitea.boner.be/bdnugget/goonserver.git
|
||||
cd goonserver
|
||||
go build
|
||||
```
|
||||
|
||||
### Client Installation
|
||||
Then install or build:
|
||||
```bash
|
||||
# Install the client
|
||||
go install gitea.boner.be/bdnugget/goonscape@latest
|
||||
```
|
||||
|
||||
Or build from source:
|
||||
```bash
|
||||
git clone https://gitea.boner.be/bdnugget/goonscape.git
|
||||
cd goonscape
|
||||
```
|
||||
|
||||
2. Install dependencies:
|
||||
```bash
|
||||
go mod tidy
|
||||
```
|
||||
|
||||
3. Build and run:
|
||||
```bash
|
||||
go run main.go
|
||||
go build
|
||||
```
|
||||
|
||||
## Controls
|
||||
|
@ -6,12 +6,7 @@ build() {
|
||||
local arch=$2
|
||||
local output=$3
|
||||
|
||||
# Set CGO flags for static linking
|
||||
export CGO_ENABLED=1
|
||||
export GOOS=$os
|
||||
export GOARCH=$arch
|
||||
|
||||
# Platform specific flags
|
||||
|
||||
if [ "$os" = "windows" ]; then
|
||||
export CC=x86_64-w64-mingw32-gcc
|
||||
export CXX=x86_64-w64-mingw32-g++
|
||||
|
Loading…
x
Reference in New Issue
Block a user