Install the Prolog compilers before installing Logtalk

Feedback on Windows installer

Moderator: Paulo Moura

Locked
Paulo Moura
Logtalk developer
Posts: 533
Joined: Sat May 05, 2007 8:35 am
Location: Portugal
Contact:

Install the Prolog compilers before installing Logtalk

Post by Paulo Moura »

Install the back-end Prolog compilers before installing Logtalk. The Logtalk installer uses the Windows registry (and a few common installation directories) to check for installed Prolog compilers. The Logtalk integration shortcuts are only created for the detected Prolog compilers.
Paulo Moura
Logtalk developer

sian
Posts: 1
Joined: Sat May 05, 2012 12:04 pm

Re: Install the Prolog compilers before installing Logtalk

Post by sian »

I have YAP prolog installed, but installer keeps saying it can not find any compatible prolog compiler installed.

OS Windows 7 x64
YAP 6.2.2 x64 (installed to c:\Program Files\Yap64)
The following entry exists in system registry:
HKEY_LOCAL_MACHINE\SOFTWARE\YAP\Prolog64 (home=C:\Program Files\Yap64)

Thanks.

Paulo Moura
Logtalk developer
Posts: 533
Joined: Sat May 05, 2007 8:35 am
Location: Portugal
Contact:

Re: Install the Prolog compilers before installing Logtalk

Post by Paulo Moura »

sian wrote:I have YAP prolog installed, but installer keeps saying it can not find any compatible prolog compiler installed.

OS Windows 7 x64
YAP 6.2.2 x64 (installed to c:\Program Files\Yap64)
The following entry exists in system registry:
HKEY_LOCAL_MACHINE\SOFTWARE\YAP\Prolog64 (home=C:\Program Files\Yap64)
The Logtalk installer uses the following Inno Steup function for detecting YAP:

Code: Select all

function YAPExePath: String;
var
  Home: String;
begin
  if Is64BitInstallMode then
    if RegQueryStringValue(HKLM64, 'Software\YAP\Prolog64\', 'home', Home) then
      Result := Home + '\bin\yap.exe'
    else if RegQueryStringValue(HKLM32, 'Software\YAP\Prolog64\', 'home', Home) then
      Result := Home + '\bin\yap.exe'
    else 
      Result := 'prolog_compiler_not_installed'
  else if RegQueryStringValue(HKLM, 'Software\YAP\Prolog\', 'home', Home) then
    Result := Home + '\bin\yap.exe'
  else
    Result := 'prolog_compiler_not_installed'
end;
It seems that either the Is64BitInstallMode function is returning false or the HKLM64/HKLM32 keys are not aliased to HKLM. Let me try to reproduce the problem here. In any case I will build a new Logtalk installer for you later today to workaround the problem. Thanks for reporting. More later.
Paulo Moura
Logtalk developer

Paulo Moura
Logtalk developer
Posts: 533
Joined: Sat May 05, 2007 8:35 am
Location: Portugal
Contact:

Re: Install the Prolog compilers before installing Logtalk

Post by Paulo Moura »

The problem is indeed that the Is64BitInstallMode function is returning false as Inno Steup also requires a directive explicitly listing the 64 bits architectures for each to run the installer in 64 bits mode. Adding this directive allows YAP to be detected but prevents SWI-Prolog for being detected. Thus, I removed the call to the Is64BitInstallMode function and changed the code for YAP detection allowing both SWI-Prolog and YAP to be detected. I have mailed you a link to a new installer.
Paulo Moura
Logtalk developer

Paulo Moura
Logtalk developer
Posts: 533
Joined: Sat May 05, 2007 8:35 am
Location: Portugal
Contact:

Re: Install the Prolog compilers before installing Logtalk

Post by Paulo Moura »

The bug fix is already committed in the Logtalk Subversion server (r6559).
Paulo Moura
Logtalk developer

Locked