FW: [CF-Devel] CFEditor cleaning up

Michael Keuchen Michael.Keuchen at hamburg.de
Wed Jul 31 21:47:09 CDT 2002


Andreas Vogl schrieb:
>
     
      > In particular, I made the following changes:
     
     >
     
      >
     
     >
     
      > - new build file
     
     >
     
      Hmm, okay this sounds good. I really never use any build scripts
     
     >
     
      and I have little idea whether the old ones worked or not.
     
     >
     
      The only problem is, I don't like some of the changes below,
     
     >
     
      which might require modifications to these build scripts
     
     >
     
      in order to work.
     
     
Modifications to the build scripts are no problem.
There is only one unchangeable condition for this scripts to work:
All source files must be in a root package or a subpackage of it.
Source files out of packages (like the old CFJavaEditor class) are
not recognized by the build file. 

>
     
     
     >
     
      > - new packages for java sources
     
     >
     
      Sorry I don't want to have the packages renamed. These overly
     
     >
     
      long names cause a big mess in the directory tree on CVS.
     
     
What do you mean with "mess"?
CVS does not have problems with several subdirectories.

Arguments I see:
Advantages of long names (like "de.tabacha.crossfire.editor"):
- java standard
- unique all over the world
- more flexible (e.g. if you combine the editor with a java client,
the classes for the client can be in de.tabacha.crossfire.client).
Advantages of short names (like "cfeditor"):
- changing from base dir to source file dir is faster
- less characters to type in "import" statements

I (and most Java developers) prefer the long names.
But I am not bound to this point.
If you think short names are a must, o.k., let
's use them.
But all source files must reside in a package (nothing in default
package, see above), and, PLEASE, use small characters ("cfeditor",
NOT "CFEditor"). This is Java standard and will be no problem for
you.

>
     
      However, I could agree to move the sources into a "src"
     
     >
     
      directory.
     
     
(relief)

 
>
     
      > - Changed project name to from CFJavaEditor to CFEditor
     
     >
     
      >      Old name was a bit long-winded.
     
     >
     
     
     >
     
      CFJavaEditor is the name - and that's where it stays.
     
     >
     
      I hope you understand, but it's really not the habit to have
     
     >
     
      project names changed like that.
     
     
I understand. Seems that I was going too far at that point.

However, I don
't like that name. People that are interestedd
in the programming language will soon recognize that it's Java,
and other people don't want to be bothered with that stuff.


>
     
     
     >
     
      > - Resources included in jar
     
     >
     
      Yes this is possible, but I want to have the resource files
     
     >
     
      in non-archived form on CVS. The reason is that a lot of people
     
     >
     
      don't know what a jar file is and how to unzip it.
     
     
??? Complete misunderstanding!
1) The resource files will be in non-archived form on CVS.
2) The only jar that will be on CVS is the included png library.
3) No one - user or developer - will ever have to unzip a jar.
4) The CFEditor jar will not be on CVS. It will be generated
and only be part of the exe-distribution, not part of the
src-distribution.

>
     
      I want that everybody - including non-java-coders - can access
     
     >
     
      and modify the resource files easily.
     
     
Yeah, that's a point: What of the files would be changed by
users? Surely not the help files, the icons and the "system"
PNG pictures, but what about these four:
- autojoin.txt
- spells.def
- typenumbers.def
- types.txt
Are they meant to be changed by a user?
Or are they just officially updated more often than the source
code, so they must be downloadable separated from the jar?

>
     
      Now if a release of the CFJavaEditor without source is made,
     
     >
     
      there you could put the resources in the jar file and then
     
     >
     
      everything is small and clean.
     
     
This is exactly what I did:
one distribution with src and resource files,
one with only the jar.

 
>
     
      > - Separating the PNG support from the CFEditor code.
     
     >
     
      There are modifications in the png code, correcting some bugs
     
     >
     
      and shortcomings of the sixlegs.com library.
     
     >
     
      I didn't have time to look at your code yet. If the newest
     
     >
     
      version of sixlegs has the old bugs corrected and directly
     
     >
     
      works with the JavaEditor, then we could eventually do this.
     
     
O.K., please check it.
(BTW: That's the typical outcome of forking development.)

 
>
     
      > - Support for two different distributions
     
     >
     
      ...
     
     >
     
      >      Either source files or the jar is included in a distribution
     
     >
     
      >      package.
     
     >
     
     
     >
     
      It would make sense to have two distributions:
     
     >
     
      One with full source and resource files,
     
     >
     
      the other only with jar file and the must-have files
     
     >
     
      (images/html help).
     
     >
     
      Now this stuff mainly depends on the person(s) who pack the
     
     >
     
      distributions and put them online somewhere.
     
     >
     
      I don't have the webspace to make official distributions
     
     >
     
      currently.
     
     
At least for the next time, I can put distributions to
crossfire.tabacha.de . This webspace belongs to a friend of mine
who has never complained about me wasting his space.
But what about the space at sourceforge?

 
>
     
      > - No change in functionality and appearance of the program
     
     >
     
      > - Changed version number from 0.975 to 0.976
     
     >
     
      >
     
     >
     
      > Do you think this version can replace the older versions of the
     
     >
     
      > CFEditor?
     
     >
     
     
     >
     
      Not directly I'm afraid. I hope this doesn't dissapoint you.
     
     
No, I'm happy. We all want to and can keep on working on this.


>
     
      But you know, you should always ask before doing a lot of work
     
     >
     
      on something. I'll have a look at your code though, when I got time.
     
     
There's one more thing I have to tell you.
My first intention for changing the editor was to have an editor for
Tabacha. Tabacha is very much like crossfire, but engaged development
ceased years ago, and there will never be a running version in the next
decades. But the old maps and objects are still there, and after
converting them to crossfire style, I changed the CFJavaEditor.
No great deal: Only change faces from 32*32 PNG to 40*35 GIF.
After that, I recognized that I wanted to work on the editor and that
forking development is no good, so I turned back the changes and
made the version you see. Two changes, that make sense, remain:
The image size is now a constant (in IGUIConstants: TILE_XLEN,
TILE_YLEN)
and some code in ArchObjectStack is moved to a separate private method
"generateFaceName".
I still have to learn to discuss changes before making them, but I try.

Michael



    
    


More information about the crossfire mailing list