45 lines
1.2 KiB
Makefile
45 lines
1.2 KiB
Makefile
VER ?= v4 # or v3
|
|
|
|
.PHONY: fetch-$(VER) inject-$(VER) build-linux build-mac build-win appimage winexe macapp all
|
|
|
|
fetch-v3:
|
|
docker compose run --rm fetch-v3
|
|
fetch-v4:
|
|
docker compose run --rm fetch-v4
|
|
|
|
inject-$(VER):
|
|
rm -rf server-ui/webroot
|
|
mkdir -p server-ui/webroot
|
|
rsync -a apps/$(VER)/Avida-ED-Eco/ server-ui/webroot/Avida-ED-Eco/
|
|
|
|
# Build binaries natively on each OS runner
|
|
build-linux: inject-$(VER)
|
|
cd server-ui && cargo build --release
|
|
|
|
build-mac: inject-$(VER)
|
|
cd server-ui && cargo build --release
|
|
|
|
build-win: inject-$(VER)
|
|
cd server-ui && cargo build --release
|
|
|
|
# Package
|
|
appimage: build-linux
|
|
bash packaging/linux/make_appimage.sh $(VER) server-ui/target/release/avidaed_onefile
|
|
|
|
winexe: build-win
|
|
# Example: pass location of WebView2 Fixed runtime and built exe
|
|
powershell -ExecutionPolicy Bypass -File packaging/windows/make_windows_sfx.ps1 \
|
|
-Version $(VER) \
|
|
-BinPath $(CURDIR)/server-ui/target/release/avidaed_onefile.exe \
|
|
-WV2Fixed "C:\SDKs\WebView2.FixedRuntime"
|
|
|
|
macapp: build-mac
|
|
bash packaging/mac/make_macos_bundle.sh $(VER) server-ui/target/release/avidaed_onefile
|
|
|
|
all:
|
|
@echo "Targets:"
|
|
@echo " make fetch-v3 | fetch-v4"
|
|
@echo " make build-linux | build-mac | build-win"
|
|
@echo " make appimage | winexe | macapp"
|
|
|