Changeset 337 for tools/dbc_export/DBCExport.pas
- Timestamp:
- Feb 27, 2010, 10:43:58 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 := '';
Note:
See TracChangeset
for help on using the changeset viewer.