RezEditor Alpha Log

Hey NC, I've been watching as you develop the program and I'm very excited! A new editor for PCNova! W00t!

Anywho, in my excitement a wave of creativity came over me. How do you feel about a splash screen when the program starts? I already made it but if you say no that's OK, I can use some of the elements for an icon!

I was also wondering if it's possible to replace the stock Java graphics with different ones? If so, and if you want, I could make graphics for buttons, title bars etc unless they won't work on different platforms.

Can hardly wait to use the program! I would help alpha test but I don't have any coding skillz (I don't understand anything about making things run 'n' stuff :wacko:). I do want to help with beta testing though when it comes time, if that's OK with you.

Thank you. Yes, I can easily replace icons, and I can use a splash screen. I'll quote my earlier list of icons I think I'll need.
(/quote)Group: new, save, delete (don't click this)
Type: new, delete, copy/move range, cut, copy, paste,
Resource: save, revert to saved, save-and-close, close-without-saving.
Special: map, table, etc. ...(/quote)
"Special" should be low-priority.

I haven't touched the code for weeks, but the last couple days I've been working on a Win<->Mac pilot converter, so I have the correct feelings to continue working. I'll probably work on it over the long weekend of Thanksgiving. I might even finish off a 0.1 alpha if I add those ... 2 more things? New resource, delete resource is all I can think of. It'd probably be a good idea to have some kind of blocker on the windows... but I hate GUI code, so that might not get done. Maybe I should remodularize and do everything CLI...

One other thing. Since nobody has been biting on those other tasks I had, I probably won't write a template parser anytime soon, but I probably will give instructions on how to create a GUI from code. Also, for later use, I still want data on how sensitive ResStore and Mash are to their headers and how sensitive they are.

After 0.1, filling in the offsets (see post 86) should be the next priority.

Oh, and if someone can tell me how to resolve a symlink to its final location on Mac, please tell me. On linux it is readlink -f. Not that many people would use RezEditor from the command-line, anyways.
-NC

The readlink command exists on OS X too, though -f isn't an option. It should work just by itself with no options.

No, because
1. it fails (if it follows similar structure to Linux with no arguments) given a non-symlink file with which to work
2. it doesn't resolve fully if it is a symlink to a symlink.
Both of these are resolved on Linux by the -f switch.

@nonconventionally-creative, on Nov 25 2008, 03:12 PM, said in RezEditor Alpha Log:

No, because
1. it fails (if it follows similar structure to Linux with no arguments) given a non-symlink file with which to work
2. it doesn't resolve fully if it is a symlink to a symlink.
Both of these are resolved on Linux by the -f switch.

hey nc. just finished doing a hell of a lot of study. thought i'd stop by here and explain a few things.

# ln -s Documents/ sym
# readlink sym
Documents/

# ln -s sym sym2
# readlink sym2
sym

so readlink returns whatever the symlink points to. you'll need to check if the returned path is a link or a directory. if link, then readlink again until it's a directory. you can check this with stat. an @ after the path is a symlink, a / is a directory.

# stat -F sym2
lrwxr-xr-x 1 userName groupName 3 Nov 29 10:18:12 2008 sym2@ -> sym
# stat -F sym 
lrwxr-xr-x 1 userName groupName 10 Nov 29 10:16:46 2008 sym@ -> Documents/
# stat -F Documents
drwx------ 18 userName groupName 612 Oct 22 23:47:16 2008 Documents/

alternatively, and i'm guessing this will be the best way(how i would do it anyway)

# stat -f "%T%Y" sym2	  
@sym
# stat -f "%T%Y" sym 
@Documents/
# stat -f "%T%Y" Documents 
/

hope this clears things up.

spanner in the works edit:
mac users don't use symlinks. they are used by posix users. macs use "Alias"'s. this is an even bigger kettle of red herrings. if i make an "Alias" in the Finder of my 'Documents' folder called 'Documents alias':

# ls -al Documents\ alias 
-rw-r--r--   1 userName  groupName  0 Nov 29 10:43 Documents alias
# cd Documents\ alias 
-bash: cd: Documents alias: Not a directory
# stat -f "%T%Y" Documents\ alias
#
# readlink Documents\ alias
#

the only way to resolve an "Alias" is to use AppleScript or some other scripting language(python, perl, maybe java). this would be way beyond the scope of what you are trying to do, unless you really do want to fill in all the gaps. here's a link for reference:
http://www.macosxhints.com/article.php?sto...021218054210294

This post has been edited by Tycho : 28 November 2008 - 08:00 PM

I've replaced the symlink replacement with a warning. My question on aliases is: if a script is executed by an alias from the command line, does the script know where it is or only where the alias is?

Implemented (heavy) inter-window communication.
Implemented new resource stuff.

TODO for 0.2 implement Actions for commands.

@nonconventionally-creative, on Nov 30 2008, 05:08 AM, said in RezEditor Alpha Log:

I've replaced the symlink replacement with a warning. My question on aliases is: if a script is executed by an alias from the command line, does the script know where it is or only where the alias is?

can you explain this? do you mean the script file is executed via an alias?
most(all?) command line shells do not know what a mac alias is and cannot use them. a mac alias is just a file with a resource fork. the fork contains a resource called alis which contains the path of the original file. if however, you were to open the alias of the script via the graphical interface, the finder would resolve the link and the command line would never even know that it started as an alias.

This post has been edited by Tycho : 30 November 2008 - 02:53 AM

The problem I am using this for does not occur from graphical launch, as it involves relative paths, which only occur from the command line.

Status update: found a few bugs with old code I though was stable. Also, not looking good for a release this weekend... Okay, I lied, I got 0.1 uploaded. I've probably forgotten something important, though. I really need to automate my upload process into the ant script. I should probably also do something like copying the misc folder into the dist folder - eliminate the issue of the CVS folders... ZZZ...

This post has been edited by Nonconventionally Creative : 01 December 2008 - 12:54 AM

Update:
Completed writing Template parser for 0.2 with the following types available:
byte, short, int, ushort/flags/flags16, uint/flags32, ulong/flags64, str, skip.

Fixed a bug when opening multiple instances would give an error about not being able to open a file with no visible name.

I have completely automated the build and distribution processes (including versioning) at the cost of a little compatibility. Now RezEditor must be built on a Unix-based machine.

My friend will love that.

Before I delve into the workings of the sound, I want to clean up by merging the import/export resource functionality into the hex editor.
I would really like these 6 icons made, immediately if not sooner:
OK (= Close and save - perhaps a standard green check box)
Cancel (= Close, no save - perhaps a standard red x)
Save (perhaps a standard disk icon)
Reset to saved (perhaps a looping arrow)
Import from file (open icon with arrow?)
Export to file (save icon with arrow?)

Again, I can use the ones at http://java.sun.com/.../hi/repository/ but they leave something to be desired.

Edit: update: I've used those graphics for all but the "OK" button, for which I none was suitable. Also, fixed a couple of old bugs regarding sizes.

This post has been edited by Nonconventionally Creative : 18 December 2008 - 02:20 PM

Fixed bug where importing images with no alpha channel to an RLE would not allow the existence of the mask.
Thanks to Google, and a little more: http://image4j.cvs.sourceforge.net/viewvc/...amp;view=markup

Rewrite is progressing. Basic text mode implemented, I'll have to add a --text or better --cli option to the parser so it can handle pipes (for which System.console() returns null). Decided to drop the previous socket behavior in favor of a simple yet flexible project system. Hence, my wish for LISP.
(Wow, it's been half a year since I posted anything. If I were to start again, I'd probably start in LISP. But the difference is, I know Java, and the standard library is much better. It doesn't matter how you do it, even skipping over the input stream for 100MB of files will cause an unappreciated delay. memory mapping is much better, but in LISP would have to be defined per interpreter)
(I really need to get EVNEW to build so I can rip out the editors and invoke them. That would give me instant usability for Windows people, which is my primary audience. Besides, most Mac people are stuck without Java 6, which really is necessary)

Aprosenf has the source code up on his EVNEW site. I would imagine Aprosenf would be open for you to use it, but I'd email to be sure.

Oh, I have the source. It's the compiling bit that's difficult. And Aprosenf has disappeared from the face of the Internet.

... You know, maybe I should stop trying to compile it as is, since my primary purpose isn't to fix the easy bugs, and instead just take the pieces I need. Still, I'm on an implementation spree, so I'll drop to that only once I've crashed.

Implemented copy/paste via system clipboard. Got rid of the old socket stuff, this implementation actually feels good.

Took me a while to realize that the you can only copy-from while the application is running (unless you have a daemon, but it's the implementation, not the apparent, that counts).

Copy from EVNEW should work now, as long as java.awt.datatransfer.SystemFlavorMap.getDefaultFlavorMap() returns a SystemFlavorMap instead of just a FlavorMap. (If anyone every compiled EVNEW on a BigEndian machine, everything would break - but, is it better to assume native or LE for the data?). Hopefully that means Copy to EVNEW should work also.
(I wish I had a Mac, because with winelib and native QT, a competent C++ programmer could make a native EVNEW build. TODO look at reimplementing the necessary bits of the QT API (I'll have to do this to deal with PICT, (rle, ) cicn, and (ugh) snd resources for rezeditor. Playing with the synthesizer might help - bsh is essential, despite irritations), since very little is used. If that is doable, it would be worth converting EVNEW to use non-Windows-specific toolkit such as FLTK (or just remove support for those, since I don't know the API well and that probably needs custom rendering and stuff))
Note to Self: don't touch EVNEW until next RezEditor is released. Wish there were 2 of me.

Imported EVNEW into rezeditor.svn.sourceforge.net, with only formatting changes so far. I'll add RezEditor to subversion instead of CVS once I pick up all the pieces. Among other things, SF ViewVC has enabled tarring for svn but not CVS.

TODO when integrating, look into whether I actually need a ClipboardOwner to keep track of when I lose ownership. The only thing I can think of is if I was a daemon waiting to exit.

DA, does MC use the system clipboard to copy/paste resources by value?

QUOTE (Nonconventionally Creative @ May 13 2010, 04:40 AM) <{POST_SNAPBACK}>

DA, does MC use the system clipboard to copy/paste resources by value?

Yes, although the data format in which they're stored is a fairly rudimentary one.

Confirmed that copy/paste to/from EVNEW works through WINE.

When Java deals with native clipboards, there needs to be a mapping from the Native Clipboard type "CNovaResource" (from EVNEW) to a MIME "flavor" type that Java can deal with (Java objects are much simpler). There isn't much documentation, but it appears that if the native clipboard string is already a MIME then Java generates the flavor automatically.

I don't know the Mac clipboard API, but I would hope there is some similar system.
If so, what is the string and format?
As long as it's not some opaque handle it can't be too hard to interpret.
Hm, you do use a single type for all resource types I hope?
... looking at the feature list, does the format include multiple resources in sequence? I should add that; EVNEW only does single file.

I wonder if anyone runs Wine on Mac? It would be easy to write a daemon to allow copy/paste between EVNEW and MC as proof-of-concept. Of course, there's no saying that the Wine clipboard handler works as well on Mac as on Linux...