forked from usgs/shakecast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Roll app version
- Loading branch information
Daniel Slosky
committed
Apr 16, 2019
1 parent
fc314d7
commit 6ea058f
Showing
25 changed files
with
524 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[Application] | ||
name=ShakeCast | ||
version=4.0.6 | ||
entry_point=shakecast:start | ||
# Yuck, pywin32 stores modules in odd places, so we need this to get them loaded | ||
# correctly | ||
extra_preamble=./shakecast/windows/set_paths.py | ||
|
||
[Python] | ||
version=2.7 | ||
bitness=32 | ||
format=bundled | ||
|
||
[Include] | ||
pypi_wheels = click==6.6 | ||
Flask==0.12.3 | ||
Flask-Login==0.4.1 | ||
Flask-Uploads==0.2.1 | ||
fpdf==1.7.2 | ||
itsdangerous==0.24 | ||
Jinja2==2.8 | ||
MarkupSafe==0.23 | ||
PySocks==1.5.7 | ||
shakecast-aebm==0.0b1 | ||
SQLAlchemy==1.0.14 | ||
Werkzeug==0.11.10 | ||
xmltodict==0.10.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
!include LogicLib.nsh | ||
|
||
# define the name of installer | ||
OutFile "dist\Shakecast_Installer.exe" | ||
|
||
# define default installation directory | ||
InstallDir "$PROFILE\Shakecast" | ||
|
||
# Get admin level | ||
RequestExecutionLevel admin | ||
|
||
!macro VerifyUserIsAdmin | ||
UserInfo::GetAccountType | ||
pop $0 | ||
${If} $0 != "admin" ;Require admin rights on NT4+ | ||
messageBox mb_iconstop "Administrator rights required!" | ||
setErrorLevel 740 ;ERROR_ELEVATION_REQUIRED | ||
quit | ||
${EndIf} | ||
!macroend | ||
|
||
function .onInit | ||
setShellVarContext all | ||
!insertmacro VerifyUserIsAdmin | ||
functionEnd | ||
|
||
# start default section | ||
Section "Install ShakeCast" IDOK | ||
|
||
# set the installation directory as the destination for the following actions | ||
SetOutPath $INSTDIR | ||
|
||
# set environment variable for shakecast home | ||
EnVar::AddValue "SC_HOME" "$PROFILE/.shakecast" | ||
|
||
DetailPrint "Extracting Files into Installation Directory" | ||
|
||
# specify files to go into the installation directory path | ||
File /r "*" | ||
|
||
# Uninstaller - See function un.onInit and section "uninstall" for configuration | ||
writeUninstaller "$INSTDIR\uninstall.exe" | ||
|
||
SectionEnd | ||
|
||
Section "Python Installation" | ||
|
||
# run the python installer and wait for it to finish | ||
File "..\requirements\python-2.7.13.msi" | ||
ExecWait '"$SYSDIR\msiExec" /i "$INSTDIR\python-2.7.13.msi" /qb TARGETDIR=C:\Python27 ALLUSERS=1' | ||
|
||
# install the windows extensions | ||
File "..\requirements\pywin32-224.win32-py2.7.exe" | ||
ExecWait 'C:\Python27\Scripts\easy_install.exe "$INSTDIR\pywin32-224.win32-py2.7.exe"' | ||
|
||
|
||
SectionEnd | ||
|
||
Section "ShakeCast installation" | ||
DetailPrint "Installing ShakeCast" | ||
|
||
ExecWait "C:\Python27\python.exe -m pip install usgs-shakecast" | ||
ExecWait "C:\Python27\python.exe -m shakecast.app.windows.set_paths" | ||
ExecWait "C:\Python27\python.exe -m shakecast start" | ||
DetailPrint "Finishing up Installation" | ||
SectionEnd | ||
|
||
# Uninstaller | ||
|
||
function un.onInit | ||
SetShellVarContext all | ||
|
||
#Verify the uninstaller - last chance to back out | ||
MessageBox MB_OKCANCEL "Permanantly remove ShakeCast?" IDOK next | ||
Abort | ||
next: | ||
!insertmacro VerifyUserIsAdmin | ||
functionEnd | ||
|
||
section "uninstall" | ||
|
||
ExecWait "c:\python27\python.exe -m shakecast stop" | ||
ExecWait "c:\python27\python.exe -m shakecast uninstall" | ||
ExecWait '"$SYSDIR\msiExec" /x "$INSTDIR\python-2.7.13.msi"' | ||
|
||
# Remove files | ||
delete $INSTDIR\* | ||
|
||
# Remove ShakeCast directories safely | ||
rmDir /r $INSTDIR\admin | ||
rmDir /r $INSTDIR\shakecast | ||
rmDir /r $INSTDIR\appveyor | ||
rmDir /r $INSTDIR\.git | ||
|
||
# Always delete uninstaller as the last action | ||
delete $INSTDIR\uninstall.exe | ||
|
||
# Try to remove the install directory | ||
rmDir /r $INSTDIR | ||
|
||
sectionEnd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from . import app | ||
from . import app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from controls import start, stop |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
from server_service import ShakecastServer | ||
from web_server_service import ShakecastWebServer | ||
|
||
def start(): | ||
server = ShakecastServer() | ||
web_server = ShakecastWebServer() | ||
|
||
server.start_daemon() | ||
web_server.start_daemon() | ||
|
||
def stop(): | ||
server = ShakecastServer() | ||
web_server = ShakecastWebServer() | ||
|
||
server.stop() | ||
web_server.stop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.