Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-10-2023, 15:16
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
Preliminarily... failure at startup occurs only if the script is built on version 5.6.1. On version 6.2.2, I have not noticed any failures yet. I could be wrong . It is possible that something is wrong with my pc machine. Or I have a mistake in the script.
youtu.be


sorry for the delayed response; i've been quite busy these past few days and, to be honest, i haven't had a good night's sleep in two days.


it seems that the wGetLogicalDriveList function doesn't function as expected in InnoSetup v5.x. however, the FLogicalDrives class works reliably across all scenarios and has undergone thorough testing.


Code:
type
  FLogicalDrives = interface(IUnknown)
    '{73D9B3A3-6571-474E-B043-7DC8D3248538}'
    procedure FCreate;
    function Count: Integer;
    function CDriveIndex: Integer;
    function Letter(const Index: Integer): WideString;
    function LetterToIndex(const Letter: WideString): Integer;
    function IsRemovable(const Index: Integer): Boolean;
    function MediaType(const Index: Integer): Integer;
    function MediaTypeEx(const Index: Integer; out HealthStatus, Usage: Integer): Integer;
    function SpaceFreeMB(const Index: Integer): Integer;
    function SpaceAvailableMB(const Index: Integer): Integer;
    function SpaceTotalMB(const Index: Integer): Integer;
  end;

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.

Code:
  { LogicalDrives }
  LogicalDrives.FCreate;

  if LogicalDrives.Count > 0 then
  begin
    { ListBox }
    ListBox.FCreate(FMXForm.Handle);
    ListBox.SetBounds(NSX(32), NSY(53), NSX(297), NSY(249));
    ListBox.OnChange(@ListBoxOnChange);

    if ImgList.Count >= 2 then
      ListBox.ImageList(ImgList.Handle);

    { ListBox-Items }
    SetArrayLength(ListBoxItems, LogicalDrives.Count);

    ListBox.BeginUpdate;   // BeginUpdate
    for i := 0 to LogicalDrives.Count - 1 do
    begin
      ListBoxItems[i] := InitListBoxItemHandle;
      ListBoxItems[i].FCreate(ListBox.Handle);
      ListBoxItems[i].Text(LogicalDrives.Letter(i));

      if (ImgList.Count >= 2) then
      begin
        if (i = LogicalDrives.CDriveIndex) then  // C-Drive
          ListBoxItems[i].ImageIndex(0)
        else
          ListBoxItems[i].ImageIndex(1);
      end;

      ListBox.AddItem(ListBoxItems[i].Handle);
    end;
    ListBox.EndUpdate;     // EndUpdate
  end else
    MsgBox('"LogicalDrives" failded!', mbError, MB_OK);

.

Last edited by BLACKFIRE69; 14-07-2024 at 02:10.
Reply With Quote
The Following 4 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (06-10-2023), Behnam2018 (06-10-2023), ffmla (07-10-2023), hitman797 (06-10-2023)
Sponsored Links
  #2  
Old 07-10-2023, 08:29
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Question Testing

Testing:

guys, if any of you happen to have some free time and are using virtual machines other than VMware 17.x, could you please test this on them?











Quote:
Originally Posted by BLACKFIRE69 View Post
sorry for the delayed response; i've been quite busy these past few days and, to be honest, i haven't had a good night's sleep in two days.


it seems that the wGetLogicalDriveList function doesn't function as expected in InnoSetup v5.x. however, the FLogicalDrives class works reliably across all scenarios and has undergone thorough testing.


Code:
type
  FLogicalDrives = interface(IUnknown)
    '{73D9B3A3-6571-474E-B043-7DC8D3248538}'
    procedure FCreate;
    function Count: Integer;
    function CDriveIndex: Integer;
    function Letter(const Index: Integer): WideString;
    function LetterToIndex(const Letter: WideString): Integer;
    function IsRemovable(const Index: Integer): Boolean;
    function MediaType(const Index: Integer): Integer;
    function MediaTypeEx(const Index: Integer; out HealthStatus, Usage: Integer): Integer;
    function SpaceFreeMB(const Index: Integer): Integer;
    function SpaceAvailableMB(const Index: Integer): Integer;
    function SpaceTotalMB(const Index: Integer): Integer;
  end;

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.

