NEW: Application That Cleans MacroQuest2 Junk Files

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

Chaosregen12010
decaying skeleton
decaying skeleton
Posts: 8
Joined: Tue Feb 05, 2013 11:48 pm

NEW: Application That Cleans MacroQuest2 Junk Files

Post by Chaosregen12010 » Thu Aug 15, 2013 10:16 pm

Hi everyone,

I didn't know where to post this, but I created a program that cleans a compiled version of MacroQuest2 of all the junk that is left after compiling. Basically reducing its size to basically 6 MB or less rather then the 42MB size. When MacroQuest2 is compiled it leaves behind nonsense files that are not needed to run the program. These are just basically Junk files left over from a compile. This program is very simple to use. Just find a compiled version of MacroQuest2 you compiled and hit clean MacroQuest2.

Don't ask why I crated this program, I just got sick one day of seeing allot of junk files after a compile. I'm like Why are all these junk files here. So it led me to develop this application, and publish it in visual basic (censor: i'm an idiot; please ignore me) (VB.Net) to give it to you all to use if you want.

Call me weird but I love my applications to be neat and clutter free from junk files and garbage.

My First creation of this program was just a batch file that ran in the MacroQuest2 directories and looked for wild card extensions to clean up the junk. I got kind of sick of it because I would have to always copy the dam batch file to the directory and then run it then delete the stupid batch file. So dam annoying.

Now all you have to do is run the application any way you want. Hit Browse find the release of MacroQuest2 and hit clean macroquest2.

This version is 0.5 Beta, I hope you guys enjoy this because it just makes the release looks so neat.

I'll post new release's if there is. this program is complementary free because I love MacroQuest2 and use it so much too.

Love you all peace!

For (Bug Reports & Feedback), you can send me an E-Mail @ ravenofbones@hotmail.com
Last edited by Chaosregen12010 on Thu Aug 15, 2013 11:50 pm, edited 4 times in total.

JudgeD
a snow griffon
a snow griffon
Posts: 354
Joined: Sat Aug 18, 2012 8:07 pm

Re: NEW: Application That Cleans MacroQuest2 Junk Files

Post by JudgeD » Thu Aug 15, 2013 11:06 pm

Do you have a list of files cleaned up? Just curious which ones you eliminate.

Chaosregen12010
decaying skeleton
decaying skeleton
Posts: 8
Joined: Tue Feb 05, 2013 11:48 pm

Re: NEW: Application That Cleans MacroQuest2 Junk Files

Post by Chaosregen12010 » Thu Aug 15, 2013 11:23 pm

It cleans the following extensions.

*.cvsignore"
*.exp"
*.pdb"
*.map"
*.lib"

I should have posted that before. Sorry about that... these just useless files basically made after compiling.

Chaosregen12010
decaying skeleton
decaying skeleton
Posts: 8
Joined: Tue Feb 05, 2013 11:48 pm

Re: NEW: Application That Cleans MacroQuest2 Junk Files

Post by Chaosregen12010 » Thu Aug 15, 2013 11:47 pm

I don't get why they put that in my post.

(censor: i'm an idiot; please ignore me)

sigh I didn't even swear......

ascii38
a grimling bloodguard
a grimling bloodguard
Posts: 506
Joined: Sat Jul 17, 2004 8:06 pm

Re: NEW: Application That Cleans MacroQuest2 Junk Files

Post by ascii38 » Fri Aug 16, 2013 10:07 am

The bad word filter triggers on V B. It's because there were a lot of people who came in and asked why they couldn't compile with their copy of V*B6.

[Am I in trouble now for bypassing the filter?]

Gomer
a snow griffon
a snow griffon
Posts: 304
Joined: Fri Apr 15, 2005 2:38 pm

Re: NEW: Application That Cleans MacroQuest2 Junk Files

Post by Gomer » Sun Aug 18, 2013 5:03 pm

I'm not sure what the point of this is. Are you just trying to save disk space on your build machine after a compile?

If you want to know what to copy around to your various EQ PCs, it's just *.exe, *.dll and *.txt (assuming you have already configured the .ini files on those systems).

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Re: NEW: Application That Cleans MacroQuest2 Junk Files

Post by dont_know_at_all » Tue Aug 20, 2013 4:12 am

Don't post an exe to an open source project dealing with hacking...

Chaosregen12010
decaying skeleton
decaying skeleton
Posts: 8
Joined: Tue Feb 05, 2013 11:48 pm

Re: NEW: Application That Cleans MacroQuest2 Junk Files

Post by Chaosregen12010 » Thu Aug 22, 2013 6:59 pm

what do you mean hacking. all the .exe does is just delete 4 or 5 extension types making the app more clean and neat. If you want I can post my code online for the *.exe file so you all can see what I did. I don't hack I just make game tweaks hence the name DiGiSoft, DiGiTal Gaming Software. So please don't accuse me of hacking when its just a few simple lines of visual basic (censor: i'm an idiot; please ignore me) code that just deletes the files based on extension is all. I'm not a hacker I'm just a fellow developer looking to just improve or make things a little cooler or make things neat or compact efficient for users. Well here is the lines of code so you guys can see. and Please forgive me for being blunt but I'm merely just trying to help, is-int this a site where people share things about the MacroQuest2 program?

Code: Select all

Imports System.IO
Public Class Main

    Private Sub BTN_Cleanup_Click(sender As Object, e As EventArgs) Handles BTN_Cleanup.Click
        Dim Default_Directory As String = Text_Directory.Text
        If Text_Directory.Text = "" Then
            MessageBox.Show("Please browse for your realse of MacroQuest 2 first.", "DiGiSoft's: MacroQuest 2 Cleanup Utilitie 0.5, Beta.", MessageBoxButtons.OK, MessageBoxIcon.Error)
            BTN_Browes_Click(sender, e)
        Else
            If Not (CleanFiles(Default_Directory, New String() {".cvsignore", ".exp", ".pdb", ".map", ".lib"})) Then
                MessageBox.Show("There are no junk files found in this compiled version.", "DiGiSoft's: MacroQuest 2 Cleanup Utilitie 0.5, Beta.", MessageBoxButtons.OK, MessageBoxIcon.Information)
            Else
                MessageBox.Show("MacroQuest 2 has been cleaned successfully.", "DiGiSoft's: MacroQuest 2 Cleanup Utilitie 0.5, Beta.", MessageBoxButtons.OK, MessageBoxIcon.Information)
            End If
        End If

    End Sub

    Private Sub BTN_Browes_Click(sender As Object, e As EventArgs) Handles BTN_Browes.Click
        Folder_Nav.Description = "Where is the MacroQuest 2 folder located?"
        Folder_Nav.ShowNewFolderButton = False
        Folder_Nav.ShowDialog()
        Text_Directory.Text = Folder_Nav.SelectedPath
        If System.IO.File.Exists(System.IO.Path.Combine(Text_Directory.Text, "MacroQuest2.exe")) Then
            MessageBox.Show("A version of MacroQuest 2 has been found.", "DiGiSoft's: MacroQuest 2 Cleanup Utilitie 0.5, Beta.", MessageBoxButtons.OK, MessageBoxIcon.Information)
        Else
            MessageBox.Show("No version of MacroQuest 2 could be validated in this directorey. Please browse for your compiled MacroQuest 2 folder.", "DiGiSoft's: MacroQuest 2 Cleanup Utilitie 0.5, Beta.", MessageBoxButtons.OK, MessageBoxIcon.Information)
            BTN_Browes_Click(sender, e)
        End If
    End Sub

    Private Sub BTN_Exit_Click(sender As Object, e As EventArgs) Handles BTN_Exit.Click
        Application.Exit()
    End Sub

    ''' <summary>  
    ''' Delete all files from the ParentDirectory provided where the file extension is found in the provided FileFilter string array.  
    ''' </summary>  
    ''' <param name="ParentDirectory">The fully qualified path to a Directory containing the target files.</param>  
    ''' <param name="FileFilter">A string array containing one file filter per element. E.g. {".txt", ".jpg"}</param>  
    ''' <returns>True if files were found and deleted. False if the ParentDirectory does not exist or Files were not found.</returns>  
    ''' <remarks></remarks>  
    Private Function CleanFiles(ByVal ParentDirectory As String, ByVal FileFilter() As String) As Boolean
       
        If Not (System.IO.Directory.Exists(ParentDirectory)) Then Return False
        Dim FilteredFiles() As String = System.IO.Directory.GetFiles(ParentDirectory, "*.*").Where(Function(f) FileFilter.Contains(New System.IO.FileInfo(f).Extension)).ToArray
        If FilteredFiles.Length = 0 Then Return False

        For Each FilePath As String In FilteredFiles
            If System.IO.File.Exists(FilePath) Then
                System.IO.File.Delete(FilePath)
            End If
        Next FilePath
        Return True
    End Function
End Class
It's just a simple peace of code I developed it first in C then converted it so many different formats over time. I just got sick of deleting every-time I compiled so I wrote the program to do it for us. Just trying to help us all out is all.

Chaosregen12010
decaying skeleton
decaying skeleton
Posts: 8
Joined: Tue Feb 05, 2013 11:48 pm

Re: NEW: Application That Cleans MacroQuest2 Junk Files

Post by Chaosregen12010 » Thu Aug 22, 2013 7:09 pm

I noticed the file is missing, did you delete the file to? Just a final thought just to make you think a little I'm a developer and do gaming mods on the side and program in almost ALL the top languages and more. I don't hack I just develop you should not accuse people of hacking just because you see a EXE file in might I add in rar format ziped. Some of my work can be seen in some of the mods created for Oblivion and other games. I just create and share with the world. No harm is done to no one at all so don't call me a hacker just because you see an exe im just a fellow developer like you.

Not trying to be harsh lol, Just a little annoyed because it was removed.
Last edited by Chaosregen12010 on Thu Aug 22, 2013 7:21 pm, edited 2 times in total.

JudgeD
a snow griffon
a snow griffon
Posts: 354
Joined: Sat Aug 18, 2012 8:07 pm

Re: NEW: Application That Cleans MacroQuest2 Junk Files

Post by JudgeD » Thu Aug 22, 2013 7:11 pm

The hosted exe's can be tampered with by outside sources, that's the main reason he said not to have it here.

vsab
a hill giant
a hill giant
Posts: 151
Joined: Fri Nov 04, 2005 7:40 am

Re: NEW: Application That Cleans MacroQuest2 Junk Files

Post by vsab » Fri Aug 23, 2013 4:24 am

Dude, I think you have the wrong end of the stick.

Depending on your age, a hacker used to be a good term. Someone who understands the inner workings of code...

Since this an open source project, pretty much everything on here has the source code included- mostly in posts, sometimes on SVN and amazingly so far I've not seen anything on github yet...

The point being, share the code, we will compile ourselves, or even add features if we want (which we can't do easily to an .exe).

EqMule
Developer
Developer
Posts: 2697
Joined: Fri Jan 03, 2003 9:57 pm
Contact:

Re: NEW: Application That Cleans MacroQuest2 Junk Files

Post by EqMule » Fri Aug 23, 2013 6:31 am

We always welcome code contributions, what strikes me here is that you want to delete the very files that are needed in case you crash, the .pdb most notably... Without that file its a lot harder to figure out what line you crashed on...

Anyway I appreciate your effort, if you have the c source feel free to post it.
My status o/
If you like MQ2 and would like to contribute, please do. My goal is 25 donations per month.
So far I've received Image donations for this month's patches.

Bitcoin: 1Aq8ackjQ4f7AUvbUL7BE6oPfT8PmNP4Zq
Krono: PM me.
I can always use characters for testing, PM me if you can donate one.

Chaosregen12010
decaying skeleton
decaying skeleton
Posts: 8
Joined: Tue Feb 05, 2013 11:48 pm

Re: NEW: Application That Cleans MacroQuest2 Junk Files

Post by Chaosregen12010 » Fri Aug 23, 2013 12:20 pm

Is all good :D

I'll post some more idea's Just waiting for the 20th expansion to arrive to do updates on a new Forage mac I have been working on too. Has some parity nifty features too.

I'll also post some other code as well to some other macros I got too.