~ubuntu-branches/ubuntu/karmic/notecase/karmic

« back to all changes in this revision

Viewing changes to docs/_build_locale.bat

  • Committer: Bazaar Package Importer
  • Author(s): Vijay(Vijay)
  • Date: 2007-06-14 00:13:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070614001348-z9e2vbgtenb9nhoo
Tags: 1.5.6-0ubuntu1
* New Upstream release 
*  The libgnomevfs2-dev is also added to Build-Depends 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
@ECHO OFF
 
2
REM 
 
3
REM This is a batch script to rebuild /locale directory (used to prepare Win32 release)
 
4
REM     NOTE: requires some recent Windows (NT based)
 
5
REM
 
6
 
 
7
IF NOT "%OS%"=="Windows_NT" GOTO :End
 
8
 
 
9
REM define some constants
 
10
 
 
11
SET program=notecase
 
12
SET srcdir=../po/
 
13
SET target=locale
 
14
SET msgfmt="C:\\Program Files\PoEdit\bin\msgfmt.exe"
 
15
SET tmpmo="C:\\Program Files\PoEdit\bin\messages.mo"
 
16
SET tmpdir="C:\\Program Files\PoEdit\bin\"
 
17
 
 
18
REM Check if source directory exists
 
19
 
 
20
IF NOT EXIST .\%srcdir%\NUL GOTO :End
 
21
 
 
22
REM Remove and recreate target directory
 
23
 
 
24
PUSHD ..
 
25
IF EXIST .\%target%\NUL RMDIR /S /Q %target%
 
26
MKDIR %target%
 
27
POPD
 
28
 
 
29
REM  main loop
 
30
 
 
31
FOR /R "%srcdir%" %%A IN (*.po) DO CALL :ProcessFile %%A
 
32
 
 
33
GOTO :End
 
34
 
 
35
REM %%~n1 expands variable %%1 to file name only
 
36
REM %%~f1 expands variable %%1 to full path name
 
37
 
 
38
:ProcessFile
 
39
@echo %~n1
 
40
REM delete previously existing compiled message catalog (not to use junk one in case creating new one fails)
 
41
if exist %tmpmo% (
 
42
        PUSHD %tmpdir% 
 
43
        DEL /F messages.mo
 
44
        POPD
 
45
)
 
46
REM compile message catalog
 
47
%msgfmt%  %~f1 -o %tmpmo% 2> nul
 
48
 
 
49
if exist %tmpmo% (
 
50
        PUSHD ..
 
51
        MKDIR %target%\%~n1\LC_MESSAGES  3> nul
 
52
        copy %tmpmo% %target%\%~n1\LC_MESSAGES\%program%.mo > nul
 
53
        POPD
 
54
) ELSE (
 
55
        echo Error: failed to compile %~n1 package!
 
56
)
 
57
 
 
58
:End
 
 
b'\\ No newline at end of file'