mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-22 00:00:04 +08:00
23 lines
1022 B
Plaintext
Executable File
23 lines
1022 B
Plaintext
Executable File
#!/usr/bin/env mew_js
|
|
|
|
for (let size of ["64", "128", "256", "512"]) {
|
|
let iconPath = @.fs.homePath(`.local/share/icons/hicolor/${size}x${size}/wechat-devtools.png`);
|
|
@.fs.makeDirs(@.fs.dirname(iconPath));
|
|
@info(`Writing icon file ${iconPath}`);
|
|
@.fs.copyFile.sync(@path(__dirname, "../res/icons", `wechat-devtools${size}.png`), iconPath);
|
|
}
|
|
|
|
let svgPath = @.fs.homePath(".local/share/icons/hicolor/scalable/wechat-devtools.svg");
|
|
@.fs.makeDirs(@.fs.dirname(svgPath));
|
|
@info(`Writing icon file ${svgPath}`);
|
|
@.fs.copyFile.sync(@path(__dirname, "../res/icons/wechat-devtools.svg"), svgPath);
|
|
|
|
let desktopCode = @.format(@.fs.readFile.sync(@path(__dirname, "../res/template.desktop"), "utf8"), {
|
|
"dir": (@path(__dirname, ".."))
|
|
});
|
|
|
|
desktopPath = @.fs.homePath(".local/share/applications/wechat-devtools.desktop");
|
|
@.fs.makeDirs(@.fs.dirname(desktopPath));
|
|
@info(`Writing desktop file ${desktopPath}`);
|
|
@.fs.writeFile.sync(desktopPath, desktopCode);
|