Commit Graph

6 Commits

Author SHA1 Message Date
forehalo
7b3673ae82
chore: assign todos (#7297) 2024-06-21 07:54:14 +00:00
pengx17
0b380f94c7
build(electron): add nsis script for windows installer (#6674)
This pr only includes how to bundle the app into an installer after package step.

todo (not in this pr)
- [ ] make sure updater can work for both nsis & squirrel
- [ ] integrate nsis build into github action workflow

Advantage over Squirrel:
- allowing user to specify the installation location
- better uninstaller

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/b75f1076-62e7-445c-bbf9-d7be00dbfc59.png)

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/c9ddc58c-512e-487e-80c8-7c4bd51482a8.png)

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/cfc5c281-e044-4929-a261-b02a4619117b.png)
2024-04-25 03:30:04 +00:00
Brooooooklyn
85ee22329c
fix(electron): add icon for AppImage build (#6257)
1. the icon is fixed in `/Applications`: 128b8c22f9 (diff-a694a3e854f53b066e34ec310e05bd18b4944c016455f6963f54a351784d5fa6L91)
2. the App's icon MUST be 64x64 png and set via `setIcon`

![image](https://github.com/toeverything/AFFiNE/assets/584378/bbce0007-066b-413f-a85a-193acbbe5c13)
2024-03-21 14:29:02 +00:00
Peng Xiao
20f7473e20
fix(electron): linux login issues (#5821)
Looks like there are some issues using `@reforged/maker-appimage`:
- deep link not working properly (cannot login)
- cannot be installed via AppImageLauncher, which is required to enable deep link on linux

I forked saleae/electron-forge-maker-appimage into https://github.com/toeverything/electron-forge-maker-appimage to fix these issues
See changes: https://github.com/saleae/electron-forge-maker-appimage/compare/master...toeverything:electron-forge-maker-appimage:master?w=1

To enable login on Linux, the app must be installed via AppImageLauncher.

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/28dcaadb-49d1-4c95-8a4f-ef41bef604be.png)

fix https://github.com/toeverything/AFFiNE/issues/4978
fix https://github.com/toeverything/AFFiNE/issues/4466
2024-02-19 14:24:59 +00:00
Peng Xiao
3839a9bd15
build(electron): asar (#4965)
Due to restrictions on how Electron package works, the `node_modules` should not be hoisted and not to use s/h-links at all. This is why we need to have two separate installs for electron and non-electron packages in the build.

Tested via the following script

```bash
#!/bin/bash

echo "step 1: clean up"
find . -name "node_modules" -prune -exec rm -rf '{}' +
# git clean -dfX
build_type=canary

echo "step 2: install web dependencies"
# firstly, build web static
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 SENTRYCLI_SKIP_DOWNLOAD=1 PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=1 yarn

echo "step 3: generate assets"
BUILD_TYPE="$build_type" yarn workspace @affine/electron generate-assets

# cleanup node_modules
find . -name "node_modules" -prune -exec rm -rf '{}' +

echo "step 4: install electron dependencies"
# install electron deps
yarn config set nmHoistingLimits workspaces
yarn config set enableScripts false
yarn config set nmMode classic
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=0 yarn workspaces focus @affine/electron @affine/monorepo

echo "step 5: build native"
# build native
yarn workspace @affine/native build
yarn workspace @affine/storage build

echo "step 6: build electron"
# build electron
yarn workspace @affine/electron build

echo "step 7: package electron"
# package
SKIP_GENERATE_ASSETS=1 BUILD_TYPE="$build_type" HOIST_NODE_MODULES=1 yarn workspace @affine/electron package
```
2023-11-21 17:44:30 +00:00
Joooye_34
bed9310519
refactor(infra): directory structure (#4615) 2023-10-18 15:30:08 +00:00