-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.js
More file actions
36 lines (33 loc) · 1.01 KB
/
build.js
File metadata and controls
36 lines (33 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const { compile } = require("nexe");
const package = require("./package.json");
const color = require("ansi-colors");
color.enabled = false;
color.enabled = require("color-support").hasBasic;
var compileOptions = {
name: "./dist/FreshNW.exe",
input: "./src/main.js",
target: "windows-x64-23.11.0",
ico: "./icon.ico",
build: true,
rc: {
CompanyName: package.author,
FileDescription: `Licensed under ${package.license}`,
ProductName: "Fresh NW for Construct 2",
InternalName: package.name,
LegalCopyright: `Copyright ${package.author} 2025`,
OriginalFilename: "FreshNW.exe",
ProductVersion: package.version,
FileVersion: package.version,
},
clean: false
}
compile(compileOptions).then(() => {
if (compileOptions.clean) {
console.clear()
console.log(color.green("Successfully cleaned!\n"))
} else {
console.clear()
console.log(color.green("Successfully compiled executable!"))
console.log(color.magenta("The file should be located in the \"dist\" folder.\n"))
}
})