• R/O
  • SSH
  • HTTPS

dzbdslauncher: Commit


Commit MetaInfo

Revision23 (tree)
Zeit2020-03-02 03:07:58
Autordummzeuch

Log Message

(empty log message)

Ändern Zusammenfassung

Diff

--- tags/1.0.3/src/Velthuis.Console.pas (nonexistent)
+++ tags/1.0.3/src/Velthuis.Console.pas (revision 23)
@@ -0,0 +1,941 @@
1+{ }
2+{ File: Velthuis.Console.pas }
3+{ Function: Console unit, similar to the Crt unit in Turbo Pascal. }
4+{ Language: Delphi 5 and above }
5+{ Author: Rudolph Velthuis }
6+{ Copyright: (c) 2006,2008 Rudy Velthuis }
7+{ Disclaimer: This code is freeware. All rights are reserved. }
8+{ This code is provided as is, expressly without a warranty }
9+{ of any kind. You use it at your own risk. }
10+{ }
11+{ If you use this code, please credit me. }
12+{ }
13+// taken from https://github.com/rvelthuis/Consoles
14+// -- 2020-02-29 twm
15+
16+unit Velthuis.Console;
17+
18+{$IFDEF CONDITIONALEXPRESSIONS}
19+ {$IF CompilerVersion >= 17.0}
20+ {$DEFINE INLINES}
21+ {$IFEND}
22+ {$IF RTLVersion >= 14.0}
23+ {$DEFINE HASERROUTPUT}
24+ {$IFEND}
25+{$ENDIF}
26+
27+interface
28+
29+uses Windows;
30+
31+const
32+ // Background and foreground colors
33+ Black = 0;
34+ Blue = 1;
35+ Green = 2;
36+ Cyan = 3;
37+ Red = 4;
38+ Magenta = 5;
39+ Brown = 6;
40+ LightGray = 7;
41+
42+ // Foreground colors
43+ DarkGray = 8;
44+ LightBlue = 9;
45+ LightGreen = 10;
46+ LightCyan = 11;
47+ LightRed = 12;
48+ LightMagenta = 13;
49+ Yellow = 14;
50+ White = 15;
51+
52+ // Blink attribute, to be or-ed with background colors.
53+ Blink = 128;
54+
55+ // Text modes:
56+ BW40 = 0; // 40x25 B/W on Color Adapter
57+ CO40 = 1; // 40x25 Color on Color Adapter
58+ BW80 = 2; // 80x25 B/W on Color Adapter
59+ CO80 = 3; // 80x25 Color on Color Adapter
60+ Mono = 7; // 80x25 on Monochrome Adapter
61+ Font8x8 = 256; // Add-in for ROM font
62+
63+ // Mode constants for 3.0 compatibility of original CRT unit }
64+ C40 = CO40;
65+ C80 = CO80;
66+
67+
68+// Turbo/Borland Pascal Crt routines:
69+
70+// Waits for keypress and returns the key pressed. If the key is not an ASCII
71+// key, #0 is returned, and a successive ReadKey will give the extended key
72+// code of the key.
73+function ReadKey: Char;
74+
75+// Checks whether a key was pressed.
76+function KeyPressed: Boolean;
77+
78+// Puts the cursor at the given coordinates on the screen.
79+procedure GotoXY(X, Y: Smallint);
80+
81+// Returns the current X position of the cursor.
82+function WhereX: Integer;
83+
84+// Returns the current Y position of the cursor.
85+function WhereY: Integer;
86+
87+// Sets text foreground color.
88+procedure TextColor(Color: Byte); overload;
89+
90+// Gets text forground color.
91+function TextColor: Byte; overload;
92+
93+// Sets text background color.
94+procedure TextBackground(Color: Byte); overload;
95+
96+// Gets text background color.
97+function TextBackground: Byte; overload;
98+
99+// Sets text mode.
100+procedure TextMode(Mode: Word);
101+
102+// Sets text colors to low intensity
103+procedure LowVideo;
104+
105+// Sets text colors to high intensity
106+procedure HighVideo;
107+
108+// Sets text attribute to value at startup.
109+procedure NormVideo;
110+
111+// Clears the entire screen, or, if a window is set, the entire window,
112+// in the current background color.
113+procedure ClrScr;
114+
115+// Clears until the end of the line, in the current background color.
116+procedure ClrEol;
117+
118+// Inserts a line at the current cursor position.
119+procedure InsLine;
120+
121+// Deletes the line at the current cursor position.
122+procedure DelLine;
123+
124+// Sets a window, into which all successive output will go. You can reset the
125+// window to full screen by calling Window with a zero or negative value
126+// for Left.
127+procedure Window(Left, Top, Right, Bottom: Integer);
128+
129+// Displays message and waits for the next key press. Displays key
130+// and returns.
131+function Pause(const Msg: string = ''): Char;
132+
133+type
134+ // Plays a sound at the given frequency (in Herz).
135+ TSoundProc = procedure(Frequency: Smallint);
136+
137+ // Stops the sound started with Sound.
138+ TNoSoundProc = procedure;
139+
140+ // Delays for the given amount of milliseconds, or as close as possible.
141+ TDelayProc = procedure(Millisecs: Integer);
142+
143+ // Plays a sound at the given frequency (in Hz) and duration (in ms).
144+ TBeepProc = procedure(Frequency, Duration: Smallint);
145+
146+var
147+ Sound: TSoundProc;
148+ NoSound: TNoSoundProc;
149+ Delay: TDelayProc;
150+ Beep: TBeepProc;
151+
152+// Additional routines:
153+
154+function ScreenWidth: Smallint;
155+function ScreenHeight: Smallint;
156+function BufferWidth: Smallint;
157+function BufferHeight: Smallint;
158+
159+var
160+ TextWindow: TSmallRect;
161+ TextAttr: Byte;
162+ DefaultAttr: Byte;
163+ ScreenMode: Byte;
164+ BufferSize: TCoord;
165+ ScreenSize: TCoord;
166+ StdIn, StdOut: THandle;
167+ StdErr: THandle;
168+ LastMode: Word;
169+ WindMin: Word;
170+ WindMax: Word;
171+ CheckBreak: Boolean;
172+
173+implementation
174+
175+uses SysUtils;
176+
177+type
178+ PKey = ^TKey;
179+ TKey = record
180+ KeyCode: Smallint;
181+ Normal: Smallint;
182+ Shift: Smallint;
183+ Ctrl: Smallint;
184+ Alt: Smallint;
185+ end;
186+
187+const
188+ CKeys: array[0..88] of TKey = (
189+ (KeyCode: VK_BACK; Normal: $8; Shift: $8; Ctrl: $7F; Alt: $10E; ),
190+ (KeyCode: VK_TAB; Normal: $9; Shift: $10F; Ctrl: $194; Alt: $1A5; ),
191+ (KeyCode: VK_RETURN; Normal: $D; Shift: $D; Ctrl: $A; Alt: $1A6),
192+ (KeyCode: VK_ESCAPE; Normal: $1B; Shift: $1B; Ctrl: $1B; Alt: $101),
193+ (KeyCode: VK_SPACE; Normal: $20; Shift: $20; Ctrl: $103; Alt: $20),
194+ (KeyCode: Ord('0'); Normal: Ord('0'); Shift: Ord(')'); Ctrl: - 1; Alt: $181),
195+ (KeyCode: Ord('1'); Normal: Ord('1'); Shift: Ord('!'); Ctrl: - 1; Alt: $178),
196+ (KeyCode: Ord('2'); Normal: Ord('2'); Shift: Ord('@'); Ctrl: $103; Alt: $179),
197+ (KeyCode: Ord('3'); Normal: Ord('3'); Shift: Ord('#'); Ctrl: - 1; Alt: $17A),
198+ (KeyCode: Ord('4'); Normal: Ord('4'); Shift: Ord('$'); Ctrl: - 1; Alt: $17B),
199+ (KeyCode: Ord('5'); Normal: Ord('5'); Shift: Ord('%'); Ctrl: - 1; Alt: $17C),
200+ (KeyCode: Ord('6'); Normal: Ord('6'); Shift: Ord('^'); Ctrl: $1E; Alt: $17D),
201+ (KeyCode: Ord('7'); Normal: Ord('7'); Shift: Ord('&'); Ctrl: - 1; Alt: $17E),
202+ (KeyCode: Ord('8'); Normal: Ord('8'); Shift: Ord('*'); Ctrl: - 1; Alt: $17F),
203+ (KeyCode: Ord('9'); Normal: Ord('9'); Shift: Ord('('); Ctrl: - 1; Alt: $180),
204+ (KeyCode: Ord('A'); Normal: Ord('a'); Shift: Ord('A'); Ctrl: $1; Alt: $11E),
205+ (KeyCode: Ord('B'); Normal: Ord('b'); Shift: Ord('B'); Ctrl: $2; Alt: $130),
206+ (KeyCode: Ord('C'); Normal: Ord('c'); Shift: Ord('C'); Ctrl: $3; Alt: $12E),
207+ (KeyCode: Ord('D'); Normal: Ord('d'); Shift: Ord('D'); Ctrl: $4; Alt: $120),
208+ (KeyCode: Ord('E'); Normal: Ord('e'); Shift: Ord('E'); Ctrl: $5; Alt: $112),
209+ (KeyCode: Ord('F'); Normal: Ord('f'); Shift: Ord('F'); Ctrl: $6; Alt: $121),
210+ (KeyCode: Ord('G'); Normal: Ord('g'); Shift: Ord('G'); Ctrl: $7; Alt: $122),
211+ (KeyCode: Ord('H'); Normal: Ord('h'); Shift: Ord('H'); Ctrl: $8; Alt: $123),
212+ (KeyCode: Ord('I'); Normal: Ord('i'); Shift: Ord('I'); Ctrl: $9; Alt: $117),
213+ (KeyCode: Ord('J'); Normal: Ord('j'); Shift: Ord('J'); Ctrl: $A; Alt: $124),
214+ (KeyCode: Ord('K'); Normal: Ord('k'); Shift: Ord('K'); Ctrl: $B; Alt: $125),
215+ (KeyCode: Ord('L'); Normal: Ord('l'); Shift: Ord('L'); Ctrl: $C; Alt: $126),
216+ (KeyCode: Ord('M'); Normal: Ord('m'); Shift: Ord('M'); Ctrl: $D; Alt: $132),
217+ (KeyCode: Ord('N'); Normal: Ord('n'); Shift: Ord('N'); Ctrl: $E; Alt: $131),
218+ (KeyCode: Ord('O'); Normal: Ord('o'); Shift: Ord('O'); Ctrl: $F; Alt: $118),
219+ (KeyCode: Ord('P'); Normal: Ord('p'); Shift: Ord('P'); Ctrl: $10; Alt: $119),
220+ (KeyCode: Ord('Q'); Normal: Ord('q'); Shift: Ord('Q'); Ctrl: $11; Alt: $110),
221+ (KeyCode: Ord('R'); Normal: Ord('r'); Shift: Ord('R'); Ctrl: $12; Alt: $113),
222+ (KeyCode: Ord('S'); Normal: Ord('s'); Shift: Ord('S'); Ctrl: $13; Alt: $11F),
223+ (KeyCode: Ord('T'); Normal: Ord('t'); Shift: Ord('T'); Ctrl: $14; Alt: $114),
224+ (KeyCode: Ord('U'); Normal: Ord('u'); Shift: Ord('U'); Ctrl: $15; Alt: $116),
225+ (KeyCode: Ord('V'); Normal: Ord('v'); Shift: Ord('V'); Ctrl: $16; Alt: $12F),
226+ (KeyCode: Ord('W'); Normal: Ord('w'); Shift: Ord('W'); Ctrl: $17; Alt: $111),
227+ (KeyCode: Ord('X'); Normal: Ord('x'); Shift: Ord('X'); Ctrl: $18; Alt: $12D),
228+ (KeyCode: Ord('Y'); Normal: Ord('y'); Shift: Ord('Y'); Ctrl: $19; Alt: $115),
229+ (KeyCode: Ord('Z'); Normal: Ord('z'); Shift: Ord('Z'); Ctrl: $1A; Alt: $12C),
230+ (KeyCode: VK_PRIOR; Normal: $149; Shift: $149; Ctrl: $184; Alt: $199),
231+ (KeyCode: VK_NEXT; Normal: $151; Shift: $151; Ctrl: $176; Alt: $1A1),
232+ (KeyCode: VK_END; Normal: $14F; Shift: $14F; Ctrl: $175; Alt: $19F),
233+ (KeyCode: VK_HOME; Normal: $147; Shift: $147; Ctrl: $177; Alt: $197),
234+ (KeyCode: VK_LEFT; Normal: $14B; Shift: $14B; Ctrl: $173; Alt: $19B),
235+ (KeyCode: VK_UP; Normal: $148; Shift: $148; Ctrl: $18D; Alt: $198),
236+ (KeyCode: VK_RIGHT; Normal: $14D; Shift: $14D; Ctrl: $174; Alt: $19D),
237+ (KeyCode: VK_DOWN; Normal: $150; Shift: $150; Ctrl: $191; Alt: $1A0),
238+ (KeyCode: VK_INSERT; Normal: $152; Shift: $152; Ctrl: $192; Alt: $1A2),
239+ (KeyCode: VK_DELETE; Normal: $153; Shift: $153; Ctrl: $193; Alt: $1A3),
240+ (KeyCode: VK_NUMPAD0; Normal: Ord('0'); Shift: $152; Ctrl: $192; Alt: - 1),
241+ (KeyCode: VK_NUMPAD1; Normal: Ord('1'); Shift: $14F; Ctrl: $175; Alt: - 1),
242+ (KeyCode: VK_NUMPAD2; Normal: Ord('2'); Shift: $150; Ctrl: $191; Alt: - 1),
243+ (KeyCode: VK_NUMPAD3; Normal: Ord('3'); Shift: $151; Ctrl: $176; Alt: - 1),
244+ (KeyCode: VK_NUMPAD4; Normal: Ord('4'); Shift: $14B; Ctrl: $173; Alt: - 1),
245+ (KeyCode: VK_NUMPAD5; Normal: Ord('5'); Shift: $14C; Ctrl: $18F; Alt: - 1),
246+ (KeyCode: VK_NUMPAD6; Normal: Ord('6'); Shift: $14D; Ctrl: $174; Alt: - 1),
247+ (KeyCode: VK_NUMPAD7; Normal: Ord('7'); Shift: $147; Ctrl: $177; Alt: - 1),
248+ (KeyCode: VK_NUMPAD8; Normal: Ord('8'); Shift: $148; Ctrl: $18D; Alt: - 1),
249+ (KeyCode: VK_NUMPAD9; Normal: Ord('9'); Shift: $149; Ctrl: $184; Alt: - 1),
250+ (KeyCode: VK_MULTIPLY; Normal: Ord('*'); Shift: Ord('*'); Ctrl: $196; Alt: $137),
251+ (KeyCode: VK_ADD; Normal: Ord('+'); Shift: Ord('+'); Ctrl: $190; Alt: $14E),
252+ (KeyCode: VK_SUBTRACT; Normal: Ord('-'); Shift: Ord('-'); Ctrl: $18E; Alt: $14A),
253+ (KeyCode: VK_DECIMAL; Normal: Ord('.'); Shift: Ord('.'); Ctrl: $153; Alt: $193),
254+ (KeyCode: VK_DIVIDE; Normal: Ord('/'); Shift: Ord('/'); Ctrl: $195; Alt: $1A4),
255+ (KeyCode: VK_F1; Normal: $13B; Shift: $154; Ctrl: $15E; Alt: $168),
256+ (KeyCode: VK_F2; Normal: $13C; Shift: $155; Ctrl: $15F; Alt: $169),
257+ (KeyCode: VK_F3; Normal: $13D; Shift: $156; Ctrl: $160; Alt: $16A),
258+ (KeyCode: VK_F4; Normal: $13E; Shift: $157; Ctrl: $161; Alt: $16B),
259+ (KeyCode: VK_F5; Normal: $13F; Shift: $158; Ctrl: $162; Alt: $16C),
260+ (KeyCode: VK_F6; Normal: $140; Shift: $159; Ctrl: $163; Alt: $16D),
261+ (KeyCode: VK_F7; Normal: $141; Shift: $15A; Ctrl: $164; Alt: $16E),
262+ (KeyCode: VK_F8; Normal: $142; Shift: $15B; Ctrl: $165; Alt: $16F),
263+ (KeyCode: VK_F9; Normal: $143; Shift: $15C; Ctrl: $166; Alt: $170),
264+ (KeyCode: VK_F10; Normal: $144; Shift: $15D; Ctrl: $167; Alt: $171),
265+ (KeyCode: VK_F11; Normal: $185; Shift: $187; Ctrl: $189; Alt: $18B),
266+ (KeyCode: VK_F12; Normal: $186; Shift: $188; Ctrl: $18A; Alt: $18C),
267+ (KeyCode: $DC; Normal: Ord('\'); Shift: Ord('|'); Ctrl: $1C; Alt: $12B),
268+ (KeyCode: $BF; Normal: Ord('/'); Shift: Ord('?'); Ctrl: - 1; Alt: $135),
269+ (KeyCode: $BD; Normal: Ord('-'); Shift: Ord('_'); Ctrl: $1F; Alt: $182),
270+ (KeyCode: $BB; Normal: Ord('='); Shift: Ord('+'); Ctrl: - 1; Alt: $183),
271+ (KeyCode: $DB; Normal: Ord('['); Shift: Ord('{'); Ctrl: $1B; Alt: $11A),
272+ (KeyCode: $DD; Normal: Ord(']'); Shift: Ord('}'); Ctrl: $1D; Alt: $11B),
273+ (KeyCode: $BA; Normal: Ord(';'); Shift: Ord(':'); Ctrl: - 1; Alt: $127),
274+ (KeyCode: $DE; Normal: Ord(''''); Shift: Ord('"'); Ctrl: - 1; Alt: $128),
275+ (KeyCode: $BC; Normal: Ord(','); Shift: Ord('<'); Ctrl: - 1; Alt: $133),
276+ (KeyCode: $BE; Normal: Ord('.'); Shift: Ord('>'); Ctrl: - 1; Alt: $134),
277+ (KeyCode: $C0; Normal: Ord('`'); Shift: Ord('~'); Ctrl: - 1; Alt: $129)
278+ );
279+
280+var
281+ ExtendedChar: Char = #0;
282+
283+function FindKeyCode(KeyCode: Smallint): PKey; {$IFDEF INLINES}inline;{$ENDIF}
284+var
285+ I: Integer;
286+begin
287+ for I := 0 to High(CKeys) do
288+ if CKeys[I].KeyCode = KeyCode then
289+ begin
290+ Result := @CKeys[I];
291+ Exit;
292+ end;
293+ Result := nil;
294+end;
295+
296+// This has a complexity of 11, because of the if else ladder.
297+// That bugs me a bit. Looking for something more elegant.
298+function TranslateKey(const Rec: TInputRecord; State: Integer; Key: PKey; KeyCode: Integer): Smallint;
299+begin
300+ if State and (RIGHT_ALT_PRESSED or LEFT_ALT_PRESSED) <> 0 then
301+ Result := Key^.Alt
302+ else if State and (RIGHT_CTRL_PRESSED or LEFT_CTRL_PRESSED) <> 0 then
303+ Result := Key^.Ctrl
304+ else if State and SHIFT_PRESSED <> 0 then
305+ Result := Key^.Shift
306+ else if KeyCode in [Ord('A')..Ord('Z')] then
307+ Result := Ord(Rec.Event.KeyEvent.AsciiChar)
308+ else
309+ Result := Key^.Normal;
310+end;
311+
312+function ConvertKey(const Rec: TInputRecord; Key: PKey): Smallint;
313+ {$IFDEF INLINES}inline;{$ENDIF}
314+begin
315+ if Assigned(Key) then
316+ Result := TranslateKey(Rec, Rec.Event.KeyEvent.dwControlKeyState,
317+ Key, Rec.Event.KeyEvent.wVirtualKeyCode)
318+ else
319+ Result := -1
320+end;
321+
322+function ReadKey: Char;
323+var
324+ InputRec: TInputRecord;
325+ NumRead: Cardinal;
326+ KeyMode: DWORD;
327+ KeyCode: Smallint;
328+begin
329+ if ExtendedChar <> #0 then
330+ begin
331+ Result := ExtendedChar;
332+ ExtendedChar := #0;
333+ Exit;
334+ end
335+ else
336+ begin
337+ Result := #$FF;
338+ GetConsoleMode(StdIn, KeyMode);
339+ SetConsoleMode(StdIn, 0);
340+ repeat
341+ ReadConsoleInput(StdIn, InputRec, 1, NumRead);
342+ if (InputRec.EventType and KEY_EVENT <> 0) and
343+ InputRec.Event.KeyEvent.bKeyDown then
344+ begin
345+ if InputRec.Event.KeyEvent.AsciiChar <> #0 then
346+ begin
347+ // From Delphi 2009 on, Result is WideChar
348+ Result := Chr(Ord(InputRec.Event.KeyEvent.AsciiChar));
349+ Break;
350+ end;
351+ KeyCode := ConvertKey(InputRec,
352+ FindKeyCode(InputRec.Event.KeyEvent.wVirtualKeyCode));
353+ if KeyCode > $FF then
354+ begin
355+ ExtendedChar := Chr(KeyCode and $FF);
356+ Result := #0;
357+ Break;
358+ end;
359+ end;
360+ until False;
361+ SetConsoleMode(StdIn, KeyMode);
362+ end;
363+end;
364+
365+function KeyPressed: Boolean;
366+var
367+ InputRecArray: array of TInputRecord;
368+ NumRead: DWORD;
369+ NumEvents: DWORD;
370+ I: Integer;
371+ KeyCode: Word;
372+begin
373+ Result := False;
374+ GetNumberOfConsoleInputEvents(StdIn, NumEvents);
375+ if NumEvents = 0 then
376+ Exit;
377+ SetLength(InputRecArray, NumEvents);
378+ PeekConsoleInput(StdIn, InputRecArray[0], NumEvents, NumRead);
379+ for I := 0 to High(InputRecArray) do
380+ begin
381+ if (InputRecArray[I].EventType and Key_Event <> 0) and
382+ InputRecArray[I].Event.KeyEvent.bKeyDown then
383+ begin
384+ KeyCode := InputRecArray[I].Event.KeyEvent.wVirtualKeyCode;
385+ if not (KeyCode in [VK_SHIFT, VK_MENU, VK_CONTROL]) then
386+ begin
387+ if ConvertKey(InputRecArray[I], FindKeyCode(KeyCode)) <> -1 then
388+ begin
389+ Result := True;
390+ Exit;
391+ end;
392+ end;
393+ end;
394+ end;
395+end;
396+
397+procedure TextColor(Color: Byte);
398+begin
399+ LastMode := TextAttr;
400+ TextAttr := (TextAttr and $F0) or (Color and $0F);
401+ SetConsoleTextAttribute(StdOut, TextAttr);
402+end;
403+
404+procedure TextBackground(Color: Byte);
405+begin
406+ LastMode := TextAttr;
407+ TextAttr := (TextAttr and $0F) or ((Color shl 4) and $F0);
408+ SetConsoleTextAttribute(StdOut, TextAttr);
409+end;
410+
411+procedure LowVideo;
412+begin
413+ LastMode := TextAttr;
414+ TextAttr := TextAttr and $F7;
415+ SetConsoleTextAttribute(StdOut, TextAttr);
416+end;
417+
418+procedure HighVideo;
419+begin
420+ LastMode := TextAttr;
421+ TextAttr := TextAttr or $08;
422+ SetConsoleTextAttribute(StdOut, TextAttr);
423+end;
424+
425+procedure NormVideo;
426+begin
427+ TextAttr := DefaultAttr;
428+ SetConsoleTextAttribute(StdOut, TextAttr);
429+end;
430+
431+// The following functions are independent of TextWindow.
432+
433+function GetCursorX: Integer; {$IFDEF INLINES}inline;{$ENDIF}
434+var
435+ BufferInfo: TConsoleScreenBufferInfo;
436+begin
437+ GetConsoleSCreenBufferInfo(StdOut, BufferInfo);
438+ Result := BufferInfo.dwCursorPosition.X;
439+end;
440+
441+function GetCursorY: Integer; {$IFDEF INLINES}inline;{$ENDIF}
442+var
443+ BufferInfo: TConsoleScreenBufferInfo;
444+begin
445+ GetConsoleSCreenBufferInfo(StdOut, BufferInfo);
446+ Result := BufferInfo.dwCursorPosition.Y;
447+end;
448+
449+procedure SetCursorPos(X, Y: Smallint);
450+var
451+ NewPos: TCoord;
452+begin
453+ NewPos.X := X;
454+ NewPos.Y := Y;
455+ SetConsoleCursorPosition(StdOut, NewPos);
456+end;
457+
458+// The following functions are relative to TextWindow.
459+
460+procedure ClrScr;
461+var
462+ StartPos: TCoord;
463+ Len, NumWritten: DWORD;
464+ I: Integer;
465+begin
466+ if (TextWindow.Left = 0) and (TextWindow.Top = 0) and
467+ (TextWindow.Right = BufferSize.X - 1) and
468+ (TextWindow.Bottom = BufferSize.Y - 1) then
469+ begin
470+ StartPos.X := 0;
471+ StartPos.Y := 0;
472+ Len := BufferSize.X * BufferSize.Y;
473+ FillConsoleOutputCharacterA(StdOut, ' ', Len, StartPos, NumWritten);
474+ FillConsoleOutputAttribute(StdOut, TextAttr, Len, StartPos, NumWritten);
475+ if NumWritten < Len then
476+ begin
477+ ScreenSize.X := ScreenWidth;
478+ ScreenSize.Y := ScreenHeight;
479+ end;
480+ end
481+ else
482+ begin
483+ Len := TextWindow.Right - TextWindow.Left + 1;
484+ StartPos.X := TextWindow.Left;
485+ for I := TextWindow.Top to TextWindow.Bottom do
486+ begin
487+ StartPos.Y := I;
488+ FillConsoleOutputCharacterA(StdOut, ' ', Len, StartPos, NumWritten);
489+ FillConsoleOutputAttribute(StdOut, TextAttr, Len, StartPos, NumWritten);
490+ end;
491+ end;
492+ GotoXY(1, 1);
493+end;
494+
495+procedure GotoXY(X, Y: Smallint);
496+begin
497+ Inc(X, TextWindow.Left - 1);
498+ Inc(Y, TextWindow.Top - 1);
499+ if (X >= TextWindow.Left) and (X <= TextWindow.Right) and
500+ (Y >= TextWindow.Top) and (Y <= TextWindow.Bottom) then
501+ SetCursorPos(X, Y);
502+end;
503+
504+procedure ClrEol;
505+var
506+ Len: Integer;
507+ Pos: TCoord;
508+ NumWritten: DWORD;
509+begin
510+ Len := TextWindow.Right - GetCursorX + 1;
511+ Pos.X := GetCursorX;
512+ Pos.Y := GetCursorY;
513+ FillConsoleOutputCharacterA(StdOut, ' ', Len, Pos, NumWritten);
514+ FillConsoleOutputAttribute(StdOut, TextAttr, Len, Pos, NumWritten);
515+end;
516+
517+procedure Scroll(Left, Top, Right, Bottom: Integer; Distance: Integer = 0);
518+var
519+ Rect: TSmallRect;
520+ Fill: TCharInfo;
521+ NewPos: TCoord;
522+begin
523+ Fill.AsciiChar := ' ';
524+ Fill.Attributes := TextAttr;
525+ if Distance = 0 then
526+ Distance := Bottom - Top + 1;
527+ Rect.Left := Left;
528+ Rect.Right := Right;
529+ Rect.Top := Top;
530+ Rect.Bottom := Bottom;
531+ NewPos.X := Left;
532+ NewPos.Y := Top + Distance;
533+ ScrollConsoleScreenBufferA(StdOut, Rect, @Rect, NewPos, Fill);
534+end;
535+
536+procedure InsLine;
537+begin
538+ Scroll(TextWindow.Left, GetCursorY,
539+ TextWindow.Right, TextWindow.Bottom, 1);
540+end;
541+
542+procedure DelLine;
543+begin
544+ Scroll(TextWindow.Left, GetCursorY,
545+ TextWindow.Right, TextWindow.Bottom, -1);
546+end;
547+
548+function Validate(X1, Y1, X2, Y2: Integer): Boolean;
549+ {$IFDEF INLINES}inline;{$ENDIF}
550+begin
551+ Result := (X1 < X2) and (Y1 < Y2) and
552+ (X1 >= 0) and (X2 < BufferSize.X) and
553+ (Y1 >= 0) and (Y2 < BufferSize.Y);
554+end;
555+
556+procedure WriteText(Line: PAnsiChar; Len: Integer);
557+var
558+ NumWritten: DWORD;
559+begin
560+ SetConsoleTextAttribute(StdOut, TextAttr);
561+ WriteConsoleA(StdOut, Line, Len, NumWritten, nil);
562+end;
563+
564+// Replacement for TTextRec.InOutFunc and TTextRec.FlushFunc for the Output
565+// and ErrOutput pseudo-textfiles.
566+// This is generally only used if a text window is set, otherwise this is
567+// handled by the runtime library.
568+function NewTextOut(var T: TTextRec): Integer;
569+var
570+ ReadPtr, WritePtr: PAnsiChar;
571+ Line: AnsiString;
572+ DistanceToEdge: Integer;
573+
574+ // Moves cursor to start of line, updates DistanceToEdge.
575+ procedure CarriageReturn;
576+ begin
577+ SetCursorPos(TextWindow.Left, GetCursorY);
578+ DistanceToEdge := TextWindow.Right - TextWindow.Left + 1;
579+ end;
580+
581+ // Moves cursor down one line. If necessary, scrolls window.
582+ procedure LineFeed; {$IFDEF INLINES}inline;{$ENDIF}
583+ begin
584+ if GetCursorY < TextWindow.Bottom then
585+ SetCursorPos(GetCursorX, GetCursorY + 1)
586+ else
587+ Scroll(TextWindow.Left, TextWindow.Top, TextWindow.Right,
588+ TextWindow.Bottom, -1);
589+ end;
590+
591+ // Store one char in write buffer.
592+ procedure CharToWriteBuffer(C: AnsiChar);
593+ begin
594+ WritePtr^ := C;
595+ Inc(WritePtr);
596+ Dec(DistanceToEdge);
597+ end;
598+
599+ // True if at right edge of window.
600+ function WriteLine: Boolean;
601+ begin
602+ WritePtr^ := #0;
603+ WriteText(PAnsiChar(Line), WritePtr - PAnsiChar(Line));
604+ Result := DistanceToEdge = 0;
605+ WritePtr := PAnsiChar(Line);
606+ DistanceToEdge := TextWindow.Right - TextWindow.Left + 1;
607+ end;
608+
609+ // Converts tabs to spaces, since WriteConsole will do its own tabbing when
610+ // it encounters a #9, which is of course independent of this unit's
611+ // TextWindow settings.
612+ procedure ProcessTab;
613+ var
614+ Num, I: Integer;
615+ begin
616+ Num := 8 - (WritePtr - PAnsiChar(Line)) mod 8;
617+ if Num > DistanceToEdge then
618+ Num := DistanceToEdge;
619+ for I := 1 to Num do
620+ CharToWriteBuffer(' ');
621+ end;
622+
623+begin
624+ SetLength(Line, BufferSize.X); // Line only contains one line of windowed text.
625+ WritePtr := PAnsiChar(Line);
626+ ReadPtr := T.BufPtr;
627+ DistanceToEdge := TextWindow.Right - GetCursorX + 1;
628+ while T.BufPos > 0 do
629+ begin
630+ while (T.BufPos > 0) and (DistanceToEdge > 0) do
631+ begin
632+ case ReadPtr^ of
633+ #7: Windows.Beep(800, 200); // this is what my internal speaker uses.
634+ #8: begin
635+ Dec(WritePtr);
636+ Inc(DistanceToEdge);
637+ end;
638+ #9: ProcessTab;
639+ // LineFeed is not just a line feed, it takes the function of #13#10
640+ #10: begin
641+ WriteLine;
642+ CarriageReturn;
643+ LineFeed;
644+ end;
645+ #13: begin
646+ WriteLine;
647+ CarriageReturn;
648+ end;
649+ else
650+ CharToWriteBuffer(ReadPtr^);
651+ end;
652+ Inc(ReadPtr);
653+ Dec(T.BufPos);
654+ end;
655+ if WriteLine then
656+ begin
657+ CarriageReturn;
658+ // If TexWindow.Right is at the edge of the screen, WriteConsole will
659+ // already do a linefeed.
660+ if TextWindow.Right <> ScreenWidth - 1 then
661+ LineFeed;
662+ end;
663+ end;
664+ Result := 0;
665+end;
666+
667+var
668+ OldInOutFunc: Pointer;
669+ OldFlushFunc: Pointer;
670+
671+procedure Window(Left, Top, Right, Bottom: Integer);
672+begin
673+ Dec(Left);
674+ Dec(Top);
675+ Dec(Right);
676+ Dec(Bottom);
677+ if Validate(Left, Top, Right, Bottom) then
678+ begin
679+ TextWindow.Left := Left;
680+ TextWindow.Top := Top;
681+ TextWindow.Right := Right;
682+ TextWindow.Bottom := Bottom;
683+ if (Left > 0) or (Top > 0) or
684+ (Right < BufferSize.X - 1) or (Bottom < BufferSize.Y - 1) then
685+ // Text must be contained in window
686+ begin
687+ OldInOutFunc := TTextRec(Output).InOutFunc;
688+ OldFlushFunc := TTextRec(Output).FlushFunc;
689+ TTextRec(Output).InOutFunc := @NewTextOut;
690+ TTextRec(Output).FlushFunc := @NewTextOut;
691+ SetCursorPos(Left, Top);
692+ end;
693+ end
694+ else
695+ begin
696+ TextWindow.Left := 0;
697+ TextWindow.Right := BufferSize.X - 1;
698+ TextWindow.Top := 0;
699+ TextWindow.Bottom := BufferSize.Y - 1;
700+ SetCursorPos(0, 0);
701+ if Assigned(OldInOutFunc) then
702+ begin
703+ TTextRec(Output).InOutFunc := OldInOutFunc;
704+ OldInOutFunc := nil;
705+ end;
706+ if Assigned(OldFlushFunc) then
707+ begin
708+ TTextRec(Output).FlushFunc := OldFlushFunc;
709+ OldFlushFunc := nil;
710+ end;
711+ end;
712+ WindMin := (TextWindow.Left and $FF) or (TextWindow.Top and $FF) shl 8;
713+ WindMax := (TextWindow.Right and $FF) or (TextWindow.Bottom and $FF) shl 8;
714+end;
715+
716+procedure HardwareSound(Frequency: Smallint);
717+asm
718+ CMP AX,37
719+ JB @@1
720+ MOV CX,AX
721+ MOV AL,$B6
722+ OUT $43,AL
723+ MOV AX,$3540
724+ MOV DX,$0012
725+ DIV CX
726+ OUT $42,AL
727+ MOV AL,AH
728+ OUT $42,AL
729+ MOV AL,3
730+ OUT $61,AL
731+@@1:
732+end;
733+
734+procedure HardwareNoSound;
735+asm
736+ MOV AL,0
737+ OUT $61,AL
738+end;
739+
740+procedure HardwareDelay(Millisecs: Integer);
741+begin
742+ Sleep(Millisecs);
743+end;
744+
745+procedure HardwareBeep(Frequency, Duration: Smallint);
746+begin
747+ Sound(Frequency);
748+ Delay(Duration);
749+ NoSound;
750+end;
751+
752+type
753+ TSoundState = (ssPending, ssPlaying, ssFreed);
754+
755+var
756+ CurrentFrequency: Integer;
757+ SoundState: TSoundState;
758+
759+// On Windows NT and later, direct port access is prohibited, so there is
760+// no way to use HardwareSound and HardwareNoSound.
761+//
762+// Since probably every note played by Sound will be delimited by some kind
763+// of Delay, the playing of the note is deferred to Delay. Sound only stores
764+// the frequency and sets the SoundState to ssPending. Delay now knows both
765+// parameters, and can use Windows.Beep.
766+//
767+// Note that such code is not reentrant.
768+
769+procedure SoftwareSound(Frequency: Smallint);
770+begin
771+ // $123540 div Frequency must be <= $7FFF, so Frequency must be >= 37.
772+ if Frequency >= 37 then
773+ begin
774+ CurrentFrequency := Frequency;
775+ SoundState := ssPending;
776+ end;
777+end;
778+
779+procedure SoftwareDelay(Millisecs: Integer);
780+begin
781+ if SoundState = ssPending then
782+ begin
783+ SoundState := ssPlaying;
784+ Windows.Beep(CurrentFrequency, MilliSecs);
785+ SoundState := ssFreed;
786+ end
787+ else
788+ Sleep(MilliSecs);
789+end;
790+
791+procedure SoftwareBeep(Frequency, Duration: Smallint);
792+begin
793+ if Frequency >= 37 then
794+ begin
795+ SoundState := ssPlaying;
796+ Windows.Beep(Frequency, Duration);
797+ SoundState := ssFreed;
798+ end;
799+end;
800+
801+procedure SoftwareNoSound;
802+begin
803+ Windows.Beep(CurrentFrequency, 0);
804+ SoundState := ssFreed;
805+end;
806+
807+function WhereX: Integer;
808+begin
809+ Result := GetCursorX - TextWindow.Left + 1;
810+end;
811+
812+function WhereY: Integer;
813+begin
814+ Result := GetCursorY - TextWindow.Top + 1;
815+end;
816+
817+procedure GetScreenSizes(var Width, Height: Smallint);
818+var
819+ BufferInfo: TConsoleScreenBufferInfo;
820+begin
821+ GetConsoleScreenBufferInfo(StdOut, BufferInfo);
822+ Width := BufferInfo.srWindow.Right - BufferInfo.srWindow.Left + 1;
823+ Height := BufferInfo.srWindow.Bottom - BufferInfo.srWindow.Top + 1;
824+end;
825+
826+function ScreenWidth: Smallint;
827+var
828+ Height: Smallint;
829+begin
830+ GetScreenSizes(Result, Height);
831+end;
832+
833+function ScreenHeight: Smallint;
834+var
835+ Width: Smallint;
836+begin
837+ GetScreenSizes(Width, Result);
838+end;
839+
840+procedure GetBufferSizes(var Width, Height: Smallint);
841+var
842+ BufferInfo: TConsoleScreenBufferInfo;
843+begin
844+ GetConsoleScreenBufferInfo(StdOut, BufferInfo);
845+ Width := BufferInfo.dwSize.X;
846+ Height := BufferInfo.dwSize.Y;
847+end;
848+
849+function BufferWidth: Smallint;
850+var
851+ Height: Smallint;
852+begin
853+ GetBufferSizes(Result, Height);
854+end;
855+
856+function BufferHeight: Smallint;
857+var
858+ Width: Smallint;
859+begin
860+ GetBufferSizes(Width, Result);
861+end;
862+
863+function TextColor: Byte;
864+begin
865+ Result := TextAttr and $0F;
866+end;
867+
868+function TextBackground: Byte;
869+begin
870+ Result := (TextAttr and $F0) shr 4;
871+end;
872+
873+procedure TextMode(Mode: Word);
874+begin
875+ Window(0, 0, 0, 0);
876+ NormVideo;
877+end;
878+
879+function Pause(const Msg: string = ''): Char;
880+begin
881+ if Msg = '' then
882+ Write('Press any key... ')
883+ else
884+ Write(Msg);
885+ Result := ReadKey;
886+end;
887+
888+procedure InitScreenMode;
889+var
890+ BufferInfo: TConsoleScreenBufferInfo;
891+begin
892+ Reset(Input);
893+ Rewrite(Output);
894+ StdIn := TTextRec(Input).Handle;
895+ StdOut := TTextRec(Output).Handle;
896+{$IFDEF HASERROUTPUT}
897+ Rewrite(ErrOutput);
898+ StdErr := TTextRec(ErrOutput).Handle;
899+{$ELSE}
900+ StdErr := GetStdHandle(STD_ERROR_HANDLE);
901+{$ENDIF}
902+ if not GetConsoleScreenBufferInfo(StdOut, BufferInfo) then
903+ begin
904+ SetInOutRes(GetLastError);
905+ Exit;
906+ end;
907+ TextWindow.Left := 0;
908+ TextWindow.Top := 0;
909+ TextWindow.Right := BufferInfo.dwSize.X - 1;
910+ TextWindow.Bottom := BufferInfo.dwSize.Y - 1;
911+ TextAttr := BufferInfo.wAttributes and $FF;
912+ DefaultAttr := TextAttr;
913+ BufferSize := BufferInfo.dwSize;
914+ ScreenSize.X := BufferInfo.srWindow.Right - BufferInfo.srWindow.Left + 1;
915+ ScreenSize.Y := BufferInfo.srWindow.Bottom - BufferInfo.srWindow.Top + 1;
916+ WindMin := 0;
917+ WindMax := (ScreenSize.X and $FF) or (ScreenSize.Y and $FF) shl 8;
918+ LastMode := CO80;
919+ OldInOutFunc := nil;
920+ OldFlushFunc := nil;
921+ if Win32Platform = VER_PLATFORM_WIN32_NT then
922+ begin
923+ Sound := SoftwareSound;
924+ NoSound := SoftwareNoSound;
925+ Delay := SoftwareDelay;
926+ Beep := SoftwareBeep;
927+ end
928+ else
929+ begin
930+ Sound := HardwareSound;
931+ NoSound := HardwareNoSound;
932+ Delay := HardwareDelay;
933+ Beep := HardwareBeep;
934+ end;
935+end;
936+
937+initialization
938+ InitScreenMode;
939+
940+end.
941+
--- tags/1.0.3/src/dzBdsLauncher.dpr (nonexistent)
+++ tags/1.0.3/src/dzBdsLauncher.dpr (revision 23)
@@ -0,0 +1,17 @@
1+program dzBdsLauncher;
2+
3+{$APPTYPE CONSOLE}
4+
5+uses
6+ System.SysUtils,
7+ u_dzBdsLauncher in 'u_dzBdsLauncher.pas',
8+ Velthuis.Console in 'Velthuis.Console.pas',
9+ u_dzStdOut in 'u_dzStdOut.pas';
10+
11+{$R *_version.res}
12+{$R *_icon.res}
13+{$R *_manifest.res}
14+
15+begin
16+ Main;
17+end.
--- tags/1.0.3/src/dzBdsLauncher.dproj (nonexistent)
+++ tags/1.0.3/src/dzBdsLauncher.dproj (revision 23)
@@ -0,0 +1,1035 @@
1+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+ <PropertyGroup>
3+ <Base>True</Base>
4+ <AppType>Console</AppType>
5+ <Config Condition="'$(Config)'==''">Debug</Config>
6+ <FrameworkType>None</FrameworkType>
7+ <MainSource>dzBdsLauncher.dpr</MainSource>
8+ <Platform Condition="'$(Platform)'==''">Win32</Platform>
9+ <ProjectGuid>{4CA0A90D-F239-46ED-A855-D1C0E0DEDAC1}</ProjectGuid>
10+ <ProjectVersion>18.8</ProjectVersion>
11+ <TargetedPlatforms>1</TargetedPlatforms>
12+ </PropertyGroup>
13+ <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
14+ <Base>true</Base>
15+ <CfgParent>Base</CfgParent>
16+ <Base_Win64>true</Base_Win64>
17+ </PropertyGroup>
18+ <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
19+ <Base>true</Base>
20+ </PropertyGroup>
21+ <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
22+ <Base>true</Base>
23+ <CfgParent>Base</CfgParent>
24+ <Base_Win32>true</Base_Win32>
25+ </PropertyGroup>
26+ <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
27+ <Base>true</Base>
28+ <CfgParent>Base</CfgParent>
29+ <Cfg_1>true</Cfg_1>
30+ </PropertyGroup>
31+ <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
32+ <Base>true</Base>
33+ <CfgParent>Cfg_1</CfgParent>
34+ <Cfg_1>true</Cfg_1>
35+ <Cfg_1_Win32>true</Cfg_1_Win32>
36+ </PropertyGroup>
37+ <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
38+ <Base>true</Base>
39+ <CfgParent>Base</CfgParent>
40+ <Cfg_2>true</Cfg_2>
41+ </PropertyGroup>
42+ <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
43+ <Base>true</Base>
44+ <CfgParent>Cfg_2</CfgParent>
45+ <Cfg_2>true</Cfg_2>
46+ <Cfg_2_Win32>true</Cfg_2_Win32>
47+ </PropertyGroup>
48+ <PropertyGroup Condition="'$(Base_Win64)'!=''">
49+ <DCC_ConsoleTarget>true</DCC_ConsoleTarget>
50+ <DCC_UsePackage>DBXSqliteDriver;bindcompdbx;IndyIPCommon;RESTComponents;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;dsnapcon;FireDACADSDriver;VirtualTreesR;FireDACMSAccDriver;fmxFireDAC;vclimg;FireDAC;vcltouch;vcldb;bindcompfmx;FireDACSqliteDriver;FireDACPgDriver;inetdb;soaprtl;DbxCommonDriver;FireDACIBDriver;fmx;fmxdae;xmlrtl;soapmidas;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;FireDACCommon;IndyIPClient;bindcompvcl;RESTBackendComponents;VCLRESTComponents;soapserver;dbxcds;VclSmp;adortl;vclie;bindengine;DBXMySQLDriver;CloudService;dsnapxml;FireDACMySQLDriver;dbrtl;inetdbxpress;IndyProtocols;FireDACCommonODBC;FireDACCommonDriver;inet;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
51+ <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
52+ <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
53+ </PropertyGroup>
54+ <PropertyGroup Condition="'$(Base)'!=''">
55+ <SanitizedProjectName>dzBdsLauncher</SanitizedProjectName>
56+ <DCC_DUPLICATE_CTOR_DTOR>false</DCC_DUPLICATE_CTOR_DTOR>
57+ <DCC_DcuOutput>..\dcu\$(Platform)\$(Config)</DCC_DcuOutput>
58+ <DCC_Define>NO_TRANSLATION;NO_TRANSLATION_HINT;$(DCC_Define)</DCC_Define>
59+ <DCC_E>false</DCC_E>
60+ <DCC_ExeOutput>..\</DCC_ExeOutput>
61+ <DCC_F>false</DCC_F>
62+ <DCC_K>false</DCC_K>
63+ <DCC_N>false</DCC_N>
64+ <DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
65+ <DCC_S>false</DCC_S>
66+ <DCC_SYMBOL_PLATFORM>false</DCC_SYMBOL_PLATFORM>
67+ <DCC_UNIT_PLATFORM>false</DCC_UNIT_PLATFORM>
68+ <DCC_UnitSearchPath>..\libs\dzlib\src;..\libs\dzlib\jedi_inc;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
69+ <PostBuildEvent>
70+ <![CDATA[call ..\buildtools\postbuild.cmd $(OUTPUTDIR)$(OUTPUTNAME)
71+$(PostBuildEvent)]]>
72+ </PostBuildEvent>
73+ <PreBuildEvent>
74+ <![CDATA[call ..\buildtools\prebuild.cmd $(PROJECTPATH)
75+$(PreBuildEvent)]]>
76+ </PreBuildEvent>
77+ <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
78+ <VerInfo_Locale>2057</VerInfo_Locale>
79+ </PropertyGroup>
80+ <PropertyGroup Condition="'$(Base_Win32)'!=''">
81+ <BT_BuildType>Debug</BT_BuildType>
82+ <DCC_ConsoleTarget>true</DCC_ConsoleTarget>
83+ <DCC_MapFile>3</DCC_MapFile>
84+ <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
85+ <DCC_UsePackage>DBXSqliteDriver;bindcompdbx;IndyIPCommon;RESTComponents;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;ccpack;vclFireDAC;IndySystem;tethering;svnui;dsnapcon;FireDACADSDriver;VirtualTreesR;FireDACMSAccDriver;fmxFireDAC;vclimg;FireDAC;vcltouch;vcldb;bindcompfmx;svn;FireDACSqliteDriver;FireDACPgDriver;inetdb;soaprtl;DbxCommonDriver;FireDACIBDriver;fmx;fmxdae;xmlrtl;soapmidas;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;FireDACCommon;IndyIPClient;bindcompvcl;RESTBackendComponents;VCLRESTComponents;soapserver;dbxcds;VclSmp;adortl;vclie;bindengine;DBXMySQLDriver;CloudService;dsnapxml;FireDACMySQLDriver;dbrtl;inetdbxpress;IndyProtocols;FireDACCommonODBC;FireDACCommonDriver;AutoSuffix;inet;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
86+ <Manifest_File>(None)</Manifest_File>
87+ <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
88+ <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
89+ <VerInfo_Locale>1033</VerInfo_Locale>
90+ </PropertyGroup>
91+ <PropertyGroup Condition="'$(Cfg_1)'!=''">
92+ <DCC_DebugDCUs>true</DCC_DebugDCUs>
93+ <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
94+ <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
95+ <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
96+ <DCC_Optimize>false</DCC_Optimize>
97+ <DCC_RemoteDebug>true</DCC_RemoteDebug>
98+ </PropertyGroup>
99+ <PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
100+ <DCC_RemoteDebug>false</DCC_RemoteDebug>
101+ <VerInfo_Locale>1033</VerInfo_Locale>
102+ </PropertyGroup>
103+ <PropertyGroup Condition="'$(Cfg_2)'!=''">
104+ <DCC_DebugInformation>0</DCC_DebugInformation>
105+ <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
106+ <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
107+ <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
108+ </PropertyGroup>
109+ <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
110+ <VerInfo_Locale>1033</VerInfo_Locale>
111+ </PropertyGroup>
112+ <ItemGroup>
113+ <DelphiCompile Include="$(MainSource)">
114+ <MainSource>MainSource</MainSource>
115+ </DelphiCompile>
116+ <DCCReference Include="u_dzBdsLauncher.pas"/>
117+ <DCCReference Include="Velthuis.Console.pas"/>
118+ <DCCReference Include="u_dzStdOut.pas"/>
119+ <BuildConfiguration Include="Base">
120+ <Key>Base</Key>
121+ </BuildConfiguration>
122+ <BuildConfiguration Include="Debug">
123+ <Key>Cfg_1</Key>
124+ <CfgParent>Base</CfgParent>
125+ </BuildConfiguration>
126+ <BuildConfiguration Include="Release">
127+ <Key>Cfg_2</Key>
128+ <CfgParent>Base</CfgParent>
129+ </BuildConfiguration>
130+ </ItemGroup>
131+ <ProjectExtensions>
132+ <Borland.Personality>Delphi.Personality.12</Borland.Personality>
133+ <Borland.ProjectType>Application</Borland.ProjectType>
134+ <BorlandProject>
135+ <Delphi.Personality>
136+ <Source>
137+ <Source Name="MainSource">dzBdsLauncher.dpr</Source>
138+ </Source>
139+ <Excluded_Packages>
140+ <Excluded_Packages Name="$(BDSBIN)\dcloffice2k260.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
141+ <Excluded_Packages Name="$(BDSBIN)\dclofficexp260.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
142+ </Excluded_Packages>
143+ </Delphi.Personality>
144+ <Deployment Version="3">
145+ <DeployFile LocalName="$(BDS)\Redist\iossimulator\libcgunwind.1.0.dylib" Class="DependencyModule">
146+ <Platform Name="iOSSimulator">
147+ <Overwrite>true</Overwrite>
148+ </Platform>
149+ </DeployFile>
150+ <DeployFile LocalName="$(BDS)\Redist\iossimulator\libpcre.dylib" Class="DependencyModule">
151+ <Platform Name="iOSSimulator">
152+ <Overwrite>true</Overwrite>
153+ </Platform>
154+ </DeployFile>
155+ <DeployFile LocalName="$(BDS)\Redist\osx32\libcgunwind.1.0.dylib" Class="DependencyModule">
156+ <Platform Name="OSX32">
157+ <Overwrite>true</Overwrite>
158+ </Platform>
159+ </DeployFile>
160+ <DeployFile LocalName="..\dzBdsLauncher.exe" Configuration="Debug" Class="ProjectOutput">
161+ <Platform Name="Win32">
162+ <RemoteName>dzBdsLauncher.exe</RemoteName>
163+ <Overwrite>true</Overwrite>
164+ </Platform>
165+ </DeployFile>
166+ <DeployClass Name="AdditionalDebugSymbols">
167+ <Platform Name="iOSSimulator">
168+ <Operation>1</Operation>
169+ </Platform>
170+ <Platform Name="OSX32">
171+ <RemoteDir>Contents\MacOS</RemoteDir>
172+ <Operation>1</Operation>
173+ </Platform>
174+ <Platform Name="Win32">
175+ <Operation>0</Operation>
176+ </Platform>
177+ </DeployClass>
178+ <DeployClass Name="AndroidClassesDexFile">
179+ <Platform Name="Android">
180+ <RemoteDir>classes</RemoteDir>
181+ <Operation>1</Operation>
182+ </Platform>
183+ <Platform Name="Android64">
184+ <RemoteDir>classes</RemoteDir>
185+ <Operation>1</Operation>
186+ </Platform>
187+ </DeployClass>
188+ <DeployClass Name="AndroidFileProvider">
189+ <Platform Name="Android">
190+ <RemoteDir>res\xml</RemoteDir>
191+ <Operation>1</Operation>
192+ </Platform>
193+ <Platform Name="Android64">
194+ <RemoteDir>res\xml</RemoteDir>
195+ <Operation>1</Operation>
196+ </Platform>
197+ </DeployClass>
198+ <DeployClass Name="AndroidGDBServer">
199+ <Platform Name="Android">
200+ <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
201+ <Operation>1</Operation>
202+ </Platform>
203+ </DeployClass>
204+ <DeployClass Name="AndroidLibnativeArmeabiFile">
205+ <Platform Name="Android">
206+ <RemoteDir>library\lib\armeabi</RemoteDir>
207+ <Operation>1</Operation>
208+ </Platform>
209+ <Platform Name="Android64">
210+ <RemoteDir>library\lib\armeabi</RemoteDir>
211+ <Operation>1</Operation>
212+ </Platform>
213+ </DeployClass>
214+ <DeployClass Name="AndroidLibnativeArmeabiv7aFile">
215+ <Platform Name="Android64">
216+ <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
217+ <Operation>1</Operation>
218+ </Platform>
219+ </DeployClass>
220+ <DeployClass Name="AndroidLibnativeMipsFile">
221+ <Platform Name="Android">
222+ <RemoteDir>library\lib\mips</RemoteDir>
223+ <Operation>1</Operation>
224+ </Platform>
225+ <Platform Name="Android64">
226+ <RemoteDir>library\lib\mips</RemoteDir>
227+ <Operation>1</Operation>
228+ </Platform>
229+ </DeployClass>
230+ <DeployClass Name="AndroidServiceOutput">
231+ <Platform Name="Android">
232+ <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
233+ <Operation>1</Operation>
234+ </Platform>
235+ <Platform Name="Android64">
236+ <RemoteDir>library\lib\arm64-v8a</RemoteDir>
237+ <Operation>1</Operation>
238+ </Platform>
239+ </DeployClass>
240+ <DeployClass Name="AndroidServiceOutput_Android32">
241+ <Platform Name="Android64">
242+ <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
243+ <Operation>1</Operation>
244+ </Platform>
245+ </DeployClass>
246+ <DeployClass Name="AndroidSplashImageDef">
247+ <Platform Name="Android">
248+ <RemoteDir>res\drawable</RemoteDir>
249+ <Operation>1</Operation>
250+ </Platform>
251+ <Platform Name="Android64">
252+ <RemoteDir>res\drawable</RemoteDir>
253+ <Operation>1</Operation>
254+ </Platform>
255+ </DeployClass>
256+ <DeployClass Name="AndroidSplashStyles">
257+ <Platform Name="Android">
258+ <RemoteDir>res\values</RemoteDir>
259+ <Operation>1</Operation>
260+ </Platform>
261+ <Platform Name="Android64">
262+ <RemoteDir>res\values</RemoteDir>
263+ <Operation>1</Operation>
264+ </Platform>
265+ </DeployClass>
266+ <DeployClass Name="AndroidSplashStylesV21">
267+ <Platform Name="Android">
268+ <RemoteDir>res\values-v21</RemoteDir>
269+ <Operation>1</Operation>
270+ </Platform>
271+ <Platform Name="Android64">
272+ <RemoteDir>res\values-v21</RemoteDir>
273+ <Operation>1</Operation>
274+ </Platform>
275+ </DeployClass>
276+ <DeployClass Name="Android_Colors">
277+ <Platform Name="Android">
278+ <RemoteDir>res\values</RemoteDir>
279+ <Operation>1</Operation>
280+ </Platform>
281+ <Platform Name="Android64">
282+ <RemoteDir>res\values</RemoteDir>
283+ <Operation>1</Operation>
284+ </Platform>
285+ </DeployClass>
286+ <DeployClass Name="Android_DefaultAppIcon">
287+ <Platform Name="Android">
288+ <RemoteDir>res\drawable</RemoteDir>
289+ <Operation>1</Operation>
290+ </Platform>
291+ <Platform Name="Android64">
292+ <RemoteDir>res\drawable</RemoteDir>
293+ <Operation>1</Operation>
294+ </Platform>
295+ </DeployClass>
296+ <DeployClass Name="Android_LauncherIcon144">
297+ <Platform Name="Android">
298+ <RemoteDir>res\drawable-xxhdpi</RemoteDir>
299+ <Operation>1</Operation>
300+ </Platform>
301+ <Platform Name="Android64">
302+ <RemoteDir>res\drawable-xxhdpi</RemoteDir>
303+ <Operation>1</Operation>
304+ </Platform>
305+ </DeployClass>
306+ <DeployClass Name="Android_LauncherIcon36">
307+ <Platform Name="Android">
308+ <RemoteDir>res\drawable-ldpi</RemoteDir>
309+ <Operation>1</Operation>
310+ </Platform>
311+ <Platform Name="Android64">
312+ <RemoteDir>res\drawable-ldpi</RemoteDir>
313+ <Operation>1</Operation>
314+ </Platform>
315+ </DeployClass>
316+ <DeployClass Name="Android_LauncherIcon48">
317+ <Platform Name="Android">
318+ <RemoteDir>res\drawable-mdpi</RemoteDir>
319+ <Operation>1</Operation>
320+ </Platform>
321+ <Platform Name="Android64">
322+ <RemoteDir>res\drawable-mdpi</RemoteDir>
323+ <Operation>1</Operation>
324+ </Platform>
325+ </DeployClass>
326+ <DeployClass Name="Android_LauncherIcon72">
327+ <Platform Name="Android">
328+ <RemoteDir>res\drawable-hdpi</RemoteDir>
329+ <Operation>1</Operation>
330+ </Platform>
331+ <Platform Name="Android64">
332+ <RemoteDir>res\drawable-hdpi</RemoteDir>
333+ <Operation>1</Operation>
334+ </Platform>
335+ </DeployClass>
336+ <DeployClass Name="Android_LauncherIcon96">
337+ <Platform Name="Android">
338+ <RemoteDir>res\drawable-xhdpi</RemoteDir>
339+ <Operation>1</Operation>
340+ </Platform>
341+ <Platform Name="Android64">
342+ <RemoteDir>res\drawable-xhdpi</RemoteDir>
343+ <Operation>1</Operation>
344+ </Platform>
345+ </DeployClass>
346+ <DeployClass Name="Android_NotificationIcon24">
347+ <Platform Name="Android">
348+ <RemoteDir>res\drawable-mdpi</RemoteDir>
349+ <Operation>1</Operation>
350+ </Platform>
351+ <Platform Name="Android64">
352+ <RemoteDir>res\drawable-mdpi</RemoteDir>
353+ <Operation>1</Operation>
354+ </Platform>
355+ </DeployClass>
356+ <DeployClass Name="Android_NotificationIcon36">
357+ <Platform Name="Android">
358+ <RemoteDir>res\drawable-hdpi</RemoteDir>
359+ <Operation>1</Operation>
360+ </Platform>
361+ <Platform Name="Android64">
362+ <RemoteDir>res\drawable-hdpi</RemoteDir>
363+ <Operation>1</Operation>
364+ </Platform>
365+ </DeployClass>
366+ <DeployClass Name="Android_NotificationIcon48">
367+ <Platform Name="Android">
368+ <RemoteDir>res\drawable-xhdpi</RemoteDir>
369+ <Operation>1</Operation>
370+ </Platform>
371+ <Platform Name="Android64">
372+ <RemoteDir>res\drawable-xhdpi</RemoteDir>
373+ <Operation>1</Operation>
374+ </Platform>
375+ </DeployClass>
376+ <DeployClass Name="Android_NotificationIcon72">
377+ <Platform Name="Android">
378+ <RemoteDir>res\drawable-xxhdpi</RemoteDir>
379+ <Operation>1</Operation>
380+ </Platform>
381+ <Platform Name="Android64">
382+ <RemoteDir>res\drawable-xxhdpi</RemoteDir>
383+ <Operation>1</Operation>
384+ </Platform>
385+ </DeployClass>
386+ <DeployClass Name="Android_NotificationIcon96">
387+ <Platform Name="Android">
388+ <RemoteDir>res\drawable-xxxhdpi</RemoteDir>
389+ <Operation>1</Operation>
390+ </Platform>
391+ <Platform Name="Android64">
392+ <RemoteDir>res\drawable-xxxhdpi</RemoteDir>
393+ <Operation>1</Operation>
394+ </Platform>
395+ </DeployClass>
396+ <DeployClass Name="Android_SplashImage426">
397+ <Platform Name="Android">
398+ <RemoteDir>res\drawable-small</RemoteDir>
399+ <Operation>1</Operation>
400+ </Platform>
401+ <Platform Name="Android64">
402+ <RemoteDir>res\drawable-small</RemoteDir>
403+ <Operation>1</Operation>
404+ </Platform>
405+ </DeployClass>
406+ <DeployClass Name="Android_SplashImage470">
407+ <Platform Name="Android">
408+ <RemoteDir>res\drawable-normal</RemoteDir>
409+ <Operation>1</Operation>
410+ </Platform>
411+ <Platform Name="Android64">
412+ <RemoteDir>res\drawable-normal</RemoteDir>
413+ <Operation>1</Operation>
414+ </Platform>
415+ </DeployClass>
416+ <DeployClass Name="Android_SplashImage640">
417+ <Platform Name="Android">
418+ <RemoteDir>res\drawable-large</RemoteDir>
419+ <Operation>1</Operation>
420+ </Platform>
421+ <Platform Name="Android64">
422+ <RemoteDir>res\drawable-large</RemoteDir>
423+ <Operation>1</Operation>
424+ </Platform>
425+ </DeployClass>
426+ <DeployClass Name="Android_SplashImage960">
427+ <Platform Name="Android">
428+ <RemoteDir>res\drawable-xlarge</RemoteDir>
429+ <Operation>1</Operation>
430+ </Platform>
431+ <Platform Name="Android64">
432+ <RemoteDir>res\drawable-xlarge</RemoteDir>
433+ <Operation>1</Operation>
434+ </Platform>
435+ </DeployClass>
436+ <DeployClass Name="Android_Strings">
437+ <Platform Name="Android">
438+ <RemoteDir>res\values</RemoteDir>
439+ <Operation>1</Operation>
440+ </Platform>
441+ <Platform Name="Android64">
442+ <RemoteDir>res\values</RemoteDir>
443+ <Operation>1</Operation>
444+ </Platform>
445+ </DeployClass>
446+ <DeployClass Name="DebugSymbols">
447+ <Platform Name="iOSSimulator">
448+ <Operation>1</Operation>
449+ </Platform>
450+ <Platform Name="OSX32">
451+ <RemoteDir>Contents\MacOS</RemoteDir>
452+ <Operation>1</Operation>
453+ </Platform>
454+ <Platform Name="Win32">
455+ <Operation>0</Operation>
456+ </Platform>
457+ </DeployClass>
458+ <DeployClass Name="DependencyFramework">
459+ <Platform Name="OSX32">
460+ <RemoteDir>Contents\MacOS</RemoteDir>
461+ <Operation>1</Operation>
462+ <Extensions>.framework</Extensions>
463+ </Platform>
464+ <Platform Name="OSX64">
465+ <RemoteDir>Contents\MacOS</RemoteDir>
466+ <Operation>1</Operation>
467+ <Extensions>.framework</Extensions>
468+ </Platform>
469+ <Platform Name="Win32">
470+ <Operation>0</Operation>
471+ </Platform>
472+ </DeployClass>
473+ <DeployClass Name="DependencyModule">
474+ <Platform Name="iOSDevice32">
475+ <Operation>1</Operation>
476+ <Extensions>.dylib</Extensions>
477+ </Platform>
478+ <Platform Name="iOSDevice64">
479+ <Operation>1</Operation>
480+ <Extensions>.dylib</Extensions>
481+ </Platform>
482+ <Platform Name="iOSSimulator">
483+ <Operation>1</Operation>
484+ <Extensions>.dylib</Extensions>
485+ </Platform>
486+ <Platform Name="OSX32">
487+ <RemoteDir>Contents\MacOS</RemoteDir>
488+ <Operation>1</Operation>
489+ <Extensions>.dylib</Extensions>
490+ </Platform>
491+ <Platform Name="OSX64">
492+ <RemoteDir>Contents\MacOS</RemoteDir>
493+ <Operation>1</Operation>
494+ <Extensions>.dylib</Extensions>
495+ </Platform>
496+ <Platform Name="Win32">
497+ <Operation>0</Operation>
498+ <Extensions>.dll;.bpl</Extensions>
499+ </Platform>
500+ </DeployClass>
501+ <DeployClass Required="true" Name="DependencyPackage">
502+ <Platform Name="iOSDevice32">
503+ <Operation>1</Operation>
504+ <Extensions>.dylib</Extensions>
505+ </Platform>
506+ <Platform Name="iOSDevice64">
507+ <Operation>1</Operation>
508+ <Extensions>.dylib</Extensions>
509+ </Platform>
510+ <Platform Name="iOSSimulator">
511+ <Operation>1</Operation>
512+ <Extensions>.dylib</Extensions>
513+ </Platform>
514+ <Platform Name="OSX32">
515+ <RemoteDir>Contents\MacOS</RemoteDir>
516+ <Operation>1</Operation>
517+ <Extensions>.dylib</Extensions>
518+ </Platform>
519+ <Platform Name="OSX64">
520+ <RemoteDir>Contents\MacOS</RemoteDir>
521+ <Operation>1</Operation>
522+ <Extensions>.dylib</Extensions>
523+ </Platform>
524+ <Platform Name="Win32">
525+ <Operation>0</Operation>
526+ <Extensions>.bpl</Extensions>
527+ </Platform>
528+ </DeployClass>
529+ <DeployClass Name="File">
530+ <Platform Name="Android">
531+ <Operation>0</Operation>
532+ </Platform>
533+ <Platform Name="Android64">
534+ <Operation>0</Operation>
535+ </Platform>
536+ <Platform Name="iOSDevice32">
537+ <Operation>0</Operation>
538+ </Platform>
539+ <Platform Name="iOSDevice64">
540+ <Operation>0</Operation>
541+ </Platform>
542+ <Platform Name="iOSSimulator">
543+ <Operation>0</Operation>
544+ </Platform>
545+ <Platform Name="OSX32">
546+ <RemoteDir>Contents\Resources\StartUp\</RemoteDir>
547+ <Operation>0</Operation>
548+ </Platform>
549+ <Platform Name="OSX64">
550+ <RemoteDir>Contents\Resources\StartUp\</RemoteDir>
551+ <Operation>0</Operation>
552+ </Platform>
553+ <Platform Name="Win32">
554+ <Operation>0</Operation>
555+ </Platform>
556+ </DeployClass>
557+ <DeployClass Name="ProjectAndroidManifest">
558+ <Platform Name="Android">
559+ <Operation>1</Operation>
560+ </Platform>
561+ <Platform Name="Android64">
562+ <Operation>1</Operation>
563+ </Platform>
564+ </DeployClass>
565+ <DeployClass Name="ProjectOSXDebug">
566+ <Platform Name="OSX64">
567+ <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
568+ <Operation>1</Operation>
569+ </Platform>
570+ </DeployClass>
571+ <DeployClass Name="ProjectOSXEntitlements">
572+ <Platform Name="OSX32">
573+ <RemoteDir>..\</RemoteDir>
574+ <Operation>1</Operation>
575+ </Platform>
576+ <Platform Name="OSX64">
577+ <RemoteDir>..\</RemoteDir>
578+ <Operation>1</Operation>
579+ </Platform>
580+ </DeployClass>
581+ <DeployClass Name="ProjectOSXInfoPList">
582+ <Platform Name="OSX32">
583+ <RemoteDir>Contents</RemoteDir>
584+ <Operation>1</Operation>
585+ </Platform>
586+ <Platform Name="OSX64">
587+ <RemoteDir>Contents</RemoteDir>
588+ <Operation>1</Operation>
589+ </Platform>
590+ </DeployClass>
591+ <DeployClass Name="ProjectOSXResource">
592+ <Platform Name="OSX32">
593+ <RemoteDir>Contents\Resources</RemoteDir>
594+ <Operation>1</Operation>
595+ </Platform>
596+ <Platform Name="OSX64">
597+ <RemoteDir>Contents\Resources</RemoteDir>
598+ <Operation>1</Operation>
599+ </Platform>
600+ </DeployClass>
601+ <DeployClass Required="true" Name="ProjectOutput">
602+ <Platform Name="Android">
603+ <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
604+ <Operation>1</Operation>
605+ </Platform>
606+ <Platform Name="Android64">
607+ <RemoteDir>library\lib\arm64-v8a</RemoteDir>
608+ <Operation>1</Operation>
609+ </Platform>
610+ <Platform Name="iOSDevice32">
611+ <Operation>1</Operation>
612+ </Platform>
613+ <Platform Name="iOSDevice64">
614+ <Operation>1</Operation>
615+ </Platform>
616+ <Platform Name="iOSSimulator">
617+ <Operation>1</Operation>
618+ </Platform>
619+ <Platform Name="Linux64">
620+ <Operation>1</Operation>
621+ </Platform>
622+ <Platform Name="OSX32">
623+ <RemoteDir>Contents\MacOS</RemoteDir>
624+ <Operation>1</Operation>
625+ </Platform>
626+ <Platform Name="OSX64">
627+ <RemoteDir>Contents\MacOS</RemoteDir>
628+ <Operation>1</Operation>
629+ </Platform>
630+ <Platform Name="Win32">
631+ <Operation>0</Operation>
632+ </Platform>
633+ </DeployClass>
634+ <DeployClass Name="ProjectOutput_Android32">
635+ <Platform Name="Android64">
636+ <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
637+ <Operation>1</Operation>
638+ </Platform>
639+ </DeployClass>
640+ <DeployClass Name="ProjectUWPManifest">
641+ <Platform Name="Win32">
642+ <Operation>1</Operation>
643+ </Platform>
644+ <Platform Name="Win64">
645+ <Operation>1</Operation>
646+ </Platform>
647+ </DeployClass>
648+ <DeployClass Name="ProjectiOSDeviceDebug">
649+ <Platform Name="iOSDevice32">
650+ <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
651+ <Operation>1</Operation>
652+ </Platform>
653+ <Platform Name="iOSDevice64">
654+ <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
655+ <Operation>1</Operation>
656+ </Platform>
657+ </DeployClass>
658+ <DeployClass Name="ProjectiOSDeviceResourceRules">
659+ <Platform Name="iOSDevice32">
660+ <Operation>1</Operation>
661+ </Platform>
662+ <Platform Name="iOSDevice64">
663+ <Operation>1</Operation>
664+ </Platform>
665+ </DeployClass>
666+ <DeployClass Name="ProjectiOSEntitlements">
667+ <Platform Name="iOSDevice32">
668+ <RemoteDir>..\</RemoteDir>
669+ <Operation>1</Operation>
670+ </Platform>
671+ <Platform Name="iOSDevice64">
672+ <RemoteDir>..\</RemoteDir>
673+ <Operation>1</Operation>
674+ </Platform>
675+ </DeployClass>
676+ <DeployClass Name="ProjectiOSInfoPList">
677+ <Platform Name="iOSDevice32">
678+ <Operation>1</Operation>
679+ </Platform>
680+ <Platform Name="iOSDevice64">
681+ <Operation>1</Operation>
682+ </Platform>
683+ <Platform Name="iOSSimulator">
684+ <Operation>1</Operation>
685+ </Platform>
686+ </DeployClass>
687+ <DeployClass Name="ProjectiOSResource">
688+ <Platform Name="iOSDevice32">
689+ <Operation>1</Operation>
690+ </Platform>
691+ <Platform Name="iOSDevice64">
692+ <Operation>1</Operation>
693+ </Platform>
694+ <Platform Name="iOSSimulator">
695+ <Operation>1</Operation>
696+ </Platform>
697+ </DeployClass>
698+ <DeployClass Name="UWP_DelphiLogo150">
699+ <Platform Name="Win32">
700+ <RemoteDir>Assets</RemoteDir>
701+ <Operation>1</Operation>
702+ </Platform>
703+ <Platform Name="Win64">
704+ <RemoteDir>Assets</RemoteDir>
705+ <Operation>1</Operation>
706+ </Platform>
707+ </DeployClass>
708+ <DeployClass Name="UWP_DelphiLogo44">
709+ <Platform Name="Win32">
710+ <RemoteDir>Assets</RemoteDir>
711+ <Operation>1</Operation>
712+ </Platform>
713+ <Platform Name="Win64">
714+ <RemoteDir>Assets</RemoteDir>
715+ <Operation>1</Operation>
716+ </Platform>
717+ </DeployClass>
718+ <DeployClass Name="iPad_Launch1024x768">
719+ <Platform Name="iOSDevice32">
720+ <Operation>1</Operation>
721+ </Platform>
722+ <Platform Name="iOSDevice64">
723+ <Operation>1</Operation>
724+ </Platform>
725+ <Platform Name="iOSSimulator">
726+ <Operation>1</Operation>
727+ </Platform>
728+ </DeployClass>
729+ <DeployClass Name="iPad_Launch1536x2048">
730+ <Platform Name="iOSDevice32">
731+ <Operation>1</Operation>
732+ </Platform>
733+ <Platform Name="iOSDevice64">
734+ <Operation>1</Operation>
735+ </Platform>
736+ <Platform Name="iOSSimulator">
737+ <Operation>1</Operation>
738+ </Platform>
739+ </DeployClass>
740+ <DeployClass Name="iPad_Launch1668">
741+ <Platform Name="iOSDevice32">
742+ <Operation>1</Operation>
743+ </Platform>
744+ <Platform Name="iOSDevice64">
745+ <Operation>1</Operation>
746+ </Platform>
747+ <Platform Name="iOSSimulator">
748+ <Operation>1</Operation>
749+ </Platform>
750+ </DeployClass>
751+ <DeployClass Name="iPad_Launch1668x2388">
752+ <Platform Name="iOSDevice32">
753+ <Operation>1</Operation>
754+ </Platform>
755+ <Platform Name="iOSDevice64">
756+ <Operation>1</Operation>
757+ </Platform>
758+ <Platform Name="iOSSimulator">
759+ <Operation>1</Operation>
760+ </Platform>
761+ </DeployClass>
762+ <DeployClass Name="iPad_Launch2048x1536">
763+ <Platform Name="iOSDevice32">
764+ <Operation>1</Operation>
765+ </Platform>
766+ <Platform Name="iOSDevice64">
767+ <Operation>1</Operation>
768+ </Platform>
769+ <Platform Name="iOSSimulator">
770+ <Operation>1</Operation>
771+ </Platform>
772+ </DeployClass>
773+ <DeployClass Name="iPad_Launch2048x2732">
774+ <Platform Name="iOSDevice32">
775+ <Operation>1</Operation>
776+ </Platform>
777+ <Platform Name="iOSDevice64">
778+ <Operation>1</Operation>
779+ </Platform>
780+ <Platform Name="iOSSimulator">
781+ <Operation>1</Operation>
782+ </Platform>
783+ </DeployClass>
784+ <DeployClass Name="iPad_Launch2224">
785+ <Platform Name="iOSDevice32">
786+ <Operation>1</Operation>
787+ </Platform>
788+ <Platform Name="iOSDevice64">
789+ <Operation>1</Operation>
790+ </Platform>
791+ <Platform Name="iOSSimulator">
792+ <Operation>1</Operation>
793+ </Platform>
794+ </DeployClass>
795+ <DeployClass Name="iPad_Launch2388x1668">
796+ <Platform Name="iOSDevice32">
797+ <Operation>1</Operation>
798+ </Platform>
799+ <Platform Name="iOSDevice64">
800+ <Operation>1</Operation>
801+ </Platform>
802+ <Platform Name="iOSSimulator">
803+ <Operation>1</Operation>
804+ </Platform>
805+ </DeployClass>
806+ <DeployClass Name="iPad_Launch2732x2048">
807+ <Platform Name="iOSDevice32">
808+ <Operation>1</Operation>
809+ </Platform>
810+ <Platform Name="iOSDevice64">
811+ <Operation>1</Operation>
812+ </Platform>
813+ <Platform Name="iOSSimulator">
814+ <Operation>1</Operation>
815+ </Platform>
816+ </DeployClass>
817+ <DeployClass Name="iPad_Launch768x1024">
818+ <Platform Name="iOSDevice32">
819+ <Operation>1</Operation>
820+ </Platform>
821+ <Platform Name="iOSDevice64">
822+ <Operation>1</Operation>
823+ </Platform>
824+ <Platform Name="iOSSimulator">
825+ <Operation>1</Operation>
826+ </Platform>
827+ </DeployClass>
828+ <DeployClass Name="iPhone_Launch1125">
829+ <Platform Name="iOSDevice32">
830+ <Operation>1</Operation>
831+ </Platform>
832+ <Platform Name="iOSDevice64">
833+ <Operation>1</Operation>
834+ </Platform>
835+ <Platform Name="iOSSimulator">
836+ <Operation>1</Operation>
837+ </Platform>
838+ </DeployClass>
839+ <DeployClass Name="iPhone_Launch1136x640">
840+ <Platform Name="iOSDevice32">
841+ <Operation>1</Operation>
842+ </Platform>
843+ <Platform Name="iOSDevice64">
844+ <Operation>1</Operation>
845+ </Platform>
846+ <Platform Name="iOSSimulator">
847+ <Operation>1</Operation>
848+ </Platform>
849+ </DeployClass>
850+ <DeployClass Name="iPhone_Launch1242">
851+ <Platform Name="iOSDevice32">
852+ <Operation>1</Operation>
853+ </Platform>
854+ <Platform Name="iOSDevice64">
855+ <Operation>1</Operation>
856+ </Platform>
857+ <Platform Name="iOSSimulator">
858+ <Operation>1</Operation>
859+ </Platform>
860+ </DeployClass>
861+ <DeployClass Name="iPhone_Launch1242x2688">
862+ <Platform Name="iOSDevice32">
863+ <Operation>1</Operation>
864+ </Platform>
865+ <Platform Name="iOSDevice64">
866+ <Operation>1</Operation>
867+ </Platform>
868+ <Platform Name="iOSSimulator">
869+ <Operation>1</Operation>
870+ </Platform>
871+ </DeployClass>
872+ <DeployClass Name="iPhone_Launch1334">
873+ <Platform Name="iOSDevice32">
874+ <Operation>1</Operation>
875+ </Platform>
876+ <Platform Name="iOSDevice64">
877+ <Operation>1</Operation>
878+ </Platform>
879+ <Platform Name="iOSSimulator">
880+ <Operation>1</Operation>
881+ </Platform>
882+ </DeployClass>
883+ <DeployClass Name="iPhone_Launch1792">
884+ <Platform Name="iOSDevice32">
885+ <Operation>1</Operation>
886+ </Platform>
887+ <Platform Name="iOSDevice64">
888+ <Operation>1</Operation>
889+ </Platform>
890+ <Platform Name="iOSSimulator">
891+ <Operation>1</Operation>
892+ </Platform>
893+ </DeployClass>
894+ <DeployClass Name="iPhone_Launch2208">
895+ <Platform Name="iOSDevice32">
896+ <Operation>1</Operation>
897+ </Platform>
898+ <Platform Name="iOSDevice64">
899+ <Operation>1</Operation>
900+ </Platform>
901+ <Platform Name="iOSSimulator">
902+ <Operation>1</Operation>
903+ </Platform>
904+ </DeployClass>
905+ <DeployClass Name="iPhone_Launch2436">
906+ <Platform Name="iOSDevice32">
907+ <Operation>1</Operation>
908+ </Platform>
909+ <Platform Name="iOSDevice64">
910+ <Operation>1</Operation>
911+ </Platform>
912+ <Platform Name="iOSSimulator">
913+ <Operation>1</Operation>
914+ </Platform>
915+ </DeployClass>
916+ <DeployClass Name="iPhone_Launch2688x1242">
917+ <Platform Name="iOSDevice32">
918+ <Operation>1</Operation>
919+ </Platform>
920+ <Platform Name="iOSDevice64">
921+ <Operation>1</Operation>
922+ </Platform>
923+ <Platform Name="iOSSimulator">
924+ <Operation>1</Operation>
925+ </Platform>
926+ </DeployClass>
927+ <DeployClass Name="iPhone_Launch320">
928+ <Platform Name="iOSDevice32">
929+ <Operation>1</Operation>
930+ </Platform>
931+ <Platform Name="iOSDevice64">
932+ <Operation>1</Operation>
933+ </Platform>
934+ <Platform Name="iOSSimulator">
935+ <Operation>1</Operation>
936+ </Platform>
937+ </DeployClass>
938+ <DeployClass Name="iPhone_Launch640">
939+ <Platform Name="iOSDevice32">
940+ <Operation>1</Operation>
941+ </Platform>
942+ <Platform Name="iOSDevice64">
943+ <Operation>1</Operation>
944+ </Platform>
945+ <Platform Name="iOSSimulator">
946+ <Operation>1</Operation>
947+ </Platform>
948+ </DeployClass>
949+ <DeployClass Name="iPhone_Launch640x1136">
950+ <Platform Name="iOSDevice32">
951+ <Operation>1</Operation>
952+ </Platform>
953+ <Platform Name="iOSDevice64">
954+ <Operation>1</Operation>
955+ </Platform>
956+ <Platform Name="iOSSimulator">
957+ <Operation>1</Operation>
958+ </Platform>
959+ </DeployClass>
960+ <DeployClass Name="iPhone_Launch750">
961+ <Platform Name="iOSDevice32">
962+ <Operation>1</Operation>
963+ </Platform>
964+ <Platform Name="iOSDevice64">
965+ <Operation>1</Operation>
966+ </Platform>
967+ <Platform Name="iOSSimulator">
968+ <Operation>1</Operation>
969+ </Platform>
970+ </DeployClass>
971+ <DeployClass Name="iPhone_Launch828">
972+ <Platform Name="iOSDevice32">
973+ <Operation>1</Operation>
974+ </Platform>
975+ <Platform Name="iOSDevice64">
976+ <Operation>1</Operation>
977+ </Platform>
978+ <Platform Name="iOSSimulator">
979+ <Operation>1</Operation>
980+ </Platform>
981+ </DeployClass>
982+ <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
983+ <ProjectRoot Platform="Android64" Name="$(PROJECTNAME)"/>
984+ <ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
985+ <ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
986+ <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
987+ <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
988+ <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
989+ <ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
990+ <ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
991+ <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
992+ </Deployment>
993+ <Platforms>
994+ <Platform value="Win32">True</Platform>
995+ <Platform value="Win64">False</Platform>
996+ </Platforms>
997+ </BorlandProject>
998+ <ProjectFileVersion>12</ProjectFileVersion>
999+ </ProjectExtensions>
1000+ <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
1001+ <Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
1002+ <Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
1003+ <PropertyGroup Condition="'$(Config)'=='Debug' And '$(Platform)'=='Win64'">
1004+ <PostBuildEvent>call ..\buildtools\postbuild.cmd $(OUTPUTDIR)$(OUTPUTNAME)</PostBuildEvent>
1005+ <PostBuildEventIgnoreExitCode>False</PostBuildEventIgnoreExitCode>
1006+ <PreBuildEvent>call ..\buildtools\prebuild.cmd $(PROJECTPATH)</PreBuildEvent>
1007+ <PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode>
1008+ <PreLinkEvent/>
1009+ <PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode>
1010+ </PropertyGroup>
1011+ <PropertyGroup Condition="'$(Config)'=='Debug' And '$(Platform)'=='Win32'">
1012+ <PostBuildEvent>call ..\buildtools\postbuild.cmd $(OUTPUTDIR)$(OUTPUTNAME)</PostBuildEvent>
1013+ <PostBuildEventIgnoreExitCode>False</PostBuildEventIgnoreExitCode>
1014+ <PreBuildEvent>call ..\buildtools\prebuild.cmd $(PROJECTPATH)</PreBuildEvent>
1015+ <PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode>
1016+ <PreLinkEvent/>
1017+ <PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode>
1018+ </PropertyGroup>
1019+ <PropertyGroup Condition="'$(Config)'=='Release' And '$(Platform)'=='Win64'">
1020+ <PostBuildEvent>call ..\buildtools\postbuild.cmd $(OUTPUTDIR)$(OUTPUTNAME)</PostBuildEvent>
1021+ <PostBuildEventIgnoreExitCode>False</PostBuildEventIgnoreExitCode>
1022+ <PreBuildEvent>call ..\buildtools\prebuild.cmd $(PROJECTPATH)</PreBuildEvent>
1023+ <PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode>
1024+ <PreLinkEvent/>
1025+ <PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode>
1026+ </PropertyGroup>
1027+ <PropertyGroup Condition="'$(Config)'=='Release' And '$(Platform)'=='Win32'">
1028+ <PostBuildEvent>call ..\buildtools\postbuild.cmd $(OUTPUTDIR)$(OUTPUTNAME)</PostBuildEvent>
1029+ <PostBuildEventIgnoreExitCode>False</PostBuildEventIgnoreExitCode>
1030+ <PreBuildEvent>call ..\buildtools\prebuild.cmd $(PROJECTPATH)</PreBuildEvent>
1031+ <PreBuildEventIgnoreExitCode>False</PreBuildEventIgnoreExitCode>
1032+ <PreLinkEvent/>
1033+ <PreLinkEventIgnoreExitCode>False</PreLinkEventIgnoreExitCode>
1034+ </PropertyGroup>
1035+</Project>
--- tags/1.0.3/src/dzBdsLauncher.manifest.in (nonexistent)
+++ tags/1.0.3/src/dzBdsLauncher.manifest.in (revision 23)
@@ -0,0 +1,53 @@
1+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+<!--
3+ This manifest tells Windows Vista to Windows 10 not to virtualize any file
4+ or registry access. Also, it disables themes support.
5+ -->
6+ <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
7+ <assemblyIdentity version="1.0.0.0"
8+ processorArchitecture="*"
9+ name="template from dzlib build tools"
10+ type="win32"/>
11+<!-- We do not want themes support
12+ <dependency>
13+ <dependentassembly>
14+ <assemblyidentity type="win32"
15+ name="Microsoft.Windows.Common-Controls"
16+ version="6.0.0.0"
17+ publickeytoken="6595b64144ccf1df"
18+ language="*" processorarchitecture="*">
19+ </assemblyidentity>
20+ </dependentassembly>
21+ <dependency>
22+ -->
23+ <description>This application was built using buildtools from dzlib</description>
24+ <!-- COMPATIBILITY SECTION SPECIFIES IF APP IS COMPLIANT
25+ DISABLES PCA IF SPECIFIED -->
26+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
27+ <application>
28+ <!-- We support Windows Vista -->
29+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
30+ <!-- We support Windows 7 -->
31+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
32+ <!-- We support Windows 8 -->
33+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
34+ <!-- We support Windows 8.1 -->
35+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
36+ <!-- We support Windows 10 -->
37+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
38+ </application>
39+ </compatibility>
40+
41+ <!-- TRUSTINFO SECTION SPECIFIES REQUESTED PERMISSIONS AND
42+ UIPI DISABLEMENT (SPECIAL CONDITIONS APPLY TO UIPI DISABLEMENT)-->
43+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
44+ <security>
45+ <requestedPrivileges>
46+ <requestedExecutionLevel
47+ level="asInvoker"
48+ uiAccess="false"
49+ />
50+ </requestedPrivileges>
51+ </security>
52+ </trustInfo>
53+</assembly>
\ No newline at end of file
--- tags/1.0.3/src/dzBdsLauncher_version.ini (nonexistent)
+++ tags/1.0.3/src/dzBdsLauncher_version.ini (revision 23)
@@ -0,0 +1,25 @@
1+[Version Info]
2+AutoIncBuild=0
3+Build=222
4+MajorVer=1
5+MinorVer=0
6+Release=3
7+Private=0
8+Special=0
9+Revision=
10+
11+[Version Info Keys]
12+FileVersion=1.0.3.222
13+ProductVersion={today}
14+FileDescription=dzBdsLauncher
15+OriginalFilename=dzBdsLauncher
16+Comments=
17+CompanyName=dummzeuch.de
18+InternalName=dzBdsLauncher
19+LegalCopyright=Thomas Mueller, 2019-{ThisYear}
20+LegalTrademarks=T. Mueller
21+ProductName=dzBdsLauncher
22+BuildDateTime={today}
23+PrivateBuild=
24+SpecialBuild=
25+
--- tags/1.0.3/src/u_dzBdsLauncher.pas (nonexistent)
+++ tags/1.0.3/src/u_dzBdsLauncher.pas (revision 23)
@@ -0,0 +1,353 @@
1+unit u_dzBdsLauncher;
2+
3+{$DEFINE WAIT_BEFORE_CALL}
4+
5+{$IFDEF RELEASE}
6+{$UNDEF WAIT_BEFORE_CALL}
7+{$ENDIF}
8+
9+interface
10+
11+uses
12+ Winapi.Windows,
13+ System.SysUtils,
14+ System.Classes,
15+ u_dzTranslator;
16+
17+procedure Main;
18+
19+implementation
20+
21+uses
22+ System.StrUtils,
23+ System.Generics.Collections,
24+ u_dzExecutor,
25+ u_dzClassUtils,
26+ u_dzStringUtils,
27+ u_dzFileUtils,
28+ u_dzTypes,
29+ u_dzStdOut;
30+
31+type
32+ TDelphiVersion = (
33+ dvUnknown,
34+ dv2007, dv2009, dv2010,
35+ dvXE, dvXE2, dvXE3, dvXE4, dvXE5, dvXE6, dvXE7, dvXE8,
36+ dv10, dv10_1, dv10_2, dv10_3 {, dv10_4});
37+ TDelphiVersionSet = set of TDelphiVersion;
38+
39+type
40+ TDelphiInfo = class
41+ private
42+ FName: string;
43+ FRegKey: string;
44+ FDllSuffix: string;
45+ FExtensions: TStringArray;
46+ FProjectVersions: TStringArray;
47+ public
48+ constructor Create(const _Name, _RegKey, _DllSuffix: string;
49+ const _ProjectVersions: TStringArray;
50+ const _Extensions: TStringArray);
51+ destructor Destroy; override;
52+ procedure CallIde(const _Param: string);
53+ function HasProductVersion(const _ProdVer: string): Boolean;
54+ function HasExtension(const _Ext: string): Boolean;
55+ property Name: string read FName;
56+ property RegKey: string read FRegKey;
57+ property DllSuffix: string read FDllSuffix;
58+ end;
59+
60+{ TDelphiInfo }
61+
62+constructor TDelphiInfo.Create(const _Name, _RegKey, _DllSuffix: string;
63+ const _ProjectVersions: TStringArray;
64+ const _Extensions: TStringArray);
65+begin
66+ inherited Create;
67+ FName := _Name;
68+ FRegKey := _RegKey;
69+ FDllSuffix := _DllSuffix;
70+ FProjectVersions := _ProjectVersions;
71+ FExtensions := _Extensions;
72+end;
73+
74+destructor TDelphiInfo.Destroy;
75+begin
76+ FreeAndNil(FExtensions);
77+ FreeAndNil(FProjectVersions);
78+ inherited;
79+end;
80+
81+function TDelphiInfo.HasExtension(const _Ext: string): Boolean;
82+var
83+ Ext: string;
84+begin
85+ Assert(Leftstr(_Ext, 1) = '.');
86+ Ext := TailStr(_Ext, 2);
87+ Result := (IndexText(Ext, FExtensions) <> -1);
88+end;
89+
90+function TDelphiInfo.HasProductVersion(const _ProdVer: string): Boolean;
91+begin
92+ Result := (IndexText(_ProdVer, FProjectVersions) <> -1);
93+end;
94+
95+procedure TDelphiInfo.CallIde(const _Param: string);
96+var
97+ Executable: string;
98+begin
99+ if not TRegistry_TryReadString('SOFTWARE\' + FRegKey, 'App', Executable) then
100+ raise Exception.CreateFmt('Could not read value App from registry key "%s"', [FRegKey]);
101+ StdOut.WriteLn(ccLightGreen, 'Calling Delphi %s', [Name]);
102+{$IFDEF WAIT_BEFORE_CALL}
103+ StdOut.Pause;
104+{$ENDIF}
105+ TExecutor.Execute(Executable, _Param);
106+end;
107+
108+type
109+ TDelphiInfoList = class(TDictionary<TDelphiVersion, TDelphiInfo>)
110+ private
111+ function CheckDllSuffix(_sl: TStringList; const _ProjVer: string;
112+ const _Possibles: TDelphiVersionSet): TDelphiVersion;
113+ function CheckDprojContent(const _fn: string): TDelphiVersion;
114+ function GetDelphiVersionForDproj(const _fn: string): TDelphiVersion;
115+ procedure HandleDproj(const _fn: string);
116+ procedure HandleGroupProj(const _fn: string);
117+ public
118+ constructor Create;
119+ procedure HandleFile(const _fn: string);
120+ end;
121+
122+constructor TDelphiInfoList.Create;
123+begin
124+ inherited Create;
125+ Add(dv2007, TDelphiInfo.Create('2007', 'Borland\BDS\5.0', '110', [], ['2007']));
126+ Add(dv2009, TDelphiInfo.Create('2009', 'CodeGear\BDS\6.0', '120', ['12.0'], ['2009']));
127+ Add(dv2010, TDelphiInfo.Create('2010', 'CodeGear\BDS\7.0', '140', ['12.0'], ['2010']));
128+ Add(dvXE, TDelphiInfo.Create('XE', 'Embarcadero\BDS\8.0', '150', ['12.2', '12.3'], ['XE', 'XE1']));
129+ Add(dvXE2, TDelphiInfo.Create('XE2', 'Embarcadero\BDS\9.0', '160', ['13.4'], ['XE2']));
130+ Add(dvXE3, TDelphiInfo.Create('XE3', 'Embarcadero\BDS\10.0', '170', ['14.3', '14.4'], ['XE3']));
131+ Add(dvXE4, TDelphiInfo.Create('XE4', 'Embarcadero\BDS\11.0', '180', ['14.4', '14.6'], ['XE4']));
132+ Add(dvXE5, TDelphiInfo.Create('XE5', 'Embarcadero\BDS\12.0', '190', ['15.1', '15.3'], ['XE5']));
133+ Add(dvXE6, TDelphiInfo.Create('XE6', 'Embarcadero\BDS\14.0', '200', ['15.4'], ['XE6']));
134+ Add(dvXE7, TDelphiInfo.Create('XE7', 'Embarcadero\BDS\15.0', '210', ['16.0', '16.1'], ['XE7']));
135+ Add(dvXE8, TDelphiInfo.Create('XE8', 'Embarcadero\BDS\16.0', '220', ['17.2'], ['XE8']));
136+ Add(dv10, TDelphiInfo.Create('10', ' Embarcadero\BDS\17.0 ', ' 230 ', [' 18.0 ', ' 18.1 '], [' 10 ', ' 10 - 0']));
137+ Add(dv10_1, TDelphiInfo.Create('10.1', 'Embarcadero\BDS\18.0', '240', ['18.1', '18.2'], ['10-1']));
138+ Add(dv10_2, TDelphiInfo.Create('10.2', 'Embarcadero\BDS\19.0', '250', ['18.2', '18.3', '18.4'], ['10-2']));
139+ Add(dv10_3, TDelphiInfo.Create('10.3', 'Embarcadero\BDS\20.0', '260', ['18.5', '18.6', '18.7', '18.8'], ['10-3']));
140+// Add(dv10_4, TDelphiInfo.Create('10.4','Embarcadero\BDS\21.0', '270', ['19.0'], ['10-4']))
141+end;
142+
143+function TDelphiInfoList.CheckDllSuffix(_sl: TStringList; const _ProjVer: string;
144+ const _Possibles: TDelphiVersionSet): TDelphiVersion;
145+const
146+ START_TAG = '<DllSuffix>';
147+ END_TAG = '</DllSuffix>';
148+var
149+ i: Integer;
150+ s: string;
151+ len: Integer;
152+ Item: TPair<TDelphiVersion, TDelphiInfo>;
153+ dv: TDelphiVersion;
154+begin
155+ for i := 0 to _sl.Count - 1 do begin
156+ s := Trim(_sl[i]);
157+ if StartsText(START_TAG, s) and EndsText(END_TAG, s) then begin
158+ len := Length(s);
159+ s := Copy(s, Length(START_TAG) + 1, len - Length(START_TAG) - Length(END_TAG));
160+ if s <> '' then begin
161+ StdOut.WriteLn(_('Found DllSuffix %s'), [s]);
162+ if _Possibles <> [] then begin
163+ for dv in _Possibles do begin
164+ if SameText(s, Self.Items[dv].DllSuffix) then begin
165+ StdOut.WriteLn(_('DllSuffix %s was used by Delphi %s'), [s, Self.Items[dv].Name]);
166+ Exit(dv); //==>
167+ end;
168+ end;
169+ end else begin
170+ for Item in Self do begin
171+ if SameText(s, Item.Value.DllSuffix) then begin
172+ StdOut.WriteLn(_('DllSuffix %s was used by Delphi %s'), [s, Item.Value.Name]);
173+ Exit(Item.Key); //==>
174+ end;
175+ end;
176+ end;
177+ raise Exception.CreateFmt(
178+ _('Cannot determine Delphi version for ProjectVersion "%s" and DllSuffix "%s"'),
179+ [_ProjVer, s]);
180+ end;
181+ end;
182+ end;
183+ raise Exception.CreateFmt(_('Cannot determine Delphi version for ProjectVersion "%s"'), [s]);
184+end;
185+
186+function TDelphiInfoList.CheckDprojContent(const _fn: string): TDelphiVersion;
187+const
188+ START_TAG = '<ProjectVersion>';
189+ END_TAG = '</ProjectVersion>';
190+var
191+ sl: TStringList;
192+ i: Integer;
193+ s: string;
194+ len: Integer;
195+ Item: TPair<TDelphiVersion, TDelphiInfo>;
196+begin
197+ Result := dvUnknown;
198+ sl := TStringList.Create;
199+ try
200+ sl.LoadFromFile(_fn);
201+ for i := 0 to sl.Count - 1 do begin
202+ s := Trim(sl[i]);
203+ if StartsText(START_TAG, s) and EndsText(END_TAG, s) then begin
204+ len := Length(s);
205+ s := Copy(s, Length(START_TAG) + 1, len - Length(START_TAG) - Length(END_TAG));
206+ if s <> '' then begin
207+ StdOut.WriteLn(_('Found ProjectVersion %s'), [s]);
208+ for Item in Self do begin
209+ if Item.Value.HasProductVersion(s) then begin
210+ if Result = dvUnknown then begin
211+ StdOut.WriteLn(_('ProjectVersion "%s" was used by Delphi %s'), [s, Item.Value.Name]);
212+ Result := Item.Key;
213+ end else begin
214+ // duplicate ProjectVersion (we assume that not more than two Delphi versions
215+ // used the same ProjectVersion, which has been the case up to Delphi 10.3)
216+ StdOut.Warning.WriteLn(_('ProjectVersion "%s" can be Delphi %s or %s, checking for DllSuffix'),
217+ [s, Self.Items[Result].Name, Item.Value.Name]);
218+ Result := CheckDllSuffix(sl, s, [Result, Item.Key]);
219+ Exit; //==>
220+ end;
221+ end;
222+ end;
223+ if Result <> dvUnknown then begin
224+ Exit; //==>
225+ end;
226+ StdOut.Warning.WriteLn(_('ProjectVersion "%s" unkonwn checking for DllSuffix'), [s]);
227+ Result := CheckDllSuffix(sl, s, [dv10..dv10_3]);
228+ Exit; //==>
229+ end else
230+ raise Exception.CreateFmt(_('Cannot determine Delphi version for ProjectVersion "%s"'), [s]);
231+ end;
232+ end;
233+ // no <ProjectVersion> means Delphi 2007
234+ StdOut.WriteLn(_('No ProjectVersion found, assuming Delphi 2007'));
235+ Result := dv2007;
236+ finally
237+ FreeAndNil(sl);
238+ end;
239+end;
240+
241+function TDelphiInfoList.GetDelphiVersionForDproj(const _fn: string): TDelphiVersion;
242+var
243+ fno: string;
244+ dir: string;
245+ Suffix: string;
246+ Item: TPair<TDelphiVersion, TDelphiInfo>;
247+begin
248+ dir := ExtractFileDir(_fn);
249+ fno := ChangeFileExt(ExtractFileName(_fn), '');
250+ Suffix := ExtractFileExt(fno);
251+ if Suffix <> '' then begin
252+ StdOut.WriteLn(_('Suffix is %s'), [Suffix]);
253+ for Item in Self do begin
254+ if Item.Value.HasExtension(Suffix) then
255+ Exit(Item.Key); //==>
256+ end;
257+ end;
258+ StdOut.Warning.WriteLn(_('No known suffix detected, reading DPROJ file.'));
259+ Result := CheckDprojContent(_fn);
260+end;
261+
262+procedure TDelphiInfoList.HandleDproj(const _fn: string);
263+var
264+ dv: TDelphiVersion;
265+begin
266+ dv := GetDelphiVersionForDproj(_fn);
267+ Items[dv].CallIde(_fn);
268+end;
269+
270+procedure TDelphiInfoList.HandleGroupProj(const _fn: string);
271+const
272+ START_TAG = '<Projects Include="';
273+ END_TAG1 = '">';
274+ END_TAG2 = '" />';
275+var
276+ sl: TStringList;
277+ i: Integer;
278+ s: string;
279+ len: Integer;
280+ dir: string;
281+ dv: TDelphiVersion;
282+begin
283+ sl := TStringList.Create;
284+ try
285+ sl.LoadFromFile(_fn);
286+ for i := 0 to sl.Count - 1 do begin
287+ s := Trim(sl[i]);
288+ if StartsText(START_TAG, s) then begin
289+ len := Length(s);
290+ if EndsText(END_TAG1, s) then begin
291+ s := Copy(s, Length(START_TAG) + 1, len - Length(START_TAG) - Length(END_TAG1));
292+ end else if EndsText(END_TAG2, s) then begin
293+ s := Copy(s, Length(START_TAG) + 1, len - Length(START_TAG) - Length(END_TAG2));
294+ end else
295+ Continue; //==^
296+
297+ dir := ExtractFileDir(_fn);
298+ s := TFileSystem.ExpandFileNameRelBaseDir(s, dir);
299+ StdOut.WriteLn(_('First project is: %s'), [s]);
300+ dv := GetDelphiVersionForDproj(s);
301+ Items[dv].CallIde(_fn);
302+ Exit; //==>
303+ end;
304+ end;
305+ finally
306+ FreeAndNil(sl);
307+ end;
308+ raise Exception.CreateFmt(_('Could not determine Delhpi version for %s'), [_fn]);
309+end;
310+
311+procedure TDelphiInfoList.HandleFile(const _fn: string);
312+var
313+ Ext: string;
314+begin
315+ Ext := ExtractFileExt(_fn);
316+ if SameText(Ext, '.dproj') then begin
317+ StdOut.WriteLn('DPROJ file detected');
318+ HandleDproj(_fn);
319+ end else if SameText(Ext, '.groupproj') then begin
320+ StdOut.WriteLn('GROUPPROJ file detected');
321+ HandleGroupProj(_fn);
322+ end else
323+ raise Exception.Create('Only .dproj or .groupproj files are supported.');
324+end;
325+
326+procedure Main;
327+var
328+ fn: string;
329+ List: TDelphiInfoList;
330+begin
331+ try
332+ StdOut.WriteLn('dzBdsLauncher was called as:');
333+ StdOut.WriteLn(ccWhite, GetCommandLine);
334+ if ParamCount <> 1 then
335+ raise Exception.Create('You must pass excatly one .dproj or .groupproj file as parameter.');
336+
337+ List := TDelphiInfoList.Create;
338+ try
339+ fn := ParamStr(1);
340+ List.HandleFile(fn);
341+ finally
342+ FreeAndNil(List);
343+ end;
344+ except
345+ on E: Exception do begin
346+ StdOut.Error.WriteLn('%s: %s', [E.ClassName, E.Message]);
347+ StdOut.Pause('Press enter');
348+ end;
349+ end;
350+end;
351+
352+end.
353+
--- tags/1.0.3/src/u_dzStdOut.pas (nonexistent)
+++ tags/1.0.3/src/u_dzStdOut.pas (revision 23)
@@ -0,0 +1,200 @@
1+unit u_dzStdOut;
2+
3+interface
4+
5+uses
6+ SysUtils,
7+ Velthuis.Console;
8+
9+type
10+ TConsoleColors = (
11+ // Background and foreground colors
12+ ccBlack = Velthuis.Console.Black,
13+ ccBlue = Velthuis.Console.Blue,
14+ ccGreen = Velthuis.Console.Green,
15+ ccCyan = Velthuis.Console.Cyan,
16+ ccRed = Velthuis.Console.Red,
17+ ccMagenta = Velthuis.Console.Magenta,
18+ ccBrown = Velthuis.Console.Brown,
19+ ccLightGray = Velthuis.Console.LightGray,
20+
21+ // Foreground colors
22+ ccDarkGray = Velthuis.Console.DarkGray,
23+ ccLightBlue = Velthuis.Console.LightBlue,
24+ ccLightGreen = Velthuis.Console.LightGreen,
25+ ccLightCyan = Velthuis.Console.LightCyan,
26+ ccLightRed = Velthuis.Console.LightRed,
27+ ccLightMagenta = Velthuis.Console.LightMagenta,
28+ ccYellow = Velthuis.Console.Yellow,
29+ ccWhite = Velthuis.Console.White);
30+
31+type
32+ TStdOut = class
33+ private
34+ type
35+ TColoredText = record
36+ private
37+ FStdOut: TStdOut;
38+ FColor: TConsoleColors;
39+ procedure Init(_StdOut: TStdOut; _Color: TConsoleColors);
40+ public
41+ procedure Write(const _Text: string); overload;
42+ procedure Write(const _Format: string; const _Params: array of const); overload;
43+ procedure WriteLn(const _Text: string); overload;
44+ procedure WriteLn(const _Format: string; const _Params: array of const); overload;
45+ end;
46+ private
47+ function GetTextColor: TConsoleColors;
48+ procedure SetTextColor(_Color: TConsoleColors);
49+ public
50+ Error: TColoredText;
51+ Warning: TColoredText;
52+ Hint: TColoredText;
53+ Success: TColoredText;
54+ constructor Create(_ErrorColor: TConsoleColors = ccLightRed;
55+ _WarningColor: TConsoleColors = ccYellow;
56+ _HintColor: TConsoleColors = ccWhite;
57+ _SuccessColor: TConsoleColors = ccLightGreen;
58+ _DefaultColor: TConsoleColors = ccLightGray);
59+ destructor Destroy; override;
60+
61+ procedure Write(const _Text: string); overload;
62+ procedure Write(const _Format: string; const _Params: array of const); overload;
63+ procedure Write(_Color: TConsoleColors; const _Text: string); overload;
64+ procedure Write(_Color: TConsoleColors; const _Format: string; const _Params: array of const); overload;
65+
66+ procedure WriteLn(const _Text: string); overload;
67+ procedure WriteLn(const _Format: string; const _Params: array of const); overload;
68+ procedure WriteLn(_Color: TConsoleColors; const _Text: string); overload;
69+ procedure WriteLn(_Color: TConsoleColors; const _Format: string; const _Params: array of const); overload;
70+
71+ procedure Pause(const _Msg: string = '');
72+ end;
73+
74+var
75+ StdOut: TStdOut = nil;
76+
77+implementation
78+
79+{ TStdOut }
80+
81+constructor TStdOut.Create(_ErrorColor: TConsoleColors = ccLightRed;
82+ _WarningColor: TConsoleColors = ccYellow;
83+ _HintColor: TConsoleColors = ccWhite;
84+ _SuccessColor: TConsoleColors = ccLightGreen;
85+ _DefaultColor: TConsoleColors = ccLightGray);
86+begin
87+ inherited Create;
88+ Error.Init(Self, _ErrorColor);
89+ Warning.Init(Self, _WarningColor);
90+ Hint.Init(Self, _HintColor);
91+ Success.Init(Self, _SuccessColor);
92+
93+ Velthuis.Console.TextBackground(Black);
94+ SetTextColor(_DefaultColor);
95+end;
96+
97+destructor TStdOut.Destroy;
98+begin
99+ inherited;
100+end;
101+
102+function TStdOut.GetTextColor: TConsoleColors;
103+begin
104+ Result := TConsoleColors(Velthuis.Console.TextColor);
105+end;
106+
107+procedure TStdOut.Pause(const _Msg: string = '');
108+begin
109+ Velthuis.Console.Pause(_Msg)
110+end;
111+
112+procedure TStdOut.SetTextColor(_Color: TConsoleColors);
113+begin
114+ Velthuis.Console.TextColor(Ord(_Color));
115+end;
116+
117+procedure TStdOut.Write(const _Text: string);
118+begin
119+ System.Write(Output, _Text);
120+end;
121+
122+procedure TStdOut.Write(const _Format: string; const _Params: array of const);
123+begin
124+ Self.Write(Format(_Format, _Params));
125+end;
126+
127+procedure TStdOut.Write(_Color: TConsoleColors; const _Text: string);
128+var
129+ LastColor: TConsoleColors;
130+begin
131+ LastColor := GetTextColor;
132+ SetTextColor(_Color);
133+ Self.Write(_Text);
134+ SetTextColor(LastColor);
135+end;
136+
137+procedure TStdOut.Write(_Color: TConsoleColors; const _Format: string; const _Params: array of const);
138+begin
139+ Self.Write(_Color, Format(_Format, _Params));
140+end;
141+
142+procedure TStdOut.WriteLn(const _Text: string);
143+begin
144+ System.WriteLn(Output, _Text);
145+end;
146+
147+procedure TStdOut.WriteLn(const _Format: string; const _Params: array of const);
148+begin
149+ Self.WriteLn(Format(_Format, _Params));
150+end;
151+
152+procedure TStdOut.WriteLn(_Color: TConsoleColors; const _Text: string);
153+var
154+ LastColor: TConsoleColors;
155+begin
156+ LastColor := GetTextColor;
157+ SetTextColor(_Color);
158+ Self.WriteLn(_Text);
159+ SetTextColor(LastColor);
160+end;
161+
162+procedure TStdOut.WriteLn(_Color: TConsoleColors; const _Format: string; const _Params: array of const);
163+begin
164+ Self.WriteLn(_Color, Format(_Format, _Params));
165+end;
166+
167+{ TStdOut.TColoredText }
168+
169+procedure TStdOut.TColoredText.Init(_StdOut: TStdOut; _Color: TConsoleColors);
170+begin
171+ FStdOut := _StdOut;
172+ FColor := _Color;
173+end;
174+
175+procedure TStdOut.TColoredText.Write(const _Format: string; const _Params: array of const);
176+begin
177+ FStdOut.Write(FColor, _Format, _Params);
178+end;
179+
180+procedure TStdOut.TColoredText.Write(const _Text: string);
181+begin
182+ FStdOut.Write(FColor, _Text);
183+end;
184+
185+procedure TStdOut.TColoredText.WriteLn(const _Text: string);
186+begin
187+ FStdOut.WriteLn(FColor, _Text);
188+end;
189+
190+procedure TStdOut.TColoredText.WriteLn(const _Format: string; const _Params: array of const);
191+begin
192+ FStdOut.WriteLn(FColor, _Format, _Params);
193+end;
194+
195+initialization
196+ StdOut := TStdOut.Create;
197+finalization
198+ FreeandNil(StdOut);
199+end.
200+
Show on old repository browser