Compare commits

..

No commits in common. "master" and "release-latest" have entirely different histories.

2 changed files with 15 additions and 42 deletions

View File

@ -4,10 +4,6 @@ name: Viewer build
on: on:
workflow_dispatch: workflow_dispatch:
#push:
# branches: [ "master" ]
# tags: v**
release: release:
types: [published] types: [published]
@ -18,12 +14,8 @@ jobs:
strategy: strategy:
matrix: matrix:
# XXX the mac build is broken for now -- running blind as I do
# not have a mac to test on, but I will at least fix the
# build...
#os: [ ubuntu-latest, windows-latest, macos-latest ] #os: [ ubuntu-latest, windows-latest, macos-latest ]
os: [ ubuntu-latest, windows-latest ] os: [ ubuntu-latest, windows-latest ]
#os: [ macos-latest ]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -34,8 +26,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v6
- uses: actions/setup-node@v6
- name: Windows-specific - name: Windows-specific
if: ${{ matrix.os == 'windows-latest' }} if: ${{ matrix.os == 'windows-latest' }}
@ -48,18 +40,8 @@ jobs:
# fixes an issue when running npx sandboxing... # fixes an issue when running npx sandboxing...
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: MacOS-specific #- name: MacOS-specific
if: ${{ matrix.os == 'macos-latest' }} # if: ${{ matrix.os == 'macos-latest' }}
run: |
brew install gnu-sed zip
echo PATH="$HOMEBREW_PREFIX/opt/zip/bin:$PATH" >> $GITHUB_ENV
#- name: Env
# run: |
# echo "VERSION=$(make version)" >> $GITHUB_ENV
- name: Pre-Build - name: Pre-Build
run: make clean-all dev run: make clean-all dev

View File

