mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 18:43:51 +00:00
use %APPDATA%\ewsdr on Windows instead of exe directory
Program Files is read-only for normal users; GetAppConfigDir(False) returns the proper per-user config location on all platforms. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-7
@@ -14,9 +14,9 @@ function QtPlatformAllowsOpenGLControls: Boolean;
|
||||
function HasOpenGLSpectrumSwitch: Boolean;
|
||||
function CurrentScreenDPI: Integer;
|
||||
// Возвращает каталог для хранения конфигурации (с завершающим разделителем).
|
||||
// macOS: ~/Library/Application Support/ewsdr/
|
||||
// Linux: ~/.config/ewsdr/
|
||||
// Windows: каталог исполняемого файла
|
||||
// macOS: ~/Library/Application Support/ewsdr/
|
||||
// Linux: ~/.config/ewsdr/
|
||||
// Windows: %APPDATA%\ewsdr\
|
||||
function GetAppCfgDir: string;
|
||||
|
||||
implementation
|
||||
@@ -68,13 +68,9 @@ end;
|
||||
|
||||
function GetAppCfgDir: string;
|
||||
begin
|
||||
{$IFDEF WINDOWS}
|
||||
Result := IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0)));
|
||||
{$ELSE}
|
||||
Result := IncludeTrailingPathDelimiter(GetAppConfigDir(False));
|
||||
if not DirectoryExists(Result) then
|
||||
ForceDirectories(Result);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
Reference in New Issue
Block a user