diff --git a/scripts/todesktop/afterPack.js b/scripts/todesktop/afterPack.js index 154895a3..2819ae6e 100644 --- a/scripts/todesktop/afterPack.js +++ b/scripts/todesktop/afterPack.js @@ -16,7 +16,8 @@ module.exports = async ({ appOutDir, packager,outDir }) => { if (os.platform() === "darwin") { const appName = packager.appInfo.productFilename; const appPath = path.join(`${appOutDir}`, `${appName}.app`); - const assetPath = path.join(outDir,'app','assets'); + const mainPath = path.dirname(outDir); + const assetPath = path.join(mainPath,'app-wrapper','app','assets'); const resourcePath = path.join(appPath,"Contents","Resourses"); await fs.cp(assetPath, resourcePath, {recursive: true}); } @@ -25,7 +26,8 @@ module.exports = async ({ appOutDir, packager,outDir }) => { { const appName = packager.appInfo.productFilename; const appPath = path.join(`${appOutDir}`, `${appName}.exe`); - const assetPath = path.join(outDir,'app','assets'); + const mainPath = path.dirname(outDir); + const assetPath = path.join(mainPath,'app-wrapper','app','assets'); const resourcePath = path.join(path.dirname(appPath),"resourses"); await fs.cp(assetPath, resourcePath, {recursive: true}); }