diff options
author | mösi <mösi@b9310e46-f624-0410-8ea1-cfbb3a30dc96> | 2008-11-12 19:02:15 +0000 |
---|---|---|
committer | mösi <mösi@b9310e46-f624-0410-8ea1-cfbb3a30dc96> | 2008-11-12 19:02:15 +0000 |
commit | a7af5ee4661001776c4c3f9db089c46ee326b856 (patch) | |
tree | f706c1849923f0e85534dae61ea21e47c1c860b9 /windows/neo-vars/src/Source/makecompose.ahk | |
parent | 63ac4139cfb4c9c196df198cbcdda19954d56921 (diff) |
Neuer Build-Prozess mit eingechecktem Compose-Compilat und separatem Make-Compose.
git-svn-id: https://svn.neo-layout.org@1179 b9310e46-f624-0410-8ea1-cfbb3a30dc96
Diffstat (limited to '')
-rw-r--r-- | windows/neo-vars/src/Source/makecompose.ahk | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/windows/neo-vars/src/Source/makecompose.ahk b/windows/neo-vars/src/Source/makecompose.ahk index 37f040d..5f96163 100644 --- a/windows/neo-vars/src/Source/makecompose.ahk +++ b/windows/neo-vars/src/Source/makecompose.ahk @@ -1823,14 +1823,20 @@ SetFormat, Integer, d VarSetCapacity(Composita,10240000) ; 10 MB
-EncodeUnicodeFile(FFrom,FTo,NumLines) {
-Composita := ""
-Count := 0
-Miss := 0
-FileRead, FileContents, %FFrom%
-ProgressTop := "Converting " . FFrom . "..."
-Loop, parse, FileContents, `n, `r ; Specifying `n prior to `r allows both Windows and Unix files to be parsed.
-{
+EncodeUnicodeFile(FFrom,FTo) {
+ Composita := ""
+ Miss := 0
+ FileRead, FileContents, %FFrom%
+ ProgressTop := "Converting " . FFrom . "..."
+
+ Loop, parse, FileContents, `n, `r ; Specifying `n prior to `r allows both Windows and Unix files to be parsed.
+ {
+ NumLines := A_Index
+ }
+
+ Count := 0
+ Loop, parse, FileContents, `n, `r ; Specifying `n prior to `r allows both Windows and Unix files to be parsed.
+ {
Count := Count + 1
ProgressVal := Count/NumLines*100
ProgressInd := "Lines: " . Count . ", Errors: " . Miss
@@ -1891,13 +1897,28 @@ Loop, parse, FileContents, `n, `r ; Specifying `n prior to `r allows both Windo Composita := Composita "; illegal " Xkbsym " in " A_LoopField "`r`n"
Miss := Miss + 1
}
+ }
+ Progress,off
+ FileAppend,%Composita%,%FTo%
}
-FileDelete,%FTo%
-FileAppend,%Composita%,%FTo%
+
+NumPars = %0%
+if (NumPars < 2) {
+ MsgBox,Zu wenige Parameter`, Minimum=2
+ exit
}
-EncodeUnicodeFile("..\..\..\Compose\en_US.UTF-8","Source\en_us.ahk" ,5609)
-EncodeUnicodeFile("..\..\..\Compose\Compose.neo","Source\neocomp.ahk" ,1067)
+CompRevision = %1%
+OutputFile = %2%
+
+FileDelete,%OutputFile%
+FileAppend,CompRevision := "%CompRevision%"`r`n, %OutputFile%
+
+loop %Numpars% {
+ if (A_Index < 3)
+ continue
+ EncodeUnicodeFile(%A_Index%, OutputFile)
+}
; MsgBox % EncodeUni(DecodeUni("U20ACU0041U0070"))
|