fix
This commit is contained in:
parent
3a5bdb3bbb
commit
d35871edd1
1 changed files with 9 additions and 2 deletions
|
|
@ -165,15 +165,22 @@ namespace Crafter {
|
||||||
}
|
}
|
||||||
command += std::format(" -fprebuilt-module-path={} -fprebuilt-module-path={}/wasi-sysroot-28.0/share/libc++/v1", pcmDir.string(), exeDir);
|
command += std::format(" -fprebuilt-module-path={} -fprebuilt-module-path={}/wasi-sysroot-28.0/share/libc++/v1", pcmDir.string(), exeDir);
|
||||||
|
|
||||||
|
|
||||||
const fs::path indexPath = std::format("{}/index.html", exeDir);
|
const fs::path indexPath = std::format("{}/index.html", exeDir);
|
||||||
const fs::path indexDstPath = binDir/"index.html";
|
const fs::path indexDstPath = binDir/"index.html";
|
||||||
if(!fs::exists(indexDstPath) || fs::last_write_time(indexDstPath) < fs::last_write_time(indexPath)) {
|
if(!fs::exists(indexDstPath)) {
|
||||||
|
fs::copy(indexPath, indexDstPath);
|
||||||
|
} else if(fs::last_write_time(indexDstPath) < fs::last_write_time(indexPath)) {
|
||||||
|
fs::remove(indexDstPath);
|
||||||
fs::copy(indexPath, indexDstPath);
|
fs::copy(indexPath, indexDstPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
const fs::path runtimePath = std::format("{}/runtime.js", exeDir);
|
const fs::path runtimePath = std::format("{}/runtime.js", exeDir);
|
||||||
const fs::path runtimeDstPath = binDir/"runtime.js";
|
const fs::path runtimeDstPath = binDir/"runtime.js";
|
||||||
if(!fs::exists(runtimeDstPath) || fs::last_write_time(runtimeDstPath) < fs::last_write_time(runtimePath)) {
|
if(!fs::exists(runtimeDstPath)) {
|
||||||
|
fs::copy(runtimePath, runtimeDstPath);
|
||||||
|
} else if(fs::last_write_time(runtimeDstPath) < fs::last_write_time(runtimePath)) {
|
||||||
|
fs::remove(runtimeDstPath);
|
||||||
fs::copy(runtimePath, runtimeDstPath);
|
fs::copy(runtimePath, runtimeDstPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue