Skip to content

Commit 3289f9e

Browse files
authored
Merge pull request #2503 from planetarium/release/2.7.4
Release/2.7.4 to main
2 parents a3f38a6 + 69f78af commit 3289f9e

34 files changed

+826
-343
lines changed

.github/workflows/release.yml

+20-5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- release/*
77
- hotfix/*
8+
- preview/*
89
tags: ["*"]
910

1011
permissions:
@@ -30,7 +31,7 @@ jobs:
3031
runs-on: ${{ matrix.os }}
3132

3233
environment:
33-
name: ${{ startsWith(github.event.ref, 'refs/tags/') && 'main' || 'internal' }}
34+
name: ${{ startsWith(github.event.ref, 'refs/tags/') && 'main' || startsWith(github.event.ref, 'refs/heads/preview/') && 'preview' || 'internal' }}
3435

3536
steps:
3637
- uses: actions/[email protected]
@@ -48,12 +49,10 @@ jobs:
4849
with:
4950
distribution: "temurin"
5051
java-version: "11"
51-
5252
- name: Sync time on Ubuntu
5353
continue-on-error: true
5454
if: runner.os == 'Linux'
5555
run: sudo chronyc -a makestep
56-
5756
- name: Sync time on macOS
5857
continue-on-error: true
5958
if: runner.os == 'macOS'
@@ -73,8 +72,20 @@ jobs:
7372
then
7473
sed "s/Please replace it/${{ secrets.APPLE_TEAM_ID }}/g" electron-builder.main.yml > temp2.txt
7574
mv temp2.txt electron-builder.main.yml
75+
elif [[ "${{ startsWith(github.event.ref, 'refs/heads/preview/') }}" == true ]]
76+
then
77+
timestamp=$(date +%y%m%d%H%M%S)
78+
version=$(jq -r .version package.json | awk -F'.' '{print $1"."$2}')
79+
jq --arg version "$version.$timestamp" '.version = $version' package.json > tmp.$$.json && mv tmp.$$.json package.json
80+
jq --arg suffix " Preview" '.productName += $suffix' package.json > tmp.$$.json && mv tmp.$$.json package.json
81+
jq --arg suffix "Preview" '.name += $suffix' package.json > tmp.$$.json && mv tmp.$$.json package.json
82+
sed 's/NineChronicles@workspace/NineChroniclesPreview@workspace/g' yarn.lock > temp1.txt
83+
mv temp1.txt yarn.lock
84+
mv ./signing/sandbox_code_sign_tool.properties ./tmp/codesign/conf/code_sign_tool.properties
85+
sed "s/Please replace it/${{ secrets.APPLE_TEAM_ID }}/g" electron-builder.preview.yml > temp2.txt
86+
mv temp2.txt electron-builder.preview.yml
7687
else
77-
timestamp=$(date +%s)
88+
timestamp=$(date +%y%m%d%H%M%S)
7889
version=$(jq -r .version package.json | awk -F'.' '{print $1"."$2}')
7990
jq --arg version "$version.$timestamp" '.version = $version' package.json > tmp.$$.json && mv tmp.$$.json package.json
8091
jq --arg suffix " Internal" '.productName += $suffix' package.json > tmp.$$.json && mv tmp.$$.json package.json
@@ -115,6 +126,11 @@ jobs:
115126
sh ./scripts/release.sh main ${{ matrix.packCmd }}
116127
aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DISTRIBUTION_ID }} --paths "/main/launcher/latest.yml"
117128
aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DISTRIBUTION_ID }} --paths "/main/launcher/latest-mac.yml"
129+
elif [[ "${{ startsWith(github.event.ref, 'refs/heads/preview/') }}" == true ]]
130+
then
131+
sh ./scripts/release.sh preview ${{ matrix.packCmd }}
132+
aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DISTRIBUTION_ID }} --paths "/main/launcher/latest.yml"
133+
aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DISTRIBUTION_ID }} --paths "/main/launcher/latest-mac.yml"
118134
else
119135
sh ./scripts/release.sh internal ${{ matrix.packCmd }}
120136
aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DISTRIBUTION_ID }} --paths "/internal/launcher/latest.yml"
@@ -127,7 +143,6 @@ jobs:
127143
rm -fR ./dist/*-unpacked
128144
rm -fR ./dist/mac
129145
rm -fR ./dist/mac-arm64
130-
131146
env:
132147
APPLE_ID: ${{ secrets.APPLE_ID }}
133148
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}

README.md

+26-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,35 @@
1-
# Nine Chronicles Launcher
1+
<br>
2+
3+
<div align="center">
4+
5+
[<img src="./src/main/resources/logo.png" width="144"/>](https://nine-chronicles.com/)
6+
7+
<h1 align="center">Nine Chronicles Launcher</h1>
8+
9+
<p align="center">
10+
<strong>Game Launcher with embedded NCG Wallet</strong>
11+
</p>
12+
213
[![Discord](https://img.shields.io/discord/539405872346955788?color=6278DA&label=Planetarium&logo=discord&logoColor=white)](https://discord.gg/JyujU8E4SD)
314
[![Planetarium-Dev Discord Invite](https://img.shields.io/discord/928926944937013338?color=6278DA&label=Planetarium-dev&logo=discord&logoColor=white)](https://discord.gg/RYJDyFRYY7)
4-
[Wiki for more in-depth information.](https://github.com/planetarium/9c-launcher/wiki)
15+
16+
</div>
517

618
## Overview
719

8-
Electron-based multi-platform game launcher to run [Nine Chronicles.](https://github.com/planetarium/NineChronicles)
20+
9c-launcher is a game launcher to run [Nine Chronicles](https://github.com/planetarium/NineChronicles), with embedded private key management & NCG wallet capabilities.
21+
The launcher is written in Typescript, and uses GraphQL, Electron, React.
22+
23+
## Features
24+
- Game execution and update, with multiple release channel support.
25+
- Automatically selects optimized RPC server for user's network
26+
- Private key creation, import from QR code or raw secp256k1 key, encrypt using [Web3 Secret Storage](https://ethereum.org/en/developers/docs/data-structures-and-encoding/web3-secret-storage/) specs.
27+
- [NCG](https://gold.nine-chronicles.com/) wallet: Send NCG to other addresses or swap to WNCG.
28+
- Supports Windows, macOS, Linux.
929

10-
## Installation
30+
## Setup
31+
> **Note**
32+
> The repository is under refactor process, v2 changes will be still migrated, but if you want to participate in new version, but if you want to participate ongoing refactoring check out [v3/dev](https://github.com/planetarium/9c-launcher/tree/v3/dev) and related branches.
1133
1234
First, install all dependencies required for development.
1335

electron-builder.internal.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ win:
1212
- target: "nsis"
1313
arch:
1414
- "x64"
15-
icon: "app.ico"
15+
icon: "./src/renderer/resources/launcher-icon/internal/app.ico"
1616
nsis:
1717
oneClick: false
1818
perMachine: false
1919
allowElevation: false
2020
allowToChangeInstallationDirectory: true
2121
deleteAppDataOnUninstall: true
2222
mac:
23-
icon: "AppIcon.icns"
23+
icon: "./src/renderer/resources/launcher-icon/internal/AppIcon.icns"
2424
target:
2525
- "dmg"
2626
- "zip"
@@ -30,7 +30,7 @@ mac:
3030
entitlementsInherit: "./signing/entitlements.inherit.plist"
3131
notarize: { teamId: "Please replace it" }
3232
dmg:
33-
icon: "AppIcon.icns"
33+
icon: "./src/renderer/resources/launcher-icon/internal/AppIcon.icns"
3434
sign: false
3535
iconSize: 75
3636
contents:

electron-builder.local.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ win:
1111
- "zip"
1212
icon: "app.ico"
1313
mac:
14-
icon: "AppIcon.icns"
14+
icon: "./src/renderer/resources/launcher-icon/main/AppIcon.icns"
1515
target:
1616
- "tar.gz"
1717
category: "public.app-category.games"

electron-builder.main.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ win:
1111
- target: "nsis"
1212
arch:
1313
- "x64"
14-
icon: "app.ico"
14+
icon: "./src/renderer/resources/launcher-icon/main/app.ico"
1515
sign: "./scripts/sign.js"
1616
nsis:
1717
oneClick: false
@@ -20,7 +20,7 @@ nsis:
2020
allowToChangeInstallationDirectory: true
2121
deleteAppDataOnUninstall: true
2222
mac:
23-
icon: "AppIcon.icns"
23+
icon: "./src/renderer/resources/launcher-icon/main/AppIcon.icns"
2424
target:
2525
- "dmg"
2626
- "zip"
@@ -30,7 +30,7 @@ mac:
3030
entitlementsInherit: "./signing/entitlements.inherit.plist"
3131
notarize: { teamId: "Please replace it" }
3232
dmg:
33-
icon: "AppIcon.icns"
33+
icon: "./src/renderer/resources/launcher-icon/main/AppIcon.icns"
3434
iconSize: 75
3535
sign: false
3636
contents:

electron-builder.preview.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
appId: "com.nine-chronicles-preview"
2+
asar: true
3+
productName: "Nine Chronicles Preview"
4+
files:
5+
- "!**/*"
6+
- from: build
7+
filter:
8+
- '**/*'
9+
win:
10+
target:
11+
- "zip"
12+
- target: "nsis"
13+
arch:
14+
- "x64"
15+
icon: "./src/renderer/resources/launcher-icon/preview/app.ico"
16+
nsis:
17+
oneClick: false
18+
perMachine: false
19+
allowElevation: false
20+
allowToChangeInstallationDirectory: true
21+
deleteAppDataOnUninstall: true
22+
mac:
23+
icon: "./src/renderer/resources/launcher-icon/preview/AppIcon.icns"
24+
target:
25+
- "dmg"
26+
- "zip"
27+
category: "public.app-category.games"
28+
hardenedRuntime: true
29+
entitlements: "./signing/entitlements.plist"
30+
entitlementsInherit: "./signing/entitlements.inherit.plist"
31+
notarize: { teamId: "Please replace it" }
32+
dmg:
33+
icon: "./src/renderer/resources/launcher-icon/preview/AppIcon.icns"
34+
sign: false
35+
iconSize: 75
36+
contents:
37+
- x: 130
38+
y: 200
39+
- x: 410
40+
y: 200
41+
type: "link"
42+
path: "/Applications"
43+
linux:
44+
target:
45+
- "zip"
46+
- "AppImage"
47+
publish:
48+
provider: "s3"
49+
bucket: "9c-release.planetariumhq.com"
50+
path: "preview/launcher"
51+
acl: "private"

