forked from alhymov/RESTDebugger-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uosutils.pas
34 lines (27 loc) · 812 Bytes
/
uosutils.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{*******************************************************}
{ }
{ CodeGear Delphi Runtime Library }
{ Copyright(c) 2014-2015 Embarcadero Technologies, Inc. }
{ }
{*******************************************************}
unit uOSUtils;
interface
procedure OSExecute(const ACommand: string);
implementation
uses
{$IFDEF MSWINDOWS}
Winapi.ShellAPI, Winapi.Windows;
{$ENDIF MSWINDOWS}
{$IFDEF POSIX}
Posix.Stdlib;
{$ENDIF POSIX}
procedure OSExecute(const ACommand: string);
begin
{$IFDEF MSWINDOWS}
ShellExecute(0, 'OPEN', PChar(ACommand), '', '', SW_SHOWNORMAL);
{$ENDIF MSWINDOWS}
{$IFDEF POSIX}
_system(PAnsiChar('open ' + AnsiString(ACommand)));
{$ENDIF POSIX}
end;
end.