Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
Refactored the whole project. See the announcement in book/Refactorin…
Browse files Browse the repository at this point in the history
…g.md
  • Loading branch information
OrigamingWasTaken committed Feb 23, 2024
1 parent 9db965c commit 4c31d26
Show file tree
Hide file tree
Showing 146 changed files with 7,598 additions and 6,870 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/bun.lockb
.tmp
.tmpbuild
window_state_config.json
.storage

# Created by https://www.toptal.com/developers/gitignore/api/svelte,node,macos,windows,linux,git
# Edit at https://www.toptal.com/developers/gitignore?templates=svelte,node,macos,windows,linux,git
Expand Down Expand Up @@ -214,7 +214,6 @@ dist
# website: https://kit.svelte.dev/

.svelte-kit/
package

### Windows ###
# Windows thumbnail cache files
Expand Down
21 changes: 21 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"singleQuote": true,
"semi": true,
"printWidth": 130,
"jsxBracketSameLine": true,
"svelteSortOrder": "options-scripts-styles-markup",
"svelteBracketNewLine": false,
"bracketSameLine": true,
"tabWidth": 2,
"useTabs": true,
"plugins": [ "prettier-plugin-svelte", "prettier-plugin-tailwindcss" ],
"pluginSearchDirs": [ "." ],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"css.customData": [
".vscode/tailwind.json"
],
"css.lint.unknownAtRules": "ignore"
"css.lint.unknownAtRules": "ignore",
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
}
}
58 changes: 20 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ AutoEvent can notify you of upcoming events, while consumming close to no ram wh
<figcaption>Image of what the notifications look like</figcaption>
</figure>

## Building

To contribute, or build the projet from source, clone the repo and use the build scripts:

```bash
git clone https://github.com/Communaute-Events/AutoEvent.git
cd AutoEvent
npm install
```

And then run `npm run build` to build, and `npm run dev` to start a dev server (with hot reloading).

## Contributing

Feel free to submit PRs. If you want to get involved, join us at https://commu.events/discod

## Roadmap

Currently, a lot of features aren't present on certain platforms (ex: notifications and app focus don't work on linux and windows). This is due to the fact that the main dev (OrigamingWasTaken) is on MacOS, and can't develop for other OSes. So you are very welcome to help us implement the missing features!
Expand All @@ -30,56 +46,22 @@ Currently, a lot of features aren't present on certain platforms (ex: notificati
- [x] Alerts
- [x] Window functions
- [x] Autostarting
- [x] URL Scheme
- [x] URL Scheme (autoevent://)

**Windows**
- [ ] Notifications
- [ ] Alerts
- [ ] Window functions
- [ ] Autostarting
- [ ] URL Scheme
- [ ] URL Scheme (autoevent://)

**Linux**
- [ ] Notifications
- [ ] Alerts
- [ ] Window functions
- [ ] Autostarting
- [ ] URL Scheme
- [ ] URL Scheme (autoevent://)

## Nightly Builds

You can download the app from the [nightly builds](https://nightly.link/Communaute-Events/AutoEvent/workflows/build/main?preview)

## Building

(Note: If you're on Windows, you must install WSL)

Install Jq
```shell
# On macOS:
brew install jq
# On Linux or Windows/WSL:
sudo apt-get install jq
```

Clone the repo
```shell
git clone https://github.com/Communaute-Events/AutoEvent.git
```

Install the neu-cli
```shell
npm install -g @neutralinojs/neu
```

Run the build script for your target OS
```shell
# MacOS
./build mac
# Linux
./build linux
# Windows
./build win
# All platforms
./build all
```
You can download the app from the [nightly builds](https://nightly.link/Communaute-Events/AutoEvent/workflows/build/main?preview)
18 changes: 18 additions & 0 deletions book/Refactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# How and Why I refactored the whole project

AutoEvent is an awesome project (in my opinion) but it was getting a little unorganized, and too dependent on bash (or wsl).
So huhh i spent **1 week** coding new cross-platform build and packaging scripts.

Notable changes:
- The `npm run dev` command instead of `neu run`
> Oh boy this was a lot of trouble to implement. I had to write my own neutralino and vite binary launcher, and debug for long hours. This process is better because it does not depend on the global installation of the **neu-cli**, and gives us a lot of possibilites to make the developpement process more convenient (like working `debug.log`, to log to the terminal)
- The `npm run build` command instead of `./build all`
> This was especially hard to implement, because I'm on MacOS and don't have a Windows or Linux machine to test on, so I had to see how others did it (you're welcome to clean up the code). The new build scripts remove the dependence on **WSL / Bash**. Those are also better because they directly install the **Windows version icon file into the exe** (oh boy). Overall, i'm pretty satisfied with the new scripts!
- 😈 The codebase 😈
> Basically I changed the whole project architecture, to remove the double `node_modules` folder (yes, I know, why did I do that in the first place).
Thanks for reading (please contribute lol we are short on Linux and Windows devs)

# 👋
57 changes: 0 additions & 57 deletions build

This file was deleted.

30 changes: 30 additions & 0 deletions build.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { type Config } from "./scripts/build/ts/config-types"
import { resolve as path } from "path"

const BuildConfig: Config = {
projectPath: path("./frontend/dist"),
outDir: path("./dist"),
appName: "Svelte Neutralino",
description: "An app made with Vite, Svelte and NeutralinoJS",
appBundleName: "SvelteNeutralino",
appIdentifier: "ts.svelte.neutralino",
mac: {
architecture: ["universal","arm64","x64"],
appIcon: path("./build/assets/mac.icns"),
minimumOS: "10.13.0"
},
win: {
architecture: ["x64"],
appIcon: path("./build/assets/win.ico"),
// This feature currently doesn't work and takes more space. See https://github.com/neutralinojs/neutralinojs/issues/1120
embedResources: false,
},
linux: {
architecture: ["x64","arm64","armhf"],
appIcon: path("./build/assets/linux.png"),
appPath: "/usr/share/SvelteNeutralino",
appIconPath: "/usr/share/SvelteNeutralino/icon.png"
}
}

export default BuildConfig
Binary file added build/assets/linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/assets/mac.icns
Binary file not shown.
Binary file added build/assets/win.ico
Binary file not shown.
File renamed without changes.
20 changes: 0 additions & 20 deletions building/_app_scaffolds/linux/install.sh

This file was deleted.

Binary file not shown.
Binary file removed building/_app_scaffolds/win/WebView2Loader.dll
Binary file not shown.
13 changes: 0 additions & 13 deletions building/_app_scaffolds/win/install-icon.cmd

This file was deleted.

Loading

0 comments on commit 4c31d26

Please sign in to comment.