Code:
  { LogicalDrives }
  LogicalDrives.FCreate;

  if LogicalDrives.Count > 0 then
  begin
    { ListBox }
    ListBox.FCreate(FMXForm.Handle);
    ListBox.SetBounds(NSX(32), NSY(53), NSX(297), NSY(249));
    ListBox.OnChange(@ListBoxOnChange);

    if ImgList.Count >= 2 then
      ListBox.ImageList(ImgList.Handle);

    { ListBox-Items }
    SetArrayLength(ListBoxItems, LogicalDrives.Count);

    ListBox.BeginUpdate;   // BeginUpdate
    for i := 0 to LogicalDrives.Count - 1 do
    begin
      ListBoxItems[i] := InitListBoxItemHandle;
      ListBoxItems[i].FCreate(ListBox.Handle);
      ListBoxItems[i].Text(LogicalDrives.Letter(i));

      if (ImgList.Count >= 2) then
      begin
        if (i = LogicalDrives.CDriveIndex) then  // C-Drive
          ListBoxItems[i].ImageIndex(0)
        else
          ListBoxItems[i].ImageIndex(1);
      end;

      ListBox.AddItem(ListBoxItems[i].Handle);
    end;
    ListBox.EndUpdate;     // EndUpdate
  end else
    MsgBox('"LogicalDrives" failded!', mbError, MB_OK);

.

Last edited by BLACKFIRE69; 07-10-2023 at 08:38.
Reply With Quote
The Following 2 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (07-10-2023), hitman797 (07-10-2023)
  #3  
Old 11-10-2023, 12:07
ADMIRAL's Avatar
ADMIRAL ADMIRAL is offline
Registered User
 
Join Date: Oct 2019
Location: iran
Posts: 92
Thanks: 568
Thanked 40 Times in 34 Posts
ADMIRAL is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
Thanks for the hotfix. It seems that everything you need is working properly.
HI, Is it inno script project or compiler?
__________________
Search and Find
Reply With Quote
The Following User Says Thank You to ADMIRAL For This Useful Post:
Behnam2018 (13-10-2023)
  #4  
Old 13-10-2023, 06:37
ADMIRAL's Avatar
ADMIRAL ADMIRAL is offline
Registered User
 
Join Date: Oct 2019
Location: iran
Posts: 92
Thanks: 568
Thanked 40 Times in 34 Posts
ADMIRAL is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
this will be a scenario for Inno Setup
I tried to make it once when the sample was just made, but I couldn't. Even now, if I want to make it, I won't succeed. If possible, please complete it and share the code so that I can increase my ability to make this type of script.
Thankful
__________________
Search and Find
Reply With Quote
The Following User Says Thank You to ADMIRAL For This Useful Post:
BLACKFIRE69 (13-10-2023)
  #5  
Old 13-10-2023, 09:41
hitman797's Avatar
hitman797 hitman797 is offline
Registered User
 
Join Date: Feb 2013
Location: Algeria
Posts: 168
Thanks: 486
Thanked 202 Times in 122 Posts
hitman797 is on a distinguished road
Talking

Quote:
Originally Posted by ADMIRAL View Post
I tried to make it once when the sample was just made, but I couldn't. Even now, if I want to make it, I won't succeed. If possible, please complete it and share the code so that I can increase my ability to make this type of script.
Thankful
BLACKFIRE69, made this script possible by adding many of the components to this library.
and audiofeel, created this scenario using this library.
So, thanks to them

