index.ts 671 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * Preload module, this file will be loaded when the program starts.
  3. */
  4. import { logger } from 'ee-core/log';
  5. import {DbStorage} from "../service/database/DbStorage";
  6. import { appConfigService } from '../service/database/AppConfigService'
  7. import { socketDService } from '../service/SocketDService'
  8. import { Menu } from 'electron'
  9. function preload(): void {
  10. // Example feature module, optional to use and modify
  11. logger.info('[preload] load 5');
  12. // 移除菜单栏
  13. Menu.setApplicationMenu(null);
  14. // init sqlite db
  15. DbStorage._init()
  16. appConfigService._init()
  17. socketDService._init()
  18. }
  19. /**
  20. * Entry point of the preload module
  21. */
  22. export { preload };