f_00000a 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. import { queenApi } from "/node_modules/.vite/deps/queenjs.js?v=aff0ab7e";
  2. import { Controller } from "/src/comm/core/controller.ts";
  3. import { RxValue } from "/src/comm/core/rxValue.ts";
  4. import { useCtx } from "/src/comm/ctx/index.ts?t=1702975066869";
  5. import { message } from "/node_modules/.vite/deps/ant-design-vue.js?v=f7d2fa05";
  6. class App {
  7. name = "";
  8. version = "0.0.0";
  9. lastUpdateDate = "";
  10. icon = "";
  11. revAssets = [];
  12. size = "0MB";
  13. tags = "";
  14. desc = "";
  15. entry = "";
  16. type = "";
  17. key = "";
  18. instCount = 1;
  19. Version = "";
  20. ExePath = "";
  21. }
  22. export class InstallController extends Controller {
  23. state = RxValue.create({
  24. apps: [],
  25. installing: false,
  26. downProgress: "",
  27. installProgress: ""
  28. });
  29. async onReady() {
  30. return await this.parseInstalledApp();
  31. }
  32. async parseInstalledApp() {
  33. const { deviceCtrl, prjCtrl } = useCtx();
  34. const records = [];
  35. try {
  36. const appconfig = await deviceCtrl.ReadFileText(
  37. `${prjCtrl.RootDir}/app.json`
  38. );
  39. if (!appconfig.error && appconfig.text) {
  40. const app = JSON.parse(appconfig.text);
  41. records.push(app);
  42. }
  43. } catch (error) {
  44. console.error(error);
  45. }
  46. this.state.setApps(records);
  47. }
  48. async install(item) {
  49. console.log("install=>", item);
  50. const { deviceCtrl, prjCtrl } = useCtx();
  51. const localpath = prjCtrl.createPath(`${item._id}.zip`);
  52. this.state.installing = true;
  53. const ok = await deviceCtrl.DownloadFile(
  54. item.url,
  55. localpath,
  56. 60 * 10,
  57. (evt, msg) => {
  58. console.log("down", evt, msg.fva11);
  59. if (evt == "progress") {
  60. this.state.downProgress = ((msg.fva11 || 0) * 100).toFixed(1);
  61. }
  62. if (evt == "succ") {
  63. this.state.downProgress = "";
  64. message.success("下载成功,开始安装...");
  65. }
  66. if (evt == "error") {
  67. this.state.installing = false;
  68. deviceCtrl.TrayNotice({
  69. context: `软件下载失败,请检查你的网络设置`
  70. });
  71. }
  72. }
  73. );
  74. if (ok) {
  75. const unzipOk = await deviceCtrl.Unzip(
  76. localpath,
  77. prjCtrl.RootDir,
  78. (evt, msg) => {
  79. console.log("install", evt, msg.fva11);
  80. if (evt == "progress") {
  81. this.state.installProgress = ((msg.fva11 || 0) * 10).toFixed(1);
  82. }
  83. if (evt == "succ") {
  84. this.state.installProgress = "";
  85. this.state.installing = false;
  86. deviceCtrl.TrayNotice({
  87. context: `软件安装成功`
  88. });
  89. }
  90. if (evt == "error") {
  91. this.state.installing = false;
  92. this.state.installProgress = "";
  93. deviceCtrl.TrayNotice({
  94. context: `软件安装失败,请重新安装`
  95. });
  96. }
  97. }
  98. );
  99. if (unzipOk) {
  100. await deviceCtrl.UpdateConfig(item.version);
  101. await this.parseInstalledApp();
  102. }
  103. }
  104. queenApi.hideLoading();
  105. }
  106. async update(appRecord) {
  107. const { deviceCtrl, prjCtrl } = useCtx();
  108. const runnings = await deviceCtrl.GetRunningApp();
  109. let appRunning = runnings.find((item) => item.Key == appRecord.name);
  110. console.log("running", runnings);
  111. if (appRunning) {
  112. queenApi.messageWarn("请先关闭应用程序,再进行更新!");
  113. return;
  114. }
  115. const fpath = prjCtrl.getAppInstallDir() + `/${appRecord.name}`;
  116. const ok = await deviceCtrl.RemoveDir(fpath);
  117. if (ok) {
  118. this.install(appRecord);
  119. }
  120. }
  121. async uninstall(appRecord) {
  122. const { deviceCtrl, prjCtrl } = useCtx();
  123. const runnings = await deviceCtrl.GetRunningApp();
  124. let appRunning = runnings.find((item) => item.Key == appRecord.key);
  125. if (appRunning) {
  126. queenApi.messageWarn("请先关闭应用程序,再进行卸载!");
  127. return;
  128. }
  129. const fpath = prjCtrl.getAppInstallDir() + `/${appRecord.key}`;
  130. const ok = await deviceCtrl.RemoveDir(fpath);
  131. if (ok) {
  132. deviceCtrl.DeleteShortcut(appRecord.key);
  133. deviceCtrl.TrayNotice({ context: `${appRecord.name}卸载成功!` });
  134. await this.parseInstalledApp();
  135. }
  136. }
  137. async CreateShortcut(appRecord) {
  138. const { deviceCtrl, prjCtrl } = useCtx();
  139. const iconPath = prjCtrl.getAppInstallDir() + `/${appRecord.key}/${appRecord.icon}`;
  140. const ok = await deviceCtrl.CreateShortcut(
  141. appRecord.key,
  142. deviceCtrl.profile.exePath,
  143. iconPath
  144. );
  145. if (ok) {
  146. deviceCtrl.TrayNotice({ context: `${appRecord.name}快捷方式创建成功!` });
  147. }
  148. }
  149. }
  150. //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluc3RhbGxDdHJsLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHF1ZWVuQXBpIH0gZnJvbSBcInF1ZWVuanNcIjtcclxuaW1wb3J0IHsgQ29udHJvbGxlciB9IGZyb20gXCIuLi9jb3JlL2NvbnRyb2xsZXJcIjtcclxuaW1wb3J0IHsgUnhWYWx1ZSB9IGZyb20gXCIuLi9jb3JlL3J4VmFsdWVcIjtcclxuaW1wb3J0IHsgdXNlQ3R4IH0gZnJvbSBcIi4uL2N0eFwiO1xyXG5pbXBvcnQgeyBtZXNzYWdlIH0gZnJvbSBcImFudC1kZXNpZ24tdnVlXCI7XHJcblxyXG4vKipcclxuICogIGFwcOWuieijheeuoeeQhlxyXG4gKiAgMS4g6K+75Y+W5a6J6KOF55qEYXBwcy5tYW5pZmVzdOaWh+S7tuino+aekOW9k+WJjeW3suWuieijheeahOW6lOeUqFxyXG4gKiAgMi4g5omA5pyJYXBw5a6J6KOF5Zyo55uu5b2VJHtBcHBJbnN0YWxsRGlyfS/kuIvpnaIsIOWuieijheWQjuiiqyBhcHBzLm1hbmlmZXN06YWN572u5paH5Lu257Si5byVXHJcbiAqICAzLiDlronoo4XnmoRhcHDljYfnu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0KTtcclxuXHJcbiAgICAvL+ino+aekOW3suWuieijheeahOebruW9lVxyXG4gICAgY29uc3QgcmVjb3JkczogQXBwW10gPSBbXTtcclxuXHJcbiAgICB0cnkge1xyXG4gICAgICBjb25zdCBhcHBjb25maWcgPSBhd2FpdCBkZXZpY2VDdHJsLlJlYWRGaWxlVGV4dChcclxuICAgICAgICBgJHtwcmpDdHJsLlJvb3REaXJ9L2FwcC5qc29uYFxyXG4gICAgICApO1xyXG5cclxuICAgICAgaWYgKCFhcHBjb25maWcuZXJyb3IgJiYgYXBwY29uZmlnLnRleHQpIHtcclxuICAgICAgICBjb25zdCBhcHAgPSBKU09OLnBhcnNlKGFwcGNvbmZpZy50ZXh0KTtcclxuICAgICAgICByZWNvcmRzLnB1c2goYXBwKTtcclxuICAgICAgfVxyXG4gICAgfSBjYXRjaCAoZXJyb3IpIHtcclxuICAgICAgY29uc29sZS5lcnJvcihlcnJvcik7XHJcbiAgICB9XHJcbiAgICB0aGlzLnN0YXRlLnNldEFwcHMocmVjb3Jkcyk7XHJcbiAgfVxyXG5cclxuICBhc3luYyBpbnN0YWxsKGl0ZW06IGFueSkge1xyXG4gICAgY29uc29sZS5sb2coXCJpbnN0YWxsPT5cIiwgaXRlbSk7XHJcbiAgICBjb25zdCB7IGRldmljZUN0cmwsIHByakN0cmwgfSA9IHVzZUN0eCgpO1xyXG4gICAgY29uc3QgbG9jYWxwYXRoID0gcHJqQ3RybC5jcmVhdGVQYXRoKGAke2l0ZW0uX2lkfS56aXBgKTtcclxuICAgIHRoaXMuc3RhdGUuaW5zdGFsbGluZyA9IHRydWU7XHJcbiAgICBjb25zdCBvayA9IGF3YWl0IGRldmljZUN0cmwuRG93bmxvYWRGaWxlKFxyXG4gICAgICBpdGVtLnVybCxcclxuICAgICAgbG9jYWxwYXRoLFxyXG4gICAgICA2MCAqIDEwLFxyXG4gICAgICAoZXZ0LCBtc2cpID0+IHtcclxuICAgICAgICBjb25zb2xlLmxvZyhcImRvd25cIiwgZXZ0LCBtc2cuZnZhMTEpO1xyXG5cclxuICAgICAgICBpZiAoZXZ0ID09IFwicHJvZ3Jlc3NcIikge1xyXG4gICAgICAgICAgdGhpcy5zdGF0ZS5kb3duUHJvZ3Jlc3MgPSAoKG1zZy5mdmExMSB8fCAwKSAqIDEwMCkudG9GaXhlZCgxKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKGV2dCA9PSBcInN1Y2NcIikge1xyXG4gICAgICAgICAgdGhpcy5zdGF0ZS5kb3duUHJvZ3Jlc3MgPSBcIlwiO1xyXG4gICAgICAgICAgbWVzc2FnZS5zdWNjZXNzKFwi5LiL6L295oiQ5Yqf77yM5byA5aeL5a6J6KOFLi4uXCIpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoZXZ0ID09IFwiZXJyb3JcIikge1xyXG4gICAgICAgICAgdGhpcy5zdGF0ZS5pbnN0YWxsaW5nID0gZmFsc2U7XHJcbiAgICAgICAgICBkZXZpY2VDdHJsLlRyYXlOb3RpY2UoeyAgICAgICAgICBcclxuICAgICAgICAgICAgY29udGV4dDogYOi9r+S7tuS4i+i9veWksei0pe+8jOivt+ajgOafpeS9oOeahOe9kee7nOiuvue9rmAsXHJcbiAgICAgICAgICB9KTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgICk7XHJcbiAgICBpZiAob2spIHtcclxuICAgICAgY29uc3QgdW56aXBPayA9IGF3YWl0IGRldmljZUN0cmwuVW56aXAoXHJcbiAgICAgICAgbG9jYWxwYXRoLFxyXG4gICAgICAgIHByakN0cmwuUm9vdERpcixcclxuICAgICAgICAoZXZ0LCBtc2cpID0+IHtcclxuICAgICAgICAgIGNvbnNvbGUubG9nKFwiaW5zdGFsbFwiLCBldnQsIG1zZy5mdmExMSk7XHJcbiAgICAgICAgICBpZiAoZXZ0ID09IFwicHJvZ3Jlc3NcIikge1xyXG4gICAgICAgICAgICB0aGlzLnN0YXRlLmluc3RhbGxQcm9ncmVzcyA9ICgobXNnLmZ2YTExIHx8IDApICogMTApLnRvRml4ZWQoMSk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBpZiAoZXZ0ID09IFwic3VjY1wiKSB7XHJcbiAgICAgICAgICAgIHRoaXMuc3RhdGUuaW5zdGFsbFByb2dyZXNzID0gXCJcIjtcclxuICAgICAgICAgICAgdGhpcy5zdGF0ZS5pbnN0YWxsaW5nID0gZmFsc2U7XHJcbiAgICAgICAgICAgIGRldmljZUN0cmwuVHJheU5vdGljZSh7ICAgICAgICAgICAgIFxyXG4gICAgICAgICAgICAgIGNvbnRleHQ6IGDova/ku7blronoo4XmiJDlip9gLFxyXG4gICAgICAgICAgICB9KTtcclxuICAgICAgICAgIH1cclxuICAgICAgICAgIGlmIChldnQgPT0gXCJlcnJvclwiKSB7XHJcbiAgICAgICAgICAgIHRoaXMuc3RhdGUuaW5zdGFsbGluZyA9IGZhbHNlO1xyXG4gICAgICAgICAgICB0aGlzLnN0YXRlLmluc3RhbGxQcm9ncmVzcyA9IFwiXCI7XHJcbiAgICAgICAgICAgIGRldmljZUN0cmwuVHJheU5vdGljZSh7ICAgICAgICAgICAgXHJcbiAgICAgICAgICAgICAgY29udGV4dDogYOi9r+S7tuWuieijheWksei0pe+8jOivt+mHjeaWsOWuieijhWAsXHJcbiAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgKTtcclxuICAgICAgaWYgKHVuemlwT2spIHtcclxuICAgICAgICBhd2FpdCBkZXZpY2VDdHJsLlVwZGF0ZUNvbmZpZyhpdGVtLnZlcnNpb24pO1xyXG4gICAgICAgIGF3YWl0IHRoaXMucGFyc2VJbnN0YWxsZWRBcHAoKTtcclxuICAgICAgfVxyXG4gICAgfVxyXG4gICAgcXVlZW5BcGkuaGlkZUxvYWRpbmcoKTtcclxuICB9XHJcbiAgYXN5bmMgdXBkYXRlKGFwcFJlY29yZDogYW55KSB7XHJcbiAgICBjb25zdCB7ICBkZXZpY2VDdHJsLC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