Skip to content

Commit

Permalink
Update dependencies (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
toyobayashi authored Mar 6, 2024
1 parent 8079149 commit 6b66ab0
Show file tree
Hide file tree
Showing 33 changed files with 15,965 additions and 12,382 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
os: [windows-latest, ubuntu-latest, macos-13]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14.x'
node-version: '18.17.1'
registry-url: 'https://registry.npmjs.org'

- name: Get npm cache directory
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
./app/script/build.sh
- name: macOS build
if: ${{ matrix.os == 'macos-latest' }}
if: ${{ contains(matrix.os, 'macos') }}
shell: bash
run: |
chmod +x ./app/script/build.sh
Expand Down
29 changes: 10 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,23 @@ Repo: [mishiro-score-viewer](https://github.com/toyobayashi/mishiro-score-viewer
### Windows Require

* __Windows 7+__
* __Node.js 12+__
* __Python 2.7__ ( 3.x is not supported by `node-gyp` yet)
* __Visual Studio 2015/2017/2019 with C++ Desktop workload installed__
* __.NET & Powershell__
* __Node.js 18+__
* __Python 3__
* __Visual Studio 2022 with C++ Desktop workload installed__
* __.NET & Powershell__

### Linux Require

* __Node.js 12+__
* __Python 2.7__
* __Node.js 18+__
* __Python 3__
* __gcc & g++__
* __make__
* __zip & unzip__

### MacOS Require (This part is not tested)

* __Node.js 12+__
* __Python 2.7__
* __Node.js 18+__
* __Python 3__
* __Xcode__ (install Command Line Tools by running ```xcode-select --install``` in your terminal)

### Quick Start
Expand Down Expand Up @@ -94,18 +94,10 @@ Repo: [mishiro-score-viewer](https://github.com/toyobayashi/mishiro-score-viewer
``` bat
> cd mishiro/app
REM set global npm config toolset variable
REM if your VC++ toolset is not v140 (VS 2015)
> npm config set toolset v142
REM install node-gyp@5
> npm install -g node-gyp
REM it's important to set the npm_config_node_gyp environment variable to tell npm using global installed node-gyp
> for /f "delims=" %P in ('npm prefix -g') do npm config set node_gyp "%P\node_modules\node-gyp\bin\node-gyp.js"
REM install electron's node C++ header
> for /f "delims=" %P in ('node -p "require('./package.json').devDependencies.electron"') do node-gyp install --target=%P --dist-url=https://atom.io/download/electron
> for /f "delims=" %P in ('node -p "require('./package.json').devDependencies.electron"') do node-gyp install --target=%P --dist-url=https://electronjs.org/headers
REM install dependencies
> npm install
Expand All @@ -119,8 +111,7 @@ Repo: [mishiro-score-viewer](https://github.com/toyobayashi/mishiro-score-viewer
$ cd mishiro/app
$ npm install -g node-gyp
$ npm config set node_gyp "`npm prefix -g`/lib/node_modules/node-gyp/bin/node-gyp.js"
$ node-gyp install --target=$(node -p require\(\'./package.json\'\).devDependencies.electron) --dist-url=https://atom.io/download/electron
$ node-gyp install --target=$(node -p require\(\'./package.json\'\).devDependencies.electron) --dist-url=https://electronjs.org/headers
$ npm install
$ npm run get # get external resources
Expand Down
36 changes: 13 additions & 23 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@
### Windows 需要

* __Windows 7 以上__
* __Node.js 12+__
* __Python 2.7__`node-gyp` 现在不支持 3.x )
* __Visual Studio 2015/2017/2019 并安装`使用 C++ 的桌面开发`工作负载或 `VC++ v140+ 构建工具集`__
* __.NET 和 Powershell__ (Windows 10 有自带)
* __Node.js 18+__
* __Python 3__
* __Visual Studio 2022 并安装`使用 C++ 的桌面开发`工作负载或 `VC++ v140+ 构建工具集`__
* __.NET 和 Powershell__

### Linux 需要

* __Node.js 12+__
* __Python 2.7__
* __Node.js 18+__
* __Python 3__
* __gcc & g++__
* __make__
* __zip & unzip__

### MacOS 需要 (这部分未测试)

* __Node.js 12+__
* __Python 2.7__
* __Node.js 18+__
* __Python 3__
* __Xcode__ (终端运行 ```xcode-select --install``` 安装Command Line Tools)

### 快速开始
Expand Down Expand Up @@ -78,22 +78,13 @@
> cd mishiro/app
REM 设置国内镜像
> npm config set registry http://registry.npm.taobao.org/
> npm config set electron_mirror https://npm.taobao.org/mirrors/electron/
> npm config set registry https://registry.npmmirror.com/
> npm config set electron_mirror https://registry.npmmirror.com/-/binary/electron/
REM 特别的,如果安装的 VC++ 构建工具集版本不是 v140 (VS 2015)
REM 需要全局设置一下 toolset 变量让 sqlite3 能够编译通过
> npm config set toolset v142
REM 安装 node-gyp@5
> npm install -g node-gyp
REM 这一步很重要,把 npm 内部使用的 node-gyp 设置成全局安装的 node-gyp
REM 新版 node-gyp 的头文件缓存位置和老版本不一样,没有这一步安装原生模块依赖时可能会报找不到头文件的错
> for /f "delims=" %P in ('npm prefix -g') do npm config set node_gyp "%P\node_modules\node-gyp\bin\node-gyp.js"
REM 根据 package.json 中指定的 electron 版本下载对应的头文件
> for /f "delims=" %P in ('node -p "require('./package.json').devDependencies.electron"') do node-gyp install --target=%P --dist-url=https://npm.taobao.org/mirrors/atom-shell
> for /f "delims=" %P in ('node -p "require('./package.json').devDependencies.electron"') do node-gyp install --target=%P --dist-url=https://electronjs.org/headers
REM 安装依赖
> npm install
Expand All @@ -107,11 +98,10 @@
$ cd mishiro/app
$ npm config set registry http://registry.npm.taobao.org/
$ npm config set electron_mirror https://npm.taobao.org/mirrors/electron/
$ npm config set electron_mirror https://registry.npmmirror.com/-/binary/electron/
$ npm install -g node-gyp
$ npm config set node_gyp "`npm prefix -g`/lib/node_modules/node-gyp/bin/node-gyp.js"
$ node-gyp install --target=$(node -p require\(\'./package.json\'\).devDependencies.electron) --dist-url=https://npm.taobao.org/mirrors/atom-shell
$ node-gyp install --target=$(node -p require\(\'./package.json\'\).devDependencies.electron) --dist-url=https://electronjs.org/headers
$ npm install
$ npm run get # 获取开发所需要的额外的资源
Expand Down
4 changes: 3 additions & 1 deletion app/.npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
build_from_source=true
runtime=electron
target=13.1.7
target=27.3.2
disturl=https://electronjs.org/headers
# openssl_fips=
# napi_build_version=9
1 change: 1 addition & 0 deletions app/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"typescript.tsdk": "./node_modules/typescript/lib",
"eslint.validate": [
"javascript",
"typescript",
Expand Down
Loading

0 comments on commit 6b66ab0

Please sign in to comment.