From ca8c76cb2abb575a2c38c7fae1e484f2dd46cf88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 8 Sep 2013 09:41:49 +0000 Subject: Refactored installing langpacks generated with Refresher.bat script git-svn-id: http://svn.miranda-ng.org/main/trunk@6017 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- tools/lpgen/installer.bat | 72 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 tools/lpgen/installer.bat (limited to 'tools') 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 -- cgit v1.2.3