- Timestamp:
- Mar 1, 2010, 4:04:25 PM (15 years ago)
- Location:
- tools/dbc_export
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/dbc_export
- Property svn:ignore
-
old new 1 1 bin 2 2 *.bak 3 backup
-
- Property svn:ignore
-
tools/dbc_export/DBCExport.lpi
r341 r348 12 12 <Title Value="DBCExport"/> 13 13 <UseXPManifest Value="True"/> 14 <ActiveEditorIndexAtStart Value=" 0"/>14 <ActiveEditorIndexAtStart Value="3"/> 15 15 </General> 16 16 <VersionInfo> … … 27 27 <local> 28 28 <FormatVersion Value="1"/> 29 <CommandLineParams Value="-f ../../../trunk/source/3.3. 0/dbc/GameTips.dbc -n test.dbc -c usuuuuuuuuuuuuuuuu -q "SELECT T.entry as entry,T.Text as text1 FROM (SELECT * FROM gametips WHERE (Complete = 1) AND ((Language = 1)) AND (User IN (459,670,602,462,1,400,638,592,624,610,769,331,131,704,2,499,641,660,578,337,304,277,208,613,768,754,590,606,26,618,739,503,601,607,585,596,765,320,547,687)) AND VersionStart <= 9947 AND VersionEnd >= 9947) AS T GROUP BY T.entry""/>29 <CommandLineParams Value="-f ../../../trunk/source/3.3.2/dbc/GameTips.dbc -n test.dbc -c usuuuuuuuuuuuuuuuu -q "SELECT T.entry as entry,T.Text as text1 FROM (SELECT * FROM gametips WHERE (Complete = 1) AND ((Language = 1)) AND (User IN (459,670,602,462,1,400,638,592,624,610,769,331,131,704,2,499,641,660,578,337,304,277,208,613,768,754,590,606,26,618,739,503,601,607,585,596,765,320,547,687)) AND VersionStart <= 9947 AND VersionEnd >= 9947) AS T GROUP BY T.entry""/> 30 30 <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> 31 31 </local> … … 36 36 <IsPartOfProject Value="True"/> 37 37 <UnitName Value="DBCExport"/> 38 <CursorPos X="1" Y="19 9"/>39 <TopLine Value="1 96"/>38 <CursorPos X="1" Y="196"/> 39 <TopLine Value="174"/> 40 40 <EditorIndex Value="0"/> 41 <UsageCount Value=" 48"/>41 <UsageCount Value="79"/> 42 42 <Loaded Value="True"/> 43 43 <SyntaxHighlighter Value="Delphi"/> … … 48 48 <CursorPos X="1" Y="1"/> 49 49 <TopLine Value="1"/> 50 <UsageCount Value="2 7"/>50 <UsageCount Value="24"/> 51 51 <SyntaxHighlighter Value="Delphi"/> 52 52 </Unit1> … … 55 55 <CursorPos X="14" Y="719"/> 56 56 <TopLine Value="703"/> 57 <UsageCount Value="1 3"/>57 <UsageCount Value="10"/> 58 58 </Unit2> 59 59 <Unit3> … … 61 61 <CursorPos X="23" Y="36"/> 62 62 <TopLine Value="33"/> 63 <UsageCount Value=" 12"/>63 <UsageCount Value="9"/> 64 64 </Unit3> 65 65 <Unit4> … … 68 68 <CursorPos X="1" Y="1"/> 69 69 <TopLine Value="1"/> 70 <UsageCount Value="2 7"/>70 <UsageCount Value="24"/> 71 71 <SyntaxHighlighter Value="Delphi"/> 72 72 </Unit4> … … 75 75 <CursorPos X="24" Y="6"/> 76 76 <TopLine Value="1"/> 77 <UsageCount Value=" 7"/>77 <UsageCount Value="4"/> 78 78 <SyntaxHighlighter Value="None"/> 79 79 </Unit5> … … 83 83 <CursorPos X="3" Y="166"/> 84 84 <TopLine Value="164"/> 85 <UsageCount Value=" 8"/>85 <UsageCount Value="5"/> 86 86 </Unit6> 87 87 <Unit7> … … 89 89 <CursorPos X="22" Y="196"/> 90 90 <TopLine Value="184"/> 91 <UsageCount Value=" 10"/>91 <UsageCount Value="7"/> 92 92 </Unit7> 93 93 <Unit8> … … 96 96 <CursorPos X="12" Y="100"/> 97 97 <TopLine Value="66"/> 98 <UsageCount Value=" 10"/>98 <UsageCount Value="7"/> 99 99 </Unit8> 100 100 <Unit9> … … 102 102 <CursorPos X="1" Y="1"/> 103 103 <TopLine Value="51"/> 104 <UsageCount Value=" 10"/>104 <UsageCount Value="7"/> 105 105 </Unit9> 106 106 <Unit10> … … 109 109 <CursorPos X="9" Y="79"/> 110 110 <TopLine Value="51"/> 111 <UsageCount Value=" 9"/>111 <UsageCount Value="6"/> 112 112 </Unit10> 113 113 <Unit11> … … 115 115 <IsPartOfProject Value="True"/> 116 116 <UnitName Value="USqlDatabase"/> 117 <CursorPos X="1 4" Y="34"/>118 <TopLine Value="1 6"/>117 <CursorPos X="1" Y="181"/> 118 <TopLine Value="159"/> 119 119 <EditorIndex Value="3"/> 120 <UsageCount Value=" 39"/>120 <UsageCount Value="70"/> 121 121 <Loaded Value="True"/> 122 122 <SyntaxHighlighter Value="Delphi"/> … … 126 126 <IsPartOfProject Value="True"/> 127 127 <UnitName Value="UDBC"/> 128 <CursorPos X=" 1" Y="130"/>129 <TopLine Value=" 116"/>128 <CursorPos X="27" Y="139"/> 129 <TopLine Value="89"/> 130 130 <EditorIndex Value="1"/> 131 <UsageCount Value=" 39"/>131 <UsageCount Value="70"/> 132 132 <Loaded Value="True"/> 133 133 <SyntaxHighlighter Value="Delphi"/> … … 139 139 <TopLine Value="1"/> 140 140 <EditorIndex Value="2"/> 141 <UsageCount Value=" 39"/>141 <UsageCount Value="70"/> 142 142 <Loaded Value="True"/> 143 143 <SyntaxHighlighter Value="None"/> … … 148 148 <CursorPos X="15" Y="42"/> 149 149 <TopLine Value="28"/> 150 <UsageCount Value="1 5"/>150 <UsageCount Value="12"/> 151 151 </Unit14> 152 152 </Units> … … 154 154 <Position1> 155 155 <Filename Value="DBCExport.pas"/> 156 <Caret Line=" 192" Column="1" TopLine="178"/>156 <Caret Line="203" Column="1" TopLine="189"/> 157 157 </Position1> 158 158 <Position2> 159 159 <Filename Value="DBCExport.pas"/> 160 <Caret Line=" 193" Column="1" TopLine="179"/>160 <Caret Line="204" Column="1" TopLine="190"/> 161 161 </Position2> 162 162 <Position3> 163 163 <Filename Value="DBCExport.pas"/> 164 <Caret Line=" 194" Column="1" TopLine="180"/>164 <Caret Line="205" Column="1" TopLine="191"/> 165 165 </Position3> 166 166 <Position4> 167 167 <Filename Value="DBCExport.pas"/> 168 <Caret Line=" 195" Column="1" TopLine="181"/>168 <Caret Line="206" Column="1" TopLine="192"/> 169 169 </Position4> 170 170 <Position5> 171 171 <Filename Value="DBCExport.pas"/> 172 <Caret Line=" 194" Column="64" TopLine="176"/>172 <Caret Line="29" Column="5" TopLine="1"/> 173 173 </Position5> 174 174 <Position6> 175 175 <Filename Value="DBCExport.pas"/> 176 <Caret Line=" 190" Column="1" TopLine="177"/>176 <Caret Line="80" Column="18" TopLine="58"/> 177 177 </Position6> 178 178 <Position7> 179 179 <Filename Value="DBCExport.pas"/> 180 <Caret Line=" 157" Column="1" TopLine="146"/>180 <Caret Line="81" Column="42" TopLine="59"/> 181 181 </Position7> 182 182 <Position8> 183 <Filename Value=" DBCExport.pas"/>184 <Caret Line=" 156" Column="1" TopLine="142"/>183 <Filename Value="USqlDatabase.pas"/> 184 <Caret Line="34" Column="14" TopLine="8"/> 185 185 </Position8> 186 186 <Position9> 187 <Filename Value=" DBCExport.pas"/>188 <Caret Line=" 157" Column="1" TopLine="143"/>187 <Filename Value="USqlDatabase.pas"/> 188 <Caret Line="52" Column="24" TopLine="30"/> 189 189 </Position9> 190 190 <Position10> 191 <Filename Value=" DBCExport.pas"/>192 <Caret Line=" 158" Column="1" TopLine="144"/>191 <Filename Value="USqlDatabase.pas"/> 192 <Caret Line="80" Column="45" TopLine="54"/> 193 193 </Position10> 194 194 <Position11> 195 <Filename Value=" DBCExport.pas"/>196 <Caret Line="1 57" Column="1" TopLine="143"/>195 <Filename Value="USqlDatabase.pas"/> 196 <Caret Line="137" Column="21" TopLine="115"/> 197 197 </Position11> 198 198 <Position12> 199 199 <Filename Value="DBCExport.pas"/> 200 <Caret Line=" 208" Column="22" TopLine="184"/>200 <Caret Line="96" Column="7" TopLine="55"/> 201 201 </Position12> 202 202 <Position13> 203 203 <Filename Value="DBCExport.pas"/> 204 <Caret Line="19 0" Column="1" TopLine="176"/>204 <Caret Line="193" Column="16" TopLine="171"/> 205 205 </Position13> 206 206 <Position14> 207 207 <Filename Value="DBCExport.pas"/> 208 <Caret Line="19 3" Column="1" TopLine="184"/>208 <Caret Line="198" Column="37" TopLine="171"/> 209 209 </Position14> 210 210 <Position15> 211 <Filename Value=" DBCExport.pas"/>212 <Caret Line=" 194" Column="1" TopLine="180"/>211 <Filename Value="USqlDatabase.pas"/> 212 <Caret Line="4" Column="18" TopLine="1"/> 213 213 </Position15> 214 214 <Position16> 215 <Filename Value=" DBCExport.pas"/>216 <Caret Line=" 195" Column="1" TopLine="181"/>215 <Filename Value="USqlDatabase.pas"/> 216 <Caret Line="52" Column="24" TopLine="30"/> 217 217 </Position16> 218 218 <Position17> 219 <Filename Value=" DBCExport.pas"/>220 <Caret Line=" 196" Column="1" TopLine="182"/>219 <Filename Value="USqlDatabase.pas"/> 220 <Caret Line="80" Column="45" TopLine="58"/> 221 221 </Position17> 222 222 <Position18> 223 <Filename Value=" DBCExport.pas"/>224 <Caret Line="1 99" Column="1" TopLine="185"/>223 <Filename Value="USqlDatabase.pas"/> 224 <Caret Line="137" Column="21" TopLine="115"/> 225 225 </Position18> 226 226 <Position19> 227 227 <Filename Value="DBCExport.pas"/> 228 <Caret Line="2 01" Column="1" TopLine="187"/>228 <Caret Line="212" Column="30" TopLine="190"/> 229 229 </Position19> 230 230 <Position20> 231 231 <Filename Value="DBCExport.pas"/> 232 <Caret Line=" 202" Column="1" TopLine="188"/>232 <Caret Line="197" Column="32" TopLine="191"/> 233 233 </Position20> 234 234 <Position21> 235 235 <Filename Value="DBCExport.pas"/> 236 <Caret Line=" 203" Column="1" TopLine="189"/>236 <Caret Line="195" Column="1" TopLine="173"/> 237 237 </Position21> 238 238 <Position22> 239 <Filename Value=" DBCExport.pas"/>240 <Caret Line=" 204" Column="1" TopLine="190"/>239 <Filename Value="USqlDatabase.pas"/> 240 <Caret Line="181" Column="1" TopLine="159"/> 241 241 </Position22> 242 242 <Position23> 243 <Filename Value=" DBCExport.pas"/>244 <Caret Line=" 205" Column="1" TopLine="191"/>243 <Filename Value="USqlDatabase.pas"/> 244 <Caret Line="183" Column="1" TopLine="161"/> 245 245 </Position23> 246 246 <Position24> 247 <Filename Value="U DBC.pas"/>248 <Caret Line="1 25" Column="1" TopLine="111"/>247 <Filename Value="USqlDatabase.pas"/> 248 <Caret Line="184" Column="1" TopLine="162"/> 249 249 </Position24> 250 250 <Position25> 251 <Filename Value="U DBC.pas"/>252 <Caret Line="1 26" Column="1" TopLine="112"/>251 <Filename Value="USqlDatabase.pas"/> 252 <Caret Line="186" Column="1" TopLine="164"/> 253 253 </Position25> 254 254 <Position26> 255 <Filename Value="U DBC.pas"/>256 <Caret Line="1 27" Column="1" TopLine="113"/>255 <Filename Value="USqlDatabase.pas"/> 256 <Caret Line="188" Column="1" TopLine="166"/> 257 257 </Position26> 258 258 <Position27> 259 <Filename Value="U DBC.pas"/>260 <Caret Line="1 28" Column="1" TopLine="114"/>259 <Filename Value="USqlDatabase.pas"/> 260 <Caret Line="190" Column="1" TopLine="168"/> 261 261 </Position27> 262 262 <Position28> 263 <Filename Value="U DBC.pas"/>264 <Caret Line="1 30" Column="1" TopLine="116"/>263 <Filename Value="USqlDatabase.pas"/> 264 <Caret Line="193" Column="1" TopLine="171"/> 265 265 </Position28> 266 266 <Position29> 267 <Filename Value=" DBCExport.pas"/>268 <Caret Line=" 206" Column="1" TopLine="192"/>267 <Filename Value="USqlDatabase.pas"/> 268 <Caret Line="194" Column="1" TopLine="172"/> 269 269 </Position29> 270 270 <Position30> 271 271 <Filename Value="DBCExport.pas"/> 272 <Caret Line=" 207" Column="1" TopLine="193"/>272 <Caret Line="196" Column="1" TopLine="174"/> 273 273 </Position30> 274 274 </JumpHistory> … … 304 304 </CompilerOptions> 305 305 <Debugging> 306 <BreakPoints Count=" 2">306 <BreakPoints Count="3"> 307 307 <Item1> 308 308 <Source Value="DBCExport.pas"/> 309 <Line Value=" 190"/>309 <Line Value="212"/> 310 310 </Item1> 311 311 <Item2> 312 312 <Source Value="DBCExport.pas"/> 313 <Line Value="19 9"/>313 <Line Value="195"/> 314 314 </Item2> 315 <Item3> 316 <Source Value="DBCExport.pas"/> 317 <Line Value="196"/> 318 </Item3> 315 319 </BreakPoints> 316 320 <Watches Count="2"> -
tools/dbc_export/DBCExport.pas
r341 r348 27 27 IndexTable: array of integer; 28 28 SQLquery: string; 29 CharSet: string; 29 30 DisplayData: Boolean; 30 31 constructor Create(TheOwner: TComponent); override; … … 77 78 Database.Hostname := GetOptionValue('t', 'host'); 78 79 end else Database.Hostname := 'localhost'; 80 if HasOption('a', 'Charset') then begin 81 Charset := GetOptionValue('a', 'Charset'); 82 end else Charset := 'utf8'; 79 83 if HasOption('q', 'sql_query') then begin 80 84 SQLquery := GetOptionValue('q', 'sql_query'); … … 115 119 WriteLn('Usage: ', ExtractFileName(ExeName), ' [options]'); 116 120 WriteLn(' -h --help Show this help'); 117 WriteLn(' -u --user Database user name ');121 WriteLn(' -u --user Database user name, default root'); 118 122 WriteLn(' -p --password Database password name'); 119 WriteLn(' -s --schema Database schema name'); 120 WriteLn(' -t --host Database host name'); 123 WriteLn(' -s --schema Database schema name, default wowpreklad'); 124 WriteLn(' -t --host Database host name, default localhost'); 125 WriteLn(' -a --Charset Database Charset, default utf8'); 121 126 WriteLn(' -f --file Source DBC file name'); 122 127 WriteLn(' -n --newfile New created DBC file name'); … … 169 174 begin 170 175 with DBC do begin 171 SaveToFile(NewDBCFileName); 176 if FileExists(DBCFileName) then 177 SaveToFile(NewDBCFileName); 172 178 Free; 173 179 end; … … 185 191 with DBC do begin 186 192 if (SQLquery <> '') then begin; 193 187 194 Database.Connect; 195 // Database.Query('CHARACTER SET '+CharSet); 196 Database.Query('SET NAMES '+CharSet); 188 197 DBRows := Database.Query(SQLquery); 198 CharSet:=Database.Charset; 189 199 190 200 CreateIndexTable(DBRows); -
tools/dbc_export/UDBC.pas
r340 r348 118 118 for Col := 1 to Length(StringList[Row]) do 119 119 WriteByte(Ord(StringList[Row][Col])); 120 WriteByte(0); 120 121 end; 121 122 end;
Note:
See TracChangeset
for help on using the changeset viewer.