|
#1531
|
|||
|
|||
|
^^
I don't see why you wouldn't be able to put an Exec2 leading to a batch file before ISDone (or whatever implementation you use to bridge Inno Setup and FreeArc) starts. A suggestion, Paste this into a batch file and save it as disable_path_limit.bat: Code:
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v "LongPathsEnabled" /t REG_DWORD /d 1 /f Code:
Source: disable_path_limit.bat; DestDir: {tmp}; Flags: dontcopy
Code:
ExtractTemporaryFile('disable_path_limit.bat');
Exec2(ExpandConstant('{tmp}\disable_path_limit.bat'),'',false);
DeleteFile(ExpandConstant('{tmp}\disable_path_limit.bat'));
Note that this batch file requires admin permissions so providing the installer is running in an elevated state, the script should face no issues. |
| Sponsored Links |
|
#1532
|
||||
|
||||
|
Quote:
UPDATE: It seems that FreeArc doesn't like Long Paths regardless of the registry, looks like I'll have to resign myself to using a shorter default folder name. Last edited by L33THAK0R; 12-01-2023 at 00:36. |
|
#1533
|
|||
|
|||
|
Good morning everybody! Is there any way to add a check box in setup.exe for unnecessary .bin files (e.g. soundtracks, manuals, .png images, bonus content in general) and the corresponding instructions in archives.ini file for inno setup? Which are the needed instructions for it? Thank you so much!
|
|
#1534
|
||||
|
||||
|
Does anyone know how to change the border cursor of an EDIT?
See the attached file. I would like the cursor when entering the edit to also display the "Hand" cursor and not the "Arrow" cursor. P.S: If you disable the Edit border, this cursor is not displayed. Although the attachment file is created in delphi I would like a solution that I can use in Inno Setup. Thanks! |
|
#1535
|
||||
|
||||
|
Code:
#define public RequiredSpace "1000"
#define MbToBytes(str *Value) \
Local[1] = MbToBytes((Value)), \
Local[1]
[Setup]
AppName=111
AppVersion=0.0
AppPublisher=bbbbb
DefaultDirName={autopf}\111
ExtraDiskSpaceRequired={#MbToBytes(RequiredSpace)}
[_Code]
function MbToBytes(Value: Integer): Integer;
begin
Result := (Value * (1024 * 1024));
end;
__________________
¤ Life good be a Dream ¤ Last edited by Lord.Freddy; 10-04-2023 at 07:55. |
|
#1536
|
||||
|
||||
|
You cannot mix ISPP and CODE section codes.
Try like this: Code:
#define public RequiredSpace "1000"
#define MbToBytes(str Value) \
Int(Value, 0) * 1024 * 1024
[Setup]
AppName=111
AppVersion=0.0
AppPublisher=bbbbb
DefaultDirName={autopf}\111
ExtraDiskSpaceRequired={#MbToBytes(RequiredSpace)}
|
| The Following User Says Thank You to Cesar82 For This Useful Post: | ||
Lord.Freddy (10-04-2023) | ||
|
#1537
|
||||
|
||||
|
Quote:
Code:
[_Code] const IDC_MYCURSOR = 100; // Custom cursor ID var MyCursor: HCURSOR; function LoadCursorFromFile(lpFileName: string): HCURSOR; external '[email protected] stdcall'; procedure InitializeWizard; begin MyCursor := LoadCursorFromFile('C:\Path\To\MyCursor.cur'); end; procedure CurPageChanged(CurPageID: Integer); var EditHandle: HWND; begin if CurPageID = wpSelectDir then begin EditHandle := WizardForm.DirEdit.Handle; SendMessage(EditHandle, EM_SETCURSOR, 0, LPARAM(MyCursor)); end; end;
__________________
¤ Life good be a Dream ¤ |
|
#1538
|
||||
|
||||
|
does anyone know how to convert this following Delphi code into InnoSetup?
alternatively, if you have any other suggestions on how to accomplish this in a similar manner, please feel free to share your thoughts. thanks. Code:
uses
Winapi.Windows, System.SysUtils;
type
TFuncX = procedure(const Var1: Integer); cdecl;
TFuncY = function(const Count: Longint; var Str: AnsiString): Integer; cdecl;
TFuncZ = procedure(const Str1, Str2: WideString); cdecl;
TFuncCommon = record
case Integer of
0: (FuncX: TFuncX);
1: (FuncY: TFuncY);
2: (FuncZ: TFuncZ);
end;
function MySafeLoadLibFunc(const LibName, FuncName: WideString;
var Func: TFuncCommon; var ErrorStr: WideString): Cardinal;
begin
ErrorStr := '';
Result := LoadLibraryW(PWideChar(LibName));
if Result > 32 then begin
try
case Integer(Func) of // Get the address of the function by name
0: Func.FuncX := GetProcAddress(Result, PWideChar(FuncName));
1: Func.FuncY := GetProcAddress(Result, PWideChar(FuncName));
2: Func.FuncZ := GetProcAddress(Result, PWideChar(FuncName));
end;
if not Assigned(Pointer(Integer(Func))) then begin
ErrorStr := 'Could not find function "' + FuncName + '" in library "' + LibName + '"';
Result := 0;
end;
except
on E: Exception do begin
ErrorStr := 'Error loading function "' + FuncName + '" from library "' + LibName + '": ' + E.Message;
Result := 0;
end;
end;
end else ErrorStr := 'Could not load library "' + LibName + '"';
if ErrorStr = '' then ErrorStr := 'empty';
end;
Code:
USAGE:
procedure Test;
var
MyFunc: TFuncCommon;
ErrorStr: WideString;
LibModule: Cardinal;
TmpStr: AnsiString;
begin
try
LibModule := MySafeLoadLibFunc('MyDll.dll', 'MyFunc3', MyFunc, ErrorStr);
if LibModule > 32 then
begin
//MyFunc.FuncX(69); // Call function FuncX
//MyFunc.FuncY(47, TmpStr); // Call function FuncY
MyFunc.FuncZ('Hello', 'World'); // Call function FuncZ
FreeLibrary(LibModule); // Free MyDll.dll
end
else WriteLn(ErrorStr);
except
on E: Exception do WriteLn(E.ClassName, ': ', E.Message);
end;
end;
Code:
MyDll:
library MyDll;
uses
System.SysUtils, Winapi.Windows;
{$R *.res}
function ShowMsg(const Msg: WideString; Caption: WideString = 'A Msg From MyDll.dll'): Integer; cdecl;
begin
Result := MessageBoxW(0, PWideChar(Msg), PWideChar(Caption), MB_OK);
end;
procedure MyFunc1(const Var1: Integer); cdecl;
begin
ShowMsg('[MyFunc1] : Var1 = ' + IntToStr(Var1));
end;
function MyFunc2(const Count: Longint; var Str: AnsiString): Integer; cdecl;
begin
Str := 'BLACKFIRE';
Result := -10;
ShowMsg('[MyFunc2] : Count = ' + IntToStr(Count));
end;
procedure MyFunc3(const Str1, Str2: WideString); cdecl;
begin
ShowMsg('[MyFunc3] : Str1 = ' + Str1 + ', Str2 = ' + Str2);
end;
exports MyFunc1, MyFunc2, MyFunc3;
begin
end.
|
|
#1539
|
||||
|
||||
|
Code:
function CreateFileMapping( File: Cardinal; Attributes: Cardinal; Protect: Cardinal; MaximumSizeHigh: Cardinal; MaximumSizeLow: Cardinal; Name: PAnsiChar): Cardinal; external '[email protected] stdcall'; function MapViewOfFile( FileMappingObject: THandle; DesiredAccess: Cardinal; FileOffsetHigh: Cardinal; FileOffsetLow: Cardinal; NumberOfBytesToMap: Cardinal): PChar; external '[email protected] stdcall'; File mapping is a technique that allows you to map the contents of a file into the virtual memory space of a process. This allows you to access the contents of the file as if it were in memory, rather than on disk. There are several benefits to using file mapping: • Performance: File mapping can improve the performance of file I/O operations by reducing the number of disk accesses. When you map a file into memory, the operating system can use its virtual memory management mechanisms to cache the contents of the file in memory. This means that subsequent accesses to the file can be satisfied from memory, rather than requiring a disk access. • Concurrency: File mapping allows multiple processes to access the same file concurrently. When multiple processes map the same file into their virtual memory space, they can all access the contents of the file simultaneously. This can be useful for inter-process communication and data sharing. • Ease of use: File mapping allows you to access the contents of a file using memory-mapped I/O operations, rather than traditional file I/O operations. This can make it easier to work with files, as you can use pointer arithmetic and other memory-based operations to manipulate the contents of the file. Overall, file mapping is a powerful technique that can improve the performance and ease-of-use of file I/O operations. It is widely used in many different types of applications and is supported by most modern operating systems. Last edited by Junior53; 07-06-2023 at 17:37. Reason: I found the answer myself :) |
|
#1540
|
|||
|
|||
|
error everytime
Hi
In last days I used method (xt_zlib+srep_new:3+LOLZ_NORMAL) DiskSpan In thes games Call of Duty Ghosts Call of Duty Black Ops 4 A Plague Tale Requiem but every time after click on install this what come to me what is the wrong that I did? |
|
#1541
|
||||
|
||||
|
Quote:
Make sure the selected installation path is not too long. Try installing in a folder like "D:\Games\Call of Duty Ghosts" It also cannot contain special characters in the installation path. |
| The Following User Says Thank You to Cesar82 For This Useful Post: | ||
IRAQIGHOST (10-05-2023) | ||
|
#1542
|
||||
|
||||
|
My question is not about INNO but batch. Since batch is not something I deal everyday with, I need some help here. I don't want to open a new topic for this.
I have some files which I extract with a tool. The problem is that the extracted folders have the exact name as the files. For example Code:
File1.abc > Folder1.abc File2.abc > Folder2.abc ... I already tried something like this but didn't work. Code:
for /d %%i in (*.abc) do ren "%%~i" *
__________________
Haters gonna hate
|
|
#1543
|
||||
|
||||
|
Quote:
Code:
for /d %%i in (*.abc) do ren "%%~i" "%%~ni" |
| The Following User Says Thank You to Cesar82 For This Useful Post: | ||
KaktoR (18-05-2023) | ||
|
#1544
|
||||
|
||||
|
Thanks this works
__________________
Haters gonna hate
|
|
#1545
|
|||
|
|||
|
Hi all !
How can i get the installed app's path to 'DefaultDirName' ? I have a reg-entry : Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\ Windows\CurrentVersion\Uninstall\MyApp] "InstallLocation"="D:\\MyProgram" Theoretically in InnoSetup's [setup] section DefaultDirName={reg:HKLM64\HKEY_LOCAL_MACHINE\SOFT WARE\Microsoft\Windows\CurrentVersion\Uninstall\My App, InstallLocation} should do the job. But no... Any idea ? Note : (there are "spaces" in the example paths,etc. Its only visible here,dont know why. I my script they doesnt exists. No matter.) |
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup | REV0 | Conversion Tutorials | 129 | 21-05-2021 05:51 |
| INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup | REV0 | Conversion Tutorials | 51 | 26-03-2015 06:57 |
| Frequently Asked Questions | Joe Forster/STA | PC Games - Frequently Asked Questions | 0 | 29-11-2005 09:48 |