WheatonCS / Lexos

Python/Flask-based website for text analysis workflow. Previous (stable) release is live at:
http://lexos.wheatoncollege.edu
MIT License
120 stars 20 forks source link

information for future windows installer developer #427

Closed czhang03 closed 8 years ago

czhang03 commented 8 years ago

first thing first

powershell rocks.

the easy way

theoretically changing the version number in \install\windows\config.ps1 will work.

the hard way

if solely changing the version number do not work... I feel sorry about that.

I will explain how the scripts works:

cmd's

all the cmd scripts are helper scripts that actually calls powershell scripts(ps1).

Therefore the local version of install.cmd, update.ps1, install.ps1 actually never runs.

ps1's

This is the tricky part, but because of the awesomeness of powershell, it is actually very easy to read.

install.ps1

this file first goes to https://repo.continuum.io/archive/, and then go through the table to find the latest version of anaconda and then check the hash, and install it.(special notice, because the security issue of MD5, continuum resently changes all their verification method from MD5 to SHA256, this archive page still uses outdated MD5, I think some time they will change it sometime, then we need to change our script as well.)

and then this script goes to the lexos release page and downloads the release with the version number you specified.

and then create shortcut, install module, and stuff.

run.ps1

this script opens a cmd running python(but not display the output, the output is redirected to null.) and then continuously trying to connect to http://localhost:5000 when it success, pop up the default browser.

update.ps1

This script will first check whether the version you specify in config.ps1 is already installed. if not, remove all the other version of lexos(basically C:\Lexos-*) and then install the new version of lexos.

other cool stuff.

the lexos_installer.exe is made with http://bat2exe.net/ and install.cmd. the lexos_installer.exe(also install.cmd and install.ps1) accepts two switch: -noAnaconda and -noConfirm(alias: -y) -noAnaconda will turn off anaconda installation and download for testing. -y will disable all the confirmation and prompt. if you want to sign the exe or ps1 file (you should, if you create a new exe or ps1) use the method here: https://github.com/GeeLaw/psguy.me/tree/master/profile#sign-scripts and the code can be found here: https://github.com/GeeLaw/psguy.me/blob/master/profile/profile.ps1#L32

Happy scripting.

scottkleinman commented 8 years ago

Added this to a documentation file in the repo.