The rules have been updated, read them now: Rules!
Coders and would-be coders alike, this is the place to talk about programming.
-
finale00
- M-M-M-Monster veteran

- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 300 times
Post
by finale00 » Sat Jul 28, 2012 10:04 pm
So I'm using C# to write a simple archive viewer GUI.
I have it working and it loads up my archive and displays all of the file paths in a nice tree view structure.
But I don't have any references to my list of file entries to actually get the offsets and sizes!
Anyone have ideas on how I could reference my entries?
-
Rick
- Moderator
- Posts: 388
- Joined: Tue Aug 09, 2005 10:10 pm
- Location: California
- Been thanked: 84 times
-
Contact:
Post
by Rick » Sun Jul 29, 2012 10:17 am
http://blog.gib.me/
Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.
-
snakemeat
- advanced
- Posts: 45
- Joined: Tue Jan 27, 2009 5:00 pm
- Has thanked: 12 times
- Been thanked: 20 times
Post
by snakemeat » Mon Jul 30, 2012 9:07 pm
I've done something similar in VGMToolbox, see the source for the ISO Extractor form
here. Drop me a PM if you have any questions.
-
finale00
- M-M-M-Monster veteran

- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 300 times
Post
by finale00 » Tue Jul 31, 2012 1:33 am
I guess using that tag property is the easiest way to go. I'll go with that for now.
-
WRS
- ultra-veteran

- Posts: 601
- Joined: Fri Nov 06, 2009 12:13 am
- Has thanked: 74 times
- Been thanked: 133 times
Post
by WRS » Fri Aug 10, 2012 8:40 pm
i'm not familiar with c# in any way, but you only need store all the file data in an array(or vector or similar) and have the tree items hold an index so the file data array.
-
ChocoladeBen
- n00b
- Posts: 11
- Joined: Wed Aug 15, 2012 1:42 am
Post
by ChocoladeBen » Thu Aug 16, 2012 10:26 pm
Finale00 great job.
Could you please give me a link to some toturials where to start from ? what you did is just what i wanted to do also in c#.
But i want to learn to do it.
If its not so hard to learn and understand could you give me some guide so i can get at least to the point you did ?
-
finale00
- M-M-M-Monster veteran

- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 300 times
Post
by finale00 » Fri Aug 17, 2012 6:21 pm
I already knew what I wanted to do so it was a matter of looking at how to write it in C#.
1: you start by figuring out the archive format
2: then you write an unpacker script (to verify the format is correct)
3: then you make the GUI and have it run the unpacker script (you might re-write the script in C# if you didn't already)
4: the unpacker script doesn't actually unpack anything in GUI mode; instead, it parses it and returns a list of file entries, which you can draw on the GUI
5: users then choose what to unpack: everything, selected items, selected folders, etc.
Everything I needed was on stackoverflow and microsoft's online docs.
-
Dinoguy1000
- Site Admin
- Posts: 758
- Joined: Mon Sep 13, 2004 1:55 am
- Has thanked: 129 times
- Been thanked: 141 times
Post
by Dinoguy1000 » Sat Aug 25, 2012 6:12 am
finale00 wrote:I already knew what I wanted to do so it was a matter of looking at how to write it in C#.
1: you start by figuring out the archive format
2: then you write an unpacker script (to verify the format is correct)
3: then you make the GUI and have it run the unpacker script (you might re-write the script in C# if you didn't already)
4: the unpacker script doesn't actually unpack anything in GUI mode; instead, it parses it and returns a list of file entries, which you can draw on the GUI
5: users then choose what to unpack: everything, selected items, selected folders, etc.
Everything I needed was on stackoverflow and microsoft's online docs.
Or you could skip having to write a GUI and just write a MexScript.

Welcome to Xentax!
Rules |
Requests |
Wiki |
Discord
If you run across a post that breaks the rules, please
report the post - a mod or admin will handle it from there.
-
finale00
- M-M-M-Monster veteran

- Posts: 2382
- Joined: Sat Apr 09, 2011 1:22 am
- Has thanked: 170 times
- Been thanked: 300 times
Post
by finale00 » Sat Aug 25, 2012 8:03 pm
Dinoguy1000 wrote:
Or you could skip having to write a GUI and just write a MexScript.

Usually I would expect an unpacker eventually becomes a re-packer, and support specific functionality for the particular format.
-
Dinoguy1000
- Site Admin
- Posts: 758
- Joined: Mon Sep 13, 2004 1:55 am
- Has thanked: 129 times
- Been thanked: 141 times
Post
by Dinoguy1000 » Sun Aug 26, 2012 2:47 am
finale00 wrote:Dinoguy1000 wrote:
Or you could skip having to write a GUI and just write a MexScript.

Usually I would expect an unpacker eventually becomes a re-packer, and support specific functionality for the particular format.
MultiEx Commander allows for repacking archives, though I don't understand very well how it decides whether it can or can't repack a given archive format (and I definitely have no comment on format-specific functionality).
Welcome to Xentax!
Rules |
Requests |
Wiki |
Discord
If you run across a post that breaks the rules, please
report the post - a mod or admin will handle it from there.