2024-10-08 00:15:37 +02:00
|
|
|
#define MyAppName "LOLLMS"
|
2024-10-08 00:33:55 +02:00
|
|
|
#define MyAppVersion "13.0"
|
2024-10-08 00:15:37 +02:00
|
|
|
#define MyAppPublisher "ParisNeo"
|
|
|
|
#define MyAppURL "https://github.com/ParisNeo/lollms-webui"
|
|
|
|
|
2024-10-07 23:51:35 +02:00
|
|
|
[Setup]
|
2024-10-08 00:15:37 +02:00
|
|
|
AppId={{LOLLMS-INSTALLER}}
|
|
|
|
AppName={#MyAppName}
|
|
|
|
AppVersion={#MyAppVersion}
|
|
|
|
AppPublisher={#MyAppPublisher}
|
|
|
|
AppPublisherURL={#MyAppURL}
|
|
|
|
AppSupportURL={#MyAppURL}
|
|
|
|
AppUpdatesURL={#MyAppURL}
|
2024-10-08 00:33:55 +02:00
|
|
|
DefaultDirName={userpf}\{#MyAppName}
|
2024-10-08 00:15:37 +02:00
|
|
|
DefaultGroupName={#MyAppName}
|
|
|
|
AllowNoIcons=yes
|
|
|
|
LicenseFile=LICENSE.txt
|
|
|
|
OutputDir=.
|
2024-10-08 00:33:55 +02:00
|
|
|
OutputBaseFilename=lollms_setup
|
2024-10-08 00:15:37 +02:00
|
|
|
Compression=lzma
|
|
|
|
SolidCompression=yes
|
|
|
|
WizardStyle=modern
|
|
|
|
PrivilegesRequired=lowest
|
2024-10-08 00:33:55 +02:00
|
|
|
DisableProgramGroupPage=auto
|
2024-10-08 00:15:37 +02:00
|
|
|
|
|
|
|
[Languages]
|
|
|
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
2024-10-07 23:51:35 +02:00
|
|
|
|
2024-10-08 00:33:55 +02:00
|
|
|
[Tasks]
|
|
|
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
|
|
|
|
2024-10-07 23:51:35 +02:00
|
|
|
[Files]
|
2024-10-08 00:33:55 +02:00
|
|
|
Source: "lollmsenv_installer.bat"; DestDir: "{app}"; Flags: ignoreversion
|
2024-10-08 00:15:37 +02:00
|
|
|
Source: "LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
|
2024-10-07 23:51:35 +02:00
|
|
|
|
2024-10-08 00:33:55 +02:00
|
|
|
[Icons]
|
|
|
|
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\lollms.bat"
|
|
|
|
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\lollms.bat"; Tasks: desktopicon
|
2024-10-07 23:51:35 +02:00
|
|
|
|
2024-10-08 00:15:37 +02:00
|
|
|
[Run]
|
2024-10-08 00:33:55 +02:00
|
|
|
Filename: "{app}\lollmsenv_installer.bat"; Parameters: "--dir ""{app}\lollmsenv"" -y"; StatusMsg: "Installing LollmsEnv..."; Flags: runhidden
|
|
|
|
Filename: "{app}\lollmsenv\bin\lollmsenv.bat"; Parameters: "create-env lollms_env"; StatusMsg: "Creating Python environment..."; Flags: runhidden
|
|
|
|
Filename: "{app}\lollmsenv\envs\lollms_env\Scripts\activate.bat"; StatusMsg: "Activating Python environment..."; Flags: runhidden
|
|
|
|
Filename: "git"; Parameters: "clone --depth 1 --recurse-submodules https://github.com/ParisNeo/lollms-webui.git ""{app}\lollms-webui"""; StatusMsg: "Cloning LOLLMS repository..."; Flags: runhidden
|
|
|
|
Filename: "{app}\lollmsenv\envs\lollms_env\Scripts\python.exe"; Parameters: "-m pip install -r ""{app}\lollms-webui\requirements.txt"""; StatusMsg: "Installing Python requirements..."; Flags: runhidden
|
|
|
|
Filename: "{app}\lollmsenv\envs\lollms_env\Scripts\python.exe"; Parameters: "-m pip install -e ""{app}\lollms-webui\lollms_core"""; StatusMsg: "Installing LOLLMS core..."; Flags: runhidden
|
2024-10-08 00:15:37 +02:00
|
|
|
|
|
|
|
[Code]
|
2024-10-07 23:51:35 +02:00
|
|
|
var
|
2024-10-08 00:15:37 +02:00
|
|
|
BindingPage: TInputOptionWizardPage;
|
|
|
|
|
|
|
|
procedure InitializeWizard;
|
2024-10-07 23:51:35 +02:00
|
|
|
begin
|
2024-10-08 00:15:37 +02:00
|
|
|
BindingPage := CreateInputOptionPage(wpSelectDir,
|
2024-10-08 00:33:55 +02:00
|
|
|
'Select Binding', 'Choose the default binding to install',
|
|
|
|
'Please select one of the following bindings:',
|
2024-10-08 00:15:37 +02:00
|
|
|
True, False);
|
|
|
|
BindingPage.Add('None (install the binding later)');
|
|
|
|
BindingPage.Add('Local binding - ollama');
|
|
|
|
BindingPage.Add('Local binding - python_llama_cpp');
|
|
|
|
BindingPage.Add('Local binding - bs_exllamav2');
|
|
|
|
BindingPage.Add('Remote binding - groq');
|
|
|
|
BindingPage.Add('Remote binding - open_router');
|
|
|
|
BindingPage.Add('Remote binding - open_ai');
|
|
|
|
BindingPage.Add('Remote binding - mistral_ai');
|
|
|
|
BindingPage.Add('Remote binding - gemini');
|
|
|
|
BindingPage.Add('Remote binding - vllm');
|
|
|
|
BindingPage.Add('Remote binding - xAI');
|
|
|
|
BindingPage.Add('Remote binding - elf');
|
|
|
|
BindingPage.Add('Remote binding - remote lollms');
|
2024-10-08 00:33:55 +02:00
|
|
|
BindingPage.SelectedValueIndex := 0;
|
2024-10-07 23:51:35 +02:00
|
|
|
end;
|
|
|
|
|
2024-10-08 00:33:55 +02:00
|
|
|
procedure CurStepChanged(CurStep: TSetupStep);
|
2024-10-07 23:51:35 +02:00
|
|
|
var
|
|
|
|
ResultCode: Integer;
|
2024-10-08 00:15:37 +02:00
|
|
|
BindingScript: string;
|
2024-10-07 23:51:35 +02:00
|
|
|
begin
|
2024-10-08 00:33:55 +02:00
|
|
|
if CurStep = ssPostInstall then
|
2024-10-07 23:51:35 +02:00
|
|
|
begin
|
2024-10-08 00:15:37 +02:00
|
|
|
case BindingPage.SelectedValueIndex of
|
|
|
|
1: BindingScript := 'ollama';
|
|
|
|
2: BindingScript := 'python_llama_cpp';
|
|
|
|
3: BindingScript := 'bs_exllamav2';
|
|
|
|
4: BindingScript := 'groq';
|
|
|
|
5: BindingScript := 'open_router';
|
|
|
|
6: BindingScript := 'open_ai';
|
|
|
|
7: BindingScript := 'mistral_ai';
|
|
|
|
8: BindingScript := 'gemini';
|
|
|
|
9: BindingScript := 'vllm';
|
|
|
|
10: BindingScript := 'xAI';
|
|
|
|
11: BindingScript := 'elf';
|
|
|
|
12: BindingScript := 'remote_lollms';
|
2024-10-07 23:51:35 +02:00
|
|
|
else
|
2024-10-08 00:15:37 +02:00
|
|
|
BindingScript := '';
|
|
|
|
end;
|
2024-10-08 00:33:55 +02:00
|
|
|
|
2024-10-08 00:15:37 +02:00
|
|
|
if BindingScript <> '' then
|
2024-10-07 23:51:35 +02:00
|
|
|
begin
|
2024-10-08 00:33:55 +02:00
|
|
|
Exec(ExpandConstant('{app}\lollmsenv\envs\lollms_env\Scripts\python.exe'),
|
|
|
|
ExpandConstant('"{app}\lollms-webui\zoos\bindings_zoo\' + BindingScript + '\__init__.py"'),
|
|
|
|
'', SW_HIDE, ewWaitUntilTerminated, ResultCode);
|
2024-10-07 23:51:35 +02:00
|
|
|
end;
|
|
|
|
|
2024-10-08 00:33:55 +02:00
|
|
|
SaveStringToFile(ExpandConstant('{app}\lollms.bat'),
|
|
|
|
'@echo off' + #13#10 +
|
|
|
|
'call "' + ExpandConstant('{app}') + '\lollmsenv\envs\lollms_env\Scripts\activate.bat"' + #13#10 +
|
|
|
|
'cd "' + ExpandConstant('{app}') + '\lollms-webui"' + #13#10 +
|
|
|
|
'python app.py %*' + #13#10 +
|
|
|
|
'pause', False);
|
2024-10-08 00:15:37 +02:00
|
|
|
|
2024-10-08 00:33:55 +02:00
|
|
|
SaveStringToFile(ExpandConstant('{app}\lollms_cmd.bat'),
|
|
|
|
'@echo off' + #13#10 +
|
|
|
|
'call "' + ExpandConstant('{app}') + '\lollmsenv\envs\lollms_env\Scripts\activate.bat"' + #13#10 +
|
|
|
|
'cd "' + ExpandConstant('{app}') + '\lollms-webui"' + #13#10 +
|
|
|
|
'cmd /k', False);
|
|
|
|
end;
|
|
|
|
end;
|