Forum Discussion

EnTerr's avatar
EnTerr
Roku Guru
9 years ago

Lightweight deployment script for Windows

This question made me wonder about writing a Windows equivalent of this script i use on Mac to build&deploy to Roku box.

I like to have as little "friction"/dependencies for people as reasonably possible - but the thing is, stock Windows has neither make nor zip nor curl out of the box. So the question is, can something be done for that, short of a "You wanted a banana but what you got was a gorilla holding the banana and the entire jungle" syndrome (i.e. install some Unix subsystem flavor or get eclipsed).

I did some research and seems that it could potentially be done, by say writing a PowerShell script, one should be able to do zipping and file upload, and result filtering. Yet my PowerShell king-fu is non-existent. So i wonder - has somebody already done this? Like write a deployment script that works on a vanilla Windows?

3 Replies

  • THIS SENDS YOUR NEW CHANNEL FROM PC TO ROKU

    put these two commands in a windows batch file...
    7Z a ARCHIVE.ZIP @LISTFILE.TXT
    CURL http://192.168.x.x/plugin_install -u"rokudev:xxxx" -F "archive=@ARCHIVE.ZIP" -F "mysubmit=" --digest

    listfile.txt contains these four lines...
    manifest
    components
    images
    source

    manifest is a file in your work directory.
    the others are subdirectories of work.

    CURL is already in Windows 10.
    7Z is a free zip program from https://www.7-zip.org

    The x's are your own numbers.

  • renojim's avatar
    renojim
    Community Streaming Expert
    I've never tried to create one and PowerShell is a beast.  It seems far easier to just download one of the curl executables for Windows.  I used to use netcat, but had to change to curl when they added that stupid password requirement to sideload.  curl combined with a command line zip utility (I use pkzip25 which can probably still be found floating around on the Internet; 7zip would also work) makes a batch file pretty trivial to create.

    -JT
  • If you have W10 you can enable Bash on Windows. Very handy.
    For myself I've made nodejs script to handle deployment. It isn't small but it does handle more complex deployment scenarios.