diff --git a/Novetus/NovetusCore/StorageAndFunctions/Util.cs b/Novetus/NovetusCore/StorageAndFunctions/Util.cs
index 595d957..0fb01ca 100644
--- a/Novetus/NovetusCore/StorageAndFunctions/Util.cs
+++ b/Novetus/NovetusCore/StorageAndFunctions/Util.cs
@@ -830,6 +830,33 @@ namespace Novetus.Core
return outFname;
}
+ public static void Compress(string currFile) // taken from https://github.com/IDeletedSystem64/rblx-compressor
+ {
+ var newFile = currFile + ".bz2";
+ var input = File.OpenRead(currFile);
+ var output = File.Create(newFile);
+
+ {
+ try
+ {
+ {
+ using (var compressor = new Ionic.BZip2.ParallelBZip2OutputStream(output))
+ {
+ byte[] buffer = new byte[2048];
+ int n;
+ while ((n = input.Read(buffer, 0, buffer.Length)) > 0)
+ {
+ compressor.Write(buffer, 0, n);
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ throw;
+ }
+ }
+ }
private static void Pump(Stream src, Stream dest)
{
diff --git a/Novetus/NovetusLauncher/Forms/SDK/NovetusSDK.Designer.cs b/Novetus/NovetusLauncher/Forms/SDK/NovetusSDK.Designer.cs
index b599073..cd7896e 100644
--- a/Novetus/NovetusLauncher/Forms/SDK/NovetusSDK.Designer.cs
+++ b/Novetus/NovetusLauncher/Forms/SDK/NovetusSDK.Designer.cs
@@ -46,12 +46,14 @@
System.Windows.Forms.ListViewItem listViewItem9 = new System.Windows.Forms.ListViewItem(new string[] {
"Roblox Script Generator"}, "ROBLOXScriptGenerator.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
System.Windows.Forms.ListViewItem listViewItem10 = new System.Windows.Forms.ListViewItem(new string[] {
- "Roblox Legacy Place Converter"}, "ROBLOXLegacyPlaceConverter.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
+ "Place Compressor"}, "ModCreator.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
System.Windows.Forms.ListViewItem listViewItem11 = new System.Windows.Forms.ListViewItem(new string[] {
- "Diogenes Editor"}, "Diogenes.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
+ "Roblox Legacy Place Converter"}, "ROBLOXLegacyPlaceConverter.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
System.Windows.Forms.ListViewItem listViewItem12 = new System.Windows.Forms.ListViewItem(new string[] {
- "ClientScript Tester"}, "ClientScriptTester.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
+ "Diogenes Editor"}, "Diogenes.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
System.Windows.Forms.ListViewItem listViewItem13 = new System.Windows.Forms.ListViewItem(new string[] {
+ "ClientScript Tester"}, "ClientScriptTester.png", System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
+ System.Windows.Forms.ListViewItem listViewItem14 = new System.Windows.Forms.ListViewItem(new string[] {
"XML Content Editor"}, 9, System.Drawing.Color.Empty, System.Drawing.Color.Empty, new System.Drawing.Font("Microsoft Sans Serif", 9.75F));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NovetusSDK));
this.label1 = new System.Windows.Forms.Label();
@@ -106,7 +108,8 @@
listViewItem10,
listViewItem11,
listViewItem12,
- listViewItem13});
+ listViewItem13,
+ listViewItem14});
this.listView1.Location = new System.Drawing.Point(12, 102);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(414, 260);
diff --git a/Novetus/NovetusLauncher/Forms/SDK/NovetusSDK.cs b/Novetus/NovetusLauncher/Forms/SDK/NovetusSDK.cs
index 58263f7..417bd2e 100644
--- a/Novetus/NovetusLauncher/Forms/SDK/NovetusSDK.cs
+++ b/Novetus/NovetusLauncher/Forms/SDK/NovetusSDK.cs
@@ -21,6 +21,7 @@ enum SDKApps
ClientScriptDoc,
SplashTester,
ScriptGenerator,
+ PlaceCompressor,
LegacyPlaceConverter,
DiogenesEditor,
ClientScriptTester,
@@ -142,6 +143,10 @@ public partial class NovetusSDK : Form
proc.StartInfo.UseShellExecute = false;
proc.Start();
break;
+ case SDKApps.PlaceCompressor:
+ PlaceCompressor pc = new PlaceCompressor();
+ pc.Show();
+ break;
case SDKApps.LegacyPlaceConverter:
Process proc2 = new Process();
proc2.StartInfo.FileName = GlobalPaths.DataDir + "\\Roblox_Legacy_Place_Converter.exe";
@@ -149,6 +154,7 @@ public partial class NovetusSDK : Form
proc2.StartInfo.UseShellExecute = false;
proc2.Start();
break;
+
case SDKApps.DiogenesEditor:
DiogenesEditor dio = new DiogenesEditor();
dio.Show();
diff --git a/Novetus/NovetusLauncher/Forms/SDK/NovetusSDK.resx b/Novetus/NovetusLauncher/Forms/SDK/NovetusSDK.resx
index bcc263f..ccbde72 100644
--- a/Novetus/NovetusLauncher/Forms/SDK/NovetusSDK.resx
+++ b/Novetus/NovetusLauncher/Forms/SDK/NovetusSDK.resx
@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACw
- FgAAAk1TRnQBSQFMAgEBDQEAAVABAAFQAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ FgAAAk1TRnQBSQFMAgEBDQEAAVgBAAFYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQG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fQyAAFSBOUCXgHlAVIB/wGS
Ae8B7AH0MgABeQdYAXkB8gHtAe8B7AH0MgABGwFSAVgBHAH3BZIC7wHsAfQzAAHzAZkBHAH3Ae8FBwHv
Ae0B/zQAAv8B9AHvAvcEkgG8Af9aAAH/AZgaAASzAa0BxwEABa0BvAS1CrQBvAUAA20CSQFtDAACcgsA
diff --git a/Novetus/NovetusLauncher/Forms/SDK/PlaceCompressor.Designer.cs b/Novetus/NovetusLauncher/Forms/SDK/PlaceCompressor.Designer.cs
new file mode 100644
index 0000000..c764c78
--- /dev/null
+++ b/Novetus/NovetusLauncher/Forms/SDK/PlaceCompressor.Designer.cs
@@ -0,0 +1,125 @@
+ partial class PlaceCompressor
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PlaceCompressor));
+ this.statusLabel = new System.Windows.Forms.Label();
+ this.processStatus = new System.Windows.Forms.Label();
+ this.selectButton = new System.Windows.Forms.Button();
+ this.selectedText = new System.Windows.Forms.Label();
+ this.currentFile = new System.Windows.Forms.Label();
+ this.sourceLink = new System.Windows.Forms.LinkLabel();
+ this.SuspendLayout();
+ //
+ // statusLabel
+ //
+ this.statusLabel.AutoSize = true;
+ this.statusLabel.Location = new System.Drawing.Point(12, 15);
+ this.statusLabel.Name = "statusLabel";
+ this.statusLabel.Size = new System.Drawing.Size(40, 13);
+ this.statusLabel.TabIndex = 0;
+ this.statusLabel.Text = "Status:";
+ //
+ // processStatus
+ //
+ this.processStatus.AutoSize = true;
+ this.processStatus.Location = new System.Drawing.Point(49, 15);
+ this.processStatus.Name = "processStatus";
+ this.processStatus.Size = new System.Drawing.Size(74, 13);
+ this.processStatus.TabIndex = 1;
+ this.processStatus.Text = "processStatus";
+ //
+ // selectButton
+ //
+ this.selectButton.Location = new System.Drawing.Point(12, 31);
+ this.selectButton.Name = "selectButton";
+ this.selectButton.Size = new System.Drawing.Size(340, 23);
+ this.selectButton.TabIndex = 2;
+ this.selectButton.Text = "Select Place";
+ this.selectButton.UseVisualStyleBackColor = true;
+ this.selectButton.Click += new System.EventHandler(this.selectButton_Click);
+ //
+ // selectedText
+ //
+ this.selectedText.AutoSize = true;
+ this.selectedText.Location = new System.Drawing.Point(12, 57);
+ this.selectedText.Name = "selectedText";
+ this.selectedText.Size = new System.Drawing.Size(82, 13);
+ this.selectedText.TabIndex = 3;
+ this.selectedText.Text = "Selected Place:";
+ //
+ // currentFile
+ //
+ this.currentFile.AutoSize = true;
+ this.currentFile.Location = new System.Drawing.Point(91, 57);
+ this.currentFile.Name = "currentFile";
+ this.currentFile.Size = new System.Drawing.Size(41, 13);
+ this.currentFile.TabIndex = 4;
+ this.currentFile.Text = "currFile";
+ //
+ // sourceLink
+ //
+ this.sourceLink.AutoSize = true;
+ this.sourceLink.LinkColor = System.Drawing.Color.Black;
+ this.sourceLink.Location = new System.Drawing.Point(12, 80);
+ this.sourceLink.Name = "sourceLink";
+ this.sourceLink.Size = new System.Drawing.Size(298, 13);
+ this.sourceLink.TabIndex = 5;
+ this.sourceLink.TabStop = true;
+ this.sourceLink.Text = "Checkout the fully featured compressor and source on GitHub";
+ this.sourceLink.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.sourceLink_LinkClicked);
+ //
+ // PlaceCompressor
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.ControlLightLight;
+ this.ClientSize = new System.Drawing.Size(364, 105);
+ this.Controls.Add(this.sourceLink);
+ this.Controls.Add(this.currentFile);
+ this.Controls.Add(this.selectedText);
+ this.Controls.Add(this.selectButton);
+ this.Controls.Add(this.processStatus);
+ this.Controls.Add(this.statusLabel);
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.Name = "PlaceCompressor";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "RBLX Compressor";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label statusLabel;
+ private System.Windows.Forms.Label processStatus;
+ private System.Windows.Forms.Button selectButton;
+ private System.Windows.Forms.Label selectedText;
+ private System.Windows.Forms.Label currentFile;
+ private System.Windows.Forms.LinkLabel sourceLink;
+ }
diff --git a/Novetus/NovetusLauncher/Forms/SDK/PlaceCompressor.cs b/Novetus/NovetusLauncher/Forms/SDK/PlaceCompressor.cs
new file mode 100644
index 0000000..014c165
--- /dev/null
+++ b/Novetus/NovetusLauncher/Forms/SDK/PlaceCompressor.cs
@@ -0,0 +1,73 @@
+#region Usings
+using Novetus.Core;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.IO;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Collections;
+using System.Windows.Forms;
+#endregion
+
+public partial class PlaceCompressor : Form
+{
+ private bool successful;
+ private string currFile;
+ public PlaceCompressor()
+ {
+ InitializeComponent();
+ processStatus.Text = "Idle";
+ currentFile.Text = "No place selected!";
+ }
+
+ private void selectButton_Click(object sender, EventArgs e)
+ {
+ OpenFileDialog ofd = new OpenFileDialog();
+ {
+ ofd.Filter = "Roblox Level (*.rbxl)|*.rbxl|Roblox Level|*.rbxlx";
+ ofd.FilterIndex = 1;
+ ofd.Title = "Load Roblox Level...";
+ if (ofd.ShowDialog() == DialogResult.OK)
+ {
+ currentFile.Text = ofd.SafeFileName;
+ currFile = Path.GetFullPath(ofd.FileName);
+ selectButton.Enabled = false;
+ processStatus.Text = "Compressing...";
+ Util.ConsolePrint("Beginning compression of " + ofd.SafeFileName, 3);
+ try
+ {
+ Util.Compress(currFile);
+ successful = true;
+ }
+ catch (Exception ex)
+ {
+ successful = false;
+ Util.ConsolePrint("Something went wrong while compressing: " + ex.Message, 2);
+ MessageBox.Show("Something went wrong while compressing the Place: \n" + ex.Message, "RBLX Compressor - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ throw;
+ }
+ finally
+ {
+ selectButton.Enabled = true;
+ System.GC.Collect(); // I know this isn't recommended, but repeated use in a single session can cause memory leaks otherwise.
+ if (!successful) { processStatus.Text = "Error"; }
+ else
+ {
+ processStatus.Text = "Compression Finished!";
+ Util.ConsolePrint("Compression Finished", 3);
+ }
+ }
+ }
+ }
+ }
+
+ private void sourceLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
+ {
+ System.Diagnostics.Process.Start("https://github.com/IDeletedSystem64/rblx-compressor");
+ }
+}
+
diff --git a/Novetus/NovetusLauncher/Forms/SDK/PlaceCompressor.resx b/Novetus/NovetusLauncher/Forms/SDK/PlaceCompressor.resx
new file mode 100644
index 0000000..845ce26
--- /dev/null
+++ b/Novetus/NovetusLauncher/Forms/SDK/PlaceCompressor.resx
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+
+ AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ AAD///8A////AP///wD///8A////ANhsJXDYbCXg0mwpdltoaA1ZZmYPVmVlGVRhYRtSYGAZzWsqc9ds
+ JeLXbCVx////AP///wD///8A////AP///wDfgEHg66+I/9d/RPBcamqGXGpqkFlmZuVWZWXpVmNj5dV+
+ Q/Lrrob/3oBB4f///wD///8A////AP///wBrd3cD1ZFgfeCTXuTKjWGKYW9vMV5ra0tjb2/+XGpq/l5r
+ a/7Ii1+J4ZRe4eGUXnH///8A////AP///wD///8Ab3p6EYiSktJ8h4f/eoWF/3N/f/9lcnL9jZeX/5yk
+ pP9rdnb/V2VlJP///wD///8AJ5/CcCefwv8nn8L/J5/C/yifwf8unLz/MJq4/zKYtP9YfYXHa3d314qU
+ lP+epqb/bXl5/1toaCT///8A////ACefwv9b6O//YPT2/1309v9Z9Pb/VfT2/1H09v9J5+7/Kp2+/2h0
+ dDV4g4P/oKio/3B7e/9camok////AP///wAnn8L/Z/X2/yrc3f8c1NT/F9LU/xHS0/8V2dv/UvT2/yef
+ wv9qd3cjd4KC/6Kqqv9xfn7/YG1tJP///wD///8AJ5/C/2v19v8n1df/o/T0/6H09P+g9PT/EdLT/1b0
+ 9v8nn8L/bXl5H4SGgfWiqan/fIN+/2NvbyT///8A////ACefwv9u9fb/TPP0/0jz9P9F8/T/QPL0/zzy
+ 9P9a9Pb/J5/C/3B8fB5/hH70pKuq/3uDgP9lcnIk////AP///wAnn8L/cfX2/zje3/8s1tf/KNXX/yPV
+ 1v8n3N3/XvT2/yefwv91gYEei42G9Katrf+Dh4T/aHV1JP///wD///8AJ5/C/3P19v812Nj/p/T0/6b0
+ 9P+k9PT/JNXW/2L09v8nn8L/d4ODHoaLhPSor67/gYeG/215eST///8A////ACefwv929fb/V/P0/1Tz
+ 9P9R8/T/TvP0/0rz9P9m9fb/J5/C/3qGhh6Qk4v0qrCw/4eOi/9wfHwk////AP///wAnn8LBRM/Z/0re
+ 3/810tL/NM7O/zLMzf880ND/QsjO/zacuddgkZ1giY6L9620s/+GjIv/cn5+JP///wD///8AJ5/CWief
+ wv1Dxs//ka2u/5qiov+Xn5//lp6e/5KcnP+Rmpr/k5yc/6Cpqf+wtrb/ho6M/3eBgST///8A////AP//
+ /wAnn8JOM56+vpCorPmepqb/qrGx/7m/v/+4vr7/try8/7W7u/+zubn/sLe3/4WQkP95hIQh////AP//
+ /wD///8A////AJObmwOTm5sXkpqaM52lpd6aoqL/maGh/5aenv+Unp7/kpyc/46YmPqSmpqWfoiIDv//
+ /wD///8A+AAAAPgAAADwAAAA8AMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAD
+ AACAAwAAwAMAAA==
+
+
+
\ No newline at end of file
diff --git a/Novetus/NovetusLauncher/Novetus.Launcher.csproj b/Novetus/NovetusLauncher/Novetus.Launcher.csproj
index 994687e..7b457b1 100644
--- a/Novetus/NovetusLauncher/Novetus.Launcher.csproj
+++ b/Novetus/NovetusLauncher/Novetus.Launcher.csproj
@@ -369,6 +369,12 @@
NovetusConsole.cs
+
+ Form
+
+
+ PlaceCompressor.cs
+
Form
@@ -497,6 +503,9 @@
NovetusConsole.cs
+
+ PlaceCompressor.cs
+
ModCreator.cs