Turecko-americká vycházející matematická hvězda Levent Alpöge ze společnosti Anthropic vyvolal pozdvižení oznámením (PDF), že s pomocí superinteligence Claude od Antropicu dokázal vyřešit jeden ze sedmi největších matematických problémů tisíciletí, slavnou Riemannovu hypotézu (prvočísla se mezi čísly objevují zdánlivě nepravidelně, hypotéza tvrdí, že za jejich rozmístěním je určitý řád). Svůj důkaz uvolnil jako open-source
… více »Skotský vývojář Mike Lothian pozastavil vývoj svého otevřeného ovladače Vino (nedostupné) pro dokovací stanice DisplayLink poté, co mu Synaptics v reakci na žádost o pomoc pohrozil žalobou kvůli údajnému porušování patentů. Firma nejprve předložila seznam 125 patentů bez specifikace, které konkrétně měl ovladač porušovat, a následně požadovala 25 tisíc dolarů za náklady na jejich přiřazení ke kódu s hrozbou, že se tato částka bude
… více »[Code]
////////// zaciatok psvince.dll //////////
const
ProgramName = 'notepad';
ProgramExeName = 'notepad.exe';
ProgramRunningOnInstallMessage = ProgramName + ' is currently running. ' + #13 + #13 + 'Please close it and then click on ''Retry'' to proceed with the installation.';
InstallationCanceledMessage = 'The installation was canceled.';
ProgramRunningOnUninstallMessage = ProgramName + ' is currently running. ' + #13 + #13 + 'Please close it and then click on ''Retry'' to proceed.';
UninstallationCanceledMessage = 'The uninstallation process was canceled.';
// IsModuleLoadedI - function to call at install time
// Also added setuponly flag
function IsModuleLoadedI(modulename: AnsiString ): Boolean;
external 'IsModuleLoaded@files:psvince.dll stdcall setuponly';
// IsModuleLoadedU - function to call at uninstall time
// Also added uninstallonly flag
function IsModuleLoadedU(modulename: AnsiString ): Boolean;
external 'IsModuleLoaded@{app}\psvince.dll stdcall uninstallonly' ;
function IsModuleLoaded( modulename: String; isUninstallation: Boolean ): Boolean;
begin
if isUninstallation then
Result := IsModuleLoadedU( modulename )
else
Result := IsModuleLoadedI( modulename );
end;
//------------------------------------------------------------------------------
// Prompt the user to close a program that's still running.
// Finish when the executable is closed or the user cancels the process.
// -> message : A message to show the user to prompt them to close
// -> isUninstallation : Whether this is an uninstallation (to call the right function.)
// <- True if the program was closed (or was not running),
// False if the user clicked on the Cancel button and didn't close the program
function PromptUntilProgramClosedOrInstallationCanceled(message: String; isUninstallation: Boolean ): Boolean;
var
ButtonPressed : Integer;
begin
ButtonPressed := IDRETRY;
// Check if the program is running or if the user has pressed the cancel button
while IsModuleLoaded( ProgramExeName, isUninstallation ) and ( ButtonPressed <> IDCANCEL ) do
begin
ButtonPressed := MsgBox( message , mbError, MB_RETRYCANCEL );
end;
// Has the program been closed?
Result := Not IsModuleLoaded( ProgramExeName, isUninstallation );
end;
//------------------------------------------------------------------------------
function InitializeSetup(): Boolean;
begin
Result := PromptUntilProgramClosedOrInstallationCanceled( ProgramRunningOnInstallMessage, False );
if Not Result then
begin
MsgBox( InstallationCanceledMessage, mbInformation, MB_OK );
end;
end;
//------------------------------------------------------------------------------
function InitializeUninstall(): Boolean;
begin
Result := PromptUntilProgramClosedOrInstallationCanceled( ProgramRunningOnUninstallMessage, True );
// Unload the DLL, otherwise the dll psvince is not deleted
UnloadDLL(ExpandConstant('{app}\psvince.dll'));
if not Result then
begin
MsgBox( UninstallationCanceledMessage, mbInformation, MB_OK );
end;
end;
////////// koniec psvince.dll //////////
teraz by som potreboval, aby premenné ProgramRunningOnInstallMessage, InstallationCanceledMessage sa naplnili textom jazykovej mutácie, ktorú si užívateľ vybral, t.j. povedzme stringom UninstallAppRunningError z slovak.isl (jazyky mám v inno scripte nadefinované). ako mám pozmeniť v kóde vyššie tú časť :???
const
ProgramRunningOnInstallMessage = ProgramName + ' is currently running. ' + #13 + #13 + 'Please close it and then click on ''Retry'' to proceed with the installation.';
prosím o názorný príklad, lebo pascal vôbec neovládam
Řešení dotazu:
Tiskni
Sdílej: