anchor.diff:      Result := SysUtils.GetEnvironmentVariable('USER');
   end;
   
  -{$ifndef console}
  +{$IFDEF GUI}
   procedure FlashInWindowsTaskbar(const aFlashEvenIfActive : boolean);
   begin
  -  {$ifdef windows}
  +  {$IFDEF WINDOWS}
     // http://forum.lazarus.freepascal.org/index.php?topic=33574.0
     If aFlashEvenIfActive or (not Application.Active) Then
  -    FlashWindow({$ifdef fpc}WidgetSet.AppHandle{$else}Application.Handle{$endif}, True);
  -  {$endif}
  -end;
  -{$endif}
  +    FlashWindow({$IFDEF FPC}WidgetSet.AppHandle{$ELSE}Application.Handle{$ENDIF}, True);
  +  {$ENDIF}
  +end;
  +{$ENDIF}
   
   function RegisterDefaultApplication(const aFullPathExe: string; const aFileExtension: string; var aError : string) : boolean;
  -{$ifdef windows}
  +{$IFDEF WINDOWS}
   var
     a: byte;
     tmpRegistry : TRegistry;
  
positive.code: function GetApplicationDataFolder(const aApplicationSubDir: string): String;
  var
    tmpDir : string;
    {$ifdef windows}
    AppDataPath: Array[0..MaxPathLen] of Char; //http://wiki.lazarus.freepascal.org/Windows_Programming_Tips
    {$endif}
  begin
    {$ifdef windows}
    AppDataPath:='';
    SHGetSpecialFolderPath(0,AppDataPath,CSIDL_APPDATA,false);
    tmpDir:= AppDataPath;
    Result := IncludeTrailingPathDelimiter(tmpDir) + aApplicationSubDir;
    {$else}
      {$ifdef linux}
      // GetAppConfigDir(false);
      raise Exception.Create('GetApplicationLocalDataFolder missing implementation for this platform');
      {$else}
      raise Exception.Create('GetApplicationLocalDataFolder missing implementation for this platform');
      {$endif}
    {$endif}
    if not DirectoryExists(Result) then
      ForceDirectories(Result);
  end;
  
negative.code:    lProcess.Free;
  end;
  
  {$ELSE}
  function GetCPUCores : integer;
  begin
    raise Exception.Create('GetCPUCores missing implementation for this platform');
  end;
  {$ENDIF}
  {$ENDIF}
  {$ENDIF}
  
  function GetApplicationLocalDataFolder(const aApplicationSubDir: string): String;
  var
    tmpDir : string;
    {$IFDEF WINDOWS}
    AppDataPath: Array[0..MaxPathLen] of Char; //http://wiki.lazarus.freepascal.org/Windows_Programming_Tips
    {$ENDIF}
  begin
    {$IFDEF WINDOWS}
    AppDataPath:='';
    SHGetSpecialFolderPath(0,AppDataPath,CSIDL_LOCAL_APPDATA,false);
    tmpDir:= AppDataPath;
    Result := IncludeTrailingPathDelimiter(tmpDir) + aApplicationSubDir;
    {$ELSE}
      {$IFDEF LINUX}
      tmpDir:= GetEnvironmentVariableUTF8('HOME');
      Result := IncludeTrailingPathDelimiter(tmpDir) + '.' + aApplicationSubDir;
      {$ELSE}
      raise Exception.Create('GetApplicationLocalDataFolder missing implementation for this platform');
      {$ENDIF}
    {$ENDIF}
    if not DirectoryExists(Result) then
      ForceDirectories(Result);
  end;
  