aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2023-04-26 21:58:55 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2023-04-26 21:58:55 +0200
commit10616b295eb23c8250a0d874fe05211f73a8ba81 (patch)
treeaa9496bd16d973f69f6c4d9df7695cae469fad83 /docs
parent85bb5253657c16d9674a9be2f6c8090b413ca7fb (diff)
parente38ab60e1e4f565f0dafdb7b539e386a390594d7 (diff)
downloadFlightCore-10616b295eb23c8250a0d874fe05211f73a8ba81.tar.gz
FlightCore-10616b295eb23c8250a0d874fe05211f73a8ba81.zip
Merge branch 'main' into fix/handle-failed-download
Diffstat (limited to 'docs')
-rw-r--r--docs/DEV-TOOLS.md28
-rw-r--r--docs/DEVELOPMENT.md111
-rw-r--r--docs/FAQ.md4
-rw-r--r--docs/TROUBLESHOOTING.md14
-rw-r--r--docs/assets/dev-view-screenshot.pngbin0 -> 716658 bytes
-rw-r--r--docs/assets/webview2-download-screenshot.pngbin0 -> 277124 bytes
6 files changed, 155 insertions, 2 deletions
diff --git a/docs/DEV-TOOLS.md b/docs/DEV-TOOLS.md
new file mode 100644
index 00000000..cf880d9d
--- /dev/null
+++ b/docs/DEV-TOOLS.md
@@ -0,0 +1,28 @@
+# Dev tools
+
+![dev view screenshot](assets/dev-view-screenshot.png)
+
+FlightCore features a hidden view that contains development features.
+
+It's targetted at both Northstar and FlightCore contributors. Among other things it contains buttons for unreleased features in FlightCore and tools to help with Northstar development.
+
+To activate it, spam click the FlightCore version number in the settings view at least 6 times. After that a new entry named _DEV_ should appear in the menubar.
+
+## Northstar
+
+### Pull request install
+
+The dev view offers a way to install pull request from the [NorthstarLauncher](https://github.com/R2Northstar/NorthstarLauncher) and [NorthstarMods](https://github.com/R2Northstar/NorthstarMods) repositories.
+
+Launcher pull requests overwrite `NorthstarLauncher.exe` and `Northstar.dll`.
+
+Mod pull requests install into a separate profile called `R2Northstar-PR-test-managed-folder`. \
+When installing a mods PR, FlightCore will place `r2ns-launch-mod-pr-version.bat` into your Titanfall2 directory that can be used to run that PR profile directly. \
+The batch file simply runs `NorthstarLauncher.exe -profile=R2Northstar-PR-test-managed-folder`
+
+
+## FlightCore
+
+The dev view contains various buttons that call functions that might not be fully implemented or tested yet.
+
+Additionally it has some buttons for testing like the _Panic button_ which force crashes the application to test automatic log uploading on crash among other things.
diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md
index 8dbb1cea..ce6ba010 100644
--- a/docs/DEVELOPMENT.md
+++ b/docs/DEVELOPMENT.md
@@ -14,7 +14,6 @@ As for splitting logic between _frontend_ and _backend_, state and UI related lo
Make sure you have the necessary dependencies for Tauri installed as described in this link: https://tauri.app/v1/guides/getting-started/prerequisites
-
Then, install `npm` dependencies with
```sh
@@ -24,7 +23,7 @@ npm install
Install UI dependencies too
```sh
-cd src-vue && npm install
+cd src-vue && npm install && cd ..
```
Then for developing
@@ -35,6 +34,30 @@ npx tauri dev
Automatic recompiling on save is enabled for both the Rust and the Typescript/Vue code.
+If you want to build FlightCore from source, run
+
+```sh
+npx tauri build
+```
+
+This will build the executable and bundles, such as `AppImage`, `.deb` or `.msi`.
+
+To build just the executable, edit [tauri.conf.json](https://github.com/R2NorthstarTools/FlightCore/blob/main/src-tauri/tauri.conf.json) in the same folder:
+
+```json
+ "bundle": {
+ "active": true,
+```
+
+Change `active` from `true` to `false`, and bundles won't be included afterwards.
+
+To disable the updater (which requires a private key) change `active` value to `false`:
+
+```json
+ "updater": {
+ "active": true,
+```
+
## Tauri
An introduction to Tauri can be seen in this short YouTube video: https://youtu.be/-X8evddpu7M
@@ -145,6 +168,7 @@ const persistentStore = new Store('flight-core-settings.json');
// Save change in persistent store
await persistentStore.set('northstar-release-canal', { value: "NorthstarReleasecandidate" });
+await persistentStore.save(); // explicit save to disk
// Grab Northstar release canal value from store if exists
var persistent_northstar_release_canal = (await persistentStore.get('northstar-release-canal')) as any;
@@ -178,6 +202,89 @@ struct User {
then simply run `cargo test`. The generated bindings are placed in `src-tauri/bindings/`. Make sure to add and commit them as well!
+### Internationalization
+
+For FlightCore to be used by the largest number, its interface is translated in several languages; users can choose used language through FlightCore settings.
+
+Localization files are located in `src-vue/src/i18n/lang`.
+
+To add a new language, you have to create associated file, *e.g. `src-vue/src/i18n/lang/de.json`*, and import it in the i18n application object in `main.ts`:
+```javascript
+import de from "./i18n/lang/de.json";
+
+export const i18n = createI18n({
+ locale: 'en',
+ fallbackLocale: 'en',
+ messages: {
+ en, fr, de
+ }
+});
+```
+
+In order to be able to select it, make sure to that it to the `LanguageSelector` componenent in `src-vue/src/components/LanguageSelector.vue`.
+
+```vue
+export default defineComponent({
+ name: 'LanguageSelector',
+ data: () => ({
+ value: '',
+ options: [
+ {
+ value: 'en',
+ label: 'English'
+ },
+ <!-- ... -->
+ {
+ value: 'de',
+ label: 'Deutsch'
+ },
+ ]
+ }),
+ <!-- ... -->
+})
+```
+
+There are different ways to use translations in views; in HTML template, invoke the `$t` method with translation key:
+
+```html
+<div>
+ {{ $t('menu.play') }}
+</div>
+```
+
+For use in Typescript code (inside components), invoke the `this.$t` method:
+
+```javascript
+return this.$t("play.button.select_game_dir");
+```
+
+For Typescript code outside components, translations are still accessible:
+
+```javascript
+import { i18n } from '../main';
+i18n.global.tc('notification.game_folder.new.text');
+```
+
+---
+
+It is possible to inject variables into translations:
+
+```json
+"channels": {
+ "release": {
+ "component": {
+ "text": "Switched release channel to {canal}."
+ }
+ }
+}
+```
+
+```javascript
+return this.$t("channels.release.component.text", {canal: "MyCanalName"});
+```
+
+
+
## Other
This repo uses [EditorConfig](https://editorconfig.org/) to define some basic formatting rules. Find a plugin for your IDE [here](https://editorconfig.org/#download).
diff --git a/docs/FAQ.md b/docs/FAQ.md
index eb381d68..8dd2dfa4 100644
--- a/docs/FAQ.md
+++ b/docs/FAQ.md
@@ -16,6 +16,10 @@ You use it to do stuff like
- [or this](https://www.youtube.com/watch?v=suhBGqzDbNA)
- [or this](https://www.youtube.com/watch?v=vyUxAwobY60)
+## I have an issue with FlightCore, where do I go?
+
+Check [TROUBLESHOOTING.md](TROUBLESHOOTING.md).
+
## Why yet another Northstar intaller/updater/mod-manager instead of contributing to an existing one?
The 3 main GUI tools for handling such tasks with Norhtstar are
diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md
new file mode 100644
index 00000000..aed174e0
--- /dev/null
+++ b/docs/TROUBLESHOOTING.md
@@ -0,0 +1,14 @@
+# Troubleshooting
+
+Got an issue with FlightCore? Hopefully one of the steps below will help you resolve it. If not open an [issue on GitHub](https://github.com/R2NorthstarTools/FlightCore/issues/new) or ping `Gecko#7945` on the Northstar Discord.
+
+## FlightCore won't launch
+
+If you are on Windows on FlightCore won't start, make sure you have WebView2 installed. You can grab the latest version from the Microsoft website: \
+https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section
+
+![webview2 download screenshot](assets/webview2-download-screenshot.png)
+
+(make sure to select _Evergreen Bootstrapper_ -> _Download_).
+
+
diff --git a/docs/assets/dev-view-screenshot.png b/docs/assets/dev-view-screenshot.png
new file mode 100644
index 00000000..5cf28043
--- /dev/null
+++ b/docs/assets/dev-view-screenshot.png
Binary files differ
diff --git a/docs/assets/webview2-download-screenshot.png b/docs/assets/webview2-download-screenshot.png
new file mode 100644
index 00000000..2f0bfdc8
--- /dev/null
+++ b/docs/assets/webview2-download-screenshot.png
Binary files differ