Thread: Testers wanted - archiving tool.

  1. #16
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Actually I want to stay up working. I just made one more minor modification to it: I noticed while archiving it throws out a list of what it's about to add before it adds them, which is a bit misleading plus you couldn't tell whereabouts it was with progress. Now it's like extraction, I.E. lists the files as it processes them.

    Same linky as before.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  2. #17
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Tragically Poor Excuse for an Update

    It's just ticked over midnight here and the only thing keeping my eyes open is the sound of RHCP up full blast ( headphones of course ).

    I've just added an extremely preliminary, disgustingly crappy GUI. Ignore it all except the "Creation" mode button and the two associated edit boxes ( nothing else works ). Oh no, I lie, the "Enable Large Files" checkbox works ( it throws you a warning if you create with it checked ) but actually doesn't do anything because I've just remembered, I left out the call to flip the flag. God darn it.

    Anyway, run it, laugh at it, laugh at me. I'll be back in a few hours ( like 9 ). Tomorrow I'm almost certainly going to do the GUI again from scratch anyways.

    'luka, out.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  3. #18
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Does the world really need another computer game?
    Hell yeah it does.

    If you want ahluka I could make a front end GUI for it using MFC and/or an install program with the project deployment wizard.

  4. #19
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Well if you're not doing anything else, sure, MFC it. I'd like to see code for that too ( I will get a copy of the source code, right? ) since I should start learning MFC.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  5. #20
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Quick Update

    Now you don't have to worry about directories - when it finds one it omits it instead of trying to add it like a file. Go forth and archive your desktops!
    Oh and I've removed the GUI - we're back to a command prompt
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  6. #21
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    long live the command prompt!

    I'll be testing more of it this afternoon.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  7. #22
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Ok I can front end it. I need the following info:

    1. The default file extension of your archive files.
    2. What types of files you can 'Add' to the archive.
    3. The class functions from your archive responsible for creating/loading the archive.


    My program will do this:

    Creating archives
    • Open program
    • File->Create->New archive
    • User adds/removes file from list box control via buttons and/or a right click menu.
    • User clicks 'Create'
    • Windows file common dialog box pops up asking name of archive.
    • My code at this point will call yours passing in the file names of the files to be archived. I need to know how to pass them (array, vector, list, etc.)


    Loading archives
    • File->Open
    • User selects valid archive files (OFN_FILEMUSTEXIST flag is in effect meaning file must be present on drive for dialog operation to be successful)
    • List is populated with list of files archive consists of.
    • User can then add/remove files as he/she wishes
    • User can now click 'Create' to create archive with same filename of loaded archive. Archive will be completely re-written from memory to disk.
    • User can now click 'Create new' to create an archive with a new filename


    Merging archives
    • File->New->Merged archive
    • User can add/remove archive files to list
    • User clicks create to create merged archive - new filename may be entered in dialog, but old filename will be by default


    I'll get to work immediately. I need your class header so I can see the function prototypes.

  8. #23
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Then I've got some extra work to do. At the moment it takes a path to a directory and sucks up every file inside it. I'll get the creation function to accept a vector of std::string's and load each file from the path specified in each element instead.

    I'll post up here when I'm done ( or catch you on MSN ).
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  9. #24
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Well this can be done several ways. We can create a temp folder in the app folder and use that as the archive folder. This means I must copy the contents of each file into that folder which is probably not the fastest solution.

    Or I can write the output of what belongs in a file to a temporary text file. Ill pass the text file filename to your code and you can simply read in each line, open the files, add to archive buffer, and write out final buffer when done. When you return from your CreateArchiveFromFile() function I'll delete the text file.

    The best approach would be for you to stick your code into a DLL and I'll load it dynamically with LoadLibrary() and then use GetProcAddress() to get pointers to your functions. That way if you want to change how you implement the archiving you just change the DLL and it won't break the front end GUI.

    Then to install the 'patched' DLL you simply use Setup and Deployment wizard and use your DLL file as the main output. This will effectively replace the DLL that was installed previously with the new DLL. It also ensures that people have the latest code updates for your program yet also ensuring them you are not writing ten zillion dlls on their drive.
    Last edited by VirtualAce; 08-31-2006 at 04:05 AM.

  10. #25
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Well I finished the new CreateArchive() which now accepts a vector of std::string's. I'll write another function, ParseFileList() which'll read the temp text file and add each line ( filename ) to a vector and pass it onto CreateArchive().

    I'll DLL it now and email you the header.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  11. #26
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    Hmm gimmie a day to go over this, it's a mess.
    Plus for reasons unbeknowest to me, it's only outputting the .lib and .exp, no .dll. I'll start a new project ( this was a SUBSYSTEM:CONSOLE till I switched it and it doesn't seem to like it much ).
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory Analyzer Tool
    By edesign in forum C Programming
    Replies: 9
    Last Post: 06-08-2009, 12:54 PM
  2. Getting a message with wanted lparam from queue
    By BrownB in forum Windows Programming
    Replies: 6
    Last Post: 12-24-2007, 08:37 PM
  3. 3D Network Analysis Tool
    By durban in forum Projects and Job Recruitment
    Replies: 1
    Last Post: 11-08-2005, 06:33 PM
  4. prepro. clean tool / #id#def mess
    By tomsky in forum Linux Programming
    Replies: 2
    Last Post: 09-08-2005, 07:18 AM
  5. DX Texture Tool
    By spoon_ in forum Tech Board
    Replies: 0
    Last Post: 03-08-2004, 05:19 PM