Changeset 492 for Common


Ignore:
Timestamp:
Dec 10, 2016, 4:20:46 PM (8 years ago)
Author:
chronos
Message:
  • Fixed: Conditional compilation of Common package under Linux.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Common/UCommon.pas

    r490 r492  
    66
    77uses
    8   {$IFDEF Windows}Windows,{$ENDIF}
     8  {$ifdef Windows}Windows,{$endif}
     9  {$ifdef Linux}baseunix,{$endif}
    910  Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf,
    1011  FileUtil; //, ShFolder, ShellAPI;
     
    305306  end;
    306307end;
     308{$endif}
    307309
    308310function ComputerName: string;
     
    324326{$endif}
    325327{$ifdef unix}
    326 begin
    327   Result := GetHostName;
     328var
     329  Name: UtsName;
     330begin
     331  fpuname(Name);
     332  Result := Name.Nodename;
    328333end;
    329334{$endif}
    330335
     336{$ifdef windows}
    331337function LoggedOnUserNameEx(Format: TUserNameFormat): string;
    332338const
     
    443449
    444450procedure OpenWebPage(URL: string);
    445 var
    446   Process: TProcess;
    447   Browser, Params: string;
    448451begin
    449452  OpenURL(URL);
    450   {try
    451     Process := TProcess.Create(nil);
    452     Browser := '';
    453     //FindDefaultBrowser(Browser, Params);
    454     //Process.Executable := Browser;
    455     //Process.Parameters.Add(Format(Params, [ApplicationInfo.HomePage]);
    456     Process.CommandLine := 'cmd.exe /c start ' + URL;
    457     Process.Options := [poNoConsole];
    458     Process.Execute;
    459   finally
    460     Process.Free;
    461   end;}
    462453end;
    463454
Note: See TracChangeset for help on using the changeset viewer.