mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
* split tauri into 3 crates * fix macros * change builder into lib * cleanup package paths * add features back to lib * make build function public * add build-deps * rename and fix. * correct package name * move crates to root and refactor names * fix github action * move fixture to tauri-build * remove slash * add .vscode features * fix updater * fix updater mistake * fix(tauri) refactor buiilds * fix seperation * change get back to get * fix cfg and remove dead code warnings. * roll #160 into this pr * add credit * fix eof * chore(tauri) move assets to mod, loadAssets cfg outside its definition * chore(tauri) remove unused deps * update updater and cfg * fix(tauri) embedded-server with dead variable * add review refactors and remove cli form workgroup * chore(tauri) rename tauri to tauri-api and tauri-bundle to tauri * fix workspace and updater * rename update to updater
46 lines
1.5 KiB
Rust
46 lines
1.5 KiB
Rust
#[cfg(feature = "appimage")]
|
|
mod appimage_bundle;
|
|
mod category;
|
|
mod common;
|
|
mod deb_bundle;
|
|
#[cfg(feature = "dmg")]
|
|
mod dmg_bundle;
|
|
#[cfg(feature = "ios")]
|
|
mod ios_bundle;
|
|
#[cfg(target_os = "windows")]
|
|
mod msi_bundle;
|
|
mod osx_bundle;
|
|
mod path_utils;
|
|
mod rpm_bundle;
|
|
mod settings;
|
|
#[cfg(target_os = "windows")]
|
|
mod wix;
|
|
|
|
pub use self::common::{print_error, print_finished};
|
|
pub use self::settings::{BuildArtifact, PackageType, Settings};
|
|
use std::path::PathBuf;
|
|
|
|
pub fn bundle_project(settings: Settings) -> crate::Result<Vec<PathBuf>> {
|
|
let mut paths = Vec::new();
|
|
for package_type in settings.package_types()? {
|
|
paths.append(&mut match package_type {
|
|
PackageType::OsxBundle => osx_bundle::bundle_project(&settings)?,
|
|
#[cfg(feature = "ios")]
|
|
PackageType::IosBundle => ios_bundle::bundle_project(&settings)?,
|
|
// use dmg bundler
|
|
// PackageType::OsxBundle => dmg_bundle::bundle_project(&settings)?,
|
|
#[cfg(target_os = "windows")]
|
|
PackageType::WindowsMsi => msi_bundle::bundle_project(&settings)?,
|
|
// force appimage on linux
|
|
// PackageType::Deb => appimage_bundle::bundle_project(&settings)?,
|
|
PackageType::Deb => deb_bundle::bundle_project(&settings)?,
|
|
PackageType::Rpm => rpm_bundle::bundle_project(&settings)?,
|
|
#[cfg(feature = "appimage")]
|
|
PackageType::AppImage => appimage_bundle::bundle_project(&settings)?,
|
|
#[cfg(feature = "dmg")]
|
|
PackageType::Dmg => dmg_bundle::bundle_project(&settings)?,
|
|
});
|
|
}
|
|
Ok(paths)
|
|
}
|