Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix dumb windows build

Louis Beaumontc071cf9afc20
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index b914415bb..bff2a0bd1 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -126,6 +126,14 @@ jobs:
ls .
bun install
+ - name: Install Scoop (if needed)
+ if: matrix.platform == 'windows-latest'
+ shell: powershell
+ run: |
+ if (!(Get-Command scoop -ErrorAction SilentlyContinue)) {
+ iwr -useb get.scoop.sh | iex
+ }
+
- name: Run pre_build.js
shell: bash
env:
diff --git a/screenpipe-app-tauri/scripts/pre_build.js b/screenpipe-app-tauri/scripts/pre_build.js
index 8be17dd1a..3bfbd97a0 100644
--- a/screenpipe-app-tauri/scripts/pre_build.js
+++ b/screenpipe-app-tauri/scripts/pre_build.js
@@ -100,32 +100,21 @@ async function installDeno() {
console.log('installing deno...');
if (platform === 'windows') {
+
+ console.error('failed to install deno using powershell:', psError);
+ console.log('attempting to install deno using scoop...');
try {
- await $`winget install DenoLand.Deno`.quiet();
- console.log('deno installed successfully using winget.');
- } catch (error) {
- console.error('failed to install deno using winget:', error);
- console.log('attempting to install deno using powershell...');
+ await $`scoop install deno`;
+ console.log('deno installed successfully using scoop.');
+ } catch (scoopError) {
+ console.error('failed to install deno using scoop:', scoopError);
+ console.log('attempting to install deno using chocolatey...');
try {
- await $`powershell -c "irm https://deno.land/install.ps1 | iex"`;
- console.log('deno installed successfully using powershell.');
- } catch (psError) {
- console.error('failed to install deno using powershell:', psError);
- console.log('attempting to install deno using scoop...');
- try {
- await $`scoop install deno`;
- console.log('deno installed successfully using scoop.');
- } catch (scoopError) {
- console.error('failed to install deno using scoop:', scoopError);
- console.log('attempting to install deno using chocolatey...');
- try {
- await $`choco install deno`;
- console.log('deno installed successfully using chocolatey.');
- } catch (chocoError) {
- console.error('failed to install deno using chocolatey:', chocoError);
- console.error('all installation methods failed. please install deno manually.');
- }
- }
+ await $`choco install deno`;
+ console.log('deno installed successfully using chocolatey.');
+ } catch (chocoError) {
+ console.error('failed to install deno using chocolatey:', chocoError);
+ console.error('all installation methods failed. please install deno manually.');
}
}
} else {
@@ -143,16 +132,10 @@ async function copyDenoBinary() {
let denoSrc, denoDest1, denoDest2;
if (platform === 'windows') {
// Check both potential installation locations
- const wingetPath = 'C:\\Program Files\\Deno\\deno.exe';
- const homePath = path.join(os.homedir(), '.deno', 'bin', 'deno.exe');
const scoopPath = path.join(os.homedir(), 'scoop', 'shims', 'deno.exe');
const chocoPath = 'C:\\ProgramData\\chocolatey\\bin\\deno.exe';
- if (await fs.exists(wingetPath)) {
- denoSrc = wingetPath;
- } else if (await fs.exists(homePath)) {
- denoSrc = homePath;
- } else if (await fs.exists(scoopPath)) {
+ if (await fs.exists(scoopPath)) {
denoSrc = scoopPath;
} else if (await fs.exists(chocoPath)) {
denoSrc = chocoPath;