[[TableOfContents]]
== Àо±â ==
ÀÌ ÆäÀÌÁöÀÇ ³»¿ëÀº Zeta ÆÐÅ°Áö¿¡ Æ÷ÇÔµÈ docs/README ¹®¼ÀÇ ³»¿ë°ú °°½À´Ï´Ù.
´ë°³ À§Å° ÆäÀÌÁöÀÇ ³»¿ëÀÌ ´õ ÃÖ½ÅÀ̸ç, ´õ dzºÎÇÕ´Ï´Ù.
=== °³¿ä ===
Zeta´Â ÀÛÀº ¹Ì´Ï ÀÀ¿ëÇÁ·Î±×·¥À» ¸¸µé°í ±¸µ¿½Ãų ¼ö ÀÖ´Â ÅøÀÔ´Ï´Ù. Àͼ÷ÇÑ ÀÚ¹Ù
¾ð¾î¿Í SWT·Î ¼Õ½±°Ô ÇÁ·Î±×·¥À» ¸¸µé ¼ö ÀÖÀ¸¸ç, XML¸¸À» »ç¿ëÇÒ ¼öµµ ÀÖ½À´Ï´Ù.
Á¦ÀÛ ¹æ¹ýÀº ȨÆäÀÌÁö¿Í demo µð·ºÅ͸®ÀÇ ¿¹Á¦µéÀ» Âü°íÇϼ¼¿ä. Zeta Pure´Â JDK¿Í
SWT°¡ Áö¿øµÇ´Â ¸ðµç Ç÷§Æû¿¡¼ »ç¿ë °¡´ÉÇϸç, À©µµ¿ì¿ëÀ¸·Î´Â GCJ·Î ÄÄÆÄÀϵÈ
¹ÙÀ̳ʸ®¸¦ ¹èÆ÷ÇÕ´Ï´Ù.
ÇöÀç ÀÌ ÇÁ·ÎÁ§Æ®´Â GCJ, SWT, BeanShell, CookXMLÀ» ÀÌ¿ëÇϸç, ÃßÈÄ Groovy, Jython,
JavascriptµîÀ» ±âº» Áö¿øÇÒ ¿¹Á¤ÀÔ´Ï´Ù.
=== ȨÆäÀÌÁö ===
* http://wiki.kldp.org/wiki.php/zeta
* http://kldp.net/projects/zeta/
=== »ç¿ë¹ý ===
Zeta.exe³ª Zeta.jar¸¦ ½ÇÇàÇÕ´Ï´Ù.
=== °³¹ß ȯ°æ ===
Zeta 0.1 - 0.2 :
* javac/jar´Â Sun J2SE 1.5.0_8À» »ç¿ëÇÕ´Ï´Ù.
* Windows ¿¡¼ Á¦À۵ǾúÀ¸³ª, OS Á¾¼ÓÀûÀÎ ÄÚµå´Â »ç¿ëÇÏÁö ¾Ê´Â ¸¸Å
JDK¿Í SWT°¡ Áö¿øµÇ´Â ¸ðµç ȯ°æ¿¡¼ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
* ¸ðµâ ÀÛ¼º½Ã¿¡´Â ¿¡´Â OS µ¶¸³ÀûÀÎ ÄÚµå¶ó´Â Á¦ÇÑÀÌ ¾ø½À´Ï´Ù.
* IDE ȯ°æÀº JEdit 4.3 pre6 ÀÔ´Ï´Ù. ÇÁ·ÎÁ§Æ® °ü¸® ±â´ÉÀ» »ç¿ëÇÏÁö
¾ÊÀ¸¹Ç·Î ¹«½¼ ¿¡µðÅ͸¦ »ç¿ëÇÏµç »ó°üÀº ¾ø½À´Ï´Ù. ´Ü, ¸ðµç ¼Ò½º ÆÄÀÏ¿¡
UNIX Line Separator / UTF-8 Encoding ÀÌ ¿øÄ¢ÀÔ´Ï´Ù.
* ¸ðµç zip ÆÄÀÏÀº 7-Zip 4.4.2·Î ÀÛ¼ºµÇ¾ú½À´Ï´Ù.
* JAR ¹ÙÀ̳ʸ® ÀÛ¼ºÀ» À§ÇÑ ¸ÅÅ©·Î´Â zar.bat À̸ç, ³×ÀÌƼºê ¹ÙÀ̳ʸ®
»ý¼ºÀ» À§ÇÑ ¸ÅÅ©·Î´Â zjc.bat ÀÔ´Ï´Ù. Á¶±Ý º¯°æÇÏ¸é ´Ù¸¥ OS¿¡¼µµ
ÀÛ¼ºÇÒ ¼ö ÀÖ½À´Ï´Ù.
* SWT
* SWT 3.2 / 3232
* http://www.eclipse.org/swt
* GCJ, UPX : javacompiler ÇÁ·ÎÁ§Æ®ÀÇ javacompiler 0.8¿¡ Æ÷ÇÔµÈ
°ÍÀ» »ç¿ëÇÕ´Ï´Ù. GCJ´Â Windows¿Í Linux¿ëÀÌ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù.
* GCJ 4.2.0 20060630 (the core - the compiler)
* UPX 2.00w (to pack executables)
* http://javacompiler.mtsystems.ch/
* http://sourceforge.net/projects/javacompiler
* BeanShell
* bsh-core-2.0b4.jar
* bsh-classgen-2.0b4.jar
* bsh-classpath-2.0b4.jar
* bsh-commands-2.0b4.jar
* bsh-reflect-2.0b4.jar
* http://www.beanshell.org
* CookXML: XMLÀ» ÀÌ¿ëÇÑ SWT ¹× ºó¼Ð ½ºÅ©¸³ÆÃÀ» Áö¿øÇϱâ À§ÇØ
»ç¿ëµË´Ï´Ù.
* CookXML core 2.5
* CookSWT 1.2.1
* CookBSH 1.2
* http://cookxml.sourceforge.net/
=== ÀúÀÛ±Ç ===
Zeta´Â GPL v2 ÇÏ¿¡ ¹èÆ÷µË´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº docs/LICENSE¸¦ Âü°íÇϼ¼¿ä.
=== ´Þ¶óÁø Á¡ ===
0.1 : ÃÖÃÊ °ø°³ ¹öÀü.
0.2 :
* SWT 3.1 / CookSWT 1.1.2 -> SWT 3.2 / CookSWT 1.2.1 ¾÷µ¥ÀÌÆ®.
* ¼¼¼Ç ÀÚµ¿ °ü¸® : ½ÃÀ۽à ¸¶Áö¸· »ç¿ë ÈÄ Á¾·áÇÏÁö ¾ÊÀº ¸ðµâµéÀ» ºÒ·¯¿È
´Ü, ShellÀ» ¸®ÅÏÇÏ´Â ½ºÅ©¸³Æ® ¹× ¸ðµâ¿¡ ÇÑÇÔ.
* ±âº» Import ÆÐÅ°Áö º¯°æ (config/import.bsh)
* bsh, xml ÆÄÀÏ ³» ÇÑ±Û ¹®Á¦ ÇØ°á(file.encoding=utf8)
* Àâ´ÙÇÑ ÄÜ¼Ö °³¼± ¹× µ¥¸ð º¯°æ
* Äֿܼ¡ EvalError ¿Ü¿¡ Æ÷°ýÀûÀÎ Exception Ãâ·ÂµÊ.
* (Native) ÆÄ½Ì ¹®Á¦ ÇØ°á, XML ¸ðµâ Á¤»ó »ç¿ë °¡´É
* (Native) Pentium 2 ÃÖÀûÈ (-march=pentium2)
=== ¾Ë·ÁÁø ¹®Á¦Á¡ ===
* (Native) gnu/regexp/MessagesBundle.properties ¾øÀÌ ½ÇÇàµÇÁö ¾Ê´Â ¹®Á¦
DIARY - 'Native/Win32 : MessagesBundle Ŭ·¡½º ¹®Á¦(06.09.03)' Âü°í
== Zeta¿ë ÇÁ·Î±×·¥ Á¦ÀÛ ==
ÇöÀç bsh¿Í cookswt¸¦ »ç¿ëÇÑ xml·Î ¸¸µé ¼ö ÀÖ½À´Ï´Ù.
»ç¿ë¹ýÀº Æ®·¹ÀÌÀÇ zeta ¾ÆÀÌÄÜÀÇ ¸Þ´º¸¦ ¿¾î Load¸¦ ¼±ÅÃÇÑ µÚ ÆÄÀÏÀ» ¼±ÅÃÇÏ¸é µË´Ï´Ù.
ÄܼÖÀ» ¿¸é ÇÁ·ÒÇÁÆ®¿¡¼ ºó¼Ð ½ºÅ©¸³Æà ¹× ¿¹¿Ü ¹ß»ý µî¿¡ ´ëÇÑ ±â·ÏÀ» º¼ ¼ö ÀÖÀ¸¸ç,
¿©·¯ ¼ÐÀ» ¶ç¿î »óÅ¿¡¼ zeta ¾ÆÀÌÄÜÀ» Ŭ¸¯ÇÏ´Â °ÍÀ¸·Î
consoleÀ» Á¦¿ÜÇÑ ¸ðµç ¼ÐÀ» º¸ÀÌ°Ô Çϰųª °¨Ãâ ¼ö ÀÖ½À´Ï´Ù.
=== ¿¹Á¦µé ===
==== demo/HelloWorld1.bsh ====
zeta´Â bsh ÆÄÀÏÀ» ÀоîµéÀÏ ¼ö ÀÖ½À´Ï´Ù.
´ÙÀ½Àº SWT·Î °£´ÜÇÑ Ã¢À» Ãâ·ÂÇÏ´Â bsh ½ºÅ©¸³Æ®ÀÔ´Ï´Ù.
{{{#!vim java
class Hello{
public Hello(){
Display d = Display.getCurrent();
Shell s = new Shell(d, SWT.SHELL_TRIM | SWT.TOOL);
Label l = new Label(s, SWT.CENTER);
s.setLayout(new FillLayout());
String str = "Hello, Zeta!";
l.setText(str);
s.setText(str);
s.pack();
s.open();
}
}
new Hello();
}}}
Ŭ·¡½º¸¦ ±»ÀÌ »ç¿ëÇÏÁö ¾Ê¾Æµµ µÇÁö¸¸, º¯¼ö¸í µîÀÇ Ãæµ¹À» ¹æÁöÇϱâ À§ÇØ ±ÇÀåÇÕ´Ï´Ù.
==== demo/HelloWorld4.xml ====
zeta´Â xml ÆÄÀÏÀ» cookswt¸¦ ÀÌ¿ëÇØ ÆĽÌÇÕ´Ï´Ù.
´ÙÀ½°ú °°ÀÌ ½ºÅ©¸³Æ®¸¦ xml¿¡ ³»ÀåÇÒ ¼ö ÀÖ½À´Ï´Ù.
{{{#!vim xml
}}}
¹öÆ°À» Ŭ¸¯Çϸé, LabelÀÇ ÅؽºÆ®°¡ "Click! Pressed"·Î º¯°æµË´Ï´Ù.
==== PropertyCat.xml ====
ÀÚ¹ÙÀÇ ÇÁ·ÎÆÛƼµéÀ» Ãâ·ÂÇÏ´Â °£´ÜÇÑ ¿¹Á¦.
{{{#!vim xml
}}}
==== GlobalHook.bsh ====
SWT ³»ºÎ Ŭ·¡½º¸¦ ÀÌ¿ëÇÑ À©µµ¿ì ¸Þ½ÃÁö ÈÅ ¿¹Á¦ÀÔ´Ï´Ù.
W2K À̻󿡼 µ¿ÀÛÇϸç, ½ÇÇàÇϸé À©µµ»ó¿¡¼ÀÇ ¸ðµç Å°º¸µå ÀÔ·ÂÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.
{{{#!vim java
import org.eclipse.swt.internal.Callback;
import org.eclipse.swt.internal.win32.OS;
import org.eclipse.swt.internal.win32.MSG;
class GlobalHook {
static Shell s = new Shell(Display.getCurrent());
static Text t = new Text(s, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
static int hHook = 0;
Shell show(){
s.setText("GlobalHook");
s.setLayout(new FillLayout());
s.setSize(500, 500);
startHook();
return s;
}
static int getMsgProc(int code, int wParam, int lParam) {
MSG msg = new MSG();
OS.MoveMemory(msg, lParam, MSG.sizeof);
t.append(msg.message + "\n");
return OS.CallNextHookEx(hHook, code, wParam, lParam);
}
void startHook(){
Callback callback = new Callback(GlobalHook.class, "getMsgProc", 3);
int address = callback.getAddress();
int threadId = OS.GetCurrentThreadId();
hHook = OS.SetWindowsHookEx(13, address, OS.GetLibraryHandle(), 0);
if (hHook == 0) {
callback.dispose();
return;
}
}
}
new GlobalHook().show();
}}}
==== KLDP_Reader.bsh ====
[http://informa.sourceforge.net/ informa]¸¦ »ç¿ëÇÑ °£´ÜÇÑ RssReader ¿¹Á¦.
JRE»ó¿¡¼ ±¸µ¿µÇ´Â Zeta/Pure¿¡¼´Â ´ÙÀ½°ú °°ÀÌ ¿ÜºÎ ÆÐÅ°Áö¸¦ ºÒ·¯¿Ã ¼ö ÀÖ½À´Ï´Ù.
{{{#!vim java
addClassPath("demo/informa_0.6.5.jar");
addClassPath("demo/commons-logging.jar");
addClassPath("demo/jdom.jar");
import de.nava.informa.core.ChannelIF;
import de.nava.informa.core.ItemIF;
import de.nava.informa.impl.basic.ChannelBuilder;
import de.nava.informa.parsers.FeedParser;
Shell s = new Shell(Display.getCurrent(), SWT.SHELL_TRIM | SWT.TOOL);
s.setText("KLDP Reader");
s.setLayout(new FillLayout(SWT.VERTICAL));
ChannelIF channel = FeedParser.parse(
new ChannelBuilder(), new URL("http://kldp.org/node/feed"));
Iterator i = channel.getItems().iterator();
Button btn;
while(i.hasNext()){
ItemIF item = (ItemIF)i.next();
btn = new Button(s, SWT.PUSH);
btn.setText(item.getTitle());
btn.addListener(SWT.Selection, new Listener(){
URL url = item.getLink();
public void handleEvent(Event event) {
Program.launch(url.toString());
}
});
}
s.pack();
s.open();
}}}
== ½ºÅ©¸°¼¦ ==
* Zeta 0.2¿Í ½ÃÇèÁßÀÎ ¸î°¡Áö ¸ðµâµé
attachment:ZetaScreenshot2.PNG
* Zeta 0.1¿¡ demo/HelloWorld 1, 2, 3, 4¸¦ ¶ç¿î ¸ð½À
attachment:ZetaScreenshot.PNG