Last edited by hitman797; 13-10-2023 at 10:02.
Reply With Quote
The Following 2 Users Say Thank You to hitman797 For This Useful Post:
ADMIRAL (14-10-2023), BLACKFIRE69 (13-10-2023)
  #6  
Old 14-11-2023, 06:52
ADMIRAL's Avatar
ADMIRAL ADMIRAL is offline
Registered User
 
Join Date: Oct 2019
Location: iran
Posts: 92
Thanks: 568
Thanked 40 Times in 34 Posts
ADMIRAL is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
Thanks for the hotfix. It seems that everything you need is working properly.
Hi dear friend
The installation path selection section in windows 10 pro new Updates. it has a problem and does not work
I tried to change the codes but it doesn't work
__________________
Search and Find

Last edited by ADMIRAL; 14-11-2023 at 07:01.
Reply With Quote
  #7  
Old 14-11-2023, 11:56
ADMIRAL's Avatar
ADMIRAL ADMIRAL is offline
Registered User
 
Join Date: Oct 2019
Location: iran
Posts: 92
Thanks: 568
Thanked 40 Times in 34 Posts
ADMIRAL is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
the "overview" (Обзор) button
thanks for answer but it's was about metro0 script that you posted
Attached Files
File Type: 7z metro 0.7z (17.90 MB, 18 views)
__________________
Search and Find
Reply With Quote
  #8  
Old 14-11-2023, 23:11
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 688
Thanks: 481
Thanked 2,547 Times in 561 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by ADMIRAL View Post
thanks for answer but it's was about metro0 script that you posted
@ADMIRAL,

after making a few changes to the code, you can make it work. however, if i'm correct, there're some aspects in the script that need further implementation. it would be better to ask the authors to complete the script.


Code:
Edit1: 

* Replace the current 'ListBoxOnChange' code with this.

procedure ListBoxOnChange(Sender: TObject);
var
  ADir: String;
begin
  if (FMXListBox[2].GetItemIndex > -1) then
  begin
    ADir := FMXEdit[1].GetText;
    StringChange(ADir, ExtractFileDrive(ADir), FMXListBox[2].GetItemText(FMXListBox[2].GetItemIndex));
    FMXLabel[197].Text(MinimizePathName(ADir, WizardForm.DirEdit.Font, WizardForm.DirEdit.Width));
    FMXEdit[1].Text(MinimizePathName(ADir, WizardForm.DirEdit.Font, WizardForm.DirEdit.Width));
    WizardForm.DirEdit.Text:= ADir;

    FMXDiskUsage.SetDir(WizardForm.DirEdit.Text);
    FMXLabel[82].Text(MbOrTb(FMXDiskUsage.FreeSpace, 1));
    FMXLabel[85].Text(MbOrTb(FMXDiskUsage.FreeSpace, 1) + ' is available from the selected drive');
    FMXArc[5].Angle(FMXDiskUsage.FreeSpace, FMXDiskUsage.TotalSpace);
  end;
end;

procedure ListBx3OnChange(Sender: TObject);
var
  ADir: WideString;
begin
  if FMXListBox[3].GetItemIndex > -1 then
  begin
    ADir:= ExtractFileDrive(FMXEdit[1].GetText) + '\' + AddBackslash(FMXListBox[3].GetItemText(FMXListBox[3].GetItemIndex)) + '{#MyAppName}';
    FMXLabel[197].Text(MinimizePathName(ADir, WizardForm.DirEdit.Font, WizardForm.DirEdit.Width));
    FMXEdit[1].Text(MinimizePathName(ADir, WizardForm.DirEdit.Font, WizardForm.DirEdit.Width));
    WizardForm.DirEdit.Text:= ADir;

    FMXDiskUsage.SetDir(WizardForm.DirEdit.Text);
    FMXLabel[82].Text(MbOrTb(FMXDiskUsage.FreeSpace, 1));
    FMXLabel[85].Text(MbOrTb(FMXDiskUsage.FreeSpace, 1) + ' is available from the selected drive');
    FMXArc[5].Angle(FMXDiskUsage.FreeSpace, FMXDiskUsage.TotalSpace);
  end;
end;

Code:
Edit2: 

* Comment out the following line in the code.

//FMXEdit[1].OnChange(@ListBoxOnChange);

Code:
Edit3: 

* Replace the ListBoxOnChange event with ListBx3OnChange for the FMXListBox[3].

FMXListBox[3].OnChange(@ListBx3OnChange);
.

Last edited by BLACKFIRE69; 14-07-2024 at 02:12.
Reply With Quote
The Following 3 Users Say Thank You to BLACKFIRE69 For This Useful Post:
ADMIRAL (15-11-2023), audiofeel (15-11-2023), hitman797 (15-11-2023)
  #9  
Old 15-11-2023, 08:02
ADMIRAL's Avatar
ADMIRAL ADMIRAL is offline
Registered User
 
Join Date: Oct 2019
Location: iran
Posts: 92
Thanks: 568
Thanked 40 Times in 34 Posts
ADMIRAL is on a distinguished road
Quote:
Originally Posted by BLACKFIRE69 View Post
@ADMIRAL,

after making a few changes to the code, you can make it work. however, if i'm correct, there're some aspects in the script that need further implementation. it would be better to ask the authors to complete the script.


Code:
Edit1: 

* Replace the current 'ListBoxOnChange' code with this.

procedure ListBoxOnChange(Sender: TObject);
var
  ADir: String;
begin
  if (FMXListBox[2].GetItemIndex > -1) then
  begin
    ADir := FMXEdit[1].GetText;
    StringChange(ADir, ExtractFileDrive(ADir), FMXListBox[2].GetItemText(FMXListBox[2].GetItemIndex));
    FMXLabel[197].Text(MinimizePathName(ADir, WizardForm.DirEdit.Font, WizardForm.DirEdit.Width));
    FMXEdit[1].Text(MinimizePathName(ADir, WizardForm.DirEdit.Font, WizardForm.DirEdit.Width));
    WizardForm.DirEdit.Text:= ADir;

    FMXDiskUsage.SetDir(WizardForm.DirEdit.Text);
    FMXLabel[82].Text(MbOrTb(FMXDiskUsage.FreeSpace, 1));
    FMXLabel[85].Text(MbOrTb(FMXDiskUsage.FreeSpace, 1) + ' is available from the selected drive');
    FMXArc[5].Angle(FMXDiskUsage.FreeSpace, FMXDiskUsage.TotalSpace);
  end;
end;

procedure ListBx3OnChange(Sender: TObject);
var
  ADir: WideString;
begin
  if FMXListBox[3].GetItemIndex > -1 then
  begin
    ADir:= ExtractFileDrive(FMXEdit[1].GetText) + '\' + AddBackslash(FMXListBox[3].GetItemText(FMXListBox[3].GetItemIndex)) + '{#MyAppName}';
    FMXLabel[197].Text(MinimizePathName(ADir, WizardForm.DirEdit.Font, WizardForm.DirEdit.Width));
    FMXEdit[1].Text(MinimizePathName(ADir, WizardForm.DirEdit.Font, WizardForm.DirEdit.Width));
    WizardForm.DirEdit.Text:= ADir;

    FMXDiskUsage.SetDir(WizardForm.DirEdit.Text);
    FMXLabel[82].Text(MbOrTb(FMXDiskUsage.FreeSpace, 1));
    FMXLabel[85].Text(MbOrTb(FMXDiskUsage.FreeSpace, 1) + ' is available from the selected drive');
    FMXArc[5].Angle(FMXDiskUsage.FreeSpace, FMXDiskUsage.TotalSpace);
  end;
end;

Code:
Edit2: 

* Comment out the following line in the code.

//FMXEdit[1].OnChange(@ListBoxOnChange);

Code:
Edit3: 

* Replace the ListBoxOnChange event with ListBx3OnChange for the FMXListBox[3].

FMXListBox[3].OnChange(@ListBx3OnChange);
.

Thank you for your quick reply, but even with the edit's codes, I am still facing the same problem. Are there any problems for you with these codes in the script?
__________________
Search and Find
Reply With Quote
  #10  
Old 15-11-2023, 08:06
ADMIRAL's Avatar
ADMIRAL ADMIRAL is offline
Registered User
 
Join Date: Oct 2019
Location: iran
Posts: 92
Thanks: 568
Thanked 40 Times in 34 Posts
ADMIRAL is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
This part of the code was implemented by @Hitman797. I think that sometimes he will have a free hour and he will fix everything thanks to your edits in the code.
==Here is the latest "clean version" for the changes==
In the first test, my partitions and folders were not displayed at all, and by adding codes, I only encountered errors.
__________________
Search and Find
Reply With Quote
  #11  
Old 15-11-2023, 12:18
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,217
Thanks: 294
Thanked 1,404 Times in 637 Posts
Masquerade is on a distinguished road
Weird... I installed the font to my system and now all is fine
Sorry for the issues! Inno isn't my thing...
Reply With Quote
  #12  
Old 16-11-2023, 06:54
ADMIRAL's Avatar
ADMIRAL ADMIRAL is offline
Registered User
 
Join Date: Oct 2019
Location: iran
Posts: 92
Thanks: 568
Thanked 40 Times in 34 Posts
ADMIRAL is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
@ADMIRAL Test whether your directory selection is working correctly now
thanks to you
Yes, it worked this time
The path selection section works correctly, except that it does not show C drive folders for the first time, but the important thing is that the path can be selected.
and add folder button works too.

can you share the iss file?
__________________
Search and Find

Last edited by ADMIRAL; 16-11-2023 at 09:56.
Reply With Quote
The Following User Says Thank You to ADMIRAL For This Useful Post:
audiofeel (16-11-2023)
  #13  
Old 16-11-2023, 08:24
Jahan1373 Jahan1373 is offline
Registered User
 
Join Date: Jan 2022
Location: Yes
Posts: 46
Thanks: 104
Thanked 9 Times in 9 Posts
Jahan1373 is on a distinguished road
Thumbs up Script metro need for speed

Everything is great and good, only I saw 2 big problems, one of them did not have the date of the watch
2. When I chose the installation location, it wrote the volume on the image, it wrote the same. 2. There were only problems, thanks for your good script
Reply With Quote
The Following User Says Thank You to Jahan1373 For This Useful Post:
audiofeel (16-11-2023)
  #14  
Old 16-11-2023, 09:10
hitman797's Avatar
hitman797 hitman797 is offline
Registered User
 
Join Date: Feb 2013
Location: Algeria
Posts: 168
Thanks: 486
Thanked 202 Times in 122 Posts
hitman797 is on a distinguished road
Quote:
Originally Posted by Jahan1373 View Post
Everything is great and good, only I saw 2 big problems, one of them did not have the date of the watch
2. When I chose the installation location, it wrote the volume on the image, it wrote the same. 2. There were only problems, thanks for your good script
wait for @BLACKFIRE69 to update the library to add those things.
and you missing the music button and counter app running.
Reply With Quote
The Following User Says Thank You to hitman797 For This Useful Post:
audiofeel (16-11-2023)
  #15  
Old 30-11-2023, 12:14
ADMIRAL's Avatar
ADMIRAL ADMIRAL is offline
Registered User
 
Join Date: Oct 2019
Location: iran
Posts: 92
Thanks: 568
Thanked 40 Times in 34 Posts
ADMIRAL is on a distinguished road
Quote:
Originally Posted by audiofeel View Post
@ADMIRAL Test whether your directory selection is working correctly now
Hello audiofeel
As I said before, the test you sent works
Can I have your iss file?
__________________
Search and Find
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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



All times are GMT -7. The time now is 08:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com