mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 23:36:00 +02:00
Working on BeefInstall
This commit is contained in:
parent
15e65e240d
commit
3515a59bea
9 changed files with 450 additions and 43 deletions
|
@ -3,3 +3,9 @@ FileVersion = 1
|
|||
[Project]
|
||||
Name = "BeefInstall"
|
||||
StartupObject = "BeefInstall.Program"
|
||||
|
||||
[ProjectFolder]
|
||||
|
||||
[[ProjectFolder.Items]]
|
||||
Type = "Source"
|
||||
Path = "../../IDE/src/util/Zip.bf"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
FileVersion = 1
|
||||
Projects = {BeefInstall = {Path = "."}}
|
||||
Unlocked = ["corlib"]
|
||||
|
||||
[Workspace]
|
||||
StartupProject = "BeefInstall"
|
||||
|
|
136
BeefTools/BeefInstall/BeefSpace_User.toml
Normal file
136
BeefTools/BeefInstall/BeefSpace_User.toml
Normal file
|
@ -0,0 +1,136 @@
|
|||
FileVersion = 1
|
||||
LastConfig = "Debug"
|
||||
LastPlatform = "Win64"
|
||||
RecentFilesList = ["c:\\Beef\\BeefTools\\BeefInstall\\src\\Program.bf", "c:\\Beef\\IDE\\src\\util\\Zip.bf", "c:\\beef\\BeefLibs\\corlib\\src\\System\\String.bf"]
|
||||
|
||||
[MainWindow]
|
||||
X = 148
|
||||
Y = 85
|
||||
Width = 1724
|
||||
Height = 1830
|
||||
|
||||
[MainDockingFrame]
|
||||
Type = "DockingFrame"
|
||||
SplitType = 2
|
||||
|
||||
[[MainDockingFrame.DockedWidgets]]
|
||||
RequestedWidth = 350.0
|
||||
RequestedHeight = 200.0
|
||||
SizePriority = 200.0
|
||||
Type = "DockingFrame"
|
||||
SplitType = 1
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets]]
|
||||
RequestedWidth = 200.0
|
||||
RequestedHeight = 200.0
|
||||
Type = "TabbedView"
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
|
||||
Active = true
|
||||
TabLabel = "Workspace"
|
||||
TabWidth = 115.0
|
||||
Type = "ProjectPanel"
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets]]
|
||||
IsFillWidget = true
|
||||
Permanent = true
|
||||
RequestedWidth = 150.0
|
||||
RequestedHeight = 150.0
|
||||
SizePriority = 150.0
|
||||
DefaultDocumentsTabbedView = true
|
||||
Type = "TabbedView"
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
|
||||
TabLabel = "String.bf"
|
||||
TabWidth = 89.0
|
||||
Type = "SourceViewPanel"
|
||||
FilePath = "c:\\beef\\BeefLibs\\corlib\\src\\System\\String.bf"
|
||||
CursorPos = 41778
|
||||
VertPos = 24600.0
|
||||
ProjectName = "corlib"
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
|
||||
TabLabel = "Zip.bf"
|
||||
TabWidth = 63.0
|
||||
Type = "SourceViewPanel"
|
||||
FilePath = "c:\\Beef\\IDE\\src\\util\\Zip.bf"
|
||||
CursorPos = 3000
|
||||
VertPos = 540.0
|
||||
ProjectName = "BeefInstall"
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
|
||||
Active = true
|
||||
TabLabel = "Program.bf"
|
||||
TabWidth = 96.0
|
||||
Type = "SourceViewPanel"
|
||||
FilePath = "c:\\Beef\\BeefTools\\BeefInstall\\src\\Program.bf"
|
||||
CursorPos = 1398
|
||||
ProjectName = "BeefInstall"
|
||||
|
||||
[[MainDockingFrame.DockedWidgets]]
|
||||
RequestedWidth = 250.0
|
||||
RequestedHeight = 250.0
|
||||
Type = "DockingFrame"
|
||||
SplitType = 1
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets]]
|
||||
RequestedWidth = 250.0
|
||||
RequestedHeight = 250.0
|
||||
SizePriority = 0.5
|
||||
Type = "TabbedView"
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
|
||||
TabLabel = "Memory"
|
||||
TabWidth = 99.0
|
||||
Type = "MemoryPanel"
|
||||
AutoResize = "Auto_Mul8"
|
||||
RequestedWidth = 300.0
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
|
||||
TabLabel = "Watch"
|
||||
TabWidth = 86.0
|
||||
Type = "WatchPanel"
|
||||
Columns = [{Width = 200.0}, {Width = 200.0}, {Width = 200.0}]
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
|
||||
Active = true
|
||||
TabLabel = "Auto"
|
||||
TabWidth = 77.0
|
||||
Type = "AutoWatchPanel"
|
||||
Columns = [{Width = 200.0}, {Width = 200.0}, {Width = 200.0}]
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets]]
|
||||
RequestedWidth = 250.0
|
||||
RequestedHeight = 250.0
|
||||
SizePriority = 0.5
|
||||
Type = "TabbedView"
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
|
||||
TabLabel = "Find Results"
|
||||
TabWidth = 119.0
|
||||
Type = "FindResultsPanel"
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
|
||||
TabLabel = "Threads"
|
||||
TabWidth = 97.0
|
||||
Type = "ThreadPanel"
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
|
||||
TabLabel = "Call Stack"
|
||||
TabWidth = 105.0
|
||||
Type = "CallStackPanel"
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
|
||||
TabLabel = "Immediate"
|
||||
TabWidth = 111.0
|
||||
Type = "ImmediatePanel"
|
||||
|
||||
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
|
||||
Active = true
|
||||
TabLabel = "Output"
|
||||
TabWidth = 90.0
|
||||
Type = "OutputPanel"
|
||||
|
||||
[DebuggerDisplayTypes.""]
|
||||
IntDisplayType = "Default"
|
||||
MmDisplayType = "Default"
|
|
@ -1,4 +1,6 @@
|
|||
using System;
|
||||
using IDE.Util;
|
||||
using System.IO;
|
||||
|
||||
namespace BeefInstall
|
||||
{
|
||||
|
@ -34,8 +36,49 @@ namespace BeefInstall
|
|||
}
|
||||
}
|
||||
|
||||
Result<void> ExtractTo(ZipFile zipFile, StringView destDir, StringView subStr)
|
||||
{
|
||||
String fileName = scope .();
|
||||
String destPath = scope .();
|
||||
|
||||
for (int i < zipFile.GetNumFiles())
|
||||
{
|
||||
ZipFile.Entry entry = scope .();
|
||||
if (zipFile.SelectEntry(i, entry) case .Err)
|
||||
continue;
|
||||
|
||||
fileName.Clear();
|
||||
entry.GetFileName(fileName);
|
||||
|
||||
if (!fileName.StartsWith(subStr))
|
||||
continue;
|
||||
|
||||
destPath.Clear();
|
||||
destPath.Append(destDir);
|
||||
destPath.Append('/');
|
||||
destPath.Append(fileName);
|
||||
|
||||
if (entry.IsDirectory)
|
||||
{
|
||||
if (Directory.CreateDirectory(destPath) case .Err)
|
||||
return .Err;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (entry.ExtractToFile(destPath) case .Err)
|
||||
return .Err;
|
||||
}
|
||||
}
|
||||
|
||||
return .Ok;
|
||||
}
|
||||
|
||||
void Run()
|
||||
{
|
||||
ZipFile zipFile = scope .();
|
||||
zipFile.Open(@"c:\\temp\\build_1827.zip");
|
||||
ExtractTo(zipFile, @"c:\temp\unzip", .());
|
||||
|
||||
CabFile cabFile = scope .();
|
||||
cabFile.Init();
|
||||
cabFile.Copy();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue