|
#301
|
||||
|
||||
|
Quote:
Code:
var
FMXLabel : FLabel;
procedure FMXInnoInit;
begin
FMXLabel := InitLabelHandle;
end;
procedure FMXDesigning;
begin
FMXLabel.FCreate(FMXForm.Handle, '');
if wGetDriveMediaType('D') = 0 then
begin
FMXLabel.Text('UNKNOWN');
end;
if wGetDriveMediaType('D') = 3 then
begin
FMXLabel.Text('HDD');
end;
if wGetDriveMediaType('D') = 4 then
begin
FMXLabel.Text('SSD');
end;
if wGetDriveMediaType('D') = 5 then
begin
FMXLabel.Text('SCM');
end;
FMXLabel.Left(50);
FMXLabel.Top(50);
FMXLabel.FontSetting('Segoe UI', 16, ALBlack);
end;
Code:
var
FMXLabel : FLabel;
procedure FMXInnoInit;
begin
FMXLabel := InitLabelHandle;
end;
procedure FMXDesigning;
begin
FMXLabel.FCreate(FMXForm.Handle, '');
case wGetDriveMediaType('D') of
0: FMXLabel.Text('UNKNOWN');
3: FMXLabel.Text('HDD');
4: FMXLabel.Text('SSD');
5: FMXLabel.Text('SCM');
end;
FMXLabel.Left(50);
FMXLabel.Top(50);
FMXLabel.FontSetting('Segoe UI', 16, ALBlack);
end;
|
| The Following User Says Thank You to hitman797 For This Useful Post: | ||
audiofeel (24-08-2023) | ||
| Sponsored Links |
|
#302
|
||||
|
||||
|
Quote:
|
|
#303
|
||||
|
||||
|
It's bad that usb does not recognize.
|
|
#304
|
||||
|
||||
|
Update available!
Quote:
the FluentApi v2.0 update was responsible for this problem, however, it has been successfully addressed and fixed. ![]() Quote:
this update brings more properties to classes, and that includes this one too. NOTE: This update involves modifications to certain functions/procedures, which might require adjustments to current scripts. ![]() ![]() Quote:
Ok, let's update the wGetDriveMediaType function. Code:
function wGetDriveMediaType(const DriveLetter: WideString): Integer; function wGetDriveMediaTypeEx(const DriveLetter: WideString; out HealthStatus, Usage: Integer): Integer; Code:
{ Drive Media Type }
const
HDD_MEDIA_TYPE_UNKNOWN = $0000;
HDD_MEDIA_TYPE_USB = $0001;
HDD_MEDIA_TYPE_SD = $0002;
HDD_MEDIA_TYPE_HDD = $0003;
HDD_MEDIA_TYPE_SSD = $0004;
HDD_MEDIA_TYPE_SCM = $0005;
HDD_MEDIA_TYPE_NVMe = $0006;
{ Drive Health }
const
HDD_HEALTH_STATUS_HEALTHY = $0000;
HDD_HEALTH_STATUS_WARNING = $0001;
HDD_HEALTH_STATUS_UNHEALTHY = $0002;
HDD_HEALTH_STATUS_UNKNOWN = $0005;
{ Drive Usage }
const
HDD_USAGE_UNKWOWN = $0000;
HDD_USAGE_AUTO_SELECT = $0001; // used for data storage.
HDD_USAGE_MANUAL_SELECT = $0002; // used if manually selected by an administrator at the time of virtual disk creation.
HDD_USAGE_RETIRED = $0004; // retired from use
HDD_USAGE_CACHE = $0005; // used as a cache for other devices.
the first post has been updated. . Last edited by BLACKFIRE69; 26-08-2023 at 14:29. |
|
#305
|
||||
|
||||
|
#Script1.iss
when i already installed the first game The next game will be on the same drive as the first game installed.
Last edited by macut18; 26-08-2023 at 18:12. |
|
#306
|
|||
|
|||
|
@macut18 yes i currently use this script for my Repacks and you cant install 2 games with it in the same spot as it will do that.. but i just install one test it and then remove it..
ScOOt3r |
| The Following User Says Thank You to ScOOt3r For This Useful Post: | ||
macut18 (26-08-2023) | ||
|
#308
|
||||
|
||||
|
Quote:
Code:
AboutTabControl.FCreate(AboutPage.Handle);
AboutTabControl.SetBounds(100, 130, 1046, 448);
AboutTabControl.TabPosition(tpNone);
for i:= 1 to 3 do
begin
AboutTabItem[i].FCreateEx(AboutTabControl.Handle);
AboutLbl[i].FCreate(AboutTabItem[i].Handle);
AboutLbl[i].FontSetting('{#Font}', VCLFontSizeToFMX(22), ALWhiteSmoke);
AboutLbl[i].TextSetting(False, txCenter, txCenter);
AboutLbl[i].SetBounds(0, 18, 1046, 24)
AboutMemo[i].FCreate(AboutTabItem[i].Handle, True);
AboutMemo[i].SetBounds(28, 59, 1017, 358);
AboutMemo[i].FontSetting('{#Font}', VCLFontSizeToFMX2(12), ALWhiteSmoke);
AboutMemo[i].WordWrap(True);
AboutMemo[i].ReadOnly(True);
AboutMemo[i].ScrollAnimation(True);
end;
AboutLbl[1].Text(AnsiUppercase('About Game'));
AboutLbl[2].Text(AnsiUppercase('About Repack'));
AboutLbl[3].Text(AnsiUppercase('Credits'));
AboutMemo[1].AddLine(CnvtToWStr(S1));
AboutMemo[2].AddLine(CnvtToWStr(S2));
AboutMemo[3].AddLine(CnvtToWStr(S3));
AboutTabBtn[1].FCreate(AboutTabControl.Handle);
AboutTabBtn[1].SetBounds(572, 590, 50, 30);
AboutTabBtn[1].FillColor({#Color1});
AboutTabBtn[1].StrokeColor({#Color2});
AboutTabBtn[1].StrokeSetting(1.0, scFlat, sdSolid, sjMiter);
AboutTabBtn[1].CornerStyle(16, 16, [tcTopLeft, tcBottomLeft], ctBevel);
AboutTabBtnLbl[1].FCreate(AboutTabBtn[1].Handle);
AboutTabBtnLbl[1].Text(#$E938);
AboutTabBtnLbl[1].Align(Client)
AboutTabBtnLbl[1].AutoSize(True);
AboutTabBtnLbl[1].TextSetting(False, txCenter, txCenter);
AboutTabBtnLbl[1].FontSetting('Segoe MDL2 Assets', 14, ALBlack);
AboutTabBtnLbl[1].OnMouseEnter(@CommonMouseEnter);
AboutTabBtnLbl[1].OnMouseLeave(@CommonMouseLeave);
AboutTabBtnLbl[1].OnClick(@CommonOnClick);
AboutTabBtn[2].FCreate(AboutTabControl.Handle);
AboutTabBtn[2].SetBounds(622, 590, 50, 30);
AboutTabBtn[2].FillColor({#Color1});
AboutTabBtn[2].StrokeColor({#Color2});
AboutTabBtn[2].StrokeSetting(1.0, scFlat, sdSolid, sjMiter);
AboutTabBtn[2].CornerStyle(16, 16, [tcTopRight, tcBottomRight], ctBevel);
AboutTabBtnLbl[2].FCreate(AboutTabBtn[2].Handle);
AboutTabBtnLbl[2].Text(#$E937);
AboutTabBtnLbl[2].Align(Client)
AboutTabBtnLbl[2].AutoSize(True);
AboutTabBtnLbl[2].TextSetting(False, txCenter, txCenter);
AboutTabBtnLbl[2].FontSetting('Segoe MDL2 Assets', 14, ALBlack);
AboutTabBtnLbl[2].OnMouseEnter(@CommonMouseEnter);
AboutTabBtnLbl[2].OnMouseLeave(@CommonMouseLeave);
AboutTabBtnLbl[2].OnClick(@CommonOnClick);
|
| The Following User Says Thank You to hitman797 For This Useful Post: | ||
audiofeel (27-08-2023) | ||
|
#309
|
||||
|
||||
|
Quote:
add 1 TabItem in TabControl1 and add the buttons in TabItem in TabControl1. in TabControl2 add TabItem[i] in TabItem[i] add Memo[i]. |
| The Following User Says Thank You to hitman797 For This Useful Post: | ||
audiofeel (27-08-2023) | ||
|
#310
|
||||
|
||||
|
Dear Blackfire69. Could you clarify about FUserInfo. As you wrote in the examples, this is not quite suitable, at least for Windows 11. Unknown is displayed in it. If this function defines only the administrator from under the built-in account, and the user from the user group, then this is not entirely correct, probably. I tried to determine by type sid like this
Code:
var
UserSidType: Integer;
s1 : String;
...............................
s1 := Copy(UserInfo.SID,42,3)+Copy(UserInfo.SID,45,1);
UserSidType := StrToInt(s1);
if UserSidType > 1000 then
UserSidType := 1001 ;
// SUserType
case UserSidType of
500: UserTypeStr := 'Administrator';
1001: UserTypeStr := 'Standard User';
else
UserTypeStr := 'Unknown';
end;
And if the user, administrator rights? Whereas? Could you clarify this issue. Last edited by crachlow; 27-08-2023 at 08:55. |
| The Following User Says Thank You to crachlow For This Useful Post: | ||
audiofeel (27-08-2023) | ||
|
#311
|
||||
|
||||
|
Maybe it's because of the localization of the system?
Last edited by crachlow; 27-08-2023 at 11:44. |
|
#312
|
||||
|
||||
|
Quote:
i just updated it. it may work. Quote:
this 'white square' issue can be bypassed. however, after doing so, you'll need to call 'FMXForm.Show' following the 'FMXDesigning' procedure; otherwise, it won't display anything. if this solution works for you, i'll implement this fix in the next update. (the DLL file in the example is in developer mode, so please refrain from using it in the main stream.) if i specify the changes in the code: Code:
procedure InitializeWizard();
begin
...
FMXDesigning;
// New - FMXInnoDev.dll: [2023-08-28]
Page1.Visible(False);
Page2.Visible(False);
Page3.Visible(False);
Page4.Visible(False);
Page5.Visible(False);
FMXForm.Show;
//
...
end;
procedure CurPageChanged(CurPageID: Integer);
begin
...
if CurPageID = wpWelcome then
begin
...
if FMXFirstRun then
begin
FMXFirstRun := false;
// New
//Page1.AnimDelay(0.5);
//
end else
Page1.AnimDelay(0);
...
end;
...
end;
. Last edited by BLACKFIRE69; 14-07-2024 at 02:03. |
|
#313
|
||||
|
||||
|
Quote:
case IsAdminLoggedOn of 0: UserTypeStr := 'Group Users'; 1: UserTypeStr := 'Group Administrators'; and GetUserNameString; from innosetup works more correctly. In Russian localization UserInfo.UserType, and maybe in others, does not work at all, it is also difficult to determine by sid, because sid will be different in different localizations. |
|
#314
|
||||
|
||||
|
Quote:
Code:
{Setup]
...
PrivilegesRequired=admin ---> 'Admin' (IsAdminLoggedOn is True)
PrivilegesRequired=lowest ---> 'Standard' (IsAdminLoggedOn is False)
|
|
#315
|
||||
|
||||
|
Quote:
FMX Styles Windows 11 for VCL VCL Styles |
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Windows Fluent Effects Standalone API - InnoSetup / VCL / FXM | BLACKFIRE69 | Conversion Tutorials | 0 | 15-11-2023 17:35 |
| Windows Phone Installer similar to razor12911's original design? | Kitsune1982 | Conversion Tutorials | 0 | 02-07-2020 13:04 |
| INDEX - Conversion Tutorial Index | Razor12911 | Conversion Tutorials | 5 | 11-06-2020 02:05 |
| Frequently Asked Questions | Joe Forster/STA | PC Games - Frequently Asked Questions | 0 | 29-11-2005 09:48 |