@@ -51,24 +51,14 @@ JSON schema: https://shmyga.ru/public/haxetool.schema.json
|
||||
"app": {
|
||||
"buildSystem": "openfl",
|
||||
"platforms": ["flash", "html5", "linux", "windows", "android"],
|
||||
"config": {
|
||||
"meta": {
|
||||
"title": "Example",
|
||||
"filename": "example",
|
||||
"icon": "./resources/icon.jpg",
|
||||
"pack": "com.example",
|
||||
"author": "Anonim <anonim@anonim.com>",
|
||||
"company": "Any company"
|
||||
},
|
||||
"libs": {
|
||||
"lime": "8.3.2",
|
||||
"openfl": "9.5.2",
|
||||
"hxcpp": "4.3.2"
|
||||
"lime": "8.0.0",
|
||||
"openfl": "9.2.0",
|
||||
"hxcpp": "4.2.1"
|
||||
},
|
||||
"sources": ["src"],
|
||||
"main": "Main"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
"buildSystem": "openfl",
|
||||
"platforms": ["flash", "html5", "linux", "windows", "android"],
|
||||
"libs": {
|
||||
"lime": "8.3.2",
|
||||
"openfl": "9.5.2",
|
||||
"hxcpp": "4.3.2"
|
||||
"lime": "8.0.0",
|
||||
"openfl": "9.2.0",
|
||||
"hxcpp": "4.2.1"
|
||||
},
|
||||
"sources": ["src"],
|
||||
"main": "Main"
|
||||
|
||||
+4
-1
@@ -1,7 +1,10 @@
|
||||
import os from "os";
|
||||
import path from "path";
|
||||
import asset from "../common/asset";
|
||||
import { BuildSystem, type Config, type ConfigSource } from "./type";
|
||||
|
||||
export const DEFAULT_ICON = asset("icon.jpg");
|
||||
|
||||
export const DEFAULT_CONFIG: Config = {
|
||||
buildSystem: BuildSystem.HAXE,
|
||||
platforms: [],
|
||||
@@ -13,7 +16,7 @@ export const DEFAULT_CONFIG: Config = {
|
||||
libs: [],
|
||||
macros: [],
|
||||
flags: [],
|
||||
icon: null,
|
||||
icon: DEFAULT_ICON,
|
||||
meta: {
|
||||
width: 800,
|
||||
height: 600,
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ export class Haxe extends Sdk {
|
||||
static VERSION_4_0_5 = "4.0.5";
|
||||
static VERSION_4_2_5 = "4.2.5";
|
||||
static VERSION_4_3_7 = "4.3.7";
|
||||
static VERSION_4 = Haxe.VERSION_4_3_7;
|
||||
static VERSION_4 = Haxe.VERSION_4_2_5;
|
||||
static VERSION = Haxe.VERSION_4;
|
||||
|
||||
static buildDir = path.join(process.cwd(), "build");
|
||||
|
||||
@@ -4,14 +4,12 @@ import gulp from "gulp";
|
||||
import deb from "gulp-debian";
|
||||
import os from "os";
|
||||
import path from "path";
|
||||
import asset from "../../../../common/asset";
|
||||
import template from "../../../../common/template";
|
||||
import { type Config, Platform } from "../../../../core/type";
|
||||
import { Packer } from "../../../core/packer";
|
||||
|
||||
export class LinuxDEBPacker extends Packer {
|
||||
static NAME = "deb";
|
||||
static DEFAULT_ICON = asset("icon.jpg");
|
||||
|
||||
constructor(config: Config) {
|
||||
super(config, Platform.LINUX);
|
||||
@@ -20,7 +18,7 @@ export class LinuxDEBPacker extends Packer {
|
||||
call() {
|
||||
const target = this.targetPath;
|
||||
const buildDir = path.join(os.tmpdir(), "build", this.config.name, "debian");
|
||||
const icon = this.config.meta.icon || LinuxDEBPacker.DEFAULT_ICON;
|
||||
const icon = this.config.meta.icon!;
|
||||
const iconfile = `${this.config.meta.filename}${path.extname(icon)}`;
|
||||
const desktop = template.render("linux/app.desktop", { iconfile: iconfile, ...this.config });
|
||||
fse.ensureDirSync(`${buildDir}/usr/share/applications`);
|
||||
|
||||
Reference in New Issue
Block a user