#!/bin/bash
ROKU_DEV_TARGET=192.168.1.24 # Roku 2 XS
#ROKU_DEV_TARGET=192.168.1.42 # Roku 3
# wake up/interrupt Roku - workaround for fw5.4 deadly bug
curl -d '' http://$ROKU_DEV_TARGET:8060/keypress/Home
# build
touch timestamp
zip -FS -r bundle * -x run.sh
# deploy
curl -f -sS --user rokudev:nuisance --anyauth -F "mysubmit=Install" -F "archive=@bundle.zip" -F "passwd=" http://$ROKU_DEV_TARGET/plugin_install | grep -Po '(?<=<font color="red">).*' | sed 's/<\/font>//'
"EnTerr" wrote:
Sorry, don't know what makefile's issue might be, i am not using it - it is way too slow, the last time i read it, it was making new zip file from scratch every time for no raisin.
"RokuMarkn" wrote:
Does your zip program actually take a noticeable amount of time to package the channel?
--Mark
"RokuMarkn" wrote:
Making a new zip file takes a fraction of a second for me, even for a very large package. Does your zip program actually take a noticeable amount of time to package the channel?
(zip -0 -r "$(ZIPREL)/$(APPNAME).zip" . -i \*.png $(ZIP_EXCLUDE)); \Seeing that JPG files are not excluded in the same manner, i wonder if storing PNG as uncompressed is required (e.g. say zip is memory-mapped and PNG routine expects raw buffer) and i should reproduce it in my build script - or was it just compression speed optimization?
(zip -9 -r "$(ZIPREL)/$(APPNAME).zip" . -x \*~ -x \*.png -x Makefile $(ZIP_EXCLUDE)); \
"destruk" wrote:
Are you loading the code with the roku at the home screen? Some running channel screen types significantly impact the reinstall process.
"bosborne" wrote:
Doesn't matter, home screen has the same behavior.
APPNAME = customvideoplayer
VERSION = 1.0
include ../app.mk
@echo "*** Creating Package ***"
@echo " >> creating destination directory $(PKGREL)"
@if [ ! -d $(PKGREL) ]; \
then \
mkdir -p $(PKGREL); \
fi
@echo " >> setting directory permissions for $(PKGREL)"
@if [ ! -w $(PKGREL) ]; \
then \
chmod 755 $(PKGREL); \
fi
@echo "Packaging $(APPSRC)/$(APPNAME) on host $(ROKU_DEV_TARGET)"
@if [ "$(HTTPSTATUS)" == " 401" ]; \
then \
read -p "Password: " REPLY ; echo $$REPLY | xargs -i curl --user $(USERPASS) --digest -s -S -Fmysubmit=Package -Fapp_name=$(APPNAME)/$(VERSION) -Fpasswd={} -Fpkg_time=`expr \`date +%s\` \* 1000` "http://$(ROKU_DEV_TARGET)/plugin_package" | grep '^<tr><td><font face="Courier"><a' | sed 's/.*href=\"\([^\"]*\)\".*/\1/' | sed 's#pkgs//##' | xargs -i curl --user $(USERPASS) --digest -s -S -o $(PKGREL)/$(APPNAME)_`date +%F-%T`.pkg http://$(ROKU_DEV_TARGET)/pkgs/{} ; \
else \
read -p "Password: " REPLY ; echo $$REPLY | xargs -i curl -s -S -Fmysubmit=Package -Fapp_name=$(APPNAME)/$(VERSION) -Fpasswd={} -Fpkg_time=`expr \`date +%s\` \* 1000` "http://$(ROKU_DEV_TARGET)/plugin_package" | grep '^<tr><td><font face="Courier"><a' | sed 's/.*href=\"\([^\"]*\)\".*/\1/' | sed 's#pkgs//##' | xargs -i curl -s -S -o $(PKGREL)/$(APPNAME)_`date +%F-%T`.pkg http://$(ROKU_DEV_TARGET)/pkgs/{} ; \
fi
@echo "*** Package $(APPNAME) complete ***"