summaryrefslogtreecommitdiff
path: root/tools/lpgen/installer.bat
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-09-08 09:41:49 +0000
committerRobert Pösel <robyer@seznam.cz>2013-09-08 09:41:49 +0000
commitca8c76cb2abb575a2c38c7fae1e484f2dd46cf88 (patch)
treec727cce4a4d5f8a24fd1f6702643b63227b39c24 /tools/lpgen/installer.bat
parentb6e7c9e209229907fcc4bac4ebb4def2fbe6054d (diff)
Refactored installing langpacks generated with Refresher.bat script
git-svn-id: http://svn.miranda-ng.org/main/trunk@6017 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools/lpgen/installer.bat')
-rw-r--r--tools/lpgen/installer.bat72
1 files changed, 72 insertions, 0 deletions
diff --git a/tools/lpgen/installer.bat b/tools/lpgen/installer.bat
new file mode 100644
index 0000000000..cfabe071cb
--- /dev/null
+++ b/tools/lpgen/installer.bat
@@ -0,0 +1,72 @@
+@echo off
+cls
+
+echo ========================
+echo Langpack installer
+echo Author: Robyer
+echo ========================
+echo.
+
+set err=0
+if "%~1" == "" (
+ echo ERROR: You must specify language parameter!
+ set err=1
+)
+
+if "%~2" == "" (
+ echo ERROR: You must specify Miranda path!
+ set err=1
+)
+
+if not "%~3" == "" (
+ echo ERROR: You must specify 1 or 2 parameters only.
+ echo NOTE: If you have path with spaces inside, suround it with "".
+ set err=1
+)
+
+if "%err%"=="1" (
+ goto usage
+)
+
+set "language=%~1"
+set "mirandaPath=%~2"
+
+if not exist "..\..\langpacks\%language%" (
+ echo ERROR: This language doesn't exists!
+ goto exit
+)
+
+if not exist "%mirandaPath%\mimcmd.exe" (
+ echo ERROR: mimcmd.exe wasn't found in your Miranda path. Make sure you have installed Command line plugin.
+ goto exit
+)
+
+if not exist "..\..\langpacks\%language%\Langpack_%language%.txt" (
+ echo ERROR: Langpack_%language%.txt in your langpack folder wasn't found. Make sure you have freshly refreshed langpack using Refresher.bat script
+ goto exit
+)
+
+echo Installing langpack...
+
+copy "..\..\langpacks\%language%\Langpack_%language%.txt" "%mirandaPath%\Langpack_%language%.txt"
+cd "%mirandaPath%"
+mimcmd.exe callservice LangPack/Reload 0 0
+
+echo Installation successful.
+exit /b
+
+:usage
+echo.
+echo ========================
+echo Usage: installer.bat language "Miranda folder path"
+echo Note: for proper installation make sure you have enabled Command line plugin
+echo.
+echo Example: installer.bat czech "C:\Program files\Miranda NG"
+echo.
+echo If you want own script in langpack dir, look at "langpacks\czech\refresh.bat"
+echo ========================
+echo.
+
+:exit
+pause
+exit /b