Skip to content

Commit bf38c1d

Browse files
committed
Release 0.5.9 (tested)
Use embedded python3.8 to avoid conflicts Signed-off-by: miigotu <[email protected]>
1 parent bb11528 commit bf38c1d

File tree

3 files changed

+50
-14
lines changed

3 files changed

+50
-14
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ The install script is written using the excellent [Inno Setup](http://www.jrsoft
2020

2121
Download
2222
--------
23-
Head on over to the [releases](https://github.com/SickChill/SickChillInstaller/releases/latest) tab.
23+
Head on over to the [releases](https://github.com/SickChill/windows-sickchill/releases/latest) tab.
2424

2525
How It Works
2626
------------
27-
First, the installer will grab a 'seed' file, located [here](https://raw.github.com/SickChill/SickChillInstaller/master/seed.ini). This has a list of the dependencies, the URLs they can be downloaded from, their size, and an SHA1 hash. It also uses this file to make sure the user is running the latest version of the installer.
27+
First, the installer will grab a 'seed' file, located [here](https://raw.github.com/SickChill/windows-sickchill/master/seed.ini). This has a list of the dependencies, the URLs they can be downloaded from, their size, and an SHA1 hash. It also uses this file to make sure the user is running the latest version of the installer.
2828

2929
Once the user steps through the pages of the wizard, the installer downloads the dependency files and verifies the SHA1 hash. It then installs them into the directory chosen by the user. Once the dependencies are installed, it uses Git to clone the SickChill repository.

SickChill.iss

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <.\idp\idp.iss>
22

3-
#define SickChillInstallerVersion "v0.5.7"
3+
#define SickChillInstallerVersion "v0.5.9"
44

55
#define AppId "{{B0D7EA3E-CC34-4BE6-95D5-3C3D31E9E1B2}"
66
#define AppName "SickChill"
@@ -14,8 +14,8 @@
1414

1515
#define DefaultPort 8081
1616

17-
#define InstallerVersion 10008
18-
#define InstallerSeedUrl "https://raw.githubusercontent.com/SickChill/SickChillInstaller/master/seed.ini"
17+
#define InstallerVersion 10009
18+
#define InstallerSeedUrl "https://raw.githubusercontent.com/SickChill/windows-sickchill/master/seed.ini"
1919
#define AppRepoUrl "https://github.com/SickChill/SickChill.git"
2020

2121
[Setup]
@@ -162,6 +162,8 @@ const
162162
INVALID_HANDLE_VALUE = $FFFFFFFF;
163163
SLDF_RUNAS_USER = $00002000;
164164
CLSID_ShellLink = '{00021401-0000-0000-C000-000000000046}';
165+
SHCONTCH_NOPROGRESSBOX = 4;
166+
SHCONTCH_RESPONDYESTOALL = 16;
165167
166168
var
167169
// This lets AbortInstallation() terminate setup without prompting the user
@@ -403,11 +405,45 @@ end;
403405
procedure InstallPython();
404406
var
405407
ResultCode: Integer;
408+
Shell: Variant;
409+
ZipPath: Variant;
410+
ZipFile: Variant;
411+
TargetPath: Variant;
412+
TargetFolder: Variant;
413+
PythonPTHFile: Variant;
406414
begin
407415
InstallDepPage.SetText('Installing Python...', '')
408-
Exec(ExpandConstantEx('{tmp}\{filename}', 'filename', PythonDep.Filename), ExpandConstant('/quiet TargetDir="{app}\Python3" InstallAllUsers=1'), '', SW_SHOW, ewWaitUntilTerminated, ResultCode)
416+
Shell := CreateOleObject('Shell.Application');
417+
if VarIsClear(Shell) then
418+
AbortInstallation('Failed to create Shell.Application');
419+
420+
ZipPath := ExpandConstantEx('{tmp}\{filename}', 'filename', PythonDep.Filename);
421+
if VarIsClear(ZipPath) then
422+
AbortInstallation('ZIP Path failed');
423+
424+
ZipFile := Shell.NameSpace(ZipPath);
425+
if VarIsClear(ZipFile) then
426+
AbortInstallation('ZIP file does not exist or cannot be opened');
427+
428+
TargetPath := ExpandConstant('{app}\Python3');
429+
if ForceDirectories(TargetPath) then
430+
begin
431+
TargetFolder := Shell.NameSpace(TargetPath);
432+
if VarIsClear(TargetFolder) then
433+
AbortInstallation('Could not select target with shell');
434+
end
435+
else
436+
AbortInstallation('Creation of folder failed!');
437+
438+
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+
409444
CleanPython()
410445
InstallDepPage.SetProgress(InstallDepPage.ProgressBar.Position+1, InstallDepPage.ProgressBar.Max)
446+
ResultCode := 0
411447
end;
412448
413449
procedure InstallGit();

seed.ini

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[Installer]
2-
Version=10008
3-
DownloadUrl=https://github.com/SickChill/SickChillInstaller
2+
Version=10009
3+
DownloadUrl=https://github.com/SickChill/windows-sickchill
44

55
[Python.x86]
6-
url=https://www.python.org/ftp/python/3.8.5/python-3.8.5.exe
7-
size=26777232
8-
sha1=3aa5a0bb797977f5d26a39785ae4d87bb52023d3
6+
url=https://www.python.org/ftp/python/3.8.5/python-3.8.5-embed-win32.zip
7+
size=7305731
8+
sha1=080728ee56fc64f65086e2a293a8982a22a910ce
99

1010
[Python.x64]
11-
url=https://www.python.org/ftp/python/3.8.5/python-3.8.5-amd64.exe
12-
size=27864320
13-
sha1=00123c4d6cabb2e07efc5848451dcd556a734cfa
11+
url=https://www.python.org/ftp/python/3.8.5/python-3.8.5-embed-amd64.zip
12+
size=8168581
13+
sha1=3cd35dc8bf94df27df93df2ba775665a35d4c9ec
1414

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

0 commit comments

Comments
 (0)