@ -294,16 +294,12 @@ else
ifeq ($(shell uname -s),Darwin) ifeq ($(shell uname -s),Darwin)
TARGET_OS ?= darwin TARGET_OS ?= darwin
NW_OS ?= osx NW_OS ?= osx
SED = gsed
endif endif
# set arch... # set arch...
ifeq ($(shell uname -m),x86_64) ifeq ($(shell uname -m),x86_64)
ARCH ?= x64 ARCH ?= x64
endif endif
ifeq ($(shell uname -m),arm64)
ARCH ?= arm64
endif
ifneq ($(filter %86,$(shell uname -p)),) ifneq ($(filter %86,$(shell uname -p)),)
ARCH ?= ia32 ARCH ?= ia32
endif endif
@ -342,8 +338,6 @@ RM += -r
MD = @mkdir -p MD = @mkdir -p
SED ?= sed
#********************************************************************** #**********************************************************************
# Paths and lists... # Paths and lists...
@ -408,7 +402,7 @@ PATCHES := $(REQUREJS)
#********************************************************************** #**********************************************************************
# dependencies to check... # dependencies to check...
# #
DEPENDENCIES_HELP = $(SED) grep printf DEPENDENCIES_HELP = sed grep printf
DEPENDENCIES_WEB = node npm npx DEPENDENCIES_WEB = node npm npx
DEPENDENCIES = $(DEPENDENCIES_WEB) \ DEPENDENCIES = $(DEPENDENCIES_WEB) \
@ -435,23 +429,23 @@ help:
help_lines=(`grep -Fh "##" $(MAKEFILE_LIST) \ help_lines=(`grep -Fh "##" $(MAKEFILE_LIST) \
| grep -Fv grep \ | grep -Fv grep \
| grep -Fv '"##' \ | grep -Fv '"##' \
| $(SED) -e 's/\\$$//'`); \ | sed -e 's/\\$$//'`); \
for help_line in $${help_lines[@]}; do \ for help_line in $${help_lines[@]}; do \
IFS=$$'#' ; \ IFS=$$'#' ; \
if [ -z "$${help_line/'#'#[#-]*/}" ] ; then \ if [ -z "$${help_line/'#'#[#-]*/}" ] ; then \
echo ; \ echo ; \
echo "$${help_line}" \ echo "$${help_line}" \
| $(SED) -e 's/#\+[- ]*//' \ | sed -e 's/#\+[- ]*//' \
-e 's/\s*\(...\|---\)\s*$$/:/'; \ -e 's/\s*\(...\|---\)\s*$$/:/'; \
elif [ -z "$${help_line/'#'*/}" ] ; then \ elif [ -z "$${help_line/'#'*/}" ] ; then \
echo "$${help_line}" \ echo "$${help_line}" \
| $(SED) 's/#\+[- ]*//' ; \ | sed 's/#\+[- ]*//' ; \
else \ else \
help_split=($$help_line) ; \ help_split=($$help_line) ; \
help_command=`echo $${help_split[0]} \ help_command=`echo $${help_split[0]} \
| $(SED) -e 's/^ *//' -e 's/ *$$//'` ; \ | sed -e 's/^ *//' -e 's/ *$$//'` ; \
help_info=`echo $${help_split[2]} \ help_info=`echo $${help_split[2]} \
| $(SED) -e 's/^ *//' -e 's/ *$$//'` ; \ | sed -e 's/^ *//' -e 's/ *$$//'` ; \
printf " %-30s %s\n" $$help_command $$help_info ; \ printf " %-30s %s\n" $$help_command $$help_info ; \
fi ; \ fi ; \
done done
@ -736,7 +730,7 @@ $(BUILD_INFO): $(CSS_FILES) $(NODE_DIR) $(PROJECT_FILES) \
# XXX revise $LAUNCHER -- should it be absolute or relative and when??? # XXX revise $LAUNCHER -- should it be absolute or relative and when???
%: %.tpl package.json %: %.tpl package.json
cat $< \ cat $< \
| $(SED) -e 's/\$$APP_NAME/$(APP_NAME)/' \ | sed -e 's/\$$APP_NAME/$(APP_NAME)/' \
-e 's/\$$COMMENT/$(subst \/,\/,$(COMMENT))/' \ -e 's/\$$COMMENT/$(subst \/,\/,$(COMMENT))/' \
-e 's/\$$CATEGORIES/$(subst \/,\/,$(CATEGORIES))/' \ -e 's/\$$CATEGORIES/$(subst \/,\/,$(CATEGORIES))/' \
-e 's/\$$VERSION/$(APP_VERSION)/' \ -e 's/\$$VERSION/$(APP_VERSION)/' \
@ -827,7 +821,7 @@ $(REQUREJS)$(BACKUP_EXT): $(NODE_DIR)
# HACK: for some reason requirejs breaks if we do not do this (see: NOTES) # HACK: for some reason requirejs breaks if we do not do this (see: NOTES)
cp -f $(REQUREJS){,$(BACKUP_EXT)} cp -f $(REQUREJS){,$(BACKUP_EXT)}
cat $(REQUREJS)$(BACKUP_EXT) \ cat $(REQUREJS)$(BACKUP_EXT) \
| $(SED) 's/^\(#!\/\)/\/\/\1/' \ | sed 's/^\(#!\/\)/\/\/\1/' \
> $(REQUREJS) > $(REQUREJS)
.PHONY: patched-requirejs .PHONY: patched-requirejs
@ -877,7 +871,7 @@ $(TARGET_DIR)/$(ELECTRON_DIST):
$(BUILD_DIR)/app.asar: $(PACK_FULL) $(BUILD_DIR)/app.asar: $(PACK_FULL)
# update package.json to start electron... # update package.json to start electron...
cd "$(BUILD_DIR)/$(APP_NAME)/" ; \ cd "$(BUILD_DIR)/$(APP_NAME)/" ; \
$(SED) -i 's/"index.html"/"e.js"/g' package.json sed -i 's/"index.html"/"e.js"/g' package.json
# remove electron from the dist... # remove electron from the dist...
rm -rf "$(BUILD_DIR)/$(APP_NAME)/$(NODE_DIR)/electron" rm -rf "$(BUILD_DIR)/$(APP_NAME)/$(NODE_DIR)/electron"
cd "$(BUILD_DIR)" ; \ cd "$(BUILD_DIR)" ; \
@ -891,14 +885,11 @@ $(BUILD_DIR)/app.asar: $(PACK_FULL)
# rules... # rules...
# XXX need to take nw/el version part into account... # XXX need to take nw/el version part into account...
# XXX need to setup app icons... # XXX need to setup app icons...
#.PRECIOUS: $(BUILD_DIR)/$(APP_NAME)-%/ .PRECIOUS: $(BUILD_DIR)/$(APP_NAME)-%/
#$(BUILD_DIR)/$(APP_NAME)-%/: $(TARGET_DIR)/$(ELECTRON_DIST) \ $(BUILD_DIR)/$(APP_NAME)-%/: $(TARGET_DIR)/$(ELECTRON_DIST) \
.PRECIOUS: $(BUILD_DIR)/$(APP_NAME).app/
$(BUILD_DIR)/$(APP_NAME).app/: $(TARGET_DIR)/$(ELECTRON_DIST) \
$(BUILD_DIR)/app.asar $(BUILD_INFO) $(LICENSE) $(BUILD_DIR)/app.asar $(BUILD_INFO) $(LICENSE)
unzip -u "$<" -d "$@" unzip -u "$<" -d "$@"
cp -r $(BUILD_DIR)/app.asar* "$@/$(ASAR_PATH)/" cp -r $(BUILD_DIR)/app.asar* "$@/$(ASAR_PATH)/"
mv "$@/LICENSE{,.electron}"
cp -f "$(BUILD_INFO)" "$(LICENSE)" "$@/" cp -f "$(BUILD_INFO)" "$(LICENSE)" "$@/"
# remove default_app.asar... # remove default_app.asar...
$(RM) "$@/$(ASAR_PATH)/default_app.asar" $(RM) "$@/$(ASAR_PATH)/default_app.asar"
@ -931,7 +922,7 @@ $(BUILD_DIR)/$(APP_NAME)-%.in-place.zip: $(TARGET_DIR)/$(ELECTRON_DIST) \
$(call zipDelFrom,"$(BUILD_DIR)",$@.tmp,"version") $(call zipDelFrom,"$(BUILD_DIR)",$@.tmp,"version")
# rename electron stuff... # rename electron stuff...
# # XXX rename "Electron Helper" on mac builds -- this needs Info.plist changes... # # XXX rename "Electron Helper" on mac builds -- this needs Info.plist changes...
# | $(SED) 's/\(^@ \(.*\)Electron Helper\(.*\)\)$$/\1\n@=\2$(APP_NAME) Helper\3/' # | sed 's/\(^@ \(.*\)Electron Helper\(.*\)\)$$/\1\n@=\2$(APP_NAME) Helper\3/'
unzip -p "$@.tmp" LICENSE > $(BUILD_DIR)/LICENSE.electron unzip -p "$@.tmp" LICENSE > $(BUILD_DIR)/LICENSE.electron
# rename app... # rename app...
# # XXX also rename MacOS/Electron -> $(APP_NAME) -- this needs Info.plist changes... # # XXX also rename MacOS/Electron -> $(APP_NAME) -- this needs Info.plist changes...