package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "NineChronicles",
33
"productName": "Nine Chronicles",
4-
"version": "2.7.3",
4+
"version": "2.7.4",
55
"description": "Game Launcher for Nine Chronicles",
66
"author": "Planetarium <[email protected]>",
77
"license": "GPL-3.0",
@@ -24,12 +24,15 @@
2424
"build": "yarn codegen && webpack --env NODE_ENV=development --env target=render && webpack --env NODE_ENV=development --env target=main",
2525
"build-main": "yarn codegen && webpack --env NODE_ENV=production --env target=render --env DEFAULT_NETWORK=main && webpack --env NODE_ENV=production --env target=main --env DEFAULT_NETWORK=main",
2626
"build-internal": "yarn codegen && webpack --env NODE_ENV=production --env target=render --env DEFAULT_NETWORK=internal && webpack --env NODE_ENV=production --env target=main --env DEFAULT_NETWORK=internal",
27+
"build-preview": "yarn codegen && webpack --env NODE_ENV=production --env target=render --env DEFAULT_NETWORK=preview && webpack --env NODE_ENV=production --env target=main --env DEFAULT_NETWORK=preview",
2728
"server": "yarn webpack serve --env NODE_ENV=development --env target=render --hot",
2829
"start": "yarn webpack --env NODE_ENV=development --env target=main && electron ./build/.",
2930
"start:v2": "yarn webpack --env NODE_ENV=development --env target=main && electron ./build/. --v2",
3031
"pack-local": "yarn run build-internal && yarn run electron-builder -mw --x64 --config ./electron-builder.local.yml",
3132
"pack-internal": "yarn run build-internal && yarn run electron-builder -mwl --arm64 --x64 --config ./electron-builder.internal.yml",
33+
"pack-preview": "yarn run build-preview && yarn run electron-builder -mwl --arm64 --x64 --config ./electron-builder.preview.yml",
3234
"pack-main": "yarn run build-main && yarn run electron-builder -mwl --arm64 --x64 --config ./electron-builder.main.yml",
35+
"release-preview": "sh ./scripts/release.sh preview",
3336
"release-internal": "sh ./scripts/release.sh internal",
3437
"release-main": "sh ./scripts/release.sh main",
3538
"dev": "concurrently --kill-others \"yarn server\" \"yarn start\"",
@@ -85,7 +88,7 @@
8588
"electron-dl": "^3.0.2",
8689
"electron-log": "^4.4.8",
8790
"electron-store": "8.0.2",
88-
"electron-updater": "^5.3.0",
91+
"electron-updater": "^6.3.9",
8992
"fast-glob": "^3.2.11",
9093
"framer-motion": "^6.3.3",
9194
"graphql": "15.7.2",
@@ -177,7 +180,7 @@
177180
"terser-webpack-plugin": "^5.3.9",
178181
"typescript": "^5.2.2",
179182
"vitest": "^0.34.3",
180-
"webpack": "^5.88.2",
183+
"webpack": "^5.95.0",
181184
"webpack-cli": "^5.1.4",
182185
"webpack-dev-server": "^4.15.1"
183186
},

