FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   Light Installer Script (LIS) - DiskSpan_GUI (https://fileforums.com/showthread.php?t=103408)

giruthanders 01-11-2021 04:10

Quote:

Originally Posted by Cesar82 (Post 494677)
See if the line given below does not contain ";" before the line, or if you correctly set the path to the game's executable relative to the {app} installation folder.
Code:

#define GameExec "bin\game.exe"

Thank you for responding! Yes, it does not contain a ; before the line but still didn't work. In the end I found that adding "runascurrentuser" to the flags made it work. Hope this helps anyone who had the same problem I did.

Cesar82 01-11-2021 07:52

Light Installer Script 1.0.1.0
 
1 Attachment(s)
Added Light Installer Script 1.0.1.0 in first post. :)
Code:

- Added support for Persian (Farsi) language to Light Installer Script (Thanks to Gehrman for collaboration).
- Added support for skinsharp skins (SkinH.dll library by Shegorat) to Light Installer Script.
  >> The library of the skinsharp does not support special characters like cyrillic characters.
  >> So languages like Russian and Japanese and Persian should get broken using skinsharp.
- Fixed some minor bugs.

PS: SkinSharp skins only work if compiling with Inno Setup 6.0 or higher.

giruthanders 01-11-2021 09:31

Remember Default Installation Directory
 
Hello, I would like to ask how I could make the setup remember the folder I install my games in, like FitGirl's?

The default is C:\Program Files, but for example I change it to D:\Games. I want the installer to remember so that the next game I install, it will default to that directory instead of going back to C.

Cesar82 02-11-2021 09:12

Quote:

Originally Posted by giruthanders (Post 494695)
Hello, I would like to ask how I could make the setup remember the folder I install my games in, like FitGirl's?

The default is C:\Program Files, but for example I change it to D:\Games. I want the installer to remember so that the next game I install, it will default to that directory instead of going back to C.

