11#include <.\idp\idp.iss>
22
3- #define SickChillInstallerVersion " v0.5.11 "
3+ #define SickChillInstallerVersion " v0.6.0 "
44
55#define AppId " {{B0D7EA3E-CC34-4BE6-95D5-3C3D31E9E1B2}"
66#define AppName " SickChill"
@@ -67,7 +67,7 @@ Name: "{group}\Edit {#AppName} Service"; Filename: "{app}\Installer\nssm.exe"; P
6767
6868[Run]
6969;SickChill
70- Filename : " {app} \Git\cmd\git .exe" ; Parameters : " clone {#AppRepoUrl} " " {app} \{#AppName} " " " ; StatusMsg : " Installing {#AppName}..."
70+ Filename : " {app} \Python3\tools\python .exe" ; Parameters : " -m pip install sickchill " ; StatusMsg : " Installing {#AppName}..."
7171;Filename: "xcopy.exe"; Parameters: """C:\SRinstaller\SickChill"" ""{app}\{#AppName}"" /E /I /H /Y"; Flags: runminimized; StatusMsg: "Installing {#AppName}..."
7272;Service
7373Filename : " {app} \Installer\nssm.exe" ; Parameters : " start " " {#AppServiceName}" " " ; Flags : runhidden ; BeforeInstall : CreateService; StatusMsg : " Starting {#AppName} service..."
@@ -87,7 +87,6 @@ Filename: "{sys}\netsh.exe"; Parameters: "advfirewall firewall delete rule name=
8787[UninstallDelete]
8888Type : filesandordirs ; Name : " {app} \Python3"
8989Type : filesandordirs ; Name : " {app} \Python"
90- Type : filesandordirs ; Name : " {app} \Git"
9190Type : filesandordirs ; Name : " {app} \{#AppName}"
9291Type : dirifempty ; Name : " {app} "
9392
170169 CancelWithoutPrompt: Boolean;
171170 ErrorMessage, LocalFilesDir: String;
172171 SeedDownloadPageId, DependencyDownloadPageId: Integer;
173- PythonDep, GitDep : TDependency;
172+ PythonDep: TDependency;
174173 InstallDepPage: TOutputProgressWizardPage;
175174 OptionsPage: TInputQueryWizardPage;
176175 // Uninstall variables
@@ -255,13 +254,7 @@ begin
255254 // Make sure we're running the latest version of the installer
256255 CheckInstallerVersion(SeedFile)
257256
258- if Is64BitInstallMode then
259- Arch := ' x64'
260- else
261- Arch := ' x86' ;
262-
263257 ParseDependency(PythonDep, ' Python' , SeedFile)
264- ParseDependency(GitDep, ' Git.' + Arch, SeedFile)
265258
266259 DependencyDownloadPageId := idpCreateDownloadForm(wpPreparing)
267260 DownloadPage := PageFromID(DependencyDownloadPageId)
@@ -350,12 +343,11 @@ begin
350343 OldProgressString := WizardForm.StatusLabel.Caption;
351344 WizardForm.StatusLabel.Caption := ExpandConstant(' Installing {#AppName} service...' )
352345
353- Exec(Nssm, ExpandConstant(' install "{#AppServiceName}" "{app}\Python3\tools\python.exe" """{app}\{#AppName} \SickChill.py""" --nolaunch --port=' +GetWebPort(' ' )+' --datadir="""{app}\Data"""' ), ' ' , SW_HIDE, ewWaitUntilTerminated, ResultCode)
346+ Exec(Nssm, ExpandConstant(' install "{#AppServiceName}" "{app}\Python3\tools\python.exe" """{app}\Python3\tools\Scripts \SickChill.py""" --nolaunch --port=' +GetWebPort(' ' )+' --datadir="""{app}\Data"""' ), ' ' , SW_HIDE, ewWaitUntilTerminated, ResultCode)
354347 Exec(Nssm, ExpandConstant(' set "{#AppServiceName}" AppDirectory "{app}\Data"' ), ' ' , SW_HIDE, ewWaitUntilTerminated, ResultCode)
355348 Exec(Nssm, ExpandConstant(' set "{#AppServiceName}" Description "{#AppServiceDescription}"' ), ' ' , SW_HIDE, ewWaitUntilTerminated, ResultCode)
356349 Exec(Nssm, ExpandConstant(' set "{#AppServiceName}" AppStopMethodSkip 6' ), ' ' , SW_HIDE, ewWaitUntilTerminated, ResultCode)
357350 Exec(Nssm, ExpandConstant(' set "{#AppServiceName}" AppStopMethodConsole 20000' ), ' ' , SW_HIDE, ewWaitUntilTerminated, ResultCode)
358- Exec(Nssm, ExpandConstant(' set "{#AppServiceName}" AppEnvironmentExtra "PATH={app}\Git\cmd;%PATH%"' ), ' ' , SW_HIDE, ewWaitUntilTerminated, ResultCode)
359351
360352 if WindowsVersion.NTPlatform and (WindowsVersion.Major = 10 ) and (WindowsVersion.Minor = 0 ) and (WindowsVersion.Build > 14393 ) then begin
361353 Exec(Nssm, ExpandConstant(' set "{#AppServiceName}" AppNoConsole 1' ), ' ' , SW_HIDE, ewWaitUntilTerminated, ResultCode)
@@ -436,25 +428,10 @@ begin
436428 AbortInstallation(' Creation of folder failed!' );
437429
438430 TargetFolder.CopyHere(ZipFile.Items, SHCONTCH_NOPROGRESSBOX or SHCONTCH_RESPONDYESTOALL);
439-
440- ; PythonPTHFile := ExpandConstant(' {app}\Python3\python38._pth' );
441- ; SaveStringToFile(PythonPTHFile, #13 #10 + ' ..\SickChill' + #13 #10 , True);
442- ; SaveStringToFile(PythonPTHFile, #13 #10 + ' import site' + #13 #10 , True);
443-
444- CleanPython()
445431 InstallDepPage.SetProgress(InstallDepPage.ProgressBar.Position+1 , InstallDepPage.ProgressBar.Max)
446432 ResultCode := 0
447433end ;
448434
449- procedure InstallGit ();
450- var
451- ResultCode: Integer;
452- begin
453- InstallDepPage.SetText(' Installing Git...' , ' ' )
454- Exec(ExpandConstantEx(' {tmp}\{filename}' , ' filename' , GitDep.Filename), ExpandConstant(' -InstallPath="{app}\Git" -y -gm2' ), ' ' , SW_SHOW, ewWaitUntilTerminated, ResultCode)
455- InstallDepPage.SetProgress(InstallDepPage.ProgressBar.Position+1 , InstallDepPage.ProgressBar.Max)
456- end ;
457-
458435function VerifyDependency (Dependency: TDependency): Boolean;
459436begin
460437 Result := True
@@ -467,14 +444,6 @@ begin
467444 InstallDepPage.SetProgress(InstallDepPage.ProgressBar.Position+1 , InstallDepPage.ProgressBar.Max)
468445end ;
469446
470- function VerifyDependencies (): Boolean;
471- begin
472- Result := True
473-
474- Result := Result and VerifyDependency(PythonDep)
475- Result := Result and VerifyDependency(GitDep)
476- end ;
477-
478447function PrepareToInstall (var NeedsRestart: Boolean): String;
479448begin
480449 if ErrorMessage <> ' ' then begin
@@ -487,9 +456,8 @@ begin
487456 try
488457 InstallDepPage.Show
489458 InstallDepPage.SetProgress(0 , 6 )
490- if VerifyDependencies( ) then begin
459+ if VerifyDependency(PythonDep ) then begin
491460 InstallPython()
492- InstallGit()
493461 end else begin
494462 ErrorMessage := ' There was an error installing the required dependencies.'
495463 end ;
@@ -619,7 +587,6 @@ begin
619587 Result := MemoDirInfo + NewLine + NewLine + \
620588 MemoGroupInfo + NewLine + NewLine + \
621589 ' Download and install dependencies:' + NewLine + \
622- Space + ' Git' + NewLine + \
623590 Space + ' Python' + NewLine + NewLine + \
624591 ' Web server port:' + NewLine + Space + GetWebPort(' ' )
625592
0 commit comments