scripts/icon-generator.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
magick pc_Launcher_1024x1024_R.png -resize 32x32 icon-32.png
2+
magick pc_Launcher_1024x1024_R.png -resize 48x48 icon-48.png
3+
magick pc_Launcher_1024x1024_R.png -resize 96x96 icon-96.png
4+
magick pc_Launcher_1024x1024_R.png -resize 256x256 icon-256.png
5+
magick pc_Launcher_1024x1024_R.png -resize 512x512 icon-512.png
6+
magick icon-32.png icon-48.png icon-96.png icon-256.png icon-512.png app.ico
7+
mkdir AppIcon.iconset
8+
mv icon-32.png AppIcon.iconset/icon_16x16.png
9+
magick pc_Launcher_1024x1024_R.png -resize 16x16 AppIcon.iconset/[email protected]
10+
mv icon-48.png AppIcon.iconset/icon_32x32.png
11+
magick pc_Launcher_1024x1024_R.png -resize 64x64 AppIcon.iconset/[email protected]
12+
mv icon-96.png AppIcon.iconset/icon_128x128.png
13+
magick pc_Launcher_1024x1024_R.png -resize 256x256 AppIcon.iconset/[email protected]
14+
mv icon-256.png AppIcon.iconset/icon_256x256.png
15+
magick pc_Launcher_1024x1024_R.png -resize 512x512 AppIcon.iconset/[email protected]
16+
mv icon-512.png AppIcon.iconset/icon_512x512.png
17+
cp pc_Launcher_1024x1024_R.png AppIcon.iconset/[email protected]
18+
iconutil -c icns AppIcon.iconset
19+
rm -rf pc_Launcher_1024x1024_R.png AppIcon.iconset

src/interfaces/config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,5 @@ export interface IConfig {
4141
Maintenance: boolean;
4242
SwapAvailabilityCheckServiceUrl: string;
4343
ArenaServiceUrl: string;
44+
ThorSeasonBannerUrl: string | undefined;
4445
}

src/renderer/components/core/Layout/UserInfo/Button.tsx

-37
This file was deleted.

src/renderer/components/core/Layout/UserInfo/NoticeOverlay.tsx

-58
This file was deleted.

0 commit comments

Comments
 (0)