Skip to content

Commit e00e03e

Browse files
committed
removed unnecessary files from web build
1 parent 741a4d2 commit e00e03e

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

src/webbridge/install.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,22 @@ function copyFile(src, dst) {
1818
}
1919
}
2020

21-
// Copy src files
22-
copyFile(HERE+"/viewer/viewer.html", OUTPUT_DIR+"/MuseScoreStudio.html"); // replace origin MuseScoreStudio.html
23-
copyFile(HERE+"/viewer/index.html", OUTPUT_DIR+"/index.html");
24-
copyFile(HERE+"/viewer/run_server.sh", OUTPUT_DIR+"/run_server.sh");
21+
// Remove Unnecessary Qt files
22+
fs.rmSync(OUTPUT_DIR+"/MuseScoreStudio.html", {force: true})
23+
fs.rmSync(OUTPUT_DIR+"/qtloader.js", {force: true})
24+
fs.rmSync(OUTPUT_DIR+"/qtlogo.svg", {force: true})
2525

26+
// Copy api
2627
fs.mkdirSync(OUTPUT_DIR+"/distr", { recursive: true });
2728
copyFile(HERE+"/distr/muapi.js", OUTPUT_DIR+"/distr/muapi.js");
2829
copyFile(HERE+"/distr/muimpl.js", OUTPUT_DIR+"/distr/muimpl.js");
29-
copyFile(HERE+"/distr/qtloader.js", OUTPUT_DIR+"/distr/qtloader.js");
30+
copyFile(HERE+"/distr/qtloader.js", OUTPUT_DIR+"/distr/qtloader.js");
31+
32+
// Copy viewer
33+
copyFile(HERE+"/viewer/viewer.html", OUTPUT_DIR+"/viewer.html");
34+
copyFile(HERE+"/viewer/index.html", OUTPUT_DIR+"/index.html");
35+
copyFile(HERE+"/viewer/index.html", OUTPUT_DIR+"/MuseScoreStudio.html");
36+
37+
// Copy tools
38+
copyFile(HERE+"/viewer/run_server.sh", OUTPUT_DIR+"/run_server.sh");
39+

src/webbridge/viewer/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<html>
22
<head>
3-
<meta http-equiv="refresh" content="0;url=MuseScoreStudio.html" />
3+
<meta http-equiv="refresh" content="0;url=viewer.html" />
44
</head>
55
</html>

0 commit comments

Comments
 (0)