diff --git a/ui (gen4)/Makefile b/ui (gen4)/Makefile index b57dabc6..3ba66020 100755 --- a/ui (gen4)/Makefile +++ b/ui (gen4)/Makefile @@ -254,7 +254,7 @@ DEPENDENCIES = node npm wget zip unzip zipnote git \ # User targets... .PHONY: all -all: check dev dist +all: check dev dist deploy .PHONY: css @@ -276,29 +276,49 @@ cleanall: clean .PHONY: electron-dist -electron-dist: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).zip +electron-dist: VERSION := $(VERSION)-el +electron-dist: DIST := $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).zip +electron-dist: $(DIST) # add a time stamp to version... .PHONY: test-electron-dist -test-electron-dist: VERSION := $(VERSION)-$(DATE) -test-electron-dist: $(DIST_DIR)/$(APP_NAME)-$$(VERSION)-$(TARGET_OS)-$(ARCH).zip +test-electron-dist: VERSION := $(VERSION)-$(DATE)-el +test-electron-dist: DIST := $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).zip +test-electron-dist: $$(DIST) +#test-electron-dist: $(DIST_DIR)/$(APP_NAME)-$$(VERSION)-$(TARGET_OS)-$(ARCH).zip # NOTE: the "/" at the end here is significant... .PHONY: electron-unpacked -electron-unpacked: $(BUILD_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH)/ +electron-unpacked: VERSION := $(VERSION)-el +electron-unpacked: $(BUILD_DIR)/$(APP_NAME)-$$(VERSION)-$(TARGET_OS)-$(ARCH)/ +#.PHONY: electron-inst #electron-inst: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-$(TARGET_OS)-$(ARCH).msi +.PHONY: web +web: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-web.zip + + .PHONY: dist dist: test-electron-dist #dist: electron-dist -.PHONY: web -web: $(DIST_DIR)/$(APP_NAME)-$(VERSION)-web.zip +# NOTE: with the default sort order this gets the "latest" file, not sure +# how portable this is... +# XXX when ./dist is empty or non existent this will deploy the second arg... +# XXX HACK-ish... +# - deploy only when scrip both the script AND target are available +.PHONY: deploy +deploy: $(wildcard $(DIST_DIR)/$(APP_NAME)-*.zip) $(wildcard scripts/deploy.sh) + @[ -e $(DIST_DIR)/$(APP_NAME)-*.zip ] \ + || echo "Deploy error: Nothing to deploy, skipping." + @[ -e ./scripts/deploy.sh ] \ + && bash ./scripts/deploy.sh "$(DIST_DIR)/$(APP_NAME)-*.zip" \ + || echo "Deploy error: No deploy.sh script found in ./scripts/, skipping." @@ -358,6 +378,7 @@ $(BUILD_INFO): $(CSS_FILES) $(NODE_DIR) $(PROJECT_FILES) \ $(NODE_DIR): package.json npm install electron-rebuild + @touch "$@" # build app dir... @@ -374,6 +395,7 @@ $(BUILD_DIR)/$(APP_NAME)/: $(PROJECT_FILES) \ $(BUILD_INFO) \ "$(BUILD_DIR)/$(APP_NAME)" # cleanup vim swap files... + # NOTE: we need to do this as we copy whole directories... cd "$@" ; \ find . -name *.sw[po] -delete @touch "$@" diff --git a/ui (gen4)/features/demo.js b/ui (gen4)/features/demo.js index 5e2a8c85..40abf51a 100755 --- a/ui (gen4)/features/demo.js +++ b/ui (gen4)/features/demo.js @@ -99,6 +99,12 @@ module.Demo = core.ImageGridFeatures.Feature({ data: data.Data(demo_data), //images: images.Images(), images: images.Images(demo_images), + + location: { + path: 'Demo data', + method: 'loadDemoIndex', + check: true, + } }) }], }) diff --git a/ui (gen4)/features/filesystem.js b/ui (gen4)/features/filesystem.js index 788c6e87..b77c0a1b 100755 --- a/ui (gen4)/features/filesystem.js +++ b/ui (gen4)/features/filesystem.js @@ -1573,8 +1573,7 @@ var pushToHistory = function(action, to_top, checker){ if(to_top){ this.setTopURLHistory(path) } - }] -} + }] } var FileSystemURLHistory = module.FileSystemLoaderURLHistory = core.ImageGridFeatures.Feature({ diff --git a/ui (gen4)/features/history.js b/ui (gen4)/features/history.js index 8bc5f310..92afe6d4 100755 --- a/ui (gen4)/features/history.js +++ b/ui (gen4)/features/history.js @@ -129,7 +129,7 @@ var URLHistoryActions = actions.Actions({ var item = !clear ? (this.url_history[url] || {}) : {} open = item.open = open || this.location.method - check = item.check = check || 'checkPath' + check = item.check = check || this.location.check || 'checkPath' // remove the old value... if(url in this.url_history && this.config['url-history-push-up-on-open']){ @@ -182,7 +182,10 @@ var URLHistoryActions = actions.Actions({ if(url && this.url_history[url] && this.url_history[url].check){ var check = this.url_history[url].check - if(typeof(check) == typeof('str')){ + if(check === true || check === false){ + return check + + } else if(typeof(check) == typeof('str')){ return this[check](url) } else { diff --git a/ui (gen4)/ui.js b/ui (gen4)/ui.js index d78146bf..96110530 100755 --- a/ui (gen4)/ui.js +++ b/ui (gen4)/ui.js @@ -166,6 +166,7 @@ $(function(){ // setup the viewer... ig .load({ viewer: $('.viewer') }) + /* XXX load the intro index... .on('ready', function(){ // load some testing data if nothing else loaded... if(!this.url_history || Object.keys(this.url_history).length == 0){ @@ -178,6 +179,7 @@ $(function(){ .syncTags('both') } }) + //*/ .start() })