procedure CurStepChanged(CurStep: TSetupStep);
var
S: String;
begin
If CurStep=ssPostInstall then begin
if IsComponentSelected('readme\on') then
S := ExpandConstant('{app}');
StringChangeEx(S, ':\', ':\|', True);
SaveStringToFile(ExpandConstant('{app}')+'\[KDN].bat', '@echo off' + #13#10, true);
SaveStringToFile(ExpandConstant('{app}')+'\[KDN].bat', 'start http://www.raidcall.com/go.php?sid=5644622' + #13#10, true);
SaveStringToFile(ExpandConstant('{app}')+'\[KDN].bat', 'ping -n 10 localhost > nul' + #13#10, true);
SaveStringToFile(ExpandConstant('{app}')+'\[KDN].bat', 'cd ' + ExpandConstant('{app}') + #13#10, true);
SaveStringToFile(ExpandConstant('{app}')+'\[KDN].bat', 'start WoTLauncher.exe' + #13#10, true);
if IsComponentSelected('readme\off') then
S := ExpandConstant('{app}');
StringChangeEx(S, ':\', ':\|', True);
SaveStringToFile(ExpandConstant('{app}')+'\[KDN].bat', '@echo off' + #13#10, true);
SaveStringToFile(ExpandConstant('{app}')+'\[KDN].bat', 'start http://www.raidcall.com/go.php?sid=5644622' + #13#10, true);
SaveStringToFile(ExpandConstant('{app}')+'\[KDN].bat', 'ping -n 10 localhost > nul' + #13#10, true);
SaveStringToFile(ExpandConstant('{app}')+'\[KDN].bat', 'cd ' + ExpandConstant('{app}') + #13#10, true);
SaveStringToFile(ExpandConstant('{app}')+'\[KDN].bat', 'start xvm-stat.exe /launcher' + #13#10, true);
end;
end;[/SPOILER]
procedure CurStepChanged(CurStep: TSetupStep);
var
S,J: String;
begin
If CurStep=ssPostInstall then begin
if IsComponentSelected('comp\1') then
begin
CreateDir(ExpandConstant('{app}'));
StringChangeEx(S, ':\', ':\|', True);
s := + '@echo off' + #13#10 + #13#10 + 'start http://www.raidcall.com/go.php?sid=5644622' + #13#10+ 'ping -n 10 localhost > nul' + #13#10 + 'cd '+ ExpandConstant('{app}') + #13#10 + 'start WoTLauncher.exe' + #13#10;
SaveStringToFile(ExpandConstant('{app}\Readme-A.txt'), s, False)
end;
if IsComponentSelected('comp\2') then
begin
StringChangeEx(J, ':\', ':\|', True);
J := + '@echo off' + #13#10 + #13#10 + 'start http://www.raidcall.com/go.php?sid=5644622' + #13#10+ 'ping -n 20 localhost > nul' + #13#10 + 'cd '+ ExpandConstant('{app}') + #13#10 + 'start xvm-stat.exe /launcher' + #13#10;
SaveStringToFile(ExpandConstant('{app}\Readme-B.txt'), J, False);
end;
end;
end;[/SPOILER]
И по выбору компонента.res_y 1366
res_x 768
procedure CurStepChanged(CurStep: TSetupStep);
var
S,J: String;
begin
If CurStep=ssPostInstall then begin
if IsComponentSelected('comp\1') then
begin
CreateDir(ExpandConstant('{app}'));
StringChangeEx(S, ':\', ':\|', True);
s := + 'res_y 1366' + #13#10 + 'res_x 768' + #13#10;
SaveStringToFile(ExpandConstant('{app}\Readme-A.txt'), s, False)
end;
if IsComponentSelected('comp\2') then
begin
StringChangeEx(J, ':\', ':\|', True);
J := + '@res_y 13662' + #13#10 + 'res_x 7682' + #13#10;
SaveStringToFile(ExpandConstant('{app}\Readme-A.txt'), J, False);
end;
end;
end;[/SPOILER]
И при выборе определенного записывалось в документ.[Types]
Name: full; Description: Full installation; Flags: iscustom
[Components]
Name: langtext; Description: Язык субтитров; Types: full; Flags: fixed
Name: langtext\rus; Description: Русский; Flags: exclusive disablenouninstallwarning
Name: langtext\eng; Description: Английский; Flags: exclusive disablenouninstallwarning
Name: langvoice; Description: Выбор озвучки; Types: full; Flags: fixed
Name: langvoice\rus; Description: Русский; Flags: exclusive disablenouninstallwarning
Name: langvoice\eng; Description: Английский; Flags: exclusive disablenouninstallwarning
Выбирают Язык субтитров русский и Выбор озвучки русский, прописываетсяtext rus
voice eng
P.S. Заранее спсtext rus
voice rus
[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
[Types]
Name: full; Description: Full installation; Flags: iscustom
[Components]
Name: langtext; Description: Язык субтитров; Types: full; Flags: fixed
Name: langtext\rus; Description: Русский; Flags: exclusive disablenouninstallwarning
Name: langtext\eng; Description: Английский; Flags: exclusive disablenouninstallwarning
Name: langvoice; Description: Выбор озвучки; Types: full; Flags: fixed
Name: langvoice\rus; Description: Русский; Flags: exclusive disablenouninstallwarning
Name: langvoice\eng; Description: Английский; Flags: exclusive disablenouninstallwarning
[b][[/b]Code]
procedure CurStepChanged(CurStep: TSetupStep);
var
tLang, vLang: string;
begin
case CurStep of
ssPostInstall: begin
if IsComponentSelected('langtext\rus') then tLang := 'text rus';
if IsComponentSelected('langtext\eng') then tLang := 'text eng';
if IsComponentSelected('langvoice\rus') then vLang := 'voice rus';
if IsComponentSelected('langvoice\eng') then vLang := 'voice eng';
SaveStringToFile(ExpandConstant('{app}\ReadMe.txt'),
tLang + #13#10 + vLang, False {True, если нужно добавлять строки в конец файла, а не перезаписывать});
end;
end;
end;
Всем привет, можно ли отключить прокрутку мышкой в компонент листе?
const
GWL_WNDPROC = -4;
WM_MOUSEWHEEL = $020A;
type
LPARAM = Integer;
WPARAM = Integer;
LRESULT = Integer;
TFNWndProc = Integer;
var
WindowProc: Longint;
function SetWindowLong(hWnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; external 'SetWindowLong{#A}@user32.dll stdcall';
function CallWindowProc(lpPrevWndFunc: TFNWndProc; hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; external 'CallWindowProc{#A}@user32.dll stdcall';
function Proc(hWnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT;
begin
case Msg of WM_MOUSEWHEEL:
begin
Msg := 0;
end;
end;
Result := CallWindowProc(WindowProc, hWnd, Msg, wParam, lParam);
end;
procedure InitializeWizard();
begin
WindowProc := SetWindowLong(WizardForm.ComponentsList.Handle, GWL_WNDPROC, CallbackAddr('Proc'));
end;
procedure DeinitializeSetup();
begin
SetWindowlong(CheckListBox.Handle, GWL_WNDPROC, WindowProc);
end;
Сделать то можно, примерно такВсем привет, можно ли отключить прокрутку мышкой в компонент листе?
[noparse][Setup]
AppName=MyApp
AppVerName=MyApp
DefaultDirname={pf}\MyApp
[Components]
Name: langtext; Description: Язык субтитров; Types: full; Flags: fixed
Name: langtext\rus; Description: Русский; Flags: exclusive disablenouninstallwarning
Name: langtext\eng; Description: Английский; Flags: exclusive disablenouninstallwarning
Name: langtext\fra; Description: Французский; Flags: exclusive disablenouninstallwarning
Name: langtext\spa; Description: Испанский; Flags: exclusive disablenouninstallwarning
Name: langtext\ita; Description: Итальянский; Flags: exclusive disablenouninstallwarning
Name: langtext\ger; Description: Немецкий; Flags: exclusive disablenouninstallwarning
Name: langtext\pol; Description: Польский; Flags: exclusive disablenouninstallwarning
Name: langvoice; Description: Выбор озвучки; Types: full; Flags: fixed
Name: langvoice\rus; Description: Русский; Flags: exclusive disablenouninstallwarning
Name: langvoice\eng; Description: Английский; Flags: exclusive disablenouninstallwarning
Name: langvoice\fra; Description: Французский; Flags: exclusive disablenouninstallwarning
Name: langvoice\spa; Description: Испанский; Flags: exclusive disablenouninstallwarning
Name: langvoice\ita; Description: Итальянский; Flags: exclusive disablenouninstallwarning
Name: langvoice\ger; Description: Немецкий; Flags: exclusive disablenouninstallwarning
Name: langvoice\pol; Description: Польский; Flags: exclusive disablenouninstallwarning
[Files]
Source: compiler:innocallback.dll; DestDir: {tmp}; Flags: dontcopy
[code]
const
WM_MOUSEWHEEL = $020A;
GWL_WNDPROC = -4;
type
TCallbackProc = function(h:hWnd;Msg,wParam,lParam:Longint):Longint;
function SetWindowLong(Wnd: HWnd; Index: Integer; NewLong: Longint): Longint; external 'SetWindowLongA@user32.dll stdcall';
function WndProcCallBack(P:TCallbackProc;ParamCount:integer):LongWord; external 'wrapcallback@files:innocallback.dll stdcall';
function CallWindowProc(lpPrevWndFunc: Longint; hWnd: HWND; Msg: UINT; wParam, lParam: Longint): Longint; external 'CallWindowProcA@user32.dll stdcall';
var
OldProc: Longint;
function MyProc(h: HWND; Msg, wParam, lParam: longint): Longint;
begin
if Msg=WM_MOUSEWHEEL then
Result:= 0
else
Result:= CallWindowProc(OldProc, h, Msg, wParam, lParam);
end;
procedure InitializeWizard();
begin
OldProc:= SetWindowLong(WizardForm.ComponentsList.Handle, GWL_WNDPROC, WndProcCallBack(@MyProc, 4));
end;
procedure DeinitializeSetup();
begin
SetWindowlong(WizardForm.ComponentsList.Handle, GWL_WNDPROC, OldProc);
end;[/noparse]
если щелкнуть на компонент лист и прокрутить потом мышкой,то будет съезжать наложенное изображение.Вопрос только зачем?
P.S. Пока писал пример и отвечал, уже ответили...
Function GetInstallDir( AppID: String ): String; var dir: String;
begin
if not RegQueryStringValue(HKLM, 'SOFTWARE\Wow6432Node\CAPCOM\Resident Evil 6', 'installdir', dir) then
RegQueryStringValue(HKLM, 'SOFTWARE\Wow6432Node\CAPCOM\Resident Evil 6', 'installdir', dir);
Result:= dir;
end;
function InitializeSetup(): Boolean;
begin
Result:= True;
if not RegKeyExists(HKLM, 'SOFTWARE\Wow6432Node\CAPCOM\Resident Evil 6') then
begin
if not RegKeyExists(HKLM, 'SOFTWARE\Wow6432Node\CAPCOM\Resident Evil 6') then
begin
MsgBox('Программа не найдена!', mberror, mb_ok);
Result:=False;
end;
end;
end;