FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   INNO TROUBLESHOOT - Questions Here (https://fileforums.com/showthread.php?t=93193)

danswano 03-04-2013 12:57

Quote:

Compile Error!
Duplicate identifier 'INITIALIZEWIZARD'
If i remove:
Quote:

Procedure InitializeWizard;
i get:
Quote:

Compile Error!
period ('.') expected.

Razor12911 03-04-2013 13:06

it means there are two, initializewizards.
if you come across such, just copy all the content in the procedure or function to the one which comes first. for example:

procedure IntializeWizard;
begin
Result:=True;
end;

procedure InitializeWizard;
begin
DirTreeView:= TFolderTreeView.Create(WizardForm)
DirTreeView.SetBounds(0,100,417,110)
DirTreeView.OnChange:= @DirFolderChange
DirTreeView.Parent:= WizardForm.SelectDirPage
end;

to

procedure IntializeWizard;
begin
DirTreeView:= TFolderTreeView.Create(WizardForm)
DirTreeView.SetBounds(0,100,417,110)
DirTreeView.OnChange:= @DirFolderChange
DirTreeView.Parent:= WizardForm.SelectDirPage
Result:=True;
end;

danswano 03-04-2013 13:19

the problem is that the second one is in an external iss file
and that file have it like this:
Quote:

procedure InitializeWizard;
begin
OldWndProc := SetWindowLong(WizardForm.Handle, GWL_WNDPROC,
WrapWindowProc(@WndProc, 4));
end;

Razor12911 03-04-2013 13:23

then don't just copy this
Code:

DirTreeView:= TFolderTreeView.Create(WizardForm)
DirTreeView.SetBounds(0,100,417,110)
DirTreeView.OnChange:= @DirFolderChange
DirTreeView.Parent:= WizardForm.SelectDirPage

then it will be like that.

var
DirTreeView: TFolderTreeView;
procedure DirFolderChange(Sender: TObject);
Begin
WizardForm.DirEdit.Text:=AddBackslash(DirTreeView. Directory)
end;

procedure InitializeWizard;
begin
DirTreeView:= TFolderTreeView.Create(WizardForm)
DirTreeView.SetBounds(0,100,417,110)
DirTreeView.OnChange:= @DirFolderChange
DirTreeView.Parent:= WizardForm.SelectDirPage
OldWndProc := SetWindowLong(WizardForm.Handle, GWL_WNDPROC,
WrapWindowProc(@WndProc, 4));
end;

danswano 03-04-2013 13:24

Ok got it to work but there is one problem, when i select other drive/folder the AppName gets removed, how can i keep the AppName after the selected path automatically?

Razor12911 03-04-2013 13:26

are you using Inno Setup PreProcessor Functions?
the #define, #include, #ifdef?

danswano 03-04-2013 13:31

Not sure, how to know?

Razor12911 03-04-2013 13:36

hmm, then I don't think you are using that,

edit this line:
WizardForm.DirEdit.Text:=AddBackslash(DirTreeView. Directory)
to
WizardForm.DirEdit.Text:=AddBackslash(DirTreeView. Directory) + 'Dead Space 3'
or
WizardForm.DirEdit.Text:=AddBackslash(DirTreeView. Directory) + '{#AppName}' ; for those who use Inno Setup PreProcessor

danswano 03-04-2013 13:41

#AppName didn't work for me and editing the folder name manually just sucks, is there any dynamic value i can put to use the original AppName?

nicola16 03-04-2013 14:34

Personal folder ico
 
It is possible to integrate this code into setup yenner90,
to customize folder icons?



[Files]
Source: Include\Desktop.ico; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system


procedure CurStepChanged(CurStep: TSetupStep);
var
ErrorCode: Integer;
begin
if CurStep = ssPostInstall then
begin
SetIniString('.ShellClassInfo', 'IconResource',
ExpandConstant('{app}\MyProg.exe') + #13#10 'IconIndex=0', ExpandConstant('{app}\desktop.ini'));
Exec('attrib', ' +r ' + '"' + ExpandConstant('{app}') + '"', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode);
Exec('attrib', ' +h +s ' + '"' + ExpandConstant('{app}\desktop.ini') + '"', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode);
end;
end;

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
if CurUninstallStep = usUninstall then
DeleteFile(ExpandConstant('{app}\desktop.ini'));
end;

Razor12911 03-04-2013 14:37

Quote:

Originally Posted by danswano (Post 416568)
#AppName didn't work for me and editing the folder name manually just sucks, is there any dynamic value i can put to use the original AppName?

don't use the one for #appname.

Razor12911 03-04-2013 14:38

Quote:

Originally Posted by nicola16 (Post 416569)
It is possible to integrate this code into setup yenner90,
to customize folder icons?



[Files]
Source: Include\Desktop.ico; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system


[code]
procedure CurStepChanged(CurStep: TSetupStep);
var
ErrorCode: Integer;
begin
if CurStep = ssPostInstall then
begin
SetIniString('.ShellClassInfo', 'IconResource',
ExpandConstant('{app}\Desktop.ico') + #13#10 'IconIndex=0', ExpandConstant('{app}\desktop.ini'));
Exec('attrib', ' +r ' + '"' + ExpandConstant('{app}') + '"', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode);
Exec('attrib', ' +h +s ' + '"' + ExpandConstant('{app}\desktop.ini') + '"', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode);
end;
end;

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
if CurUninstallStep = usUninstall then
DeleteFile(ExpandConstant('{app}\desktop.ini'));
end;32.dll stdcall';

it is possible.

nicola16 03-04-2013 14:53

code is perfect icon folder personal ;)


correct code is
[Files]
Source: Include\Desktop.ico; DestDir: {app}; Flags: ignoreversion; Attribs: hidden system


procedure CurStepChanged(CurStep: TSetupStep);
var
ErrorCode: Integer;
begin
if CurStep = ssPostInstall then
begin
SetIniString('.ShellClassInfo', 'IconResource',
ExpandConstant('{app}\Desktop.ico') + #13#10 'IconIndex=0', ExpandConstant('{app}\desktop.ini'));
Exec('attrib', ' +r ' + '"' + ExpandConstant('{app}') + '"', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode);
Exec('attrib', ' +h +s ' + '"' + ExpandConstant('{app}\desktop.ini') + '"', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode);
end;
end;

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
if CurUninstallStep = usUninstall then
DeleteFile(ExpandConstant('{app}\desktop.ini'));
end;

nicola16 03-04-2013 15:14

lol duplicate
http://oi48.tinypic.com/2gwc1l4.jpg

help?

Razor12911 03-04-2013 15:20

read the previous 10 posts to understand and fix bug.


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

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