Skip to content

Commit f5e18cf

Browse files
committed
Ollama linux support
1 parent b96a67a commit f5e18cf

File tree

3 files changed

+45
-7
lines changed

3 files changed

+45
-7
lines changed

.github/workflows/build-release.yml

Whitespace-only changes.

.github/workflows/release.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
include:
2525
- platform: 'macos-latest'
2626
target: ''
27+
- platform: 'ubuntu-latest'
28+
target: ''
2729
- platform: 'windows-latest'
2830
target: ''
2931

@@ -41,6 +43,12 @@ jobs:
4143
- name: Setup Rust
4244
uses: dtolnay/rust-toolchain@stable
4345

46+
- name: Install Linux dependencies
47+
if: matrix.platform == 'ubuntu-latest'
48+
run: |
49+
sudo apt-get update
50+
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
51+
4452
- name: Rust cache
4553
uses: swatinem/rust-cache@v2
4654
with:
@@ -66,6 +74,13 @@ jobs:
6674
name: macos-artifacts
6775
path: src-tauri/target/release/bundle/
6876

77+
- name: Upload artifacts (linux)
78+
if: matrix.platform == 'ubuntu-latest'
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: linux-artifacts
82+
path: src-tauri/target/release/bundle/
83+
6984
create-release:
7085
needs: test-and-build
7186
runs-on: ubuntu-latest
@@ -90,7 +105,8 @@ jobs:
90105
--notes "Download the appropriate installer for your platform:
91106
92107
- **Windows**: .msi or .exe file
93-
- **macOS**: .dmg file"
108+
- **macOS**: .dmg file
109+
- **Linux**: .deb package or .AppImage portable app"
94110
95111
# Upload all artifacts
96-
find artifacts -type f \( -name "*.msi" -o -name "*.exe" -o -name "*.dmg" \) -exec gh release upload ${{ github.ref_name }} {} \;
112+
find artifacts -type f \( -name "*.msi" -o -name "*.exe" -o -name "*.dmg" -o -name "*.deb" -o -name "*.AppImage" \) -exec gh release upload ${{ github.ref_name }} {} \;

src/components/OllamaSetupOverlay.tsx

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,34 @@ export function OllamaSetupOverlay({
161161
throw installError;
162162
}
163163
} else if (platform === 'windows') {
164-
setInstallProgress('Downloading and installing Ollama...');
165-
const command = 'Download Ollama installer';
164+
setInstallProgress('Opening Ollama download page...');
165+
const command = 'Open Ollama download page';
166166
const logId = onCommandLog ? onCommandLog(command) : '';
167167

168168
try {
169-
await invoke('install_ollama_windows');
169+
const result = await invoke('install_ollama_windows') as string;
170170
if (onCommandUpdate) {
171-
onCommandUpdate(logId, 'success', 'Ollama installer downloaded');
171+
onCommandUpdate(logId, 'success', result);
172+
}
173+
setInstallProgress(result);
174+
// Don't proceed with service start on Windows since user needs to manually install
175+
setIsLoading(false);
176+
return;
177+
} catch (installError) {
178+
if (onCommandUpdate) {
179+
onCommandUpdate(logId, 'error', undefined, `Failed to open download page: ${installError}`);
180+
}
181+
throw installError;
182+
}
183+
} else if (platform === 'linux') {
184+
setInstallProgress('Installing Ollama via official script...');
185+
const command = 'curl -fsSL https://ollama.com/install.sh | sh';
186+
const logId = onCommandLog ? onCommandLog(command) : '';
187+
188+
try {
189+
const result = await invoke('install_ollama_linux') as string;
190+
if (onCommandUpdate) {
191+
onCommandUpdate(logId, 'success', result);
172192
}
173193
} catch (installError) {
174194
if (onCommandUpdate) {
@@ -676,14 +696,16 @@ export function OllamaSetupOverlay({
676696
switch (platform) {
677697
case 'macos': return 'macOS';
678698
case 'windows': return 'Windows';
699+
case 'linux': return 'Linux';
679700
default: return 'Unknown Platform';
680701
}
681702
};
682703

683704
const getInstallMethod = () => {
684705
switch (platform) {
685706
case 'macos': return 'Homebrew (brew install ollama)';
686-
case 'windows': return 'Official installer from ollama.ai';
707+
case 'windows': return 'Official installer download';
708+
case 'linux': return 'Official install script (curl | sh)';
687709
default: return 'Manual installation required';
688710
}
689711
};

0 commit comments

Comments
 (0)