Changeset 337
- Timestamp:
- Feb 27, 2010, 10:43:58 AM (15 years ago)
- Location:
- tools/dbc_export
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/dbc_export/DBCExport.lpi
r336 r337 35 35 <IsPartOfProject Value="True"/> 36 36 <UnitName Value="DBCExport"/> 37 <CursorPos X=" 42" Y="50"/>38 <TopLine Value=" 38"/>37 <CursorPos X="16" Y="68"/> 38 <TopLine Value="98"/> 39 39 <EditorIndex Value="0"/> 40 40 <UsageCount Value="30"/> … … 125 125 <IsPartOfProject Value="True"/> 126 126 <UnitName Value="UDBC"/> 127 <CursorPos X=" 3" Y="19"/>128 <TopLine Value=" 3"/>127 <CursorPos X="21" Y="54"/> 128 <TopLine Value="60"/> 129 129 <EditorIndex Value="2"/> 130 130 <UsageCount Value="21"/> … … 148 148 <TopLine Value="47"/> 149 149 <EditorIndex Value="1"/> 150 <UsageCount Value="1 0"/>150 <UsageCount Value="11"/> 151 151 <Loaded Value="True"/> 152 152 </Unit14> 153 153 </Units> 154 <JumpHistory Count=" 17" HistoryIndex="16">154 <JumpHistory Count="22" HistoryIndex="21"> 155 155 <Position1> 156 156 <Filename Value="UDBC.pas"/> … … 221 221 <Caret Line="50" Column="37" TopLine="37"/> 222 222 </Position17> 223 <Position18> 224 <Filename Value="DBCExport.pas"/> 225 <Caret Line="112" Column="13" TopLine="100"/> 226 </Position18> 227 <Position19> 228 <Filename Value="DBCExport.pas"/> 229 <Caret Line="113" Column="5" TopLine="107"/> 230 </Position19> 231 <Position20> 232 <Filename Value="DBCExport.pas"/> 233 <Caret Line="60" Column="61" TopLine="44"/> 234 </Position20> 235 <Position21> 236 <Filename Value="DBCExport.pas"/> 237 <Caret Line="123" Column="36" TopLine="107"/> 238 </Position21> 239 <Position22> 240 <Filename Value="DBCExport.pas"/> 241 <Caret Line="34" Column="3" TopLine="18"/> 242 </Position22> 223 243 </JumpHistory> 224 244 </ProjectOptions> -
tools/dbc_export/DBCExport.pas
r336 r337 21 21 DBCFileName: string; 22 22 NewDBCFileName: string; 23 ColumnTypeDefinition: string; 23 24 constructor Create(TheOwner: TComponent); override; 24 25 destructor Destroy; override; … … 30 31 31 32 procedure TDBCExport.DoRun; 32 var33 ErrorMsg: String;34 33 begin 35 // Quick check parameters36 //ErrorMsg := CheckOptions('h', 'help');37 //if ErrorMsg <> '' then begin38 // ShowException(Exception.Create(ErrorMsg));39 // Halt;40 //end;41 42 34 // Parse parameters 43 35 if HasOption('h', 'help') then begin … … 55 47 if HasOption('n', 'newfile') then begin 56 48 NewDBCFileName := GetOptionValue('n', 'newfile'); 49 end; 50 if HasOption('c', 'coltypedef') then begin 51 ColumnTypeDefinition := GetOptionValue('c', 'coltypedef'); 57 52 end; 58 53 … … 93 88 begin 94 89 WriteLn('Usage: ', ExtractFileName(ExeName), ' [options]'); 95 WriteLn(' -h --help Show this help'); 96 WriteLn(' -u --user Database user name'); 97 WriteLn(' -p --password Database password name'); 98 WriteLn(' -s --schema Database schema name'); 99 WriteLn(' -t --host Database host name'); 100 WriteLn(' -f --file Source DBC file name'); 101 WriteLn(' -n --newfile New created DBC file name'); 90 WriteLn(' -h --help Show this help'); 91 WriteLn(' -u --user Database user name'); 92 WriteLn(' -p --password Database password name'); 93 WriteLn(' -s --schema Database schema name'); 94 WriteLn(' -t --host Database host name'); 95 WriteLn(' -f --file Source DBC file name'); 96 WriteLn(' -n --newfile New created DBC file name'); 97 WriteLn(' -c --coltypedef DBC column type definition string'); 98 WriteLn(' u - uint32, s - string'); 102 99 end; 103 100 104 101 procedure TDBCExport.ShowDBC; 105 102 var 106 X, Y: Integer; 107 Text: string; 103 //X, Y: Integer; 104 //Text: string; 105 I: Integer; 108 106 begin 109 107 DBC := TDBC.Create; … … 111 109 if FileExists(DBCFileName) then begin 112 110 LoadFromFile(DBCFileName); 113 //LoadColumnStrings(1); 114 //LoadColumnStrings(127); 111 112 // Load strings for string columns 113 for I := 1 to Length(ColumnTypeDefinition) do 114 if ColumnTypeDefinition[I] = 's' then 115 LoadColumnStrings(I - 1); 116 115 117 (*for Y := 0 to Length(Cells) - 1 do begin 116 118 Text := ''; -
tools/dbc_export/UDBC.pas
r335 r337 52 52 StringBlockSize := ReadDWord; 53 53 54 SetLength(Cells, 54 SetLength(Cells, RecordCount, FieldCount); 55 55 for Row := 0 to RecordCount - 1 do 56 56 for Col := 0 to FieldCount - 1 do begin
Note:
See TracChangeset
for help on using the changeset viewer.