Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const pri = async (program: ProgramOptions) => {
}

export const make = async (program: ProgramOptions) => {
const { makeMsix, layoutDir, msix, isSparsePackage} = program;
const { makeMsix, layoutDir, msix, isSparsePackage, compress } = program;
const args = [
'pack',
'/d',
Expand All @@ -102,6 +102,9 @@ export const make = async (program: ProgramOptions) => {
if(isSparsePackage) {
args.push('/nv');
}
if(!compress) {
args.push('/nc');
}
await run(makeMsix, args);
}

Expand Down
3 changes: 3 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ export interface PackagingOptions {
windowsKitPath ? : string;
/** Indicates whether to create Pri resource files. It will be enabled by default. */
createPri ? : boolean;
/** Indicates whether to compress package files. It will be enabled by default. */
compress ? : boolean;
/**
* Indicates whether to sign the MSIX package. It will be enabled by default. If cert or signParams are not provided then the package will be signed with a dev cert.
* If sign is false then the package will not be signed.
Expand Down Expand Up @@ -147,6 +149,7 @@ export interface ProgramOptions {
priConfig: string;
priFile: string;
isSparsePackage: boolean;
compress: boolean;
sign: boolean;
windowsSignOptions: WindowsSignOptions;
createDevCert: boolean;
Expand Down
2 changes: 2 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ export const makeProgramOptions = async (options: PackagingOptions, manifestVars
const priConfig = path.join(layoutDir, 'priconfig.xml');
const priFile = path.join(layoutDir, 'resources.pri');
const createPri = options.createPri !== undefined ? options.createPri : true;
const compress = options.compress !== undefined ? options.compress : true;
const publisher = options.manifestVariables?.publisher || manifestPublisher || '';
const sign = options.sign !== undefined ? options.sign : true;
let windowsSignOptions: WindowsSignOptions
Expand Down Expand Up @@ -276,6 +277,7 @@ export const makeProgramOptions = async (options: PackagingOptions, manifestVars
priFile,
createPri,
isSparsePackage,
compress,
sign,
windowsSignOptions,
createDevCert,
Expand Down