Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
9186f259
Commit
9186f259
authored
6 years ago
by
Marco Z
Browse files
Options
Downloads
Patches
Plain Diff
Adjustments
parent
5687c3b0
No related branches found
No related tags found
2 merge requests
!488
Merge in next and don't billboard papersprites in GL
,
!356
Add new Windows installer scripts
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
windows-installer/new-install/staging.bat
+5
-1
5 additions, 1 deletion
windows-installer/new-install/staging.bat
windows-installer/new-install/uninstall.bat
+2
-114
2 additions, 114 deletions
windows-installer/new-install/uninstall.bat
with
7 additions
and
115 deletions
windows-installer/new-install/staging.bat
+
5
−
1
View file @
9186f259
...
...
@@ -153,7 +153,11 @@ mkdir "%OLDINSTALLDIR%"
set
OLDINSTALLCHANGED
=
if
[
"
%MoveOldExesDlls%
"
]
==
[
""
]
goto
MoveOldInstallNewFiles
if
[
"
%MoveOldExesDlls%
"
]
==
[
"1"
]
(
goto
MoveOldInstallExeDll
)
else
(
goto
MoveOldInstallNewFiles
)
:
MoveOldInstallExeDll
...
...
This diff is collapsed.
Click to expand it.
windows-installer/new-install/uninstall.bat
+
2
−
114
View file @
9186f259
...
...
@@ -34,110 +34,6 @@ if ["%PROCEED%"] == ["1"] (
exit
)
:
DeleteAllPrompt
:: TODO: Let's DUMMY this out for now -- I'm not confident that a full-folder
:: deletion wouldn't be disastrous for edge-cases. E.g., what if we somehow got
:: Program Files as the folder to delete? Or C:\?
::
:: Let's just delete individual files, attempt to delete the folder if it is
:: empty, then leave it up to the user to clear the rest. Yes, their data
:: and mods will be left alone by the uninstaller.
::
:: mazmazz 12/2/2018
set
DELETEALL
=
goto
DeleteFiles
echo
Do
you
want
to
delete
your
game
data
and
mods
?
In
folder
:
echo
%USERDIR%
set
/p
DELETEALL
=
"[Yes/no] "
if
/I
[
"
%DELETEALL
:~0,1
%
"
]
==
[
"n"
]
(
set
DELETEALL
=
goto
DeleteFiles
)
if
/I
[
"
%DELETEALL%
"
]
==
[
"y"
]
(
echo
Type
Yes
or
No
goto
DeleteAllPrompt
)
else
(
if
/I
[
"
%DELETEALL%
"
]
==
[
"yes"
]
(
set
DELETEALL
=
1
)
else
(
echo
.
goto
DeleteAllPrompt
)
)
:: TODO: Would be nice to have an additional prompt asking
:: Are you REALLY sure you want to delete your data? You cannot
:: recover it!
:
DeleteAll
:: Dummy out for now
goto
DeleteFiles
:: Failsafe to not delete the directory if, SOMEHOW,
:: your install dir or user dir is C:\
set
SAMEFAILSAFE
=
:: Don't delete the install folder until the very last step of the script!
if
[
"
%DELETEALL%
"
]
==
[
"1"
]
(
echo
"Deleting all data"
::
TODO
:
This
is
wrong
!
The
idea
for
this
check
is
to
see
if
the
user
::
somehow
installed
SRB2
in
C
:\.
So
we
obviously
don
't want to do
:: full folder deletion
::
:: However, the
%CD%
==
%INSTALLDIR%
check doesn'
t
work
properly
::
because
CD
doesn
't update when you change the directory?
:: So maybe it will just delete files anyway. I'
m
really
not
sure
.
::
if
/I
[
"
%CD%
"
]
==
[
"
%INSTALLDIR%
"
]
cd
\
if
/I
[
"
%CD%
"
]
==
[
"
%INSTALLDIR%
"
]
(
echo
Install
directory
is
the
same
as
your
drive
root
!
if
/I
[
"
%USERDIR%
"
]
==
[
"
%INSTALLDIR%
"
]
(
echo
Let
's just delete files instead...
echo.
set DELETEALL=
goto DeleteFiles
)
set SAMEFAILSAFE=1
) else (
echo.
)
if /I ["
%USERDIR%
"] == ["
%INSTALLDIR%
"] goto AllDone
if /I ["
%CD%
"] == ["
%USERDIR%
"] cd \
if /I ["
%CD%
"] == ["
%USERDIR%
"] (
echo User data directory is the same as your drive root
!
if ["
%SAMEFAILSAFE%
"] == ["1"] (
echo Let'
s
just
delete
files
instead
...
echo
.
set
DELETEALL
=
goto
DeleteFiles
)
else
(
echo
Let
's not delete any user folders...
goto AllDone
)
) else (
rmdir /s /q "
%USERDIR%
"
if ["
%SAMEFAILSAFE%
"] == ["1"] (
echo Let'
s
delete
your
installation
files
...
echo
.
set
DELETEALL
=
goto
DeleteFiles
)
else
(
goto
AllDone
)
)
)
:
DeleteFiles
for
/F
"usebackq tokens=*"
%%A
in
(
"
%INSTALLDIR%
\uninstall-list.txt"
)
do
(
...
...
@@ -237,15 +133,7 @@ if ["%FINALPROMPT%"] == ["Press Enter key to exit."] (
:
DeferredDelete
:: Now let's delete our installation folder!
cd
\
start
""
/b
"cmd"
/s /c
" del /q /f "
%INSTALLDIR%
\uninstall.bat
"&timeout /t 2 > NUL&rmdir "
%INSTALLDIR%
"&exit /b "
:: Now let's delete our installation folder!
:: If we're not DELETEALL, just attempt to remove the install dir in case it's empty
::
:: Dummy out for now
:: if ["%DELETEALL%"] == ["1"] (
if
[
"0"
]
==
[
"1"
]
(
start
""
/b
"cmd"
/s /c
" rmdir /s /q "
%INSTALLDIR%
"&exit /b "
)
else
(
start
""
/b
"cmd"
/s /c
" del /q /f "
%INSTALLDIR%
\uninstall.bat
"&timeout /t 2 > NUL&rmdir "
%INSTALLDIR%
"&exit /b "
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment