lua-obfuscator 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +40 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -14
- package/dist/prometheus/LICENSE +661 -661
- package/dist/prometheus/build.bat +9 -9
- package/dist/prometheus/doc/README.md +11 -11
- package/dist/prometheus/doc/SUMMARY.md +27 -27
- package/dist/prometheus/doc/advanced/using-prometheus-in-your-lua-application.md +31 -31
- package/dist/prometheus/doc/getting-started/command-line-options.md +13 -13
- package/dist/prometheus/doc/getting-started/installation.md +11 -11
- package/dist/prometheus/doc/getting-started/obfuscating-your-first-script.md +50 -50
- package/dist/prometheus/doc/getting-started/presets.md +10 -10
- package/dist/prometheus/doc/getting-started/the-config-object.md +58 -58
- package/dist/prometheus/doc/getting-started/writing-a-custom-config-file.md +56 -56
- package/dist/prometheus/doc/steps/anti-tamper.md +11 -11
- package/dist/prometheus/doc/steps/constantarray.md +71 -71
- package/dist/prometheus/doc/steps/encryptstrings.md +86 -86
- package/dist/prometheus/doc/steps/proxifylocals.md +47 -47
- package/dist/prometheus/doc/steps/splitstrings.md +40 -40
- package/dist/prometheus/doc/steps/vmify.md +9 -9
- package/dist/prometheus/doc/steps/wrapinfunction.md +29 -29
- package/dist/prometheus/readme.md +57 -57
- package/dist/prometheus/readme.txt +4 -4
- package/package.json +5 -1
- package/src/index.ts +81 -75
- package/tsconfig.json +12 -12
- package/src/prometheus/.editorconfig +0 -4
- package/src/prometheus/.gitattributes +0 -2
- package/src/prometheus/.gitbook.yaml +0 -1
- package/src/prometheus/.github/ISSUE_TEMPLATE/bug_report.md +0 -25
- package/src/prometheus/.github/workflows/Build.yml +0 -49
- package/src/prometheus/.github/workflows/Test.yml +0 -19
- package/src/prometheus/LICENSE +0 -661
- package/src/prometheus/benchmark.lua +0 -34
- package/src/prometheus/build.bat +0 -10
- package/src/prometheus/cli.lua +0 -12
- package/src/prometheus/doc/README.md +0 -11
- package/src/prometheus/doc/SUMMARY.md +0 -27
- package/src/prometheus/doc/advanced/using-prometheus-in-your-lua-application.md +0 -31
- package/src/prometheus/doc/getting-started/command-line-options.md +0 -13
- package/src/prometheus/doc/getting-started/installation.md +0 -11
- package/src/prometheus/doc/getting-started/obfuscating-your-first-script.md +0 -50
- package/src/prometheus/doc/getting-started/presets.md +0 -10
- package/src/prometheus/doc/getting-started/the-config-object.md +0 -58
- package/src/prometheus/doc/getting-started/writing-a-custom-config-file.md +0 -56
- package/src/prometheus/doc/steps/anti-tamper.md +0 -11
- package/src/prometheus/doc/steps/constantarray.md +0 -71
- package/src/prometheus/doc/steps/encryptstrings.md +0 -86
- package/src/prometheus/doc/steps/proxifylocals.md +0 -47
- package/src/prometheus/doc/steps/splitstrings.md +0 -40
- package/src/prometheus/doc/steps/vmify.md +0 -9
- package/src/prometheus/doc/steps/wrapinfunction.md +0 -29
- package/src/prometheus/prometheus-main.lua +0 -1
- package/src/prometheus/readme.md +0 -57
- package/src/prometheus/readme.txt +0 -5
- package/src/prometheus/src/cli.lua +0 -154
- package/src/prometheus/src/colors.lua +0 -61
- package/src/prometheus/src/highlightlua.lua +0 -61
- package/src/prometheus/src/logger.lua +0 -62
- package/src/prometheus/src/presets.lua +0 -174
- package/src/prometheus/src/prometheus/ast.lua +0 -792
- package/src/prometheus/src/prometheus/bit.lua +0 -521
- package/src/prometheus/src/prometheus/compiler/compiler.lua +0 -2365
- package/src/prometheus/src/prometheus/enums.lua +0 -106
- package/src/prometheus/src/prometheus/namegenerators/Il.lua +0 -41
- package/src/prometheus/src/prometheus/namegenerators/confuse.lua +0 -169
- package/src/prometheus/src/prometheus/namegenerators/mangled.lua +0 -26
- package/src/prometheus/src/prometheus/namegenerators/mangled_shuffled.lua +0 -35
- package/src/prometheus/src/prometheus/namegenerators/number.lua +0 -11
- package/src/prometheus/src/prometheus/namegenerators.lua +0 -7
- package/src/prometheus/src/prometheus/parser.lua +0 -969
- package/src/prometheus/src/prometheus/pipeline.lua +0 -250
- package/src/prometheus/src/prometheus/randomLiterals.lua +0 -41
- package/src/prometheus/src/prometheus/randomStrings.lua +0 -24
- package/src/prometheus/src/prometheus/scope.lua +0 -332
- package/src/prometheus/src/prometheus/step.lua +0 -79
- package/src/prometheus/src/prometheus/steps/AddVararg.lua +0 -33
- package/src/prometheus/src/prometheus/steps/AntiTamper.lua +0 -194
- package/src/prometheus/src/prometheus/steps/ConstantArray.lua +0 -521
- package/src/prometheus/src/prometheus/steps/EncryptStrings.lua +0 -239
- package/src/prometheus/src/prometheus/steps/NumbersToExpressions.lua +0 -82
- package/src/prometheus/src/prometheus/steps/ProxifyLocals.lua +0 -313
- package/src/prometheus/src/prometheus/steps/SplitStrings.lua +0 -338
- package/src/prometheus/src/prometheus/steps/Vmify.lua +0 -30
- package/src/prometheus/src/prometheus/steps/Watermark.lua +0 -61
- package/src/prometheus/src/prometheus/steps/WatermarkCheck.lua +0 -50
- package/src/prometheus/src/prometheus/steps/WrapInFunction.lua +0 -45
- package/src/prometheus/src/prometheus/steps.lua +0 -12
- package/src/prometheus/src/prometheus/tokenizer.lua +0 -546
- package/src/prometheus/src/prometheus/unparser.lua +0 -866
- package/src/prometheus/src/prometheus/util.lua +0 -297
- package/src/prometheus/src/prometheus/visitast.lua +0 -245
- package/src/prometheus/src/prometheus.lua +0 -71
- package/src/prometheus/tests/closures.lua +0 -12
- package/src/prometheus/tests/fibonacci.lua +0 -10
- package/src/prometheus/tests/loops.lua +0 -8
- package/src/prometheus/tests/primes.lua +0 -18
- package/src/prometheus/tests.lua +0 -149
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
# :fire: Prometheus
|
|
2
|
-
[](https://github.com/prometheus-lua/Prometheus/actions/workflows/Test.yml)
|
|
3
|
-
## Description
|
|
4
|
-
Prometheus is a Lua obfuscator written in pure Lua.
|
|
5
|
-
|
|
6
|
-
This Project was inspired by the amazing [javascript-obfuscator](https://github.com/javascript-obfuscator/javascript-obfuscator).
|
|
7
|
-
It can currently obfuscate Lua51 and Roblox's LuaU, however LuaU support is not finished yet.
|
|
8
|
-
|
|
9
|
-
You can find the full Documentation including a getting started guide [here](https://levno-710.gitbook.io/prometheus/).
|
|
10
|
-
|
|
11
|
-
Prometheus has an official [Discord server](https://discord.gg/U8h4d4Rf64).
|
|
12
|
-
|
|
13
|
-
## Installation
|
|
14
|
-
To install Prometheus, simply clone the Github Repository using:
|
|
15
|
-
|
|
16
|
-
```batch
|
|
17
|
-
git clone https://github.com/levno-710/Prometheus.git
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Alternatively you can download the Sources [here](https://github.com/prometheus-lua/Prometheus/archive/refs/heads/master.zip).
|
|
21
|
-
|
|
22
|
-
Prometheus also Requires LuaJIT or Lua51 in order to work. The Lua51 binaries can be downloaded [here](https://sourceforge.net/projects/luabinaries/files/5.1.5/Tools%20Executables/).
|
|
23
|
-
|
|
24
|
-
## Usage
|
|
25
|
-
To quickly obfuscate a script:
|
|
26
|
-
```batch
|
|
27
|
-
lua ./cli.lua --preset Medium ./your_file.lua
|
|
28
|
-
```
|
|
29
|
-
When using the windows release:
|
|
30
|
-
```batch
|
|
31
|
-
prometheus.exe --preset Medium ./your_file.lua
|
|
32
|
-
```
|
|
33
|
-
For more advanced use cases see the [Documentation](https://levno-710.gitbook.io/prometheus/).
|
|
34
|
-
## Tests
|
|
35
|
-
To perform the Prometheus Tests, just run
|
|
36
|
-
```batch
|
|
37
|
-
lua ./tests.lua
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Building
|
|
41
|
-
Prometheus can currently only build on Windows.
|
|
42
|
-
It requires [srlua.exe](https://github.com/LuaDist/srlua) and [glue.exe](https://github.com/LuaDist/srlua) inside of the root directory. If lua51 was linked dynamically, lua51.dll must also be present. Then Prometheus for Windows can be built using
|
|
43
|
-
```batch
|
|
44
|
-
build.bat
|
|
45
|
-
```
|
|
46
|
-
This creates a folder named build, that contains prometheus.exe as well as everything that is needed in order to run Prometheus.
|
|
47
|
-
Then
|
|
48
|
-
```batch
|
|
49
|
-
prometheus.exe [options]
|
|
50
|
-
```
|
|
51
|
-
can be used instead of
|
|
52
|
-
```batch
|
|
53
|
-
lua ./cli.lua [options]
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## License
|
|
57
|
-
This Project is Licensed under the GNU Affero General Public License v3.0. For more details, please refer to [LICENSE](https://github.com/levno-710/Prometheus/blob/master/LICENSE).
|
|
1
|
+
# :fire: Prometheus
|
|
2
|
+
[](https://github.com/prometheus-lua/Prometheus/actions/workflows/Test.yml)
|
|
3
|
+
## Description
|
|
4
|
+
Prometheus is a Lua obfuscator written in pure Lua.
|
|
5
|
+
|
|
6
|
+
This Project was inspired by the amazing [javascript-obfuscator](https://github.com/javascript-obfuscator/javascript-obfuscator).
|
|
7
|
+
It can currently obfuscate Lua51 and Roblox's LuaU, however LuaU support is not finished yet.
|
|
8
|
+
|
|
9
|
+
You can find the full Documentation including a getting started guide [here](https://levno-710.gitbook.io/prometheus/).
|
|
10
|
+
|
|
11
|
+
Prometheus has an official [Discord server](https://discord.gg/U8h4d4Rf64).
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
To install Prometheus, simply clone the Github Repository using:
|
|
15
|
+
|
|
16
|
+
```batch
|
|
17
|
+
git clone https://github.com/levno-710/Prometheus.git
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Alternatively you can download the Sources [here](https://github.com/prometheus-lua/Prometheus/archive/refs/heads/master.zip).
|
|
21
|
+
|
|
22
|
+
Prometheus also Requires LuaJIT or Lua51 in order to work. The Lua51 binaries can be downloaded [here](https://sourceforge.net/projects/luabinaries/files/5.1.5/Tools%20Executables/).
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
To quickly obfuscate a script:
|
|
26
|
+
```batch
|
|
27
|
+
lua ./cli.lua --preset Medium ./your_file.lua
|
|
28
|
+
```
|
|
29
|
+
When using the windows release:
|
|
30
|
+
```batch
|
|
31
|
+
prometheus.exe --preset Medium ./your_file.lua
|
|
32
|
+
```
|
|
33
|
+
For more advanced use cases see the [Documentation](https://levno-710.gitbook.io/prometheus/).
|
|
34
|
+
## Tests
|
|
35
|
+
To perform the Prometheus Tests, just run
|
|
36
|
+
```batch
|
|
37
|
+
lua ./tests.lua
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Building
|
|
41
|
+
Prometheus can currently only build on Windows.
|
|
42
|
+
It requires [srlua.exe](https://github.com/LuaDist/srlua) and [glue.exe](https://github.com/LuaDist/srlua) inside of the root directory. If lua51 was linked dynamically, lua51.dll must also be present. Then Prometheus for Windows can be built using
|
|
43
|
+
```batch
|
|
44
|
+
build.bat
|
|
45
|
+
```
|
|
46
|
+
This creates a folder named build, that contains prometheus.exe as well as everything that is needed in order to run Prometheus.
|
|
47
|
+
Then
|
|
48
|
+
```batch
|
|
49
|
+
prometheus.exe [options]
|
|
50
|
+
```
|
|
51
|
+
can be used instead of
|
|
52
|
+
```batch
|
|
53
|
+
lua ./cli.lua [options]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
This Project is Licensed under the GNU Affero General Public License v3.0. For more details, please refer to [LICENSE](https://github.com/levno-710/Prometheus/blob/master/LICENSE).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
Known Bugs:
|
|
2
|
-
Lua 5.2+ _ENV does not work
|
|
3
|
-
|
|
4
|
-
Info:
|
|
1
|
+
Known Bugs:
|
|
2
|
+
Lua 5.2+ _ENV does not work
|
|
3
|
+
|
|
4
|
+
Info:
|
|
5
5
|
Tables Constructors are treated the way they are in LuaU, meaning that every Value will be assigned in the order it programmed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lua-obfuscator",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
"build": "tsc && copyfiles -u 1 src/prometheus/**/* dist/",
|
|
9
9
|
"dev": "concurrently \"tsx watch src/\" \"tsc --watch\" \"copyfiles -u 1 src/prometheus/**/* dist/\""
|
|
10
10
|
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/Uav3537/lua-obfuscator.git"
|
|
14
|
+
},
|
|
11
15
|
"keywords": [],
|
|
12
16
|
"author": "",
|
|
13
17
|
"license": "ISC",
|
package/src/index.ts
CHANGED
|
@@ -1,76 +1,82 @@
|
|
|
1
|
-
import { LuaFactory } from 'wasmoon'
|
|
2
|
-
import fs from 'fs'
|
|
3
|
-
import path from 'path'
|
|
4
|
-
import { fileURLToPath } from 'url'
|
|
5
|
-
|
|
6
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
7
|
-
const prometheusPath = path.join(__dirname, '../dist/prometheus')
|
|
8
|
-
|
|
9
|
-
const factory = new LuaFactory()
|
|
10
|
-
|
|
11
|
-
function mountDirectory(dir: string, prefix: string = '') {
|
|
12
|
-
const entries = fs.readdirSync(dir, { withFileTypes: true })
|
|
13
|
-
for (const entry of entries) {
|
|
14
|
-
const fullPath = path.join(dir, entry.name)
|
|
15
|
-
const luaPath = prefix ? `${prefix}/${entry.name}` : entry.name
|
|
16
|
-
if (entry.isDirectory()) {
|
|
17
|
-
mountDirectory(fullPath, luaPath)
|
|
18
|
-
} else if (entry.name.endsWith('.lua')) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
): Promise<string> {
|
|
42
|
-
const lua = await factory.createEngine()
|
|
43
|
-
try {
|
|
44
|
-
await lua.doString(`arg = {}`)
|
|
45
|
-
lua.global.set('__input_code', text)
|
|
46
|
-
|
|
47
|
-
let configExpr: string
|
|
48
|
-
if (typeof config === 'string') {
|
|
49
|
-
lua.global.set('__preset_name', config)
|
|
50
|
-
configExpr = 'Prometheus.Presets[__preset_name]'
|
|
51
|
-
} else {
|
|
52
|
-
lua.global.set('__custom_config', config)
|
|
53
|
-
configExpr = '__custom_config'
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
1
|
+
import { LuaFactory } from 'wasmoon'
|
|
2
|
+
import fs from 'fs'
|
|
3
|
+
import path from 'path'
|
|
4
|
+
import { fileURLToPath } from 'url'
|
|
5
|
+
|
|
6
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
7
|
+
const prometheusPath = path.join(__dirname, '../dist/prometheus')
|
|
8
|
+
|
|
9
|
+
const factory = new LuaFactory()
|
|
10
|
+
|
|
11
|
+
function mountDirectory(dir: string, prefix: string = '') {
|
|
12
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true })
|
|
13
|
+
for (const entry of entries) {
|
|
14
|
+
const fullPath = path.join(dir, entry.name)
|
|
15
|
+
const luaPath = prefix ? `${prefix}/${entry.name}` : entry.name
|
|
16
|
+
if (entry.isDirectory()) {
|
|
17
|
+
mountDirectory(fullPath, luaPath)
|
|
18
|
+
} else if (entry.name.endsWith('.lua')) {
|
|
19
|
+
factory.mountFile(luaPath, fs.readFileSync(fullPath))
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
mountDirectory(prometheusPath)
|
|
25
|
+
|
|
26
|
+
type PrometheusPreset = 'Minify' | 'Weak' | 'Medium' | 'Strong'
|
|
27
|
+
|
|
28
|
+
interface PrometheusConfig {
|
|
29
|
+
LuaVersion?: 'Lua51' | 'LuaU'
|
|
30
|
+
VarNamePrefix?: string
|
|
31
|
+
NameGenerator?: 'Mangled' | 'MangledShuffled' | 'Il' | 'Number'
|
|
32
|
+
PrettyPrint?: boolean
|
|
33
|
+
Seed?: number
|
|
34
|
+
Steps: Array<{ Name: string; [key: string]: unknown }>
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export async function obfuscate(
|
|
38
|
+
text: string,
|
|
39
|
+
config: PrometheusPreset | PrometheusConfig = 'Strong',
|
|
40
|
+
luaVersion?: 'Lua51' | 'LuaU'
|
|
41
|
+
): Promise<string> {
|
|
42
|
+
const lua = await factory.createEngine()
|
|
43
|
+
try {
|
|
44
|
+
await lua.doString(`arg = {}`)
|
|
45
|
+
lua.global.set('__input_code', text)
|
|
46
|
+
|
|
47
|
+
let configExpr: string
|
|
48
|
+
if (typeof config === 'string') {
|
|
49
|
+
lua.global.set('__preset_name', config)
|
|
50
|
+
configExpr = 'Prometheus.Presets[__preset_name]'
|
|
51
|
+
} else {
|
|
52
|
+
lua.global.set('__custom_config', config)
|
|
53
|
+
configExpr = '__custom_config'
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
lua.global.set('__lua_version', luaVersion ?? null)
|
|
57
|
+
|
|
58
|
+
const obfuscated = await lua.doString(`
|
|
59
|
+
local Prometheus = require("src.prometheus")
|
|
60
|
+
Prometheus.Logger.logLevel = Prometheus.Logger.LogLevel.Error
|
|
61
|
+
|
|
62
|
+
local cfg = ${configExpr}
|
|
63
|
+
if cfg == nil then
|
|
64
|
+
error("Invalid preset or config")
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
if __lua_version ~= nil then
|
|
68
|
+
cfg.LuaVersion = __lua_version
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
local pipeline = Prometheus.Pipeline:fromConfig(cfg)
|
|
72
|
+
local result = pipeline:apply(__input_code)
|
|
73
|
+
return result
|
|
74
|
+
`)
|
|
75
|
+
if (typeof obfuscated !== 'string') {
|
|
76
|
+
throw new Error('Prometheus returned invalid result')
|
|
77
|
+
}
|
|
78
|
+
return obfuscated
|
|
79
|
+
} finally {
|
|
80
|
+
lua.global.close()
|
|
81
|
+
}
|
|
76
82
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"module": "NodeNext",
|
|
5
|
-
"moduleResolution": "NodeNext",
|
|
6
|
-
"outDir": "./dist",
|
|
7
|
-
"rootDir": "./src",
|
|
8
|
-
"strict": true,
|
|
9
|
-
"declaration": true,
|
|
10
|
-
"declarationDir": "./dist",
|
|
11
|
-
"types": ["node"]
|
|
12
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"rootDir": "./src",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"declarationDir": "./dist",
|
|
11
|
+
"types": ["node"]
|
|
12
|
+
}
|
|
13
13
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
root: ./doc/
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
title: "[BUG]"
|
|
5
|
-
labels: bug
|
|
6
|
-
assignees: ''
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
**Describe the bug**
|
|
11
|
-
A clear and concise description of what the bug is.
|
|
12
|
-
|
|
13
|
-
**Expected behavior**
|
|
14
|
-
A clear and concise description of what you expected to happen.
|
|
15
|
-
|
|
16
|
-
**To Reproduce**
|
|
17
|
-
Steps to reproduce the behavior:
|
|
18
|
-
|
|
19
|
-
If your problem is a non-working obfuscated file, please also include a minimal source code example, your config file as well as the output file that you got.
|
|
20
|
-
|
|
21
|
-
**Screenshots**
|
|
22
|
-
If applicable, add screenshots to help explain your problem.
|
|
23
|
-
|
|
24
|
-
**Additional context**
|
|
25
|
-
Add any other context about the problem here.
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
name: Build
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
main
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
build:
|
|
10
|
-
runs-on: windows-latest # gh-actions-lua doesn't work on windows
|
|
11
|
-
steps:
|
|
12
|
-
- name: Checkout repo
|
|
13
|
-
uses: actions/checkout@master
|
|
14
|
-
- name: Download srlua-mingw
|
|
15
|
-
run: curl -o srlua.zip "https://raw.githubusercontent.com/joedf/LuaBuilds/gh-pages/hdata/srlua-5.1.5_Win32_bin.zip"
|
|
16
|
-
- name: Unzip srlua-mingw
|
|
17
|
-
run: |
|
|
18
|
-
tar -xf srlua.zip
|
|
19
|
-
Rename-Item -Path srglue.exe -NewName glue.exe
|
|
20
|
-
- name: Download Lua53
|
|
21
|
-
run: curl -o Lua53.zip "https://raw.githubusercontent.com/joedf/LuaBuilds/gh-pages/hdata/lua-5.3.5_Win64_bin.zip"
|
|
22
|
-
- name: Unzip Lua53
|
|
23
|
-
run: |
|
|
24
|
-
tar -xf Lua53.zip
|
|
25
|
-
- run: dir
|
|
26
|
-
- name: Build the project
|
|
27
|
-
run: |
|
|
28
|
-
./build.bat
|
|
29
|
-
shell: bash
|
|
30
|
-
- name: Zip the build
|
|
31
|
-
uses: papeloto/action-zip@v1
|
|
32
|
-
with:
|
|
33
|
-
files: build/
|
|
34
|
-
dest: build.zip
|
|
35
|
-
- name: Load version and name
|
|
36
|
-
run: | # I have no idea why but 5.1 just won't work for some reason
|
|
37
|
-
echo "prometheus_full_version=$(./lua.exe ./src/config.lua --FullVersion)" >> $GITHUB_ENV
|
|
38
|
-
echo "prometheus_version=$(./lua.exe ./src/config.lua --Version)" >> $GITHUB_ENV
|
|
39
|
-
shell: bash
|
|
40
|
-
- name: Upload binaries to release
|
|
41
|
-
uses: svenstaro/upload-release-action@v2
|
|
42
|
-
with:
|
|
43
|
-
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
44
|
-
file: build.zip
|
|
45
|
-
asset_name: ${{ env.prometheus_full_version }}.zip
|
|
46
|
-
tag: release-${{ github.ref }}-${{ env.prometheus_version }}
|
|
47
|
-
release_name: ${{ env.prometheus_version }}
|
|
48
|
-
overwrite: true
|
|
49
|
-
body: ${{ env.prometheus_full_version }} ${{ github.event.commits[0].message }}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
name: Test
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
test-linux:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- name: Checkout repo
|
|
13
|
-
uses: actions/checkout@master
|
|
14
|
-
- name: Install Lua
|
|
15
|
-
uses: leafo/gh-actions-lua@master
|
|
16
|
-
with:
|
|
17
|
-
luaVersion: 5.1
|
|
18
|
-
- name: Run test case
|
|
19
|
-
run: lua ./tests.lua --Linux --CI
|