Skip to content

Commit

Permalink
Switch to nuget python
Browse files Browse the repository at this point in the history
Signed-off-by: miigotu <miigotu@gmail.com>
  • Loading branch information
miigotu committed Jul 12, 2021
1 parent bf38c1d commit dbbaa27
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions SickChill.iss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <.\idp\idp.iss>

#define SickChillInstallerVersion "v0.5.9"
#define SickChillInstallerVersion "v0.5.10"

#define AppId "{{B0D7EA3E-CC34-4BE6-95D5-3C3D31E9E1B2}"
#define AppName "SickChill"
Expand Down Expand Up @@ -72,8 +72,8 @@ Filename: "{app}\Git\cmd\git.exe"; Parameters: "clone {#AppRepoUrl} ""{app}\{#Ap
;Service
Filename: "{app}\Installer\nssm.exe"; Parameters: "start ""{#AppServiceName}"""; Flags: runhidden; BeforeInstall: CreateService; StatusMsg: "Starting {#AppName} service..."
;Firewall
Filename: "{sys}\netsh.exe"; Parameters: "advfirewall firewall add rule name=""{#AppServiceName} In"" program=""{app}\Python3\python.exe"" dir=in action=allow enable=yes"; Flags: runhidden;
Filename: "{sys}\netsh.exe"; Parameters: "advfirewall firewall add rule name=""{#AppServiceName} Out"" program=""{app}\Python3\python.exe"" dir=out action=allow enable=yes"; Flags: runhidden;
Filename: "{sys}\netsh.exe"; Parameters: "advfirewall firewall add rule name=""{#AppServiceName} In"" program=""{app}\Python3\tools\python.exe"" dir=in action=allow enable=yes"; Flags: runhidden;
Filename: "{sys}\netsh.exe"; Parameters: "advfirewall firewall add rule name=""{#AppServiceName} Out"" program=""{app}\Python3\tools\python.exe"" dir=out action=allow enable=yes"; Flags: runhidden;
;Open
Filename: "http://localhost:{code:GetWebPort}/"; Flags: postinstall shellexec; Description: "Open {#AppName} in browser"

Expand Down Expand Up @@ -350,7 +350,7 @@ begin
OldProgressString := WizardForm.StatusLabel.Caption;
WizardForm.StatusLabel.Caption := ExpandConstant('Installing {#AppName} service...')
Exec(Nssm, ExpandConstant('install "{#AppServiceName}" "{app}\Python3\python.exe" """{app}\{#AppName}\SickChill.py""" --nolaunch --port='+GetWebPort('')+' --datadir="""{app}\Data"""'), '', SW_HIDE, ewWaitUntilTerminated, ResultCode)
Exec(Nssm, ExpandConstant('install "{#AppServiceName}" "{app}\Python3\tools\python.exe" """{app}\{#AppName}\SickChill.py""" --nolaunch --port='+GetWebPort('')+' --datadir="""{app}\Data"""'), '', SW_HIDE, ewWaitUntilTerminated, ResultCode)
Exec(Nssm, ExpandConstant('set "{#AppServiceName}" AppDirectory "{app}\Data"'), '', SW_HIDE, ewWaitUntilTerminated, ResultCode)
Exec(Nssm, ExpandConstant('set "{#AppServiceName}" Description "{#AppServiceDescription}"'), '', SW_HIDE, ewWaitUntilTerminated, ResultCode)
Exec(Nssm, ExpandConstant('set "{#AppServiceName}" AppStopMethodSkip 6'), '', SW_HIDE, ewWaitUntilTerminated, ResultCode)
Expand Down Expand Up @@ -392,7 +392,7 @@ procedure CleanPython();
var
PythonPath: String;
begin
PythonPath := ExpandConstant('{app}\Python3')
PythonPath := ExpandConstant('{app}\Python3\tools')
DelTree(PythonPath + '\*.msi', False, True, False)
DelTree(PythonPath + '\Doc', True, True, True)
Expand Down Expand Up @@ -437,9 +437,9 @@ begin
TargetFolder.CopyHere(ZipFile.Items, SHCONTCH_NOPROGRESSBOX or SHCONTCH_RESPONDYESTOALL);
PythonPTHFile := ExpandConstant('{app}\Python3\python38._pth');
SaveStringToFile(PythonPTHFile, #13#10 + '..\SickChill' + #13#10, True);
SaveStringToFile(PythonPTHFile, #13#10 + 'import site' + #13#10, True);
; PythonPTHFile := ExpandConstant('{app}\Python3\python38._pth');
; SaveStringToFile(PythonPTHFile, #13#10 + '..\SickChill' + #13#10, True);
; SaveStringToFile(PythonPTHFile, #13#10 + 'import site' + #13#10, True);
CleanPython()
InstallDepPage.SetProgress(InstallDepPage.ProgressBar.Position+1, InstallDepPage.ProgressBar.Max)
Expand Down
12 changes: 6 additions & 6 deletions seed.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ Version=10009
DownloadUrl=https://github.com/SickChill/windows-sickchill

[Python.x86]
url=https://www.python.org/ftp/python/3.8.5/python-3.8.5-embed-win32.zip
size=7305731
sha1=080728ee56fc64f65086e2a293a8982a22a910ce
url=https://www.nuget.org/api/v2/package/python/3.8.10
size=14219645
sha1=6b67898b2b22d61c0a6b42aa46b10cb4210446d7

[Python.x64]
url=https://www.python.org/ftp/python/3.8.5/python-3.8.5-embed-amd64.zip
size=8168581
sha1=3cd35dc8bf94df27df93df2ba775665a35d4c9ec
url=https://www.nuget.org/api/v2/package/python/3.8.10
size=14219645
sha1=6b67898b2b22d61c0a6b42aa46b10cb4210446d7

[Git.x86]
url=https://github.com/git-for-windows/git/releases/download/v2.12.2.windows.1/PortableGit-2.12.2-32-bit.7z.exe
Expand Down

0 comments on commit dbbaa27

Please sign in to comment.