Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coh2 Game Stat Windows App #125

Merged
merged 23 commits into from
Jan 29, 2022
Merged

Coh2 Game Stat Windows App #125

merged 23 commits into from
Jan 29, 2022

Conversation

JohannesMerkt
Copy link
Collaborator

@JohannesMerkt JohannesMerkt commented Jan 19, 2022

Here we go the app we have been talking about in: #124

Features:

  • watches Coh2s log file and displays player stats of players in the current/last played game
    grafik

  • Shows team rankings if expanded
    grafik

  • When selecting a player it opens the coh2ladders player card, either in browser or in a new window depending on the application settings
    grafik

  • Can run in system tray if set in application settings

  • Can send a notification when a game is found if enabled in settings (however seems like windows suppresses notifications when running a game)

  • Only needs one relic API call for each new game

  • Automatically locates the log file but also allowes manual location

  • Ability to change the checking interval
    grafik

  • Streamer mode - When enabled hosts a website on localhost. In OBS this can be used to display a overlay with a Browser source pointed to the hosted site.
    grafik
    grafik
    grafik

  • Two layout variants for the streamer mode
    grafik
    grafik

  • When in loading screen the ranks will be displayed on the corresponding player cards
    grafik

  • Streamer mode detects when in the starting menu of coh2, then it displays nothing. Only displays player stats in loading screen and ingame

Usage

yarn install in the repos root folder

To run in dev mode use yarn app start.

To create a exe and a installer use yarn app make

A couple of things to mention

  • Hot reload in development is not working
  • There is a automatic publish feature that has not been testet or set up yet

@JohannesMerkt JohannesMerkt marked this pull request as ready for review January 19, 2022 12:31
@petrvecera
Copy link
Member

Hi , I am gonna check this our this weekend!

packages/app/assets/streamerOverlay/antd.dark.min.css Outdated Show resolved Hide resolved
packages/app/src/main/config.ts Outdated Show resolved Hide resolved
@petrvecera
Copy link
Member

I run into an issue with building the functions on this branch... I have seen this error before - it's just some weird package incompatibility bullshit

C:\Git\petrvecera\coh2ladders>yarn functions build
yarn run v1.22.5
$ yarn workspace @coh2ladders/functions build
$ tsc
../../node_modules/@types/eslint-scope/node_modules/@types/eslint/helpers.d.ts:1:6 - error TS2300: Duplicate identifier 'Prepend'.

1 type Prepend<Tuple extends any[], Addend> = ((_: Addend, ..._1: Tuple) => any) extends (..._: infer Result) => any
       ~~~~~~~

  ../../node_modules/@types/eslint/helpers.d.ts:1:6
    1 type Prepend<Tuple extends any[], Addend> = ((_: Addend, ..._1: Tuple) => any) extends (..._: infer Result) => any
           ~~~~~~~
    'Prepend' was also declared here.

../../node_modules/@types/eslint/helpers.d.ts:1:6 - error TS2300: Duplicate identifier 'Prepend'.

1 type Prepend<Tuple extends any[], Addend> = ((_: Addend, ..._1: Tuple) => any) extends (..._: infer Result) => any
       ~~~~~~~

  ../../node_modules/@types/eslint-scope/node_modules/@types/eslint/helpers.d.ts:1:6
    1 type Prepend<Tuple extends any[], Addend> = ((_: Addend, ..._1: Tuple) => any) extends (..._: infer Result) => any
           ~~~~~~~
    'Prepend' was also declared here.

And I have little problem with installing the packages, which version of NodeJS are you using please?
It would be great if this worked with Node14 as that's what we have in cloud functions but we could migrate to Node 16 if necessary.

I should have gyp installed as I run other projects which required it just fine, not sure what's the problem here

Arguments:
Directory: C:\\Git\\petrvecera\\coh2ladders\\node_modules\\electron-active-window
Output:
'prebuild-install' is not recognized as an internal or external command,
operable program or batch file.
gyp info it worked if it ends with ok
gyp info using node-gyp@8.4.1
gyp info using node@14.18.3 | win32 | x64
gyp info find Python using Python version 3.6.3 found at \"C:\\Users\\pagep\\AppData\\Local\\Programs\\Python\\Python36-32\\python.exe\"
gyp ERR! find VS
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS running in VS Command Prompt, installation path is:
gyp ERR! find VS \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\"
gyp ERR! find VS - will only use this version
gyp ERR! find VS checking VS2019 (16.11.32106.194) found at:
gyp ERR! find VS \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\"
gyp ERR! find VS - found \"Visual Studio C++ core features\"
gyp ERR! find VS - missing any VC++ toolset
gyp ERR! find VS checking VS2019 (16.11.32106.194) found at:
gyp ERR! find VS \"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\"
gyp ERR! find VS - found \"Visual Studio C++ core features\"
gyp ERR! find VS - missing any VC++ toolset
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the \"Desktop development with C++\" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (C:\\Git\\petrvecera\\coh2ladders\\node_modules\\node-gyp\\lib\\find-visualstudio.js:122:47)
gyp ERR! stack     at C:\\Git\\petrvecera\\coh2ladders\\node_modules\\node-gyp\\lib\\find-visualstudio.js:75:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\\Git\\petrvecera\\coh2ladders\\node_modules\\node-gyp\\lib\\find-visualstudio.js:363:14)
gyp ERR! stack     at C:\\Git\\petrvecera\\coh2ladders\\node_modules\\node-gyp\\lib\\find-visualstudio.js:71:14
gyp ERR! stack     at C:\\Git\\petrvecera\\coh2ladders\\node_modules\\node-gyp\\lib\\find-visualstudio.js:384:16
gyp ERR! stack     at C:\\Git\\petrvecera\\coh2ladders\\node_modules\\node-gyp\\lib\\util.js:54:7
gyp ERR! stack     at C:\\Git\\petrvecera\\coh2ladders\\node_modules\\node-gyp\\lib\\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:390:5)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at maybeClose (internal/child_process.js:1058:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
gyp ERR! System Windows_NT 10.0.19043
gyp ERR! command \"C:\\\\Program Files\\\\nodejs\\\\node.exe\" \"C:\\\\Git\\\\petrvecera\\\\coh2ladders\\\\node_modules\\\\node-gyp\\\\bin\\\\node-gyp.js\" \"rebuild\"
gyp ERR! cwd C:\\Git\\petrvecera\\coh2ladders\\node_modules\\electron-active-window
Done in 18.94s.

@JohannesMerkt
Copy link
Collaborator Author

i am using:
node v14.17.6
yarn 1.22.17
npm 6.14.15

When i try to build the cloud functions i run into the same error.

I also got an error sometimes when I ran yarn fix, so I tried updating eslint, as suggested online, it worked then on my system but not in the CI Run tests anymore. So I reverted the changes and the error on my system dissapeared and CI worked again too. That was strange...

@petrvecera
Copy link
Member

Let's marge this 👍

@petrvecera petrvecera merged commit 7083443 into cohstats:master Jan 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants