# slid_desktop

> Slid For Desktop

Latest version **2.4.0** (published 2022-08-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install slid_desktop
pnpm add slid_desktop
yarn add slid_desktop
bun add slid_desktop
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.4.0 |
| Published | 2022-08-24 |
| First published | 2022-08-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 2.4 MB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | Slid-Team |
| Maintainers | slid |

## Links

- npm: https://www.npmjs.com/package/slid_desktop
- npm.io page: https://npm.io/package/slid_desktop

## Dependencies (9)

- [dotenv](https://npm.io/package/dotenv.md) ^8.2.0
- [node-gyp](https://npm.io/package/node-gyp.md) ^7.1.2
- [sweetalert2](https://npm.io/package/sweetalert2.md) ^10.16.6
- [@sentry/electron](https://npm.io/package/@sentry/electron.md) ^3.0.4
- [mixpanel-browser](https://npm.io/package/mixpanel-browser.md) ^2.45.0
- [node-window-manager](https://npm.io/package/node-window-manager.md) ^2.2.4
- [update-electron-app](https://npm.io/package/update-electron-app.md) ^2.0.1
- [electron-squirrel-startup](https://npm.io/package/electron-squirrel-startup.md) ^1.0.0
- [mac-screen-capture-permissions](https://npm.io/package/mac-screen-capture-permissions.md) ^2.0.0

## Recent versions

- 2.4.0 (latest) — 2022-08-24

## README

## Setting up a local development repo

**Setting up the web**

- `git clone https://github.com/Slid-Team/slid_web.git`
- `cd slid_web``
- `git checkout develop`
- `npm install`
- `npm start`

**Setting up the desktop repo**

- `git clone https://github.com/Slid-Team/slid_desktop.git`
- `cd slid_desktop`
- `git checkout develop`
- `npm install`
- `npm start` (Install yarn by `npm install --global yarn` if necessary.)

## Building and Releasing a new version

### Getting ready for making a release

- [ ] Merge all changes into `develop branch`
- [ ] Update the version in the following files:
  - [ ] `version.js`
  - [ ] `version2.js`
  - [ ] `package.json`
  - [ ] `forge.config.js packagerConfig.makers`
  - [ ] `src/windows/primaryWindow` dev & prod html files title, and iframe source url
  - [ ] `src/env.json` update all versions
- [ ] do `npm install` to update package-lock.json file
- [ ] Test in development mode
- [ ] Deploy the corresponding changes in `slid_web` if any
- [ ] In `src/env.json` change to production mode and test
- [ ] Switch back to develeopment branch mode commit any changes you may have done if any

### Building a release

- [ ] Create a release branch off `develop` branch ex: `git checkout -b release/1.0.0 develeop`
- [ ] In `main.js` change `ENV` to production mode
- [ ] Commit `git commit -m "releasing version 1.0.0"`
- [ ] Make a release tag `git tag 1.0.0`
- [ ] Push the tag `git push origin 1.0.0`
- [ ] Push to the remote release branch ``git push origin release/1.0.0`
- [ ] merge the release branch into the master branch
- [ ] Make a build `npm run make`

### Code signing the build

**On Windows**

- [ ] Connect the EV Codesigning certificate usb
- [ ] Launch the command line: hit the windows button, type `cmd` and hit enter
- [ ] Navigate to the codesign tool by doing: `cd C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86`
- [ ] Code sign the executable: `signtool.exe sign /s my "C:\Users\USER\Desktop\workspace\slid_desktop\out\make\squirrel.windows\x64\Slid-0.0.3 Setup.exe"` (your path may be different)
- [ ] You will be prompted to enter the codesigning password (refer to notion doc for it)
- [ ] Verify that your build was signed: `signtool.exe verify /v /pa "C:\Users\USER\Desktop\workspace\slid_desktop\out\make\squirrel.windows\x64\Slid-0.0.3 Setup.exe"`

**Additional Steps On Mac**

- On Mac we wanna build in a zip format as it si the only format that will support auto updates
- Begin by creating a new branch: `git checkout -b release/mac/1.0.0 develop`
- In `main.js` change `ENV` to production mode
- Make the necessary changes to make sure the version works well on Mac
- Push all changes
- merge the release branch into the master branch
- Do `npm run make`
- Navigate to `out/make/zip/darwin/x64` there you will find a zip build, we need to unzip that: then sign and notarize the Slid.app inside it, and then put it back
- unzip the file and sign the .app as follows: `electron-osx-sign ./out/make/zip/darwin/x64/Slid.app --entitlements=./entitlements.plist --entitlements-inherit=./entitlements.plist --hardened-runtime --identity="Developer ID Application" --platform=darwin --provisioning-profile=./slid_desktop.provisionprofile`
- The proceed to notarize it by running the notarize script: `node notarize.js`
- Now you have a signed and notarized Slid.app
- delete the old `.zip` and compress the signed `.app` to make a new zip with exactly the same name as the original one
- We will upload the `.zip` file on github, and on s3 `
- As always test everything before deploying

### Test the build

- [ ] Uninstall the previous version of slid that may be installed on your machine
- [ ] Install the new signed build, check if installation goes well, and test all functionalities

### Creating a new release to the github public repo

- [ ] Navigate to [the public release repository](https://github.com/Slid-Team/slid-desktop-builds)
- [ ] Click on releases, then draft new release
- [ ] Add the correct tag version; (should always be in format v1.1.1)
- [ ] Keep release target to main
- [ ] For the release title simple use the same as tag version
- [ ] For description, describe briefly which changes this new release introduce
- [ ] Drag and drop the build artifacts into the "attach binary" section
  1. Fow windows: `out/make/squirrel.windows/x64` all the 3 files inside
  2. For mac: (coming soon)
- [ ] Click Publish release

### Uploading the new release to AWS S3

- [ ] Navigate to [aws s3](https://s3.console.aws.amazon.com/s3/buckets/slid-public-assets?region=us-west-1&tab=objects#)
- [ ] go to `slid_desktop_builds/` and click `upload`
- [ ] drag and drop the signed executable
- [ ] Go to permissions -> Predefined ACLs -> Grant public-read access and tick the box, as well as the confirmation box

### Updating the download url through from firebase

- [ ] Navigate to [firebase remote config](https://console.firebase.google.com/u/5/project/slid-286902/config)
- [ ] Edit the feature flag by only changing the `slid_desktop_version` and save the changes

### Testing

- [ ] Download the new version from [slid website](https://slid.cc/download) and test it
- [ ] Test if previous versions run well and update after 5 minutes of activity

#### Congratulations !!!

## Crisis Management

You have deployed a new version and all of sudden you realize that users are having issues with it, here are the steps to take:

### Urgent Steps:

1. **Prevent Installed Apps from updating to the problematic version** by going to [the public release repository](https://github.com/Slid-Team/slid-desktop-builds), edit the problematic release by ticking the box that sets it as a pre-release and save updates
2. **Prevent further downloads of the problematic version** by going to [firebase remote config](https://console.firebase.google.com/u/5/project/slid-286902/config) and changing the desktop version to the last version that worked well.

### Figure out if the problem is in slid_desktop or in slid_web codebase

1. Check is the problem is happening both on Mac and Windows
2. If the problem is with both OS:
   - Open the open the codebases: slid_desktop and slid_web
   - Start slid_web master branch
   - In slid_desktop checkout to the branch that was used to build the problematic version (format: release/1.0.0)
   - In main.js chance ENV to development
   - `npm start`
   - Start debugging the issue
3. If the issue is Mac Only:
   - Open the open the codebases: slid_desktop and slid_web
   - Start slid_web master branch
   - In slid_desktop checkout to the branch that was used to build the problematic version (format: release/mac/1.0.0)
   - In main.js chance ENV to development
   - `npm start`
   - Start debugging the issue
   - For Mac you will need to package the app in order for some features to work (ex: authentication)

### You found that the problem was in the slid_web codebase

1. Follow the standard procedure for making a new release in slid_web repo
2. Tell the users who experience the issue to go to view --> Clear Cache for the new iframe code to be loaded
3. If the problem is too nasty it may be better to just make a whole new desktop version so that even the silent users will have theit apps updates and pick up web changes

### You found that the problem was in slid_desktop codebase

1. Make a whole new release following the procedure mentioned in this file

---
_Source: https://npm.io/package/slid_desktop · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
