Skip to content

Commit 7fa2f8d

Browse files
authored
docs: update README for installation and development build instructions (#161)
* docs: update README for installation and development build instructions * Lint
1 parent 1cbe84c commit 7fa2f8d

File tree

1 file changed

+71
-20
lines changed

1 file changed

+71
-20
lines changed

README.md

Lines changed: 71 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,34 @@
55

66
A cross-browser WebExtension that serves as a web browser watcher for [ActivityWatch][activitywatch].
77

8-
## Usage
8+
## Installation
99

10-
Install for your browser:
10+
### Official Releases
1111

12-
- [Chrome][chrome]
13-
- [Firefox][firefox]
12+
Install from official stores:
1413

15-
[activitywatch]: https://github.com/ActivityWatch/activitywatch
16-
[firefox]: https://addons.mozilla.org/en-US/firefox/addon/aw-watcher-web/
17-
[chrome]: https://chromewebstore.google.com/detail/activitywatch-web-watcher/nglaklhklhcoonedhgnpgddginnjdadi
18-
[build-source-cmt]: https://github.com/ActivityWatch/aw-watcher-web/issues/94#issuecomment-1315773537
19-
[last-xpi]: https://github.com/ActivityWatch/aw-watcher-web/releases/download/v0.4.3/aw-watcher-web-v0.4.3.xpi
20-
[818]: https://github.com/orgs/ActivityWatch/discussions/818#discussioncomment-4017528
14+
- [Chrome Web Store][chrome]
15+
- [Firefox Add-ons][firefox]
16+
17+
### Development Build
18+
19+
Download the latest development build from our [GitHub Actions][gh-actions]:
20+
21+
1. Click on the latest successful workflow run
22+
2. Scroll down to "Artifacts"
23+
3. Download either `firefox.zip` or `chrome.zip`
24+
25+
> [!NOTE]
26+
>
27+
> - GitHub login is required to download artifacts
28+
> - These builds are unsigned and require developer mode/settings
2129
2230
### Firefox Enterprise Policy
2331

2432
> [!NOTE]
2533
> Due to Mozilla Add-on Policy, this is not possible with the Mozilla-hosted versions of the extension. You will need to fork the extension and change a hardcoded value to make this work.
2634
27-
Due to the above issue, a privacy notice must be displayed to comply with the Mozilla Add-on Policy. This can be pre-accepted by setting the following Firefox Enterprise Policy:
35+
Due to the above issue, a privacy notice must be displayed to comply with the Mozilla Add-on Policy. This can be pre-accepted by setting the following Firefox Enterprise Policy ([More about Firefox Policies][mozilla-policy]):
2836

2937
```json
3038
{
@@ -40,22 +48,65 @@ Due to the above issue, a privacy notice must be displayed to comply with the Mo
4048
}
4149
```
4250

43-
## Building
51+
## Building from Source
52+
53+
### Prerequisites
54+
55+
- Node.js (23 or higher)
56+
- Git
57+
- Make
58+
59+
### Build Steps
4460

45-
First, clone the repo with:
61+
1. Clone the repository with submodules:
4662

4763
```sh
48-
git pull --recurse-submodules https://github.com/ActivityWatch/aw-watcher-web.git
49-
# or, normal `git pull` and then:
50-
git submodule update --init
64+
git clone --recurse-submodules https://github.com/ActivityWatch/aw-watcher-web.git
65+
cd aw-watcher-web
5166
```
5267

53-
Then build with:
68+
2. Install dependencies:
5469

70+
```sh
71+
make install
5572
```
56-
make build
73+
74+
3. Build the extension:
75+
76+
```sh
77+
# For Firefox:
78+
make build-firefox
79+
80+
# For Chrome:
81+
make build-chrome
5782
```
5883

59-
The resulting `aw-watcher-web.zip` can then be loaded into your browser in development mode. (for Firefox, loading unsigned extensions is only possible in Firefox Nightly and Developer Edition).
84+
This will create zip files in the `artifacts` directory:
85+
86+
- `artifacts/firefox.zip` for Firefox
87+
- `artifacts/chrome.zip` for Chrome
88+
89+
### Installing the Development Build
90+
91+
#### Chrome
92+
93+
1. Extract `artifacts/chrome.zip` to a folder
94+
2. Go to `chrome://extensions`
95+
3. Enable "Developer mode"
96+
4. Click "Load unpacked" and select the extracted folder
97+
98+
#### Firefox
6099

61-
For further build instructions, refer to the `Makefile`.
100+
1. Go to `about:addons`
101+
2. Click the gear icon (⚙️) and select "Install Add-on From File..."
102+
3. Navigate to and select the `artifacts/firefox.zip` file
103+
104+
> [!NOTE]
105+
> For Firefox, installing unsigned extensions requires Firefox Developer Edition or Nightly.
106+
> In Firefox Developer Edition, you need to set `xpinstall.signatures.required` to `false` in `about:config`.
107+
108+
[activitywatch]: https://github.com/ActivityWatch/activitywatch
109+
[firefox]: https://addons.mozilla.org/en-US/firefox/addon/aw-watcher-web/
110+
[chrome]: https://chromewebstore.google.com/detail/activitywatch-web-watcher/nglaklhklhcoonedhgnpgddginnjdadi
111+
[mozilla-policy]: https://mozilla.github.io/policy-templates/
112+
[gh-actions]: https://github.com/ActivityWatch/aw-watcher-web/actions/workflows/build.yml?query=branch%3Amaster+is%3Asuccess

0 commit comments

Comments
 (0)