Skip to content
Merged
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- platform: ubuntu-22.04
args: ""
- platform: windows-latest
args: ""
args: "--bundles nsis,msi"
- platform: macos-latest
args: "--target aarch64-apple-darwin"
- platform: macos-latest
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"ws": "^8.18.3"
},
"devDependencies": {
"@tauri-apps/api": "^2.9.1",
"@tauri-apps/api": "2.9.1",
"@tauri-apps/cli": "^2.9.6",
"@types/express": "^5.0.6",
"@types/node": "^22.14.0",
Expand Down
16 changes: 15 additions & 1 deletion scripts/branding/build-nsis-assets.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,27 @@ import path from 'node:path';
import sharp from 'sharp';

const root = process.cwd();
const source = path.join(root, 'src-tauri', 'icons', 'icon.png');
const preferredSource = path.join(root, 'null library.png');
const fallbackSource = path.join(root, 'src-tauri', 'icons', 'icon.png');
let source;
const outDir = path.join(root, 'src-tauri', 'installer-assets');
const sidebarImage = path.join(outDir, 'nsis-sidebar.bmp');
const headerImage = path.join(outDir, 'nsis-header.bmp');
const installerIcon = path.join(root, 'src-tauri', 'icons', 'icon.ico');

await fs.mkdir(outDir, { recursive: true });

try {
await fs.access(preferredSource);
source = preferredSource;
} catch (error) {
source = fallbackSource;
if (error?.code && error.code !== 'ENOENT') {
throw error;
}
console.warn(`Preferred installer splash image not found at: ${preferredSource}. Falling back to ${fallbackSource}.`);
}

const toBmp24 = async (inputPath, width, height, outputPath) => {
const { data, info } = await sharp(inputPath)
.resize(width, height, { fit: 'cover' })
Expand Down Expand Up @@ -63,6 +76,7 @@ await toBmp24(source, 164, 314, sidebarImage);
await toBmp24(source, 150, 57, headerImage);

console.log('NSIS branding assets prepared:');
console.log(`- source image: ${source}`);
console.log(`- ${headerImage}`);
console.log(`- ${sidebarImage}`);
console.log(`- ${installerIcon}`);
11 changes: 10 additions & 1 deletion server/declarations.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
declare module 'google-trends-api' {
const googleTrends: any;
interface GoogleTrendsQuery {
keyword: string;
}

interface GoogleTrendsApi {
interestOverTime(options: GoogleTrendsQuery): Promise<string>;
relatedQueries(options: GoogleTrendsQuery): Promise<string>;
}

const googleTrends: GoogleTrendsApi;
export default googleTrends;
}
Loading