|
| 1 | +# name change - dpe to autoEdit 3 |
| 2 | +Decide to change the name of the app to `autoEdit 3`, to use the `autoEdit.io` domain, and encourage `autoEdit2` users to move onto this version of the app. |
| 3 | + |
| 4 | +However would rather avoid introducing breaking changes for existing `digital-paper-edit-electron` users. |
| 5 | +so in `package.json` the `name` of the app will remain to `digital-paper-edit-electron`. but will change the `productName`. |
| 6 | + |
| 7 | +>`productName` String - As `name`, but allows you to specify a product name for your executable which contains spaces and other special characters not allowed in the name property. |
| 8 | +
|
| 9 | +[see electron builder docs for more details](https://www.electron.build/configuration/configuration#configuration) |
| 10 | + |
| 11 | +in `package.json` added |
| 12 | +```json |
| 13 | + "productName":"autoEdit 3", |
| 14 | +``` |
| 15 | + |
| 16 | +and in `src/electron-main.js`, set the `userData` manually. |
| 17 | + |
| 18 | + |
| 19 | +`appData` on mac is `~/Library/Application Support` |
| 20 | +while `userData` is the folder within `appData`, which would default to `name` or `productName` in `package.json` |
| 21 | + |
| 22 | +```js |
| 23 | +// set userData to use `digital-paper-edit-electron` to be backward compatible before name change from `digital-paper-edit-electron` to `autoEdit 3`; |
| 24 | + |
| 25 | +// const userDataPath = app.getPath ('userData'); |
| 26 | +const appData = app.getPath ('appData'); |
| 27 | +app.setPath ('userData', path.join(appData,"digital-paper-edit-electron")); |
| 28 | +``` |
| 29 | + |
| 30 | +for more background info see |
| 31 | + |
| 32 | +- [electron docs - `app.setPath(name, path)`](https://www.electronjs.org/docs/api/app#appsetpathname-path) |
| 33 | +- [stackoverflow- Electron: How to set a custom directory for user data (--user-data-dir)](https://stackoverflow.com/questions/48587035/electron-how-to-set-a-custom-directory-for-user-data-user-data-dir) |
| 34 | +- [electron docs - `app.getPath(name)`](https://github.com/electron/electron/blob/master/docs/api/app.md#appgetpathname) |
| 35 | + |
| 36 | + |
| 37 | +## side notes |
| 38 | +one concern is if someone downloads an electron build form `bbc/digital-paper-edit-electron` and wants to run it along side `autoEdit 3`. |
| 39 | +They'd be using the same `userData` folder. |
| 40 | + |
| 41 | +However since `bbc/digital-paper-edit-electron` electron version is not being activly developed, in favour of a web version, this seems to be an edge case for now. |
| 42 | + |
| 43 | + |
| 44 | +Another note, is that keeping the name of the github repos to `digital-paper-edit-*` to avoid renaming all of the forks, might cause confusion amongst developers who might want to contribute to the project, so might need to add a note or explanation somewhere, or even link to this now. While at the user facing level, adjsuting the name in the user manual, and with the new landing page it should be fairly straightforward. |
0 commit comments