diff --git a/.gitignore b/.gitignore index 31b9985f2..3b0666442 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ dist-ssr output *.msi *.deb +*.AppImage *.dmg package-lock.json diff --git a/bin/builders/LinuxBuilder.ts b/bin/builders/LinuxBuilder.ts index 426e01a6e..ed55ab9c6 100644 --- a/bin/builders/LinuxBuilder.ts +++ b/bin/builders/LinuxBuilder.ts @@ -69,19 +69,28 @@ Type=Application arch = process.arch; } const debName = `${name}_${tauriConf.package.version}_${arch}.deb`; - const appPath = this.getBuildedAppPath(npmDirectory, debName); + const appPath = this.getBuildedAppPath(npmDirectory, "deb", debName); const distPath = path.resolve(`${name}.deb`); await fs.copyFile(appPath, distPath); await fs.unlink(appPath); + + + const appImageName = `${name}_${tauriConf.package.version}_${arch}.AppImage`; + const appImagePath = this.getBuildedAppPath(npmDirectory, "appimage", appImageName); + const distAppPath = path.resolve(`${name}.AppImage`); + await fs.copyFile(appImagePath, distAppPath); + await fs.unlink(appImagePath); logger.success('Build success!'); - logger.success('You can find the app installer in', distPath); + logger.success('You can find the deb app installer in', distPath); + logger.success('You can find the Appimage app installer in', distAppPath); } - getBuildedAppPath(npmDirectory: string, dmgName: string) { + getBuildedAppPath(npmDirectory: string,packageType: string, packageName: string) { return path.join( npmDirectory, - 'src-tauri/target/release/bundle/deb', - dmgName + 'src-tauri/target/release/bundle/', + packageType, + packageName ); } } \ No newline at end of file diff --git a/dist/cli.js b/dist/cli.js index bd33f4aba..dfafabf95 100644 --- a/dist/cli.js +++ b/dist/cli.js @@ -1943,7 +1943,8 @@ var tauri = { ], shortDescription: "", targets: [ - "deb" + "deb", + "appimage" ] } }; @@ -2115,16 +2116,22 @@ Type=Application arch = process.arch; } const debName = `${name}_${tauriConf.package.version}_${arch}.deb`; - const appPath = this.getBuildedAppPath(npmDirectory, debName); + const appPath = this.getBuildedAppPath(npmDirectory, "deb", debName); const distPath = path.resolve(`${name}.deb`); yield fs.copyFile(appPath, distPath); yield fs.unlink(appPath); + const appImageName = `${name}_${tauriConf.package.version}_${arch}.AppImage`; + const appImagePath = this.getBuildedAppPath(npmDirectory, "appimage", appImageName); + const distAppPath = path.resolve(`${name}.AppImage`); + yield fs.copyFile(appImagePath, distAppPath); + yield fs.unlink(appImagePath); logger.success('Build success!'); - logger.success('You can find the app installer in', distPath); + logger.success('You can find the deb app installer in', distPath); + logger.success('You can find the Appimage app installer in', distAppPath); }); } - getBuildedAppPath(npmDirectory, dmgName) { - return path.join(npmDirectory, 'src-tauri/target/release/bundle/deb', dmgName); + getBuildedAppPath(npmDirectory, packageType, packageName) { + return path.join(npmDirectory, 'src-tauri/target/release/bundle/', packageType, packageName); } }