| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- //
- // uSettings for GLSViewer
- //
- unit uSettings;
- interface
- uses
- Winapi.Windows,
- Winapi.Messages,
- System.Win.Registry,
- System.IniFiles,
- System.SysUtils,
- Vcl.Forms,
- Vcl.Graphics,
- Vcl.ActnList;
- procedure InitGeneralRegistry;
- implementation // ----------------------------------------------------------
- uses
- uGlobals;
- procedure InitGeneralRegistry;
- var
- RegIni: TRegistryIniFile;
- FileVersion: cardinal;
- begin
- GeneralSection := RegGLSViewer + 'General';
- FileVersion := GetFileVersion(ParamStr(0));
- ExePath := ExtractFilePath(ParamStr(0));
- RegIni := TRegistryIniFile.Create(GeneralSection);
- try
- with RegIni do
- begin
- if not RegIni.SectionExists(GeneralSection) then
- begin
- WriteString(GeneralSection, 'ExePath', ExePath); //Don't translate the strings
- WriteInteger(GeneralSection, 'FileVersion', FileVersion);
- WriteString(GeneralSection, 'License', 'MPL');
- end
- else
- begin
- ExePath := ReadString(GeneralSection, 'ExePath', ExePath);
- end;
- end;
- finally
- RegIni.Free;
- end;
- (*
- if RegIni.ValueExists(GeneralSection,'SplashStart') then
- SplashStart := RegIni.ReadBool(GeneralSection,'SplashStart',False)
- else
- SplashStart := True;
- if RegIni.ValueExists(GeneralSection,'TipOfTheDay') then
- TipOfTheDay := RegIni.ReadBool(GeneralSection,'TipOfTheDay', True)
- else
- TipOfTheDay := False;
- *)
- end;
- initialization //-----------------------------------------------------------
- InitGeneralRegistry;
- end.
|