Skip to content

Commit

Permalink
feat: add Linux riscv64 support (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
kxxt authored Sep 12, 2023
1 parent 4e2aa6a commit 4015728
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ ifeq ($(OS),Windows_NT)
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
OS_ARCH := linux_amd64
ifeq ($(UNAME_M),riscv64)
OS_ARCH := linux_riscv64
else
OS_ARCH := linux_amd64
endif
endif
ifeq ($(UNAME_S),Darwin)
OS_ARCH := darwin_$(shell uname -m)
Expand Down
2 changes: 1 addition & 1 deletion pkg/package-format/appimage/appImage.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func ConfigureCommand(app *kingpin.Application) {
appDir: command.Flag("app", "The app dir.").Short('a').Required().String(),
stageDir: command.Flag("stage", "The stage dir.").Short('s').Required().String(),
output: command.Flag("output", "The output file.").Short('o').Required().String(),
arch: command.Flag("arch", "The arch.").Default("x64").Enum("x64", "ia32", "armv7l", "arm64"),
arch: command.Flag("arch", "The arch.").Default("x64").Enum("x64", "ia32", "armv7l", "arm64", "riscv64"),

template: command.Flag("template", "The template file.").String(),
license: command.Flag("license", "The license file.").String(),
Expand Down
3 changes: 3 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ GOOS=linux GOARCH=386 go build -ldflags='-s -w' -o linux/ia32/app-builder ..
mkdir -p linux/x64
GOOS=linux GOARCH=amd64 go build -ldflags='-s -w' -o linux/x64/app-builder ..

mkdir -p linux/riscv64
GOOS=linux GOARCH=riscv64 go build -ldflags='-s -w' -o linux/riscv64/app-builder ..

mkdir -p linux/arm
GOOS=linux GOARCH=arm go build -ldflags='-s -w' -o linux/arm/app-builder ..

Expand Down

0 comments on commit 4015728

Please sign in to comment.