Help change single file lzma maker to multiple in c#
#1
Question 
guys i use this code to create my files for App updater.
with this code i can just select one files every time and also the output copied to clipboard and zipped files crated in same directory near unzipped files.
BUT:
i need to edit this code for:

1)possible to select multiple files (all files with files in folders and sub folders) or i think its better give a folder address to add all files also the files in sub folders.
2)put output data on a file named "info.xml" except clipboard in somewhere.(each data for each files in per line)
an example for output data on clipboard is:
Code:
<ContentFile Name="logo.bmp" Size="109976" SHA1Hash="280EFF2ADD6557E90C542263B1C7971F8EBF19A8" CompressedSize="8625" />
3) at last put zipped files (lzma format) on the other place with same files names and folders and sub folders with included files.

Guys i need full code.
Thank you for Help

this is my code:

Code:
namespace UpdateBuilder { public partial class MainFrm : Form { public string fileName = ""; public string output = ""; public MainFrm() { InitializeComponent(); } private void browseBtn_Click(object sender, EventArgs e) { // Show a file browsing dialog OpenFileDialog dialog = new OpenFileDialog(); dialog.Filter = "All files (*.*)|*.*"; dialog.InitialDirectory = Directory.GetCurrentDirectory(); dialog.Title = "Select a file to build"; if (dialog.ShowDialog() == DialogResult.OK) { // Place the selected file's path in the input textbox inBox.Text = dialog.FileName; fileName = dialog.SafeFileName; } } private void buildBtn_Click(object sender, EventArgs e) { if (inBox.Text != "") { // Disable all controls inBox.Enabled = false; browseBtn.Enabled = false; buildBtn.Enabled = false; // Start the converion utility ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = "lzma.exe"; startInfo.Arguments = "e " + inBox.Text + " " + inBox.Text + ".lzma -d21"; startInfo.CreateNoWindow = true; startInfo.WindowStyle = ProcessWindowStyle.Hidden; using (Process p = Process.Start(startInfo)) { // And wait for it to finish while (!p.HasExited) { Thread.Sleep(100); } } // Generate that final string FileInfo inFile = new FileInfo(inBox.Text); FileInfo outFile = new FileInfo(inBox.Text + ".lzma"); output = "<ContentFile Name=\"" + fileName + "\" Size=\"" + inFile.Length.ToString() + "\" SHA1Hash=\"" + HashCalc.GetSHA1Hash(inBox.Text) + "\" CompressedSize=\"" + outFile.Length.ToString() + "\" />"; // Re-enable the controls inBox.Enabled = true; browseBtn.Enabled = true; buildBtn.Enabled = true; // Show notice and copy output to clipboard Clipboard.SetText(output); MessageBox.Show("Build succeeded.\nCopied output to clipboard."); } else { MessageBox.Show("Please select a file to build."); } } } }
Reply

#2
pleas some one help me
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Using Cheat Engine 6.2 to change BO2 address values wzlrsaur 6 10,717 08-06-2013, 06:28
Last Post: 14th
  [Release] Box maker E-losev 4 4,932 07-17-2013, 04:18
Last Post: E-losev
  Mw3 Feed Color Change?? aluzion 5 7,749 07-16-2013, 19:52
Last Post: barata
  Change death animation Keouf 3 5,567 07-05-2013, 18:39
Last Post: Nekochan
  [Release] Black Ops Single Player/Zombie Trainer V3.6 Craig87 52 101,665 07-01-2013, 15:12
Last Post: explosivebanana55
Wink Preview Black ops 2 - CFG file dump SLiiTH3R 11 25,973 06-09-2013, 16:01
Last Post: dylankrajewski
  Using Cheat Engine with Zombies Single Player kikkawa 3 14,859 06-03-2013, 01:18
Last Post: kikkawa
  [Release] Modern Warfare 3 Fast File Sounds master131 5 21,696 05-21-2013, 16:46
Last Post: ZURA.
Information How to change text messages in MP (.ff edit) giofrida 5 7,001 05-02-2013, 20:05
Last Post: Pozzuh
Brick [Release] MW3 Single Player CONSOLE v1.9.433 can1907 13 37,449 05-01-2013, 15:18
Last Post: vton

Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.