Test
This commit is contained in:
@@ -133,7 +133,7 @@ versionDropdown:onSelect(function(self, index, value)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
instalScreen:addLabel(coloring)
|
installScreen:addLabel(coloring)
|
||||||
:setText("Path:")
|
:setText("Path:")
|
||||||
:setPosition(2, "{versionDesc.y + versionDesc.height + 1}")
|
:setPosition(2, "{versionDesc.y + versionDesc.height + 1}")
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
local VisualElement = require("elements/VisualElement")
|
local VisualElement = require("elements/VisualElement")
|
||||||
local tHex = require("libraries/colorHex")
|
local tHex = require("libraries/colorHex")
|
||||||
|
---@configDescription A multi-line text editor component with cursor support and text manipulation features
|
||||||
|
---@configDefault false
|
||||||
|
|
||||||
---A multi-line text editor component with cursor support and text manipulation features
|
---A multi-line text editor component with cursor support and text manipulation features
|
||||||
---@class TextBox : VisualElement
|
---@class TextBox : VisualElement
|
||||||
|
|||||||
@@ -74,34 +74,36 @@ local function categorizeFile(path)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function scanDirectory(baseDir, relativePath)
|
local function scanDirectory(baseDir)
|
||||||
local files = {}
|
local files = {}
|
||||||
|
-- Liste aller zu scannenden Ordner
|
||||||
|
local dirs = {
|
||||||
|
baseDir .. "/elements",
|
||||||
|
baseDir .. "/plugins",
|
||||||
|
baseDir .. "/libraries",
|
||||||
|
baseDir -- für Core-Files
|
||||||
|
}
|
||||||
|
|
||||||
-- Nutze direkt io.popen für das Directory Listing
|
for _, dir in ipairs(dirs) do
|
||||||
local cmd = 'dir "' .. baseDir .. '/' .. relativePath .. '" /b /s'
|
for entry in io.popen('ls -1 "' .. dir .. '"'):lines() do
|
||||||
local pipe = io.popen(cmd)
|
if entry:match("%.lua$") then
|
||||||
if not pipe then
|
local fullPath = dir .. "/" .. entry
|
||||||
error("Failed to execute directory scan command")
|
local config = parseFile(fullPath)
|
||||||
return files
|
if config then
|
||||||
end
|
config.name = entry:gsub("%.lua$", "")
|
||||||
|
-- Relativen Pfad erstellen
|
||||||
for path in pipe:lines() do
|
config.path = fullPath:gsub("^" .. baseDir .. "/", "")
|
||||||
if path:match("%.lua$") then
|
files[fullPath] = config
|
||||||
local config = parseFile(path)
|
end
|
||||||
if config then
|
|
||||||
config.name = path:match("([^/\\]+)%.lua$")
|
|
||||||
config.path = path:gsub(baseDir .. "/", "")
|
|
||||||
files[path] = config
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
pipe:close()
|
|
||||||
return files
|
return files
|
||||||
end
|
end
|
||||||
|
|
||||||
local function generateConfig(srcPath)
|
local function generateConfig(srcPath)
|
||||||
local files = scanDirectory(srcPath, "")
|
local files = scanDirectory(srcPath)
|
||||||
local categories = {}
|
local categories = {}
|
||||||
|
|
||||||
-- Files in Kategorien einordnen
|
-- Files in Kategorien einordnen
|
||||||
|
|||||||
Reference in New Issue
Block a user