Skip to content

Commit

Permalink
Merge pull request #12 from gurrrrrrett3/main
Browse files Browse the repository at this point in the history
Add Linux support
  • Loading branch information
SenkyDragon authored Jan 24, 2024
2 parents 7735261 + 13c8784 commit e303851
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"start": "electron .",
"startFromWsl": "build/startFromWsl.sh",
"watchFrontend": "cd src/frontend && webpack --watch",
"watchMain": "cd src/main && webpack --watch"
"watchMain": "cd src/main && webpack --watch",
"build": "cd src/main && webpack && cd ../frontend && webpack",
"rebuild": "npm run build && npm run start"
},
"repository": "https://github.com/OscToys/OscGoesBrrr",
"license": "CC BY-NC-SA 4.0",
Expand Down Expand Up @@ -63,6 +65,11 @@
"icon": "src/icons/ogb-logo.ico",
"artifactName": "OscGoesBrrr-setup.exe"
},
"linux": {
"target": "AppImage",
"icon": "src/icons/ogb-logo.png",
"artifactName": "OscGoesBrrr.AppImage"
},
"nsis": {
"installerIcon": "src/icons/ogb-installer.ico"
},
Expand Down
2 changes: 1 addition & 1 deletion src/main/OscConfigDeleter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import existsAsync from "../common/existsAsync";
import {SubLogger} from "./services/LoggerService";
import OgbConfigService from "./services/OgbConfigService";

const oscDir = Path.resolve(app.getPath('appData'), '../LocalLow/VRChat/VRChat/OSC');
const oscDir = process.platform == 'win32' ? Path.resolve(app.getPath('appData'), '../LocalLow/VRChat/VRChat/OSC') : Path.resolve(app.getPath('home'), '.local/share/Steam/steamapps/compatdata/438100/pfx/drive_c/users/steamuser/AppData/LocalLow/VRChat/VRChat/OSC');
const bakDir = Path.resolve(oscDir, '../OSC.bak');
const oldBakDir = Path.resolve(oscDir, 'bak');

Expand Down
2 changes: 1 addition & 1 deletion src/main/services/VrchatLogFinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import fsPlain from "fs";
/** Finds and keeps track of the local VRChat OSCQ service address */
@Service()
export default class VrchatLogFinder {
private static readonly logDir = Path.resolve(app.getPath('appData'), '../LocalLow/VRChat/VRChat');
private static readonly logDir = process.platform == 'win32' ? Path.resolve(app.getPath('appData'), '../LocalLow/VRChat/VRChat') : Path.resolve(app.getPath('home'), '.local/share/Steam/steamapps/compatdata/438100/pfx/drive_c/users/steamuser/AppData/LocalLow/VRChat/VRChat/');

public async getLatestLog() {
const files = await fs.readdir(VrchatLogFinder.logDir);
Expand Down
2 changes: 0 additions & 2 deletions src/main/services/VrchatOscqueryService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ const HostInfo = z.object({
export default class VrchatOscqueryService {
private readonly logger;

private static readonly logDir = Path.resolve(app.getPath('appData'), '../LocalLow/VRChat/VRChat');

private oscqAddress?: string;
private oscqPort?: number;
private oscAddress?: string;
Expand Down
5 changes: 5 additions & 0 deletions src/main/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ export default class Updater {
}
}
async checkAndNotifyUnsafe() {
if (process.platform !== 'win32') {
console.log("Not checking for updates, not on windows");
return;
}

console.log("Checking for updates ...");

let myversion = app.getVersion();
Expand Down

0 comments on commit e303851

Please sign in to comment.