Skip to content

Commit

Permalink
update to 1.25 and optimize builder conf etc
Browse files Browse the repository at this point in the history
also optimized positive timing exp
and start to support arm64
  • Loading branch information
RoderickQiu committed Jun 30, 2022
1 parent 4722663 commit 9e630ef
Show file tree
Hide file tree
Showing 10 changed files with 89 additions and 189 deletions.
116 changes: 57 additions & 59 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,63 +1,61 @@
name: Build
name : Build

on:
[push, pull_request]
on :
[ push, pull_request ]

jobs:
build-windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: 'yarn'
- name: Install deps
run: yarn
- name: Build windows nsis installer
run: npm run nsis
- name: Build windows nsis installer (x86/ia32)
run: npm run nsis-ia32
- name: Build windows 7zip protable version
run: npm run 7zip
- name: Build windows 7zip protable version (x86/ia32)
run: npm run 7zip-ia32
- uses: actions/upload-artifact@v2
with:
path: |
packaged/wnr-*-Setup-64.exe
packaged/wnr-*-Setup-32.exe
packaged/wnr-*-Win-64.7z
packaged/wnr-*-Win-32.7z
jobs :
build-windows :
runs-on : windows-latest
steps :
- uses : actions/checkout@v2
- uses : actions/setup-node@v2
with :
node-version : 16
cache : 'yarn'
- name : Install deps
run : yarn
- name : Build windows nsis installer
run : npm run nsis
- name : Build windows 7zip protable version
run : npm run 7zip
- uses : actions/upload-artifact@v2
with :
path : |
packaged/wnr-*-Setup-x64.exe
packaged/wnr-*-Setup-ia32.exe
packaged/wnr-*-Win-x64.7z
packaged/wnr-*-Win-ia32.7z
build-macos:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: 'yarn'
- name: Install deps
run: yarn
- name: Build macos version
run: npm run mac
- uses: actions/upload-artifact@v2
with:
path: packaged/wnr-*-MacOS.dmg
build-macos :
runs-on : macos-latest
steps :
- uses : actions/checkout@v2
- uses : actions/setup-node@v2
with :
node-version : 16
cache : 'yarn'
- name : Install deps
run : yarn
- name : Build macos version
run : npm run mac
- uses : actions/upload-artifact@v2
with :
path : |
packaged/wnr-*-MacOS-x64.dmg
packaged/wnr-*-MacOS-arm64.dmg
build-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: 'yarn'
- name: Install deps
run: yarn
- name: Build AppImage
run: npm run appimage
- uses: actions/upload-artifact@v2
with:
path: packaged/wnr-*-Linux.AppImage
build-linux :
runs-on : ubuntu-latest
steps :
- uses : actions/checkout@v2
- uses : actions/setup-node@v2
with :
node-version : 16
cache : 'yarn'
- name : Install deps
run : yarn
- name : Build AppImage
run : npm run appimage
- uses : actions/upload-artifact@v2
with :
path : packaged/wnr-*-Linux.AppImage
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{
"name": "wnr",
"version": "1.24.0",
"version": "1.25.0",
"description": "Work and rest, with wnr now!",
"main": "main.js",
"scripts": {
"dep-update": "yarn",
"start": "cross-env NODE_ENV=development electron .",
"nsis": "cross-env NODE_ENV=production node ./res/builder/nsis.js",
"nsis-ia32": "cross-env NODE_ENV=production node ./res/builder/nsis-ia32.js",
"7zip": "cross-env NODE_ENV=portable node ./res/builder/win-zip.js",
"7zip-ia32": "cross-env NODE_ENV=portable node ./res/builder/win-zip-ia32.js",
"mac": "cross-env NODE_ENV=production node ./res/builder/mac.js",
"linux": "cross-env NODE_ENV=production node ./res/builder/linux.js",
"appimage": "cross-env NODE_ENV=production node ./res/builder/appimage.js",
Expand Down
Binary file added res/builder/dmgResources/background.tiff
Binary file not shown.
15 changes: 10 additions & 5 deletions res/builder/mac.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ const config = {
"./node_modules/node-notifier/vendor/**",
"./res/icons/**"
],
"target": [
"dmg"
],
"target": {
"arch": ['arm64', 'x64'],
"target": 'dmg'
},
"icon": "res/icons/iconMac.icns",
"darkModeSupport": true,
"files": [
Expand All @@ -29,8 +30,12 @@ const config = {
},
"dmg": {
"icon": "res/icons/iconMac.icns",
"backgroundColor": "#fefefe",
"artifactName": "${productName}-${version}-MacOS.${ext}"
"background": "res/builder/dmgResources/background.tiff",
"artifactName": "${productName}-${version}-MacOS-${arch}.${ext}",
"format": "UDBZ",
"sign": "false",
"contents": [{ "x": 350, "y": 170, "type": "link", "path": "/Applications" },
{ "x": 150, "y": 170, "type": "file" }]
},
"publish": null
}
Expand Down
59 changes: 0 additions & 59 deletions res/builder/nsis-ia32.js

This file was deleted.

5 changes: 3 additions & 2 deletions res/builder/nsis.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const config = {
],
"target": [
{
"target": "nsis"
"target": "nsis",
"arch": ["x64", "ia32"]
}
],
"icon": "res/icons/iconWin.ico",
Expand All @@ -38,7 +39,7 @@ const config = {
"license": "LICENSE",
"oneClick": false,
"installerSidebar": "res/builder/nsisResources/installerSidebar.bmp",
"artifactName": "${productName}-${version}-Setup-64.${ext}",
"artifactName": "${productName}-${version}-Setup-${arch}.${ext}",
"allowToChangeInstallationDirectory": true
},
"publish": null
Expand Down
44 changes: 0 additions & 44 deletions res/builder/win-zip-ia32.js

This file was deleted.

7 changes: 5 additions & 2 deletions res/builder/win-zip.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ const config = {
"./res/icons/**"
],
"target": [
"7z"
{
"target": "7z",
"arch": ["x64", "ia32"]
}
],
"icon": "res/icons/iconWin.ico",
"files": [
Expand All @@ -24,7 +27,7 @@ const config = {
"!designs/**",
"!./node_modules/node-notifier/vendor/mac.noindex/**"
],
"artifactName": "${productName}-${version}-Win-64.${ext}"
"artifactName": "${productName}-${version}-Win-${arch}.${ext}"
},
"publish": null
}
Expand Down
2 changes: 0 additions & 2 deletions timer.html
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,6 @@ <h3>
//method = 3 means liberal / positive timer
if (methodFromStart === 3) {
$(".work").addClass("positive");
$("#skipper-container").css("display", "none");
$("#skipper-space").css("display", "none");
$("#bottom-bar").css("display", "none");

timingData.set("last-recorded-minutes-left", 0);
Expand Down
26 changes: 13 additions & 13 deletions update.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"version": "1.24.0",
"version": "1.25.0",
"feature-introduction": false,
"content": {
"zh-CN": [
"由于作者将参加高考(高中生), 6 月前将不再更新(除非特大 BUG 出现),一些之前想加的功能,因没时间先不加了",
"带来重新设计的首页、设置页面体验,更加直观",
"新增长休息功能(需前往设置页面来手动开启)",
"修复了和计时、提醒、报错相关的几个 BUG,优化了数个页面的 UI 体验"
"此版本主要解决了此前几个月由于准备考试未能解决的诸 issues 中提出的问题和功能,以及一些新发现的 bugs,并开始提供 arm64 版本的 macOS 包裹",
"优化以下功能:统计模块、单纯计时功能、核心计时组件",
"添加一些设置项:时间段结束后提醒的通知但不弹出模式、调节提示音音量、界面缩放、设置星期的第一天",
"修复了以下 bugs:家长控制模式下多进程屏蔽失效、强制退出后再进入剩余时间不正确、菜单中显示或隐藏按钮在macOS上功能不正常等"
],
"zh-TW": [
"由於作者將參加高考(高中生), 6 月前將不再更新(除非特大 BUG 出現),一些之前想加的功能,因沒時間先不加了",
"帶來重新設計的首頁、設置頁面體驗,更加直觀",
"新增長休息功能(需前往設置頁面來手動開啓)",
"修復了和計時、提醒、報錯相關的幾個 BUG,優化了數個頁面的 UI 體驗"
"此版本主要解決了此前幾個月由於準備考試未能解決的諸 issues 中提出的問題和功能,以及一些新發現的 bugs,並開始提供 arm64 版本的 macOS 包裹",
"優化以下功能:統計模塊、單純計時功能、核心計時組件",
"添加一些設置項:時間段結束後提醒的通知但不彈出模式、調節提示音音量、界面縮放、設置星期的第一天",
"修復了以下 bugs:家長控制模式下多進程屏蔽失效、強制退出後再進入剩餘時間不正確、菜單中顯示或隱藏按鈕在macOS上功能不正常等"
],
"en": [
"BUSY PREPARING FOR GAOKAO, I WILL PAUSE UPDATING THIS SOFTWARE BEFORE THIS JUNE IF THERE ARE NO BIG BUGS.",
"The newly designed index page and preferences panel.",
"Long break feature (need manual configuration in the preferences panel).",
"Several annoying bugs fixed & UI optimized."
"This version mainly solved the issues that wasn't fixed during the last semester when I was busily preparing for my exams. Also, arm64 (M1) arch of macOS is now natively supported.",
"Optimized: statistics, simple countdown mode and core timing component.",
"Updated settings panel: no pop-up mode for notifying when a period of time finishes, notify sound volume control, window zoom ratio control and changing the first day of a week.",
"Fixed several bugs related to timing, parent-control mode and macOS experience."
]
},
"introduce": {
Expand Down

0 comments on commit 9e630ef

Please sign in to comment.