FitGirl installers look for the next drive other than the drive the system is installed on and always install the game in a "Games" subfolder.
It doesn't memorize your last choice, it always installs in a "Games" folder and on the same drive.
Even if you choose "E:\My Games", assuming the system is installed on the "C:" drive in the next install it will suggest "D:\Games" as in the first install (Correct me if I'm wrong).

If you want similar behavior change the line in the [Setup] section of the script.
Code:

from:
DefaultDirName={#DefaultDir}\{#GameName}

to:
DefaultDirName={code:NoSD}\Games\{#GameName}

Then paste this code below into the [ Code] section of the script.
Code:

const
 
DRIVE_FIXED = 3;

function GetLogicalDriveStrings(nLenDrives: DWORD; lpDrives: String): DWORD;
  external '[email protected] stdcall delayload';

function GetDriveType(lpDisk: String): DWORD;
  external '[email protected] stdcall delayload';

function NoSD(Param: String): String;
var
 
Drive: String;
  Buffer: String;
begin
 
SetLength(Buffer, 255);
  SetLength(Buffer, GetLogicalDriveStrings(254, Buffer));
  Result := ExpandConstant('{sd}');
  while Pos(#0, Buffer) > 0 do
  begin
   
Drive := Copy(Buffer, 1, Pos(#0, Buffer) - 1);
    if (GetDriveType(Drive) = DRIVE_FIXED) and (CompareText(Drive, ExpandConstant('{sd}\')) <> 0) then
    begin
     
Result := RemoveBackslash(Drive);
      Break;
    end;
    Delete(Buffer, 1, Pos(#0, Buffer));
  end;
end;

I hope that's what you need.

Cesar82 23-05-2022 14:47

Quote:

Originally Posted by sakhjack (Post 496952)
is it possible to create master switch to disable all functions relevant to Uninstaller? (similar to #ifdef AppURL)
I could comment it out manually, but I might not get everything

I don't understand what exactly you need?
You mean a preprocessor parameter that disabling it disables the creation of uninstall files and uninstall registry entries?

Quote:

Originally Posted by sakhjack (Post 496952)
also people report installer trying to access Internet at the end even with AppURL not defined

It makes no sense that the installer is trying to access the internet.
The AppPublisherURL= AppSupportURL= AppUpdatesURL= keys are descriptive used only in shortcut of the control panel.
READ: AppPublisherURL, AppSupportURL, AppUpdatesURL.

Cesar82 23-05-2022 21:42

Lignt Installer Script 1.0.1.0 (u2)
 
1 Attachment(s)
Quote:

Originally Posted by sakhjack (Post 496954)
yes, I'd like script to not execute anything related to Uninstalling if a variable is not defined
---------
my own system never caught installer trying to access network, so I have no idea either

Attached script 1.0.1.0 (U2):
Code:

- Added ISPP directive (#define Uninstallable), if you disable this directive line:
>> It won't create the uninstall files.
>> Will not create uninstall registry keys.
>> It will not create the shortcuts in the start menu.


Cesar82 29-05-2022 13:41

1 Attachment(s)
Quote:

Originally Posted by sakhjack (Post 497045)
.bin and .style (unnamed) files created in folder System32 after installation
I assume it's from CurStepChanged (ssPostInstall section)
----
Other minor issues:
  • LogoOnClick is missing #ifdef AppURL condition
  • ShowWindow has a typo in argument
Code:

function ShowWindow(hWnd: v; ...)
---
I guess it's supposed to be
---
function ShowWindow(hWnd: HWND; ...)


Thanks for reporting the bugs.
If you find other bugs let me know.
I have attached the script with the reported bugs fixed.

Cesar82 12-06-2022 22:54

1 Attachment(s)
LIU Preview (Starting project)
If you have any suggestions, they are welcome.

macut18 15-06-2022 17:33

Quote:

Originally Posted by Cesar82 (Post 497203)
LIU Preview (Starting project)
If you have any suggestions, they are welcome.

It's awesome. I'm waiting. :)

fabrieunko 15-06-2022 22:46

Quote:

Originally Posted by Cesar82 (Post 497203)
LIU Preview (Starting project)
If you have any suggestions, they are welcome.

gorgeous.

-tara 19-06-2022 09:36

How do i add optional files?
 
After getting the diskspan output of 2 files (data1.bin,data-optional.bin) and adding both to the records.ini like so:
Code:

[Record1]
Type=FreeArc_Original
Source={src}\data1.bin
Output={app}\
Disk=1
Size=1.924.677.867 bytes

[Record2]
Type=FreeArc_Original
Source={src}\data-optional.bin
Output={app}\
Disk=2
Size=78.614.874 bytes

i merge the records.ini into the setup.dll and include the setup.dll in innosetup, although im not sure how to "tag" the optional file as such, therefore when i try installing without the optional file the setup asks for it.
How do i make the installer skip the optional file if its not there?
Thanks in advance. :)

Cesar82 20-06-2022 02:54

Quote:

Originally Posted by -tara (Post 497296)
After getting the diskspan output of 2 files (data1.bin,data-optional.bin) and adding both to the records.ini like so:
Code:

[Record1]
Type=FreeArc_Original
Source={src}\data1.bin
Output={app}\
Disk=1
Size=1.924.677.867 bytes

[Record2]
Type=FreeArc_Original
Source={src}\data-optional.bin
Output={app}\
Disk=2
Size=78.614.874 bytes

i merge the records.ini into the setup.dll and include the setup.dll in innosetup, although im not sure how to "tag" the optional file as such, therefore when i try installing without the optional file the setup asks for it.
How do i make the installer skip the optional file if its not there?
Thanks in advance. :)

you can include the additional file as a task and leave it unchecked. but if the task is checked the installer will always ask for the file.

Gehrman 13-07-2022 09:08

Request to add ISExec
 
Hi Cesar82
Is it possible to add ISExec like the example below?

Code:

[Record1]
Type=ISExec
Source={tmp}\SHH_Patch_HI-VU.exe
Param=/Dir={app}
Disk=1
Task=1


Cesar82 13-07-2022 11:34

Quote:

Originally Posted by Gehrman (Post 497606)
Hi Cesar82
Is it possible to add ISExec like the example below?

Code:

[Record1]
Type=ISExec
Source={tmp}\SHH_Patch_HI-VU.exe
Param=/Dir={app}
Disk=1
Task=1


Using the records section I think it would be difficult as the DiskSpan GUI creates the file using the [record#] sections in consecutive order, used in many other installers.

Perhaps something unique to the Light Installer could be implemented in a different section like [Exec#] by manually adding it to the Records.ini itself.

Lord.Freddy 17-08-2022 01:34

Isskin INI code
 
Hi Cesar82, Thank you for the script you made, but i have a problem when adding the skin(cjstyles) with INI code, the skin is not added, So i made some changes:

Code:

#if !defined(StyleFile)
  #define StyleFile "NULL"
#else
  #define StyleParam ""
  #if Pos("|", StyleFile) > 0
    #define StyleParam Trim(Copy(StyleFile, Pos("|",  StyleFile + "|") + 1, Len(StyleFile)))
      #expr StyleParam = StyleParam + ".ini"
    #if (StyleParam != "") && (LowerCase(ExtractFileExt(StyleFile)) == "cjstyles")
      #expr StyleParam = StyleParam + ".ini"
    #endif
    #define StyleFile Trim(Copy(StyleFile, 0, Pos("|",  StyleFile) - 1))
  #endif
  #if (LowerCase(ExtractFileExt(StyleFile)) != "vsf") && (LowerCase(ExtractFileExt(StyleFile)) != "cjstyles") && (LowerCase(ExtractFileExt(StyleFile)) != "she")
    #define StyleFile "NULL"
  #endif
#endif

if you like, add these changes to your Script :)


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

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