some cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-01-13 05:19:45 +03:00
parent 1394578088
commit e144c2c0cf
6 changed files with 32 additions and 3489 deletions

View File

@ -4,6 +4,7 @@
#
#
# Make dependencies that need to be installed:
# - git
# - nodejs / npm
# also nodejs-legacy seems to be required by some code...
# - npm i -g electron electron-rebuild asar less
@ -70,7 +71,7 @@ APP_NAME ?= ImageGrid.Viewer
# XXX get actual version...
# XXX need to make getting the version usable from a bare checkout...
VERSION := $(strip $(shell node ./ig --version || echo 4.0.0a))
VERSION := $(strip $(shell node ./ig --version 2> /dev/null || echo 4.0.0a))
DATE := $(strip $(shell date "+%Y%m%d %H%M"))
COMMIT := $(strip $(shell git rev-parse HEAD))
@ -82,7 +83,7 @@ COMMIT := $(strip $(shell git rev-parse HEAD))
# on a non-GUI box (i.e. no gtk)...
# ...love the "statically" linked "dynamic" libs...
ELECTRON_VERSION_FALLBACK = v1.8.1
ELECTRON_VERSION := $(strip $(shell electron -v || echo $(ELECTRON_VERSION_FALLBACK)))
ELECTRON_VERSION := $(strip $(shell electron -v 2> /dev/null || echo $(ELECTRON_VERSION_FALLBACK)))
ELECTRON_DOWNOAD_URL ?= https://github.com/electron/electron/releases/download
ELECTRON_DIST ?= electron-$(ELECTRON_VERSION)-$(TARGET_OS)-$(ARCH).zip
@ -191,7 +192,7 @@ INCLUDE_NODE_MODULES = ig-object ig-actions ig-features preact
# XXX might be a good idea to split these to sections and check only what
# is needed...
# ...like: base, electron, wix, ...
DEPENDENCIES = npm wget zip unzip zipnote \
DEPENDENCIES = node npm wget zip unzip zipnote git \
lessc electron electron-rebuild asar
# WiX dependencies...
#DEPENDENCIES += heat candle light
@ -256,14 +257,16 @@ PACK_FULL = $(BUILD_DIR)/$(APP_NAME) $(BUILD_DIR)/$(APP_NAME)/$(NODE_DIR)
# build date...
# XXX add build version...
# NOTE: this depends on lots of stuff so as to be updated in case any of
# the dependencies are touched...
$(BUILD_INFO): $(CSS_FILES) $(NODE_DIR) $(PROJECT_FILES) \
$(JS_FILES) $(CSS_FILES) $(HTML_FILES)
$(MD) "$(@D)"
echo "$(APP_NAME)" > $(BUILD_INFO)
echo "$(VERSION)" >> $(BUILD_INFO)
echo "$(DATE)" >> $(BUILD_INFO)
echo "$(COMMIT)" >> $(BUILD_INFO)
@echo "Build info:"
@echo "$(APP_NAME)" | tee $(BUILD_INFO)
@echo "$(VERSION)" | tee -a $(BUILD_INFO)
@echo "$(DATE)" | tee -a $(BUILD_INFO)
@echo "$(COMMIT)" | tee -a $(BUILD_INFO)
%.css: %.less
@ -272,13 +275,17 @@ $(BUILD_INFO): $(CSS_FILES) $(NODE_DIR) $(PROJECT_FILES) \
# XXX might be a good idea to install directly to $(BUILD_DIR) so as not
# to messup the current dir...
# npm install --prefix ./build
# XXX need to make this arch/os specific for cross compiling...
#%/$(NODE_DIR):
# cd "$*" ; \
# npm install ; \
# electron-rebuild
#$(NODE_DIR): ./$(NODE_DIR)
$(NODE_DIR):
npm install
electron-rebuild
# build app dir...
$(BUILD_DIR)/$(APP_NAME): $(CSS_FILES) $(PROJECT_FILES) \
$(JS_FILES) $(CSS_FILES) $(HTML_FILES) \

View File

@ -25,9 +25,9 @@ require('features/ui')
// XXX
require('features/ui-blank-render')
require('features/ui-ribbons')
require('features/ui-preact-render')
require('features/ui-virtual-dom')
require('features/ui-react')
//require('features/ui-preact-render')
//require('features/ui-virtual-dom')
//require('features/ui-react')
// XXX
require('features/ui-partial-ribbons-precache')
require('features/ui-partial-ribbons-2')

View File

@ -107,7 +107,7 @@ core.ImageGridFeatures.Feature('imagegrid-testing', [
//'-ui-partial-ribbons',
// Add this to enable widget mode...
// Add this to enable widget mode (will not touch the window)...
// XXX needs testing...
//'widget',

View File

@ -671,7 +671,7 @@ module.StatusBar = core.ImageGridFeatures.Feature({
tag: 'ui-status-bar',
depends: [
'ui',
'ui-chrome',
//'ui-chrome',
// XXX this is here to enable context menu
// see: StatusBarActions.__statusbar_elements__.mark(..)

File diff suppressed because it is too large Load Diff

View File

@ -25,12 +25,8 @@
"ig-actions": "^3.12.0",
"ig-features": "^3.3.2",
"ig-object": "^1.0.2",
"npm": "^5.6.0",
"openseadragon": "^2.3.1",
"pica": "^3.0.6",
"preact": "^8.2.7",
"react": "^15.6.2",
"react-dom": "^15.6.2",
"requirejs": "^2.3.5",
"requirejs-plugins": "^1.0.2",
"sharp": "^0.17.3",
@ -38,7 +34,10 @@
"wildglob": "^0.1.1"
},
"optionalDependencies": {
"flickrapi": "^0.3.28"
"flickrapi": "^0.3.28",
"preact": "^8.2.7",
"react": "^15.6.2",
"react-dom": "^15.6.2"
},
"devDependencies": {
"less": "*"