Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,18 @@ jobs:
id: adf
run: echo "filename=$(ls xsysinfo-*.adf)" >> $GITHUB_OUTPUT

- name: Find LHA filename
id: lha
run: echo "filename=$(ls xsysinfo-*.lha)" >> $GITHUB_OUTPUT

- name: Archive CI artifacts (ADF)
uses: actions/upload-artifact@v4
with:
name: ${{ steps.adf.outputs.filename }}
path: ${{ github.workspace }}/${{ steps.adf.outputs.filename }}

- name: Archive CI artifacts (LHA)
uses: actions/upload-artifact@v4
with:
name: ${{ steps.lha.outputs.filename }}
path: ${{ github.workspace }}/${{ steps.lha.outputs.filename }}
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
path: |
xSysInfo
xsysinfo-*.adf
xsysinfo-*.lha
if-no-files-found: error

release:
Expand All @@ -61,3 +62,4 @@ jobs:
files: |
artifacts/xSysInfo
artifacts/xsysinfo-*.adf
artifacts/xsysinfo-*.lha
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ downloads/
xSysInfo
xsysinfo.adf
xsysinfo-*.adf
xsysinfo-*.lha
TinySetPatch
27 changes: 25 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ OBJS = $(SRCS:.c=.o)

TARGET = xSysInfo

.PHONY: all clean identify catalogs
.PHONY: all clean identify catalogs lha

# Detect platform for flexcat binary path
UNAME_S := $(shell uname -s)
Expand All @@ -60,7 +60,7 @@ else
FLEXCAT_BIN = 3rdparty/flexcat/src/bin_unix/flexcat
endif

all: identify $(TARGET) disk
all: identify $(TARGET) disk lha

# FlexCat build - only when binary doesn't exist
$(FLEXCAT_BIN):
Expand Down Expand Up @@ -92,6 +92,28 @@ catalogs: $(FLEXCAT_BIN)
$(FLEXCAT_BIN) $(CATALOG_DESC) "catalogs/$$src/xSysInfo.ct" CATALOG "$(CATALOG_DIR)/$$lang/xSysInfo.catalog"; \
done

# LHA archive creation
LHA_NAME = xsysinfo-$(FULL_VERSION).lha
LHA_DIR = xSysInfo-$(FULL_VERSION)
LHA_OPTS := $(shell if lha 2>&1 | grep 'archive-kanji-code' | grep -q 'latin1'; then echo '--system-kanji-code=utf8 --archive-kanji-code=latin1'; fi)

lha: $(TARGET) TinySetPatch catalogs
@echo " LHA $(LHA_NAME)"
@rm -rf $(LHA_DIR)
@mkdir -p $(LHA_DIR)
@cp $(TARGET) $(LHA_DIR)/
@cp TinySetPatch $(LHA_DIR)/
@cp docs/readme.txt $(LHA_DIR)/
@cp docs/xSysInfo.info $(LHA_DIR)/
@cp LICENSE $(LHA_DIR)/
@for catalog in $(CATALOG_DIR)/*/xSysInfo.catalog; do \
lang=$$(basename $$(dirname "$$catalog")); \
cp "$$catalog" "$(LHA_DIR)/xSysInfo_$$lang.catalog"; \
done
@lha aqo5 $(LHA_OPTS) $(LHA_NAME) $(LHA_DIR)
@rm -rf $(LHA_DIR)
@echo "Created $(LHA_NAME)"

$(TARGET): $(OBJS)
@echo " LINK $@"
@$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
Expand All @@ -107,6 +129,7 @@ clean:
@echo " CLEAN"
@rm -f $(OBJS) $(TARGET) TinySetPatch
@rm -rf $(CATALOG_DIR)
@rm -f xsysinfo-*.lha
@$(MAKE) -s -C 3rdparty/flexcat clean
@$(MAKE) -s -C 3rdparty/identify clean

Expand Down