Skip to content

Commit

Permalink
Add: Usage guide & dev documentation (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotrekol authored Sep 30, 2021
1 parent 2d83ee5 commit 12df14d
Show file tree
Hide file tree
Showing 55 changed files with 4,938 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: GitHub Pages

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: cd docs
- run: yarn install --frozen-lockfile
- run: yarn docs:build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/.vuepress/dist
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,9 @@ FakesAssemblies/
innoSetup/Output/
osu!StreamCompanion/Properties/Annotations\.cs

build/*/*
build/*/*

#docs
.temp
.cache
docs/docs/.vuepress/dist/
62 changes: 62 additions & 0 deletions docs/docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { defineUserConfig } from '@vuepress/cli';
import type { DefaultThemeOptions } from '@vuepress/theme-default';
import { sidebar } from './configs';

export default defineUserConfig<DefaultThemeOptions>({
lang: 'en-US',
title: 'StreamCompanion',
description: 'osu! information extractor... on steroids',
head: [
[
'link',
{
rel: 'icon',
type: 'image/png',
sizes: '16x16',
href: `/images/icons/favicon-16x16.png`,
},
],
[
'link',
{
rel: 'icon',
type: 'image/png',
sizes: '32x32',
href: `/images/icons/favicon-32x32.png`,
},
],
['link', { rel: 'manifest', href: '/manifest.webmanifest' }],
['meta', { name: 'application-name', content: 'StreamCompanion' }],
['meta', { name: 'apple-mobile-web-app-title', content: 'StreamCompanion' }],
['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }],
['link', { rel: 'apple-touch-icon', href: `/images/icons/apple-touch-icon.png` }],
[
'link',
{
rel: 'mask-icon',
href: '/images/icons/safari-pinned-tab.svg',
color: '#3eaf7c',
},
],
['meta', { name: 'msapplication-TileColor', content: '#3eaf7c' }],
['meta', { name: 'theme-color', content: '#3eaf7c' }],
],
themeConfig: {
logo: 'images/logo.svg',
repo: 'Piotrekol/StreamCompanion',
docsBranch: 'master',
docsDir: 'docs/docs',
locales: {
'/': {
navbar: [
{
text:"Discord",
link:"https://discord.gg/N854wYZ"
}
],
sidebar: sidebar.en,
editLinkText: 'Edit this page on GitHub',
},
},
},
});
1 change: 1 addition & 0 deletions docs/docs/.vuepress/configs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * as sidebar from './sidebar'
53 changes: 53 additions & 0 deletions docs/docs/.vuepress/configs/sidebar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import type { SidebarConfig } from '@vuepress/theme-default';

export const en: SidebarConfig = {
'/guide/': [
{
text: 'Guide',
children: [
'/guide/README.md',
'/guide/getting-started.md',
'/guide/configuration.md',
'/guide/in-game-overlays.md',
'/guide/gamma.md',
'/guide/tournament-mode.md',

'/cookbook/',
'/development/'
],
},
],
'/development/': [
{
text: 'Development',
children: [
'/development/gettingSource.md',
{
text: 'Documentation',
children: [
'/development/docs/',
],
},
{
text: 'StreamCompanion',
children: [
'/development/SC/',
'/development/SC/api.md',
'/development/SC/creating-a-plugin.md',
'/development/SC/event-flow.md',
'/development/SC/types-rundown.md',
'/development/SC/linuxSupport.md',
],
},
],
},
],
'/cookbook/': [
{
text: 'Cookbook',
children: [
'/cookbook/README.md',
],
},
],
};
9 changes: 9 additions & 0 deletions docs/docs/.vuepress/public/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/images/icons/mstile-150x150.png"/>
<TileColor>#ffffff</TileColor>
</tile>
</msapplication>
</browserconfig>
Binary file added docs/docs/.vuepress/public/favicon.ico
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions docs/docs/.vuepress/public/images/icons/safari-pinned-tab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions docs/docs/.vuepress/public/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions docs/docs/.vuepress/public/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "StreamCompanion",
"short_name": "StreamCompanion",
"theme_color": "#3eaf7c",
"background_color": "#fff",
"display": "standalone",
"icons": [
{
"src": "/images/icons/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/images/icons/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
Binary file added docs/docs/.vuepress/public/misc/PluginProject.zip
Binary file not shown.
32 changes: 32 additions & 0 deletions docs/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
home: true
title: Home
heroImage: /images/logo.svg
actions:
- text: Get Started
link: /guide/getting-started.html
type: primary
- text: Introduction
link: /guide/
type: secondary
- text: Development
link: /development/
type: secondary
features:
- title: Web overlays
details: Comes with minimal web server to serve your overlays!
- title: In-game overlay
details: Display any content inside osu! itself, be it simple text or full fledged web overlay.
- title: Gamma
details: Built in screen-gamma which adjusts with current map AR.
- title: Plugins
details: C# Plugin API, allowing plugins to provide lots of custom features.
- title: HTTP/WS API
details: Loosely integrate external applications using http or WebSocket endpoints.
footer: MIT Licensed | Copyright © 2018-present Piotrekol
---

::: warning
This guide is currently work in progress and may be missing entire pages.
Check back later or contribute on github!
:::
5 changes: 5 additions & 0 deletions docs/docs/cookbook/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Cookbooks

## Modifying SC overlays crash course (Vue.js)

TODO
5 changes: 5 additions & 0 deletions docs/docs/development/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Development

* [Getting full source code](./gettingSource.md)
* [StreamCompanion developer docs](./SC/)
* [building and contributing to this documentation](./docs/)
30 changes: 30 additions & 0 deletions docs/docs/development/SC/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Building StreamCompanion

## Prerequisites

* [.NET 5.0.x __x86 SDK__](https://dotnet.microsoft.com/download/dotnet/5.0)
* Optional:
* [Visual Studio Community](https://visualstudio.microsoft.com/pl/thank-you-downloading-visual-studio/?sku=Community). Not required, but recommended for plugin development.
* [InnoSetup](https://jrsoftware.org/download.php/is.exe). Used for creating Setup files.

## I just want to compile it myself

* **Step 1:** Install .NET SDK mentioned in [prerequisites](#prerequisites) if you haven't already.

* **Step 2:** Navigate to place where you downloaded full StreamCompanion source code ([here](../gettingSource.md)) and run `buildRelease.cmd` inside.

* **Step 3:** After successful build everything should be ready to use inside `build\Release` directory.

* **Optional Step 4:** Copy in-game overlay plugins from `build\Release_browserOverlay` & `build\Release_unsafe` to `build\Release` to have both text and browser in-game overlay plugins available.

## Building solution in Visual Studio

* **Step 1:** When you first open StreamCompanion solution it might have incorrect configuration selected, leading to solution-wide errors. To fix that you need to change configuration to either `Debug/x86` or `Release/x86`
![VSError][VSError]
<!--TODO: this will be fixed(and this step removed) whenever SC migrates to using AnyCPU configuration-->

* **Step 2:** Build whole solution by pressing <kbd>CTRL+SHIFT+B</kbd> or right click on top solution node and select `build`.

* **Step 3:** StreamCompanion can be now ran either from `build` folder or from Visual Studio with full debugger capability across plugins if it was built in `Debug` configuration.

[VSError]: <./images/VisualStudioSolutionError.png>
Loading

0 comments on commit 12df14d

Please sign in to comment.