From: brett l. <wak...@gm...> - 2010-01-29 17:35:39
|
On Thu, Jan 28, 2010 at 6:33 PM, Freek Dijkstra <sf_...@ma...> wrote: >> The correct location for the jarbundler is in the same lib directories >> as the Log4j and Batik libraries. It looks like you did that >> correctly. > > I'm not sure about this. This means that it will end up in the final lib > folder of releases as well, even though that is not necessary: > jarbundler is only necessary during the build of the mac application, > not during it's execution. It would unnecessarily increase the size of > the application. So, perhaps lib needs to be divided into build dependencies, and run-time dependencies? > I am confused by build.xml (which builds the current jar file). > > Apparently, the build sequence is as follows: > * clean build directories (classes, jar) > * create a classes and a build ("rails-$version") folder > * copy all(!) files, except .java files from root to classes folder > (including log, README, tiles, lib) > * compile all .java sources in root, and put the classes in the > classes folder. > * copy all files, except log, lib from classes to jar folder > * copy doc, lib from root to build folder > * combine all files in jar folder, and and create the .jar file > in the build folder. > > Two questions on the build: > * Why are files copied from root to classes? Eclipse uses the classes directory to access a compiled version of every .java file, so you can run the app from within Eclipse. The build.xml is attempting to assure a clean build environment, so it deletes the classes directory out from under Eclipse. That means that we need to replace the classes directory, or Eclipse won't realize that it's build environment is missing until you go to run the application. > * Why does the .jar include all files by default? This seems unnecessary > to me. For example, the jar contains scripts like tiles/CombineTiles.pl, > even though those are not needed during the game play. > It does that because I'm still new to using Ant, and haven't properly documented everything to exclude from the jar. Also, CombineTiles.pl shouldn't be in the tiles directory. It's not a tile. It should be in with the other utils, or maybe we need a new location to store non-java scripts. Feel free to fix one or both of these issues. :-) > > Two more questions: > One adverted consequence about the inclusion of jarbundler was that the > sources, which came with jarbundler where also compiled, copied to > classes, and finally included in the rails.jar file (in > lib/jarbundler-2.1.0/src). I kind of doubt that is intended. > Should we fix this by only compiling sources in rails/ or test/ during > the build-process? Or by making sure there are no other source files? Do we really need the jarbundler source copied into our tree? I'd prefer to just include the .jar, if we're not planning on patching the source. > Last -- what would be the preferred output folder for the mac > application? I know choose MacRails-1.1.2. Do you have better suggestions? We should test the jar on non-Mac platforms, and compare the UI. If it doesn't change the user experience for other OSes, I see no reason to have a separate package. We can just bundle it in with the main jar. If it's too different or breaks something, then let's use rails-<platform>-<version>. > Regards, > Freek > ---Brett |