mirror of
https://github.com/xxnuo/MTranServer.git
synced 2026-09-03 06:35:20 +08:00
feat: add v3
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,3 +13,4 @@ core
|
||||
/node_modules
|
||||
/packages
|
||||
pnpm-lock.yaml
|
||||
/v3/bin
|
||||
|
||||
30
v3/Makefile
Normal file
30
v3/Makefile
Normal file
@@ -0,0 +1,30 @@
|
||||
.PHONY: download-core
|
||||
|
||||
# Detect OS and architecture
|
||||
GOOS ?= $(shell go env GOOS)
|
||||
GOARCH ?= $(shell go env GOARCH)
|
||||
|
||||
# Set binary suffix for Windows, js
|
||||
ifeq ($(GOOS),windows)
|
||||
SUFFIX := .exe
|
||||
else ifeq ($(GOOS),js)
|
||||
SUFFIX := .wasm
|
||||
else
|
||||
SUFFIX :=
|
||||
endif
|
||||
|
||||
# GitHub release URL
|
||||
GITHUB_REPO := xxnuo/MTranCore
|
||||
RELEASE_TAG := latest
|
||||
WORKER_BINARY := worker-$(GOOS)-$(GOARCH)$(SUFFIX)
|
||||
DOWNLOAD_URL := https://github.com/$(GITHUB_REPO)/releases/latest/download/$(WORKER_BINARY)
|
||||
|
||||
# Download core binary from https://github.com/xxnuo/MTranCore/releases/latest
|
||||
# Support: linux-amd64, linux-arm64, linux-386, windows-amd64, darwin-amd64, darwin-arm64
|
||||
download-core:
|
||||
@echo "Detecting platform: $(GOOS)-$(GOARCH)"
|
||||
@echo "Downloading $(WORKER_BINARY) from $(DOWNLOAD_URL)..."
|
||||
@mkdir -p bin
|
||||
@curl -L -o bin/worker$(SUFFIX) $(DOWNLOAD_URL) || (echo "Failed to download worker binary" && exit 1)
|
||||
@chmod +x bin/worker$(SUFFIX)
|
||||
@echo "Downloaded successfully to bin/worker$(SUFFIX)"
|
||||
@@ -1,5 +1,3 @@
|
||||
# Golang version
|
||||
|
||||
Server implementation is in this repository.
|
||||
# MTranServer v3
|
||||
|
||||
Core implementation is in [MTranCore](https://github.com/xxnuo/MTranCore)
|
||||
|
||||
5
v3/cmd/mtranserver/main.go
Normal file
5
v3/cmd/mtranserver/main.go
Normal file
@@ -0,0 +1,5 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user