|
9 | 9 | // Run preparing steps before install of files |
10 | 10 | if CurStep = ssInstall then |
11 | 11 | begin |
12 | | - if UsingWinNT then |
13 | | - begin |
14 | | - UnInstallOldVersion(); |
| 12 | + UnInstallOldVersion(); |
15 | 13 |
|
16 | | - Log(Format('Selected Tasks - Path: %d, Associate: %d', [PathChkBox.State, PathExtChkBox.State])); |
| 14 | + Log(Format('Selected Tasks - Path: %d, Associate: %d', [PathChkBox.State, PathExtChkBox.State])); |
17 | 15 |
|
18 | | - if IsModifyPath then |
19 | | - ModifyPath([ExpandConstant('{app}') + '\bin']); |
| 16 | + if IsModifyPath then |
| 17 | + ModifyPath([ExpandConstant('{app}') + '\bin']); |
20 | 18 |
|
21 | | - if IsAssociated then |
22 | | - ModifyFileExts(['.rb', '.rbw']); |
| 19 | + if IsAssociated then |
| 20 | + ModifyFileExts(['.rb', '.rbw']); |
23 | 21 |
|
24 | 22 | #ifdef HaveUtf8ChkBox |
25 | | - if IsUtf8 then |
26 | | - ModifyRubyopt(['-Eutf-8']); |
| 23 | + if IsUtf8 then |
| 24 | + ModifyRubyopt(['-Eutf-8']); |
27 | 25 | #endif |
28 | 26 |
|
29 | | - if WizardIsComponentSelected('msys2') then |
30 | | - DeleteRubyMsys2Directory(); |
31 | | - |
32 | | - end else |
33 | | - MsgBox('Looks like you''ve got on older, unsupported Windows version.' #13 + |
34 | | - 'Proceeding with a reduced feature set installation.', |
35 | | - mbInformation, MB_OK); |
| 27 | + if WizardIsComponentSelected('msys2') then |
| 28 | + DeleteRubyMsys2Directory(); |
36 | 29 | end; |
37 | 30 |
|
38 | 31 | // Final steps before installer closes |
@@ -76,19 +69,31 @@ procedure CurUninstallStepChanged(const CurUninstallStep: TUninstallStep); |
76 | 69 | begin |
77 | 70 | if CurUninstallStep = usUninstall then |
78 | 71 | begin |
79 | | - if UsingWinNT then |
80 | | - begin |
81 | | - if GetPreviousData('PathModified', 'no') = 'yes' then |
82 | | - ModifyPath([ExpandConstant('{app}') + '\bin']); |
| 72 | + if GetPreviousData('PathModified', 'no') = 'yes' then |
| 73 | + ModifyPath([ExpandConstant('{app}') + '\bin']); |
83 | 74 |
|
84 | | - if GetPreviousData('FilesAssociated', 'no') = 'yes' then |
85 | | - ModifyFileExts(['.rb', '.rbw']); |
| 75 | + if GetPreviousData('FilesAssociated', 'no') = 'yes' then |
| 76 | + ModifyFileExts(['.rb', '.rbw']); |
86 | 77 |
|
87 | 78 | #ifdef HaveUtf8ChkBox |
88 | | - if GetPreviousData('Utf8', 'no') = 'yes' then |
89 | | - ModifyRubyopt(['-Eutf-8']); |
| 79 | + if GetPreviousData('Utf8', 'no') = 'yes' then |
| 80 | + ModifyRubyopt(['-Eutf-8']); |
90 | 81 | #endif |
91 | 82 |
|
| 83 | + {* Remove SSL junction link *} |
| 84 | + DelTree(ExpandConstant('{app}/ssl'), True, False, False); |
| 85 | + |
| 86 | + if ExpandConstant('{param:allfiles|yes}') = 'yes' then |
| 87 | + begin |
| 88 | + {* Remove possible MSYS2 *} |
| 89 | + DelTree(ExpandConstant('{app}/msys32'), True, True, True); |
| 90 | + DelTree(ExpandConstant('{app}/msys64'), True, True, True); |
| 91 | + {* Remove binstubs of installed gems *} |
| 92 | + DelTree(ExpandConstant('{app}/bin/*'), False, True, False); |
| 93 | + {* Remove installed gems *} |
| 94 | + DelTree(ExpandConstant('{app}/lib/ruby/gems'), True, True, True); |
| 95 | + {* Remove config of "ridk use" *} |
| 96 | + DelTree(ExpandConstant('{app}/ridk_use/rubies.yml'), False, True, False); |
92 | 97 | end; |
93 | 98 | end; |
94 | 99 | end; |
0 commit comments