mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-12-28 14:01:58 +00:00
Compare commits
17 Commits
release-la
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 75b09823eb | |||
| eace898384 | |||
| 7073c3d9c5 | |||
| ee57bba4af | |||
| 498796e311 | |||
| 27ffd2a243 | |||
| a39f9530a0 | |||
| a7013814e5 | |||
| b7b955660a | |||
| 55fc1e743a | |||
| af61bd1ed2 | |||
| 55dd723e97 | |||
| 42b4b6c680 | |||
| b035aebec1 | |||
| 6edb15e1d2 | |||
| 3fe668ea1d | |||
| fd52cba3d5 |
25
.github/workflows/viewer-build.yml
vendored
25
.github/workflows/viewer-build.yml
vendored
@ -4,6 +4,11 @@ name: Viewer build
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
# XXX this gets any push -- the pattern does not work???...
|
||||
#push:
|
||||
# branches: [ "master" ]
|
||||
# tags: v**
|
||||
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
@ -14,8 +19,12 @@ jobs:
|
||||
|
||||
strategy:
|
||||
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 ]
|
||||
#os: [ macos-latest ]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
@ -26,9 +35,9 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v6
|
||||
|
||||
|
||||
- name: Windows-specific
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
run: |
|
||||
@ -40,8 +49,18 @@ jobs:
|
||||
# fixes an issue when running npx sandboxing...
|
||||
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
||||
|
||||
#- name: MacOS-specific
|
||||
# if: ${{ matrix.os == 'macos-latest' }}
|
||||
- name: MacOS-specific
|
||||
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
|
||||
run: make clean-all dev
|
||||
|
||||
@ -25,6 +25,28 @@ media
|
||||
└── tree.sh
|
||||
```
|
||||
|
||||
### Prerequisites
|
||||
|
||||
For the scripts to function they need the following in path:
|
||||
- exiftool
|
||||
- btrfs-utils (for the btrfs filesystem support)
|
||||
|
||||
And the ImageGrid Viewer CLI (the `ig` utility) either linked or globally
|
||||
installed, to do this run the following from the `Viewer/` directory:
|
||||
```shell
|
||||
sudo make devel-cli
|
||||
```
|
||||
or:
|
||||
```shell
|
||||
sudo make cli
|
||||
```
|
||||
|
||||
For additional dependencies run:
|
||||
```shell
|
||||
make check
|
||||
```
|
||||
|
||||
|
||||
### `README.md`
|
||||
|
||||
A basic introductory description. This is here to introduce a new user
|
||||
|
||||
@ -294,12 +294,16 @@ else
|
||||
ifeq ($(shell uname -s),Darwin)
|
||||
TARGET_OS ?= darwin
|
||||
NW_OS ?= osx
|
||||
SED = gsed
|
||||
endif
|
||||
|
||||
# set arch...
|
||||
ifeq ($(shell uname -m),x86_64)
|
||||
ARCH ?= x64
|
||||
endif
|
||||
ifeq ($(shell uname -m),arm64)
|
||||
ARCH ?= arm64
|
||||
endif
|
||||
ifneq ($(filter %86,$(shell uname -p)),)
|
||||
ARCH ?= ia32
|
||||
endif
|
||||
@ -338,6 +342,8 @@ RM += -r
|
||||
|
||||
MD = @mkdir -p
|
||||
|
||||
SED ?= sed
|
||||
|
||||
|
||||
#**********************************************************************
|
||||
# Paths and lists...
|
||||
@ -402,7 +408,7 @@ PATCHES := $(REQUREJS)
|
||||
#**********************************************************************
|
||||
# dependencies to check...
|
||||
#
|
||||
DEPENDENCIES_HELP = sed grep printf
|
||||
DEPENDENCIES_HELP = $(SED) grep printf
|
||||
DEPENDENCIES_WEB = node npm npx
|
||||
|
||||
DEPENDENCIES = $(DEPENDENCIES_WEB) \
|
||||
@ -429,23 +435,23 @@ help:
|
||||
help_lines=(`grep -Fh "##" $(MAKEFILE_LIST) \
|
||||
| grep -Fv grep \
|
||||
| grep -Fv '"##' \
|
||||
| sed -e 's/\\$$//'`); \
|
||||
| $(SED) -e 's/\\$$//'`); \
|
||||
for help_line in $${help_lines[@]}; do \
|
||||
IFS=$$'#' ; \
|
||||
if [ -z "$${help_line/'#'#[#-]*/}" ] ; then \
|
||||
echo ; \
|
||||
echo "$${help_line}" \
|
||||
| sed -e 's/#\+[- ]*//' \
|
||||
| $(SED) -e 's/#\+[- ]*//' \
|
||||
-e 's/\s*\(...\|---\)\s*$$/:/'; \
|
||||
elif [ -z "$${help_line/'#'*/}" ] ; then \
|
||||
echo "$${help_line}" \
|
||||
| sed 's/#\+[- ]*//' ; \
|
||||
| $(SED) 's/#\+[- ]*//' ; \
|
||||
else \
|
||||
help_split=($$help_line) ; \
|
||||
help_command=`echo $${help_split[0]} \
|
||||
| sed -e 's/^ *//' -e 's/ *$$//'` ; \
|
||||
| $(SED) -e 's/^ *//' -e 's/ *$$//'` ; \
|
||||
help_info=`echo $${help_split[2]} \
|
||||
| sed -e 's/^ *//' -e 's/ *$$//'` ; \
|
||||
| $(SED) -e 's/^ *//' -e 's/ *$$//'` ; \
|
||||
printf " %-30s %s\n" $$help_command $$help_info ; \
|
||||
fi ; \
|
||||
done
|
||||
@ -730,7 +736,7 @@ $(BUILD_INFO): $(CSS_FILES) $(NODE_DIR) $(PROJECT_FILES) \
|
||||
# XXX revise $LAUNCHER -- should it be absolute or relative and when???
|
||||
%: %.tpl package.json
|
||||
cat $< \
|
||||
| sed -e 's/\$$APP_NAME/$(APP_NAME)/' \
|
||||
| $(SED) -e 's/\$$APP_NAME/$(APP_NAME)/' \
|
||||
-e 's/\$$COMMENT/$(subst \/,\/,$(COMMENT))/' \
|
||||
-e 's/\$$CATEGORIES/$(subst \/,\/,$(CATEGORIES))/' \
|
||||
-e 's/\$$VERSION/$(APP_VERSION)/' \
|
||||
@ -821,7 +827,7 @@ $(REQUREJS)$(BACKUP_EXT): $(NODE_DIR)
|
||||
# HACK: for some reason requirejs breaks if we do not do this (see: NOTES)
|
||||
cp -f $(REQUREJS){,$(BACKUP_EXT)}
|
||||
cat $(REQUREJS)$(BACKUP_EXT) \
|
||||
| sed 's/^\(#!\/\)/\/\/\1/' \
|
||||
| $(SED) 's/^\(#!\/\)/\/\/\1/' \
|
||||
> $(REQUREJS)
|
||||
|
||||
.PHONY: patched-requirejs
|
||||
@ -871,7 +877,7 @@ $(TARGET_DIR)/$(ELECTRON_DIST):
|
||||
$(BUILD_DIR)/app.asar: $(PACK_FULL)
|
||||
# update package.json to start electron...
|
||||
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...
|
||||
rm -rf "$(BUILD_DIR)/$(APP_NAME)/$(NODE_DIR)/electron"
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
@ -885,11 +891,14 @@ $(BUILD_DIR)/app.asar: $(PACK_FULL)
|
||||
# rules...
|
||||
# XXX need to take nw/el version part into account...
|
||||
# XXX need to setup app icons...
|
||||
.PRECIOUS: $(BUILD_DIR)/$(APP_NAME)-%/
|
||||
$(BUILD_DIR)/$(APP_NAME)-%/: $(TARGET_DIR)/$(ELECTRON_DIST) \
|
||||
#.PRECIOUS: $(BUILD_DIR)/$(APP_NAME)-%/
|
||||
#$(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)
|
||||
unzip -u "$<" -d "$@"
|
||||
cp -r $(BUILD_DIR)/app.asar* "$@/$(ASAR_PATH)/"
|
||||
mv "$@/LICENSE{,.electron}"
|
||||
cp -f "$(BUILD_INFO)" "$(LICENSE)" "$@/"
|
||||
# remove default_app.asar...
|
||||
$(RM) "$@/$(ASAR_PATH)/default_app.asar"
|
||||
@ -922,7 +931,7 @@ $(BUILD_DIR)/$(APP_NAME)-%.in-place.zip: $(TARGET_DIR)/$(ELECTRON_DIST) \
|
||||
$(call zipDelFrom,"$(BUILD_DIR)",$@.tmp,"version")
|
||||
# rename electron stuff...
|
||||
# # 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
|
||||
# rename app...
|
||||
# # XXX also rename MacOS/Electron -> $(APP_NAME) -- this needs Info.plist changes...
|
||||
|
||||
@ -509,6 +509,10 @@ var KeyboardActions = actions.Actions({
|
||||
// The amount of keyboard "quiet" time to wait for when
|
||||
// .pauseKeyboardRepeat(..) is called...
|
||||
'keyboard-repeat-pause-check': 100,
|
||||
|
||||
// Keyboard handling timeout after focus...
|
||||
// XXX FOCUS_EVENT see: features.ui for more details...
|
||||
//'keyboard-pause-post-focus': 100,
|
||||
},
|
||||
|
||||
get keybindings(){
|
||||
@ -948,6 +952,20 @@ module.Keyboard = core.ImageGridFeatures.Feature({
|
||||
function(){
|
||||
this.toggleKeyboardHandling('off') }],
|
||||
|
||||
// XXX FOCUS_EVENT see: features.ui for more details...
|
||||
//['windowBlur',
|
||||
// function(){
|
||||
// this.config['keyboard-pause-post-focus'] > 0
|
||||
// && this.toggleKeyboardHandling('off') }],
|
||||
//['windowFocus',
|
||||
// function(){
|
||||
// var that = this
|
||||
// this.config['keyboard-pause-post-focus'] > 0
|
||||
// && setTimeout(
|
||||
// function(){
|
||||
// that.toggleKeyboardHandling('on') },
|
||||
// this.config['keyboard-pause-post-focus']) }],
|
||||
|
||||
// pause keyboard repeat...
|
||||
['shiftImageUp.pre shiftImageDown.pre',
|
||||
function(){
|
||||
|
||||
@ -23,6 +23,10 @@
|
||||
* - auto-single-image
|
||||
* - auto-ribbon
|
||||
*
|
||||
* XXX FOCUS_EVENT BUG: for some reason focus/blur events both on window
|
||||
* and on ig.dom trigger only if anything in the ui is physically
|
||||
* focused (e.g. clicked)
|
||||
*
|
||||
*
|
||||
**********************************************************************/
|
||||
((typeof define)[0]=='u'?function(f){module.exports=f(require)}:define)
|
||||
@ -499,6 +503,21 @@ module.ViewerActions = actions.Actions({
|
||||
//}, 0)
|
||||
}],
|
||||
|
||||
// XXX FOCUS_EVENT these for some reason work only if the ui is clicked...
|
||||
//windowFocus: ['- Interface/',
|
||||
// core.doc``,
|
||||
// core.Event(function(){
|
||||
// // This is the window focus event...
|
||||
// //
|
||||
// // Not for direct use.
|
||||
// })],
|
||||
//windowBlur: ['- Interface/',
|
||||
// core.doc``,
|
||||
// core.Event(function(){
|
||||
// // This is the window blur event...
|
||||
// //
|
||||
// // Not for direct use.
|
||||
// })],
|
||||
|
||||
// Viewer/window resize event...
|
||||
resizingWindow: ['- Interface/',
|
||||
@ -762,7 +781,7 @@ module.Viewer = core.ImageGridFeatures.Feature({
|
||||
}
|
||||
}],
|
||||
|
||||
// workspaces and resizing...
|
||||
// workspaces, resizing and other events...
|
||||
['start',
|
||||
function(){
|
||||
var that = this
|
||||
@ -777,6 +796,19 @@ module.Viewer = core.ImageGridFeatures.Feature({
|
||||
this.config['ribbon-theme']
|
||||
&& this.toggleImageRendering(this.config['image-rendering'])
|
||||
|
||||
// XXX FOCUS_EVENT
|
||||
//// focus handling...
|
||||
//// XXX focus/blur events do not seem to trigger unless we
|
||||
//// actually focus something in the window...
|
||||
//this.__window_focus_handler ??=
|
||||
// function(){
|
||||
// that.windowFocus() }
|
||||
//this.dom[0].addEventListener('focus', this.__window_focus_handler)
|
||||
//this.__window_blur_handler ??=
|
||||
// function(){
|
||||
// that.windowBlur() }
|
||||
//this.dom.on('blur', this.__window_blur_handler)
|
||||
|
||||
// center viewer on resize events...
|
||||
if(!this.__viewer_resize){
|
||||
this.__viewer_resize = function(){
|
||||
@ -802,6 +834,9 @@ module.Viewer = core.ImageGridFeatures.Feature({
|
||||
['stop',
|
||||
function(){
|
||||
if(this.__viewer_resize){
|
||||
// XXX FOCUS_EVENT
|
||||
//$(window).off('focus', this.__window_focus_handler)
|
||||
//$(window).off('blur', this.__window_blur_handler)
|
||||
$(window).off('resize', this.__viewer_resize)
|
||||
delete this.__viewer_resize
|
||||
}
|
||||
|
||||
694
Viewer/package-lock.json
generated
694
Viewer/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -18,35 +18,33 @@
|
||||
"show": false
|
||||
},
|
||||
"dependencies": {
|
||||
"object-run": "*",
|
||||
"ig-object": "*",
|
||||
"ig-types": "*",
|
||||
"ig-actions": "*",
|
||||
"ig-features": "*",
|
||||
"ig-argv": "*",
|
||||
"ig-doc": "*",
|
||||
"guarantee-events": "*",
|
||||
"generic-walk": "*",
|
||||
|
||||
"requirejs": "*",
|
||||
"requirejs-plugins": "*",
|
||||
"fs-extra": "*",
|
||||
"glob": "*",
|
||||
"wildglob": "*",
|
||||
"app-module-path": "*",
|
||||
"async-json": "0.0.2",
|
||||
"cli-progress": "^3.9.0",
|
||||
"colors": "^1.4.0",
|
||||
"electron": "^37.0.0",
|
||||
"sharp": "*",
|
||||
"sharp-phash": "^2.0.0",
|
||||
"exif-reader": "^1.0.3",
|
||||
"exifreader": "*",
|
||||
"exiftool": "^0.0.3",
|
||||
"cli-progress": "^3.9.0",
|
||||
"colors": "^1.4.0",
|
||||
|
||||
"v8-compile-cache": "^2.2.0",
|
||||
"app-module-path": "*",
|
||||
"fs-extra": "*",
|
||||
"fs-walk": "*",
|
||||
"async-json": "0.0.2",
|
||||
"json5": "^2.2.0"
|
||||
"generic-walk": "*",
|
||||
"glob": "*",
|
||||
"guarantee-events": "*",
|
||||
"ig-actions": "*",
|
||||
"ig-argv": "*",
|
||||
"ig-doc": "*",
|
||||
"ig-features": "*",
|
||||
"ig-object": "*",
|
||||
"ig-types": "*",
|
||||
"json5": "^2.2.0",
|
||||
"object-run": "*",
|
||||
"requirejs": "*",
|
||||
"requirejs-plugins": "*",
|
||||
"sharp": "^0.34.4",
|
||||
"sharp-phash": "^2.0.0",
|
||||
"v8-compile-cache": "^2.2.0",
|
||||
"wildglob": "*"
|
||||
},
|
||||
"-dependencies": {
|
||||
"openseadragon": "^2.4.1",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user