Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
NotThorny committed Dec 23, 2024
1 parent 4d98cd9 commit b28c388
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cultivation",
"version": "1.5.1",
"version": "1.5.2",
"private": true,
"dependencies": {
"@tauri-apps/api": "^1.0.0-rc.5",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cultivation"
version = "1.5.1"
version = "1.5.2"
description = "A custom launcher for anime game."
authors = ["KingRainbow44", "SpikeHD"]
license = ""
Expand Down
Binary file added src-tauri/patch/52version.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"package": {
"productName": "Cultivation",
"version": "1.5.1"
"version": "1.5.2"
},
"tauri": {
"allowlist": {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/news/NewsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default class NewsSection extends React.Component<IProps, IState> {
<tr>
<td>
Work in progress area! These numbers may be outdated, so please do not use them as reference. Latest
version: Grasscutter 1.7.4 - Cultivation 1.5.1
version: Grasscutter 1.7.4 - Cultivation 1.5.2
</td>
</tr>
)
Expand Down
18 changes: 16 additions & 2 deletions src/utils/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,34 @@ export async function getGameDataFolder() {

export async function getGameVersion() {
const GameData = await getGameDataFolder()
const platform = await invoke('get_platform')

if (!GameData) {
return null
}

const hasAsb = await invoke('dir_exists', {
let hasAsb = await invoke('dir_exists', {
path: GameData + '\\StreamingAssets\\asb_settings.json',
})

if (platform != 'windows') {
hasAsb = await invoke('dir_exists', {
path: GameData + '/StreamingAssets/asb_settings.json',
})
}

if (!hasAsb) {
// For games that cannot determine game version
const otherGameVer: string = await invoke('read_file', {
let otherGameVer: string = await invoke('read_file', {
path: GameData + '\\StreamingAssets\\BinaryVersion.bytes',
})

if (platform != 'windows') {
otherGameVer = await invoke('read_file', {
path: GameData + '/StreamingAssets/BinaryVersion.bytes',
})
}

const versionRaw = otherGameVer.split('.')
const version = {
major: parseInt(versionRaw[0]),
Expand Down

0 comments on commit b28c388

Please sign in to comment.