feat(project): add preset

This commit is contained in:
2026-10-14 15:53:44 +03:00
parent 78804036ab
commit dba24a2c68
27 changed files with 934 additions and 530 deletions
@@ -0,0 +1,24 @@
import gulp from "gulp";
import zip from "gulp-zip";
import { Config } from "../../../../core/config";
import { Platform } from "../../../../core/type";
import { Packer } from "../../../core/packer";
export class WindowsArchivePacker extends Packer {
static NAME = "archive";
constructor(config: Config) {
super(config, Platform.WINDOWS);
}
call() {
const target = this.targetPath;
const archiveName = `${this.config.meta.filename}_${this.config.meta.version}_win.zip`;
return gulp
.src(`${target}/**/*`)
.pipe(zip(archiveName))
.pipe(gulp.dest(this.resolveTargetPath("archive")));
}
}
Packer.register(Platform.WINDOWS, WindowsArchivePacker.NAME, WindowsArchivePacker);
@@ -0,0 +1,25 @@
import { Config } from "../../../../core/config";
import { Platform } from "../../../../core/type";
import { InnoSetup } from "../../../../impl/innosetup";
import { Packer } from "../../../core/packer";
export class WindowsInstallerPacker extends Packer {
static NAME = "installer";
public innosetup: InnoSetup;
constructor(config: Config) {
super(config, Platform.WINDOWS);
this.innosetup = new InnoSetup();
}
prepare() {
return this.innosetup.prepare();
}
call() {
return this.innosetup.pack(this.config, this.targetPath, this.resolveTargetPath("installer"));
}
}
Packer.register(Platform.WINDOWS, WindowsInstallerPacker.NAME, WindowsInstallerPacker);