diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-09-08 09:41:49 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-09-08 09:41:49 +0000 |
commit | ca8c76cb2abb575a2c38c7fae1e484f2dd46cf88 (patch) | |
tree | c727cce4a4d5f8a24fd1f6702643b63227b39c24 | |
parent | b6e7c9e209229907fcc4bac4ebb4def2fbe6054d (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
-rw-r--r-- | langpacks/bulgarian/Refresh.bat | 11 | ||||
-rw-r--r-- | langpacks/czech/Refresh.bat | 9 | ||||
-rw-r--r-- | langpacks/polish/Refresh.bat | 9 | ||||
-rw-r--r-- | langpacks/slovak/Refresh.bat | 9 | ||||
-rw-r--r-- | tools/lpgen/installer.bat | 72 |
5 files changed, 85 insertions, 25 deletions
diff --git a/langpacks/bulgarian/Refresh.bat b/langpacks/bulgarian/Refresh.bat index c01600790b..9ecfe2dbd7 100644 --- a/langpacks/bulgarian/Refresh.bat +++ b/langpacks/bulgarian/Refresh.bat @@ -3,16 +3,13 @@ REM ====== VARIABLES ========
set "language=bulgarian"
-set "oldLangpackPath=Deprecated\old langpack\langpack_bulgarian2.txt"
+set "oldLangpackPath="
+set "mirandaPath=C:\Program files\Miranda NG"
REM =========================
cd "..\..\tools\lpgen\"
call refresher.bat %language% "%oldLangpackPath%"
-REM copy and reload langpack in your Miranda (uncoment next lines + enable cmdline.dll plugin to use it)
- REM echo Copy and refresh Miranda NG langpack
- REM set "mirandaPath=D:\Programy\Miranda NG"
- REM copy "..\..\langpacks\%language%\Langpack_%language%.txt" "%mirandaPath%\Langpack_%language%.txt"
- REM cd "%mirandaPath%"
- REM mimcmd.exe callservice LangPack/Reload 0 0
+REM copy and reload langpack in your Miranda (uncoment next line + enable cmdline.dll plugin to use it)
+REM call installer.bat %language% "%mirandaPath%"
diff --git a/langpacks/czech/Refresh.bat b/langpacks/czech/Refresh.bat index bf426e79a7..9ed2081071 100644 --- a/langpacks/czech/Refresh.bat +++ b/langpacks/czech/Refresh.bat @@ -4,15 +4,12 @@ REM ====== VARIABLES ======== set "language=czech"
set "oldLangpackPath=Deprecated\old langpack\langpack_czech2.txt"
+set "mirandaPath=D:\Programy\Miranda NG"
REM =========================
cd "..\..\tools\lpgen\"
call refresher.bat %language% "%oldLangpackPath%"
-REM copy and reload langpack in your Miranda (uncoment next lines + enable cmdline.dll plugin to use it)
- REM echo Copy and refresh Miranda NG langpack
- REM set "mirandaPath=D:\Programy\Miranda NG"
- REM copy "..\..\langpacks\%language%\Langpack_%language%.txt" "%mirandaPath%\Langpack_%language%.txt"
- REM cd "%mirandaPath%"
- REM mimcmd.exe callservice LangPack/Reload 0 0
+REM copy and reload langpack in your Miranda (uncoment next line + enable cmdline.dll plugin to use it)
+call installer.bat %language% "%mirandaPath%"
diff --git a/langpacks/polish/Refresh.bat b/langpacks/polish/Refresh.bat index 8720a28aff..9798d1da96 100644 --- a/langpacks/polish/Refresh.bat +++ b/langpacks/polish/Refresh.bat @@ -4,15 +4,12 @@ REM ====== VARIABLES ======== set "language=polish"
set "oldLangpackPath=Deprecated\Langpack_polish.txt"
+set "mirandaPath=C:\Program files\Miranda NG"
REM =========================
cd "..\..\tools\lpgen\"
call refresher.bat %language% "%oldLangpackPath%"
-REM copy and reload langpack in your Miranda (uncoment next lines + enable cmdline.dll plugin to use it)
- REM echo Copy and refresh Miranda NG langpack
- REM set "mirandaPath=D:\Programy\Miranda NG"
- REM copy "..\..\langpacks\%language%\Langpack_%language%.txt" "%mirandaPath%\Langpack_%language%.txt"
- REM cd "%mirandaPath%"
- REM mimcmd.exe callservice LangPack/Reload 0 0
+REM copy and reload langpack in your Miranda (uncoment next line + enable cmdline.dll plugin to use it)
+REM call installer.bat %language% "%mirandaPath%"
diff --git a/langpacks/slovak/Refresh.bat b/langpacks/slovak/Refresh.bat index 7b7ac29e4f..cfd8e9ecbc 100644 --- a/langpacks/slovak/Refresh.bat +++ b/langpacks/slovak/Refresh.bat @@ -4,15 +4,12 @@ REM ====== VARIABLES ======== set "language=slovak"
set "oldLangpackPath=Deprecated\Langpack_slovak_old.txt"
+set "mirandaPath=C:\Program files\Miranda NG"
REM =========================
cd "..\..\tools\lpgen\"
call refresher.bat %language% "%oldLangpackPath%"
-REM copy and reload langpack in your Miranda (uncoment next lines + enable cmdline.dll plugin to use it)
- REM echo Copy and refresh Miranda NG langpack
- REM set "mirandaPath=D:\Programy\Miranda NG"
- REM copy "..\..\langpacks\%language%\Langpack_%language%.txt" "%mirandaPath%\Langpack_%language%.txt"
- REM cd "%mirandaPath%"
- REM mimcmd.exe callservice LangPack/Reload 0 0
+REM copy and reload langpack in your Miranda (uncoment next line + enable cmdline.dll plugin to use it)
+REM call installer.bat %language% "%mirandaPath%"
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
|