DictionaryForMids Forum

DictionaryForMIDs for Mobiles (Java ME; most devices from Nokia, Samsungs, RIM (Blackberry), LG, SonyEricsson, Motorola and plenty more) => General discussions => Topic started by: dreamingsky on 04. June 2010, 09:06:09

Title: Build environment
Post by: dreamingsky on 04. June 2010, 09:06:09
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
Title: Re: Build environment
Post by: jn0101 on 04. June 2010, 15:44:39
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
Title: Re: Build environment
Post by: Gert on 04. June 2010, 21:11:12
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 (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  :)


Title: Re: Build environment
Post by: dreamingsky on 04. June 2010, 22:24:57
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
Title: Re: Build environment
Post by: dreamingsky on 05. June 2010, 03:31:48
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

Title: Re: Build environment
Post by: jn0101 on 05. June 2010, 08:46:29
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
Title: Re: Build environment
Post by: dreamingsky on 05. June 2010, 10:15:45
Oops, here you go

http://prdownloads.sourceforge.net/dictionarymid/DictionaryForMIDs_3.5.0(beta2).zip?download

Jeff
Title: Re: Build environment
Post by: jn0101 on 14. June 2010, 13:31:37
Here is a script for Linux and Mac users.
The 'advanced' script should be put in the Advanced subdirectory

Jacob
Title: Re: Build environment
Post by: Gert on 14. June 2010, 18:00:51
Great to see your progress there !!!!

Thanks !
Gert
Title: Re: Build environment
Post by: dreamingsky on 14. June 2010, 23:54:11
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
Title: Re: Build environment
Post by: dreamingsky on 15. June 2010, 01:30:44
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
Title: Re: Build environment
Post by: jn0101 on 15. June 2010, 14:56:29
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
Title: Re: Build environment
Post by: dreamingsky on 17. June 2010, 01:22:16
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.
Title: Re: Build environment
Post by: dreamingsky on 22. July 2010, 09:29:36
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?
Title: Re: Build environment
Post by: Gert on 05. August 2010, 20:50:08
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
Title: Re: Build environment
Post by: dreamingsky on 08. August 2010, 03:11:15
I uploaded the new 3.5.7 build environment and the new newdict.html file.

The build environment is in the "BuildEnvironment" folder in File Manager.  I kept the "DictionaryForMIDs" folder for the empty JAR/JAD files.  You can rename the folders if you'd like.

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

Oops, I forgot to make a link to newdictProperties.html.  Thanks for catching that.  I added it to newdict.html.

Jeff
Title: Re: Build environment
Post by: Gert on 08. August 2010, 07:27:37
Great !!!!

In my opinion this is really a big step forward for DictionaryForMIDs !!

Gert
Title: Re: Build environment
Post by: nhtshot on 26. August 2010, 11:53:14
I'm a fairly experienced programmer, but new to java/j2me. I'm an American expat currently residing in China. As you can imagine, I rather love the dictionaryformids cedict. I have some free time and would like to add some functionality to it.

I'm perfectly willing to explore and learn the ins and outs of your style as well as java in the process. However, I need some advice on build environments. I've never used eclipse before and am finding it quite unwieldy. I would very much like to use an IDE, since it helps when working in a language I don't know.

My biggest issue is setting up the build environment properly. I've tried importing the build file, but eclipse basically pukes all over that.

Do you have any suggestions? Should I try one of the other environments? Does somebody have an eclipse project file I could get a copy of?

Thanks
Title: Re: Build environment
Post by: Gert on 27. August 2010, 20:20:10
@nhtshot: be welcome to do a lot of work on the DictionaryForMIDs project ... !!

Just let me clarify on the topic of this thread: here 'build environment' refers to setting up a new dictionary. That means to put a dictionary on DictionaryForMIDs; this thread is not related to compile the java sources.

For building DictionaryForMIDs from the source code, just read http://dictionarymid.sourceforge.net/development.html (http://dictionarymid.sourceforge.net/development.html), section "Source Code".

Under http://dictionarymid.sourceforge.net/SVNRepositoryAccess.html (http://dictionarymid.sourceforge.net/SVNRepositoryAccess.html) there is a description for accessing the SVN repository with Eclipse.

I myself use Eclipse, any other Java development environment will do too. You should install Sun's Java ME SDK also.

Let us know when you need further help (maybe a new topic under the "Admins & Developer" section of this forum would be best) !

With best greetings,
Gert