11#define MyAppName " Albayan"
2- #define MyAppVersion " 2 .0.0"
3- #define AppVersion " 2 .0.0"
2+ #define MyAppVersion " 3 .0.0"
3+ #define AppVersion " 3 .0.0"
44#define MyAppPublisher " Tecwindow"
55#define MyAppURL " https://tecwindow.net/"
66#define MyAppExeName " Albayan.exe"
@@ -22,6 +22,7 @@ AppPublisherURL={#MyAppURL}
2222AppSupportURL = {#MyAppURL}
2323AppUpdatesURL = {#MyAppURL}
2424ArchitecturesAllowed = x64
25+ SetupIconFile = Albayan.ico
2526
2627DefaultDirName = {sd} \program files \tecwindow\{#MyAppName }
2728DisableProgramGroupPage = yes
@@ -47,53 +48,57 @@ Name: "arabic"; MessagesFile: "compiler:Languages\Arabic.isl"
4748arabic.AppLNGfile= Arabic
4849english.DeleteSettingsPrompt= Do you want to delete the settings folder?
4950arabic.DeleteSettingsPrompt= هل تريد حذف مجلد الإعدادات؟
51+ english.autorun= auto start albayan with windows?
52+ arabic.autorun= فتح برنامج البيان تلقائيا مع بدء تشغيل النظام
5053
5154[Tasks]
5255Name : " desktopicon" ; Description : " {cm:CreateDesktopIcon}" ; GroupDescription: " {cm:AdditionalIcons}"
56+ Name : " autorun" ; Description : " {cm:autorun}" ; GroupDescription: " {cm:AdditionalIcons}" ; Flags : unchecked
5357
5458[Files]
5559Source : " albayan_build\{#MyAppExeName}" ; DestDir : " {app} " ; Flags : ignoreversion
5660Source : " albayan_build\*" ; DestDir : " {app} " ; Flags : ignoreversion recursesubdirs createallsubdirs
5761Source : " albayan_build\Audio\athkar\*" ; DestDir : " {userappdata}\tecwindow\albayan\Audio\athkar" ; Flags : ignoreversion recursesubdirs createallsubdirs
5862
5963[Icons]
60- Name : " {autoprograms}\Albayan" ; Filename : " {app} \{#MyAppExeName}"
61- Name : " {autodesktop}\Albayan" ; Filename : " {app} \{#MyAppExeName}" ; Tasks: desktopicon
64+ Name : " {autoprograms}\Albayan" ; Filename : " {app} \{#MyAppExeName}" ; IconFilename: " {app} \Albayan.ico "
65+ Name : " {autodesktop}\Albayan" ; Filename : " {app} \{#MyAppExeName}" ; IconFilename: " {app} \Albayan.ico " ; Tasks: desktopicon
6266
6367[INI]
64- Filename : " {userappdata}\tecwindow\{#MyAppName}\Settingss.ini" ; Section: " general" ; Key: " language" ; String : " {cm:AppLNGfile}"
68+ Filename : " {userappdata}\tecwindow\{#MyAppName}\config.ini" ; Section: " general" ; Key: " run_in_background_enabled" ; String : " true" ; Tasks: autorun
69+ Filename : " {userappdata}\tecwindow\{#MyAppName}\config.ini" ; Section: " general" ; Key: " auto_start_enabled" ; String : " true" ; Tasks: autorun
70+
71+ [Registry]
72+ Root : HKCU; Subkey : " Software\Microsoft\Windows\CurrentVersion\Run" ; ValueType : string ; ValueName : " albayan" ; ValueData : " {app} \albayan.exe --minimized" ; Flags : uninsdeletevalue ; Tasks: autorun
73+
74+ [UninstallRun]
75+ Filename : " taskkill" ; Parameters : " /F /IM Albayan.exe" ; Flags : runhidden
6576
6677[UninstallDelete]
6778Type : filesandordirs ; Name : " {pf} \tecwindow\Albayan"
6879
80+ [InstallDelete]
81+ Type : filesandordirs ; Name : " {app} \*"
82+
6983[Run]
7084Filename : " {app} \{#MyAppExeName}" ; Description : " {cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}" ; Flags : nowait postinstall
7185
7286[Code]
73- procedure DeleteOldInstallation ();
74- begin
75- if DirExists(ExpandConstant(' {sd}\program files\tecwindow\{#MyAppName}\Audio\sounds' )) then
76- begin
77- DelTree(ExpandConstant(' {sd}\program files\tecwindow\{#MyAppName}\Audio\sounds' ), True, True, True);
78- end ;
79- end ;
80-
8187function InitializeSetup (): Boolean;
8288begin
83- DeleteOldInstallation();
8489 Result := True;
8590end ;
8691
87- procedure DeleteAthkarFolder ();
88- begin
89- DelTree(ExpandConstant(' {app}\Audio\athkar' ), True, True, True);
90- end ;
9192
9293procedure CurStepChanged (CurStep: TSetupStep);
9394begin
94- if CurStep = ssPostInstall then
95+ if CurStep = ssInstall then
9596 begin
96- DeleteAthkarFolder();
97+ if FileExists(ExpandConstant(' {userappdata}\tecwindow\{#MyAppName}\Settingss.ini' )) then
98+ begin
99+ RenameFile(ExpandConstant(' {userappdata}\tecwindow\{#MyAppName}\Settingss.ini' ), ExpandConstant(' {userappdata}\tecwindow\{#MyAppName}\config.ini' ));
100+ end ;
101+
97102 end ;
98103end ;
99104
@@ -117,3 +122,4 @@ begin
117122 end ;
118123 end ;
119124end ;
125+
0 commit comments