Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
std-microblock committed Feb 10, 2024
1 parent a5d9a16 commit c6a887b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 11 deletions.
23 changes: 12 additions & 11 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
use std::{fs::File, io::Read, process::Command};

fn main() {
Command::new("./sciter/packfolder.exe")
.arg("./src/celemod-ui/dist")
.arg("./resources/dist.rc")
.arg("-binary")
.spawn()
.unwrap();

let output = Command::new("git")
.args(&["rev-parse", "HEAD"])
.output()
.unwrap();
let git_hash = String::from_utf8(output.stdout).unwrap();
let mut version = "".to_string();
File::open("version.txt").unwrap()
.read_to_string(&mut version).unwrap();
File::open("version.txt")
.unwrap()
.read_to_string(&mut version)
.unwrap();
println!("cargo:rustc-env=VERSION={}", version);
println!("cargo:rustc-env=GIT_HASH={}", git_hash);

Expand All @@ -24,18 +33,10 @@ fn main() {
"x86" => "win-x86",
_ => panic!("Unsupported target"),
}
},
}
"linux" => "linux",
"darwin" => "osx",
_ => panic!("Unsupported target"),
};
println!("cargo:rustc-env=TARGET={}", target);


Command::new("./sciter/packfolder.exe")
.arg("./src/celemod-ui/dist")
.arg("./resources/dist.rc")
.arg("-binary")
.spawn()
.unwrap();
}
1 change: 1 addition & 0 deletions src/celemod-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"build": "node build.js --prod"
},
"dependencies": {
"@babel/code-frame": "^7.23.5",
"@types/react-window": "^1.8.5",
"@types/react-window-infinite-loader": "^1.0.6",
"immer": ">=9.0",
Expand Down
22 changes: 22 additions & 0 deletions src/celemod-ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
dependencies:
"@babel/highlight" "^7.22.5"

"@babel/code-frame@^7.23.5":
version "7.23.5"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.23.5.tgz#9009b69a8c602293476ad598ff53e4562e15c244"
integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==
dependencies:
"@babel/highlight" "^7.23.4"
chalk "^2.4.2"

"@babel/compat-data@^7.22.5", "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.22.9":
version "7.22.9"
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730"
Expand Down Expand Up @@ -214,6 +222,11 @@
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f"
integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==

"@babel/helper-validator-identifier@^7.22.20":
version "7.22.20"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0"
integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==

"@babel/helper-validator-identifier@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193"
Expand Down Expand Up @@ -251,6 +264,15 @@
chalk "^2.0.0"
js-tokens "^4.0.0"

"@babel/highlight@^7.23.4":
version "7.23.4"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b"
integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==
dependencies:
"@babel/helper-validator-identifier" "^7.22.20"
chalk "^2.4.2"
js-tokens "^4.0.0"

"@babel/parser@^7.22.5", "@babel/parser@^7.22.7", "@babel/parser@^7.4.4":
version "7.22.7"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.7.tgz#df8cf085ce92ddbdbf668a7f186ce848c9036cae"
Expand Down

0 comments on commit c6a887b

Please sign in to comment.