Skip to content

Commit

Permalink
fix: build standalone for desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
syns2191 committed Nov 27, 2024
1 parent 9d07de3 commit 985b768
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .scripts/configure.electron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function updateWebConstant(setDesktopApp) {

if (argv.type === 'server') {
modifiedNextServer();
updateWebConstant(true);
} else if (argv.type === 'constant') {
updateWebConstant(false);
} else if (argv.type === 'constant') {
updateWebConstant(true);
}
2 changes: 1 addition & 1 deletion .scripts/copy-web-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async function copyWebBuild() {
// Copy standalone build
await copy(
join(webDir, '.next/standalone'),
join(distDir)
join(distDir, 'standalone')
);

// Copy static files
Expand Down
6 changes: 3 additions & 3 deletions apps/server-web/src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ const onInitApplication = () => {

const initTrayMenu = () => {
const MAX_RETRIES = 2;
const retryInit = async (attemps: number = 0) => {
const retryInit = async (attempts: number = 0) => {
try {
LocalStore.setDefaultServerConfig();
createIntervalAutoUpdate()
Expand All @@ -450,9 +450,9 @@ const initTrayMenu = () => {
trayMenuItems = trayMenuItems.length ? trayMenuItems : defaultTrayMenuItem(eventEmitter);
updateTrayMenu('none', {}, eventEmitter, tray, trayMenuItems, i18nextMainBackend);
} catch (error) {
if (attemps < MAX_RETRIES) {
if (attempts < MAX_RETRIES) {
await new Promise((resolve) => setTimeout(resolve, 1000))
retryInit(attemps + 1)
retryInit(attempts + 1)
}
console.error('Failed to initialize application:', error);
dialog.showErrorBox('Initialization Error', 'Failed to initialize application');
Expand Down

0 comments on commit 985b768

Please sign in to comment.