summaryrefslogtreecommitdiff
path: root/tools/installer_ng
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2013-09-06 19:08:39 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2013-09-06 19:08:39 +0000
commitb973a8d3deeda356af959f8f5fdd66a525dcbc66 (patch)
tree7f4670d07bb04e0604605ab59a6403b011347aad /tools/installer_ng
parent3193134013d976c58cc7d87b36e000c94474364d (diff)
Installer: better error handling
git-svn-id: http://svn.miranda-ng.org/main/trunk@5980 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools/installer_ng')
-rw-r--r--tools/installer_ng/compile.bat22
1 files changed, 19 insertions, 3 deletions
diff --git a/tools/installer_ng/compile.bat b/tools/installer_ng/compile.bat
index f0c03d0884..b22ede34ff 100644
--- a/tools/installer_ng/compile.bat
+++ b/tools/installer_ng/compile.bat
@@ -20,7 +20,13 @@ set Compile32=Inno Setup 5\ISCC.exe" /Dptx86 /DAppVer=%MirVer% /O"Output" "InnoN
set Compile64=Inno Setup 5\ISCC.exe" /DAppVer=%MirVer% /O"Output" "InnoNG_64\MirandaNG.iss"
rem end
+:chk32
+if not exist InnoNG_32 (goto compileerror) else (goto chk64)
+:chk64
+if not exist InnoNG_64 (goto compileerror) else (goto compile)
+
rem Make
+:compile
if defined ProgramFiles(x86) (
"%ProgramFiles(x86)%\%Compile32%
"%ProgramFiles(x86)%\%Compile64%
@@ -30,11 +36,21 @@ if defined ProgramFiles(x86) (
)
rem end
-rem Error repotrt
-if errorlevel 1 goto compileerror
+rem Error handling
goto end
:compileerror
-cls && echo Something went wrong... Please run createstructure.bat and try again
+rem Get archives if needed
+cls
+:again3
+set /p ans1=Something went wrong... Do you want to re-create folder structure and re-download components? (Y/N):
+if /i "%ans1:~,1%" EQU "Y" goto download
+if /i "%ans1:~,1%" EQU "N" goto end
+echo Please type Y for Yes or N for No
+goto again3
+:download
+echo Creating folders and downloading components!
+call createstructure.bat
+goto chk32
pause
:end
rem end \ No newline at end of file