diff --git a/.changes/app-bundle-cross-platform.md b/.changes/app-bundle-cross-platform.md new file mode 100644 index 00000000..ac8a203d --- /dev/null +++ b/.changes/app-bundle-cross-platform.md @@ -0,0 +1,5 @@ +--- +"cargo-packager": minor +--- + +Allow packaging the macOS app bundle on Linux and Windows hosts (without codesign support). diff --git a/.changes/package-output-struct-refactor.md b/.changes/package-output-struct-refactor.md new file mode 100644 index 00000000..646a6e39 --- /dev/null +++ b/.changes/package-output-struct-refactor.md @@ -0,0 +1,5 @@ +--- +"cargo-packager": minor +--- + +Renamed `PackageOuput` to `PackageOutput` and added `PackageOutput::new`. \ No newline at end of file diff --git a/crates/packager/src/package/mod.rs b/crates/packager/src/package/mod.rs index 85af6939..5f29bab0 100644 --- a/crates/packager/src/package/mod.rs +++ b/crates/packager/src/package/mod.rs @@ -43,6 +43,7 @@ mod context; /// Generated Package metadata. #[derive(Debug, Clone)] +#[non_exhaustive] pub struct PackageOutput { /// The package type. pub format: PackageFormat, @@ -50,6 +51,16 @@ pub struct PackageOutput { pub paths: Vec, } +impl PackageOutput { + /// Creates a new package output. + /// + /// This is only useful if you need to sign the packages in a different process, + /// after packaging the app and storing its paths. + pub fn new(format: PackageFormat, paths: Vec) -> Self { + Self { format, paths } + } +} + /// Package an app using the specified config. #[tracing::instrument(level = "trace")] pub fn package(config: &Config) -> crate::Result> {