Build environment

Started by dreamingsky, 04. June 2010, 09:06:09

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dreamingsky

I worked a little on making the newdict.html file easier to follow for new people.  I think people have 2 main problems when they try to make a new dictionary: setting up their build environment, and writing a DictionaryForMIDs.properties file.

So I thought we should put all the tools needed into 1 file that people can download.  I put these tools together:
DictionaryForMIDs.jad
DictionaryForMIDs.jar
DictionaryGeneration.jar
JarCreator.jar
fontgenerator.jar

I also created the necessary directories and made DOS batch files to run DictionaryGeneration and JarCreator.

I put a test version of the build environment here http://prdownloads.sourceforge.net/dictionarymid/DictionaryForMIDs_3.5.0(beta1).exe?download.

Then I changed the newdict.html file a little to be easier to read.  I think the main difficulty for people was reading the technical details of the DictionaryForMIDs.properties file.  So I moved the details to a new newdictProperties.html file.

I also moved the details of DictionaryGeneration to newdictDictionaryGeneration.html and the details of JARCreator to newdictJARCreator.html.

What do you guys think?  Is this a good idea or not?  It'd mean a big change on how we release new versions.  For example, if we make a new version of DictionaryGeneration.jar, then we'd have to repackage all the other old files together and re-post it to the File Manager.  If we did that we change the version number from 3.5.0 to 3.5.1, for example.  Changing DictionaryForMIDs.jad & .jar would change the version number from 3.4.0 to 3.5.0, for example.

I wrote the instructions for Windows.  I'm guessing many people who would want to make a dictionary would be using Windows.  I'm thinking most people who run Linux would understand computers enough to change the build environment to meet their needs.  I'm not sure about people on a Mac or anything else.

Jeff

jn0101

Great idea to set up a ready to run ZIP file with all the tools.

What is definitely also missing is an full example of doing everything, complete with all input files and a script for producing the output files. Consider including that as a sample. 'evrything' includes setting languageNormationClassName and languageContentDisplayText etc, and with an input dictionary included entries like [01foo [02bar]] that actually uses these things.

And perhaps all a small minimal example sample.

If you smash togehter the ZIP file and a Windows script for the minimal example sample, I could do the 'complete' sample.


Pls note that for Java-enabled developers Ive put a small README.txt in the SVN root, to help you get started compiling the source (I was missing that)

Jacob

Gert

I am enthusiastic  :)  :)  :)  :)

Yes, that will make things much easier for people to get started and to set up a dictionary !!!

@Jeff: I am not worried about having one package consisting of all tools/files and to release a new version if any one of those changes. If maybe one day the 'DfM Builder' implemented (http://dictionarymid.sourceforge.net/forum/index.php?topic=220.0), then this will be the same. Actually your approach is already a first step towards this.

Jeff, Jacob, please just go ahead on that way !

Hmmm, Jeff, about Windows: I do agree with you that many people who will set up a dictionary are Windows users. I also know that several are using Linux and other Unixes. Probably the Windows users will significantly outnumber the Unix users.
I think there is absolutely nothing wrong to have scripts and descriptions for Windows users. But we need to be sure to emphasize that the tools and implementations for DictionaryForMIDs give absolutely no preference to Windows; Unix and other OS will do exactly the same. Well, maybe  scripts/descriptions for Unix may be added later. Besides, in my understanding Mac is Unix.

Gert, in good mood  :)



dreamingsky

QuoteConsider including that as a sample. 'evrything' includes setting languageNormationClassName and languageContentDisplayText etc, and with an input dictionary included entries like [01foo [02bar]] that actually uses these things

That's a good idea.  I'll add some content declarations to the sample dictionary file.

QuoteWhat is definitely also missing is an full example of doing everything, complete with all input files and a script for producing the output files.
And perhaps all a small minimal example sample

I have a very simple sample file in the Dictionary_input.txt file.  And I have the setup.bat and jar.bat files to build the dictionary.  Do you have any suggestions for making it better?  I put a link to the tools here http://prdownloads.sourceforge.net/dictionarymid/DictionaryForMIDs_3.5.0(beta1).exe?download.

QuoteBut we need to be sure to emphasize that the tools and implementations for DictionaryForMIDs give absolutely no preference to Windows.

You're right.  Maybe we should have a separate newdict.html for Windows users and a separate one for Linux/Unix users?  I'm sorry, I only use Windows so I wouldn't be able to write instructions for Linux.  How do you guys build dictionaries on your machines (what is the equivalent of setup.bat and  jar.bat)?

Thanks a lot for your suggestions
Jeff

dreamingsky

I uploaded a new version of the build environment.  You can download it here http://prdownloads.sourceforge.net/dictionarymid/DictionaryForMIDs_3.5.0(beta2).exe?download.

I only added another sample dictionary with content declarations.  It is in C:\Dict\Advanced\.

I also cleaned up newdict.html a little.  Nothing else is changed.

When we finish and publish the final version I thought we'd offer a ZIP file with all the tools and a self-extracting archive for Windows users.

Do you guys know how to use 7-zip to use a default extract folder?  For example, in WinZip and WinRAR when I make a SFX archive, I can tell the program to extract to C:\Dict\ by default.  How do you do that in 7-zip?  I thought it'd be nice if we use 7-zip instead of WinRAR or something.

Jeff


jn0101

Hey, I just tried downloading. I can't extract the files.
Could you please distribute a ZIP file and not an EXE file?

There is no reason for keeping me and other Linux users out of this. This is Java, we can use the same JARs so lets also use the same build environment...

Jacob


jn0101

Here is a script for Linux and Mac users.
The 'advanced' script should be put in the Advanced subdirectory

Jacob

Gert

Great to see your progress there !!!!

Thanks !
Gert

dreamingsky

That's great.  Thanks.  Would you mind editing newdict.html to remove any references to Windows procedures and change it to Linux procedures?

I like deleting the "Dictionary" directory and then remaking it.  That will be useful for people.  I'll add that to the Windows scripts.

I.
I was debating putting DictionaryGeneration and JARCreator in the same batch file.  It makes it easier for users.  But, if they made a mistake in their DictionaryForMIDs.properties or Dictionary_input.txt, then DictionaryGeneration will give an error.  But then JARCreator will be run.  Then users may not see the DictionaryGeneration error.

If DictionaryGeneration could write a Dictionary\DictionaryForMIDs.properties (but give an error while building the index files), then JARCReator wouldn't give an error.  Then users won't know there was an error (because JARCreator put more information on the screen).

What do you guys think?:
1. put DictionaryGeneration and JARCreator in the same batch file
2. DictionaryGeneration and JARCreator in different batch files

Later when fontgenerator.jar has a command line version (now it is only a GUI version), then we could add it to the build: DictionaryGeneration -> FontGenerator -> JARCreator

II.
What should we do for the newdict.html file?:
1. write Linux & Windows instructions in the same file
2. write separate newdict_Linux.html & newdict_Windows.html

I recommend #2.

The build process is the same for both systems.  But, the details are different.  For example, on a Windows machine you must add Java to the Windows Path:
Start Menu-> Control Panel -> System -> Advanced System Settings -> Environment Variables -> System Variables -> Path -> Edit

And Windows users must run the Command Prompt to use the batch files:
Start Menu -> Accessories -> Command Prompt

If they run the batch files from within Windows, then they won't see any error messages.

III.
Should we release separate Windows & Linux build environments (should be put setup.bat & linux_mac_script.sh in the same ZIP file?)

We have 2 options:
A.
1. ZIP file for Linux (only Linux scripts)
2. ZIP file for Windows (only Windows scripts)
3. self-extracting ZIP file for Windows (only Windows scripts)

B.
1. ZIP file for Linux & Windows (Linux & Windows scripts)
2. self-extracting ZIP file for Windows (Linux & Windows scripts)

I recommend B.  Personally I don't think the script files for the other system would confuse users too much.  What do you guys think?

Jeff

dreamingsky

I uploaded a new version:
http://prdownloads.sourceforge.net/dictionarymid/DictionaryForMIDs_3.5.0(beta3).zip?download

I added the Linux/Mac scripts and made other minor changes.

Jeff

jn0101

I agree that build environment should be one shared ZIP file (Windows users that cannot open a ZIP file probably also cant do the other steps).

WRT whether to do one command or two I think most Linux/UNIX/Mac users will probably try to run the commands one by one if something fails, and scroll up the screen to see the first error.

Windows users will be attempted to double click and wont see errors. You can add
PAUSE   Prompt the user to press any key to continue.
in the end to make the windows stay open.


Jacob

dreamingsky

QuotePAUSE   Prompt the user to press any key to continue.
in the end to make the windows stay open.

That's a great idea.  Putting a pause after DictionaryGeneration will show users if there was an error.  JarCreator will still run and give an error, but at least users will know where the error occurred.  I'll add the pauses to the script.

dreamingsky

I uploaded a new version here:
http://prdownloads.sourceforge.net/dictionarymid/DictionaryForMIDs_3.5.0(beta4).zip?download

I added the PAUSE to the setup.bat file and edited the newdict.html file.  I think this is the final version.  I've done everything I think we need for Windows users.

I added this at the top of newdict.html:
Note: these are instructions for Windows users.  Detailed instructions are coming soon for other operating systems.  For the time being, just use the build.sh file instead of the setup.bat file.

I think Linux and Mac users can follow the instructions for the time being.  There are not many differences.

Is this ready to be official?  Should I change newdict.html on the website to the new instructions?  And should I upload a final version and direct users to download the new ZIP file with all the tools?

Or should we wait until detailed instructions for Linux & Mac are written?

Gert

Jeff,

I think this is really a great progress for the DictionaryForMIDs project !!

Most of all I like the 'modern educational' way of presenting the information (as opposed to my 'just put all the data there'-approach)   8)


In my opinion you should go ahead and publish it without waiting for instructions for other OS.

Maybe you still could add a statement that for DfM there is really no preference of Windows or any other OS, and that setting up a dictionary will work exactly as well on Linux/Mac/whaterver (you certainly will find better words than I would).

And one quick question: from newdict.html how to navigate to newdictProperties.html ?

Best greetings,
Gert