1
1
@ echo off
2
+ :: Check if no-title has been switched on.
2
3
if " %~1 " NEQ " --no-title" title StrobeOS Installation Script
4
+
5
+ :: Check if Cosmos has been installed, if true, uninstall it.
3
6
set errorlevel = 0
4
7
if exist " %appdata% \Cosmos User Kit\unins000.exe" call " %appdata% \Cosmos User Kit\unins000"
5
8
if " %errorlevel% " == " 0" goto :installNew
6
9
echo Install has failed because there was an error with the uninstaller.
7
10
goto :End
8
11
12
+
9
13
:installNew
14
+ :: Check if the Cosmos installation files are there, if they are, install them.
10
15
echo Starting installation of Cosmos...
11
16
if exist " cosmos\install-VS2015.bat" goto installreal
17
+
18
+ :: If not, clone the git repo and get them.
12
19
echo Cosmos wasn't found!
13
20
goto Clone
14
21
15
22
:Clone
23
+ :: Check for the "os" folder and delete it.
16
24
set back = %cd%
17
25
cd ..
18
26
if not exist " os" cd %back%
19
27
if exist " os" rmdir " os" /S /Q
28
+
29
+ :: Check for git
20
30
git --version > nul 2 >& 1 && (
21
31
echo Git found, Trying to git clone...
22
32
) || (
23
33
echo Git wasn't found in path.
24
34
goto End
25
35
)
36
+
37
+ :: Clone and update the submodules
26
38
git clone https://github.com/StrobeOS/os.git
27
39
cd os
28
40
git submodule update --init --recursive
41
+
42
+ :: Go back to the installer
29
43
goto installNew
30
44
31
45
:installreal
46
+ :: Actually install cosmos
32
47
cd cosmos
33
48
call " install-VS2015.bat"
34
49
call :waitUntilFinish
50
+
51
+ :: End the program
35
52
echo Installation finished, feel free to modify!
36
53
goto End
37
54
38
55
:waitUntilFinish
56
+ :: Wait untill finish, not really working, but that's what i got.
39
57
echo Waiting installation to finish...
40
58
:internal
59
+ :: Check for the uninstaller.
41
60
if exist " %appdata% \Cosmos User Kit\unins000.exe" goto out
42
61
timeout /nobreak /t 1 > nul
62
+ :: Loop.
43
63
goto internal
44
64
:out
65
+ :: Go to the real end
45
66
goto realEnd
46
67
68
+ :: The pause end
47
69
:End
48
70
pause
49
- :realEnd
71
+
72
+ :: The real end
73
+ :realEnd
0 commit comments