|
17 | 17 |
|
18 | 18 | [](https://floccus.org/download) |
19 | 19 |
|
| 20 | +This is the SHA-256 fingerprint of the certificate used to sign the floccus APKs: |
| 21 | + |
| 22 | +``` |
| 23 | +ffed2778ff07371e6367b6dcf5d7c1327c57ff7158b8444029182a9aa2dd7085 |
| 24 | +``` |
20 | 25 |
|
21 | 26 |
|
22 | 27 | If you'd like to support the creation and maintenance of this software, please consider donating. :) |
@@ -124,6 +129,63 @@ Run the following to automatically compile changes as you make them: |
124 | 129 |
|
125 | 130 | - `npm run build-release` |
126 | 131 |
|
| 132 | +#### Windows-specific considerations |
| 133 | + |
| 134 | +Follow the above general guidance on setting up a dev environment. |
| 135 | +There are Windows-specific versions of some npm scripts: |
| 136 | + - build: `npm run build-win` |
| 137 | + - build-release: `npm run build-release-win` |
| 138 | + - watch: `watch-win` |
| 139 | + |
| 140 | +When building for the first time you may get an error about `gulp` not being found. |
| 141 | +You can install gulp globally on your system by executing `npm install -g gulp` from your repo root. |
| 142 | +It is recommended that you do this proactively after executing `npm install` in the repo root for the first time. |
| 143 | + |
| 144 | +#### Running the browser extension and corresponding tests locally |
| 145 | + |
| 146 | +- Build the browser extension: |
| 147 | +`npm run build-release` |
| 148 | +(`npm run build-release-win` if you use Windows) |
| 149 | + |
| 150 | +- After a successful build, the extension package will be found in: |
| 151 | +`RepoRoot/builds/` |
| 152 | + |
| 153 | +- The following steps use _Firefox_ as an example; other browsers work similarly. |
| 154 | +The Firefox extension package is a file with an `.xpi`-extension. It is a simple archive. To modify it, you can rename it to `.zip`, make the changes, and then rename it back to `.xpi`. Many archive-related tools know this and allow you to work with the `.xpi`-file directly (e.g. [Total Commander](https://www.ghisler.com/download.htm)). |
| 155 | + |
| 156 | +- Enable the extension package for local testing: |
| 157 | +By default, tests are not included into the release archive. To run tests in your local browser, copy the file |
| 158 | +`RepoRoot/dist/js/test.js` |
| 159 | +into the release package, so that it is located at |
| 160 | +`FloccusPackage.xpi/dist/js/test.js` |
| 161 | + |
| 162 | +- Open Firefox using a dedicated test-profile: |
| 163 | +**If you use your main profile for testing, the test scripts will likely destroy your existing bookmarks and open tabs!** |
| 164 | +To interact with profiles, go to this address: |
| 165 | +`about:profiles` |
| 166 | + |
| 167 | +- Load the extension: |
| 168 | +In the a dedicated Firefox profile window, go to |
| 169 | +`about:debugging` |
| 170 | +Select "This Firefox", and then under "Temporary Extensions", select "Load Temporary Add-on...". Then select the `.xpi`-file you prepared earlier. |
| 171 | +(Remember to unload the extension if you need to modify/rebuild the extension package.) |
| 172 | + |
| 173 | +- The extension is now loaded. You can access it via the browser's extensions menu. |
| 174 | + |
| 175 | +- Run tests: |
| 176 | +After loading the extension, click on "Manifest URL". It will open a new tab with the URL |
| 177 | +`moz-extension://SomeGuid/manifest.json` |
| 178 | +Modify the URL to read |
| 179 | +`moz-extension://SomeGuid/dist/html/test.html` |
| 180 | +, keeping the same GUID and press enter. The test run should start automatically. |
| 181 | + |
| 182 | +- Debug or pause tests: |
| 183 | +Press `F12` to open developer tools. |
| 184 | +On the "Debugger" tab, you can pause the execution, set breakpoints and step through the code. |
| 185 | + |
| 186 | +Happy developing and thank you for your contributions! |
| 187 | + |
| 188 | + |
127 | 189 | ## Backers |
128 | 190 |
|
129 | 191 | Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/floccus#backer)] |
|
0 commit comments