View Single Post
  #11  
Old 12-07-2022, 02:09
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
Arrow FMXInno - Updates

FMXInno - Updates


If you want to protect your data especially things like graphics, it's now easy to do so with features built into the FMXInno. What happens here is that the FMXInno accesses those file in memory, which means that no file is created in the hard disk.


Let's see how to do it.

Quote:
1. First, make changes to your script as per the given example and compile it. (don't run the Setup.exe)
2. After that run the FXPcker.exe and add the files you want to hide. Also browse the Setup.exe compiled in the first step and generate a data file. (let's say Setup.dat)
3. We're almost done. Now just run the Setup.exe. That's all.

* Be sure to create a new data file (Setup.dat) whenever you make changes to the script and recompile it. Because that file (Setup.dat) is unique. Otherwise, accessing the data file (Setup.dat) will be treated as unauthorized access.

The attached example includes more details.


Code:
function InitializeSetup(): Boolean;
begin
  // FXStream
  FXOk := FXUnPckrInit(ExpandConstant('{src}\Setup.dat'), '@#123_Test');

  if not FXOk then
  begin
    MsgBox('Failed to initialize the setup. The installation process cannot continue.', mbError, MB_OK);
    Result := False;
  end
  else
  begin
    FMXInnoInit;
    Result := True;
  end;
end;

// ...

procedure FMXDesigning;
begin
  { FMX Form }
  FMXForm.FCreateImageFormFromFXStream(WizardForm.Handle, 'PicForm.png', 1.00); 
  FMXForm.SetCursor(ExtractAndLoad('Dark2.ani'));

  { Music Equ }
  MusicEqu.FCreate(FMXForm.Handle, NSX(620), NSY(100), NSX(110), NSY(42), 1.5, 8, '');
  MusicEqu.SetPictureFromFXStream('EqualizerLight.png');
  MusicEqu.OnClick(@MusicEquOnClick);

  { PicBtn[1] }
  PicBtn[1].FCreateFromFXStream(FMXForm.Handle, 'Button.png', NSX(600), NSY(455), NSX(125), NSY(45));
  PicBtn[1].Text('&Cancel');
  PicBtn[1].OnClick(@CommonOnClick);

  // ...

  { PicPart }
  PicPart.FCreateFromFXStream(FMXForm.Handle, 'mspaint.png', MusicEqu.GetLeft, MusicEqu.GetTop + NSY(100), 100, 100, 50, 50, 100, 100);

  // ...

  { PicPB[1] }
  PicPB[1].FCreateFromFXStream(FMXForm.Handle, 'pb.png', 'pbbkg.png', PctLabel.GetLeft + NSX(20), PctLabel.GetTop + NSY(50), 380, 25, True);
  PicPB[1].Value(69, 100);

  // ...
end;

.

Last edited by BLACKFIRE69; 14-07-2024 at 01:34.
Reply With Quote
The Following 7 Users Say Thank You to BLACKFIRE69 For This Useful Post:
ADMIRAL (14-07-2022), ffmla (14-07-2022), Gehrman (12-07-2022), Harsh ojha (31-07-2022), houcine80 (13-07-2022), Razor12911 (19-08-2022), ScOOt3r (12-07-2022)