<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ioriy2k&#039;s Knowledgebase &#187; Build</title>
	<atom:link href="http://ioriy2k.pe.kr/archives/tag/build/feed" rel="self" type="application/rss+xml" />
	<link>http://ioriy2k.pe.kr</link>
	<description>ioriy2k의 여러가지 지식 저장소</description>
	<lastBuildDate>Mon, 06 Feb 2012 11:01:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Build OpenOffice.Org 2.0.2 on Win32 (Part 2)</title>
		<link>http://ioriy2k.pe.kr/archives/5</link>
		<comments>http://ioriy2k.pe.kr/archives/5#comments</comments>
		<pubDate>Wed, 28 Mar 2007 13:00:37 +0000</pubDate>
		<dc:creator>ioriy2k</dc:creator>
				<category><![CDATA[OpenOffice.org]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://ioriy2k.pe.kr/2007/03/28/build-openofficeorg-202-on-win32-part-2/</guid>
		<description><![CDATA[4. Source Setup - Get the source code (download) Download 받은 source는 아래와 같은 방법으로 압축을 푼다. 12$ tar xvzf OOo_2.0.2_src.tar.gz $ cd OOB680_m5 이제부터 $SRC_ROOT를 OpenOffice.org source directory로 지칭하겠다. (여기서는 OOB680_m5) - External Library Build 환경이 갖추어 졌다고 해서 compile되지는 않는다. License 등의 문제로 source에서 빠진 외부 라이브러리를 source안에 설치해 줘야 한다. General Polygon [...]]]></description>
			<content:encoded><![CDATA[
<h3>4. Source Setup</h3>
<h4>- Get the source code (<a href="ftp://ftp.kr.freebsd.org/pub/openoffice/stable">download</a>)</h4>
<p>Download 받은 source는 아래와 같은 방법으로 압축을 푼다.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">tar</span> xvzf OOo_2.0.2_src.tar.gz<br />
$ <span style="color: #7a0874; font-weight: bold;">cd</span> OOB680_m5</div></td></tr></tbody></table></div>
<p>이제부터 $SRC_ROOT를 OpenOffice.org source directory로 지칭하겠다. (여기서는 OOB680_m5)</p>
<p><span id="more-5"></span></p>
<h4>- External Library</h4>
<p>Build 환경이 갖추어 졌다고 해서 compile되지는 않는다. License 등의 문제로 source에서 빠진 외부 라이브러리를 source안에 설치해 줘야 한다.</p>
<ul>
<li>General Polygon Clipper Library (GPC) (<a href="http://www.cs.man.ac.uk/~toby/alan/software/">download</a>)<br />
압축을 풀어서 나온 gpc.c gpc.h를 $SRC_ROOT/external/gpc에 복사한다.</li>
<li>Microsoft Layer for Unicode (<a href="http://download.microsoft.com/download/b/7/5/b75eace3-00e2-4aa0-9a6f-0b6882c71642/unicows.exe">download</a>)<br />
unicows.dll을 $SRC_ROOT/external/unicows에 복사한다.</li>
<li>dbghelp.dll (<a href="http://www.microsoft.com/downloads/release.asp?releaseid=30682">download</a>)<br />
dbghelp.dll을 $SRC_ROOT/external/dbghelp에 복사한다.</li>
<li>Mozilla Libraries (<a href="http://tools.openoffice.org/moz_prebuild/680/">download</a>)<br />
WNTMSCI{inc,lib,runtime}.zip을 받아서 $SRC_ROOT/moz/zipped에 복사한다.</li>
</ul>
<h4>- Generating the Build Environment and Build Tools</h4>
<p>OpenOffice.org도 다른 Open Source program들과 마찬가지로 configure script로 build 환경을 check하고 준비하며, make로 build를 한다.</p>
<p>다만 특이한 것은 config_office directory에서 configure 를 실행해서 build 환경 check와 build 순서 file을 $SRC_ROOT에 생성한다. 그리고 생성된 파일을 가지고 OpenOffice.org source에 포함된 dmake를 가지고 빌드를 하게 되어있다. 한마디로 configure, make 유틸리티도 자기들에 맞게 수정해서 사용한다는 이야기다.</p>
<p>배경 설명은 이정도로 하고, 시작해 보자.</p>
<ol>
<li>Cygwin shell을 시작한다. bash가 기본 shell로 되어 있을 것이다.</li>
<li>압축을 해제한 directory로 이동한다.</li>
<li>config_office direcotry로 이동한다. 여기에 있는 configure script를 이용해서 실제 compile시에 사용할  configure script를 생성할 것이다.
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$SRC_ROOT</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> config_office</div></td></tr></tbody></table></div>
</li>
<li>configure script에 들어갈 인자가 많기 때문에 편하게 사용하기 위해서 shell script를 작성한다.
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$SRC_ROOT</span><span style="color: #000000; font-weight: bold;">/</span>config_office<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> configure_my.sh<br />
<span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-jdk-home</span>=<span style="color: #ff0000;">'/cygdrive/c/j2sdk1.4.2_11'</span> \<br />
<span style="color: #660033;">--with-psdk-home</span>=<span style="color: #ff0000;">'/cygdrive/c/Program Files/Microsoft Platform SDK'</span> \<br />
<span style="color: #660033;">--with-directx-home</span>=<span style="color: #ff0000;">'/cygdrive/c/DirectXSDK'</span> \<br />
<span style="color: #660033;">--with-frame-home</span>=<span style="color: #ff0000;">'/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/SDK/v.1.1'</span> \<br />
<span style="color: #660033;">--with-use-shell</span>=tcsh \<br />
<span style="color: #660033;">--with-lang</span>=ko \<br />
<span style="color: #660033;">--with-mspdb-path</span>=<span style="color: #ff0000;">'/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Common7/IDE'</span> \<br />
<span style="color: #660033;">--with-midl-path</span>=<span style="color: #ff0000;">'/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Common7/Tools'</span> \<br />
<span style="color: #660033;">--with-csc-path</span>=<span style="color: #ff0000;">'/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v1.1.4322'</span> \<br />
<span style="color: #660033;">--with-cl-home</span>=<span style="color: #ff0000;">'/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003/Vc7'</span></div></td></tr></tbody></table></div>
</li>
<li>작성했다면 저장하고 나온 후, 실행 permission을 주고 실행한다.
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$SRC_ROOT</span><span style="color: #000000; font-weight: bold;">/</span>config_office<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> configure_my.sh<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$SRC_ROOT</span><span style="color: #000000; font-weight: bold;">/</span>config_office<span style="color: #7a0874; font-weight: bold;">&#93;</span> .<span style="color: #000000; font-weight: bold;">/</span>configure_my.sh</div></td></tr></tbody></table></div>
</li>
<li>성공적으로 script가 수행되었다면 $SRC_ROOT에 bootstrap, winenv.set file이 생성되었을 것이다. 그후에 다음을 실행한다.
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$SRC_ROOT</span><span style="color: #000000; font-weight: bold;">/</span>config_office<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> ..<span style="color: #000000; font-weight: bold;">/</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$SRC_ROOT</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> tcsh<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>build를 위해서 default shell인 <span style="color: #c20cb9; font-weight: bold;">bash</span>를 사용하지 않고 tcsh를 사용한다.<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$SRC_ROOT</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> .<span style="color: #000000; font-weight: bold;">/</span>bootstrap<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>configure script를 통해서 만들어진 script로 OpenOffice.org를 build할 system의 환경을 체크하고, build시 사용할 dmake를 compile한다.<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$SRC_ROOT</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">source</span> winenv.set<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>build에 필요한 환경 변수들을 설정한다.<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$SRC_ROOT</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> rehash</div></td></tr></tbody></table></div>
</li>
</ol>
<p>이제야 겨우 build 환경이 다 갖추어 졌다. 일단 여기까지 제대로 따라했다면 절반 이상은 성공한 것이나 다름없다.</p>
<h3>5. Build Instructions</h3>
<h4>- Building a Full Build</h4>
<p>전체 모든 source를 build하기 위해서는 다음을 입력한다.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$SRC_ROOT</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> dmake</div></td></tr></tbody></table></div>
<p>build가 완료될 때까지 걸리는 시간은 원문에 나와있기를&#8230;</p>
<p>Architecture : Intel<br />
Processor : Athlon XP1700<br />
Processor speed : 1466 MHz<br />
RAM : 512 MB<br />
Hard Disk : 160 GB 7200 RPM IDE<br />
Time :	about 17 hour</p>
<p>테스트한 컴퓨터의 사양과 빌드시간은,</p>
<p>Architecture : Intel<br />
Processor : Pentium 4<br />
Processor speed : 2.66 GHz<br />
RAM : 1GB<br />
Hard Disk : 60 GB 7200 RPM IDE<br />
Time : about 14 hour</p>
<p>결론은&#8230; 때려주고 싶을 정도로 오래 걸린다. ㅡㅡ;</p>
<p>Build가 error없이 성공했다면 아래의 directory에 MSI install package가 생성되어 있을 것이다. 실행하여 설치하자. 그럼 build는 끝..</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$SRC_ROOT</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> instsetoo_native<span style="color: #000000; font-weight: bold;">/</span>wntmsci10.pro<span style="color: #000000; font-weight: bold;">/</span>OpenOffice<span style="color: #000000; font-weight: bold;">/</span>msi<span style="color: #000000; font-weight: bold;">/</span>install<span style="color: #000000; font-weight: bold;">/</span>ko<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span>...ko<span style="color: #7a0874; font-weight: bold;">&#93;</span> .<span style="color: #000000; font-weight: bold;">/</span>setup.exe</div></td></tr></tbody></table></div>
<h4>- Building a Project with Debug Information</h4>
<p>OpenOffice.org의 module을 debugging하고 싶으면 full build된 source에서 그 module만 debug mode로 build해서 사용한다.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$SRC_ROOT</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>module<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> wntmsci10.pro<br />
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$SRC_ROOT</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>module<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> build <span style="color: #007800;">debug</span>=<span style="color: #c20cb9; font-weight: bold;">true</span></div></td></tr></tbody></table></div>
<p>왜 전체 module을 debug mode로 build하지 않는가? 이 질문에 대한 대답은 debug mode로 build하는 시간이 너무 오래 걸리고, 비효율적으로 OpenOffice.org가 실행이 되며, 사용공간을 많이 차지 한다는 것이다.</p>
<p>OpenOffice.org는 module화가 잘 되어있어서 굳이 필요없는 module을 debug mode로 compile할 필요 없이 필요한 module만 debug mode로 compile하면 debugging 할 수 있게 되어 있다.</p>
<h3>6. Build Trouble Shooting</h3>
<h4>1) Cygwin의 bug</h4>
<p>Cygwin의 bug로 인해서 <a href="http://wiki.services.openoffice.org/mwiki/index.php?title=Windows#Miscellaneous_info">build 중에 멈추는 현상</a>이 있다. 이 문제를 해결하기 위해서는 build하고 있는 cygwin shell외에 하나 더 띄워서 다음과 같은 script를 만들어서 실행한다.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">vi</span> fd_ls.sh<br />
<span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
<span style="color: #000000; font-weight: bold;">do</span><br />
<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">5</span><br />
<span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/*/</span>fd<br />
<span style="color: #000000; font-weight: bold;">done</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>저장<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
$ <span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">755</span> fd_ls.sh<br />
$ .<span style="color: #000000; font-weight: bold;">/</span>fd_ls.sh</div></td></tr></tbody></table></div>
<h4>2) Build 중에 생기는 error들&#8230;</h4>
<ol>
<li>$SRC_ROOT/lingucomponent/source/spellcheck/hunspell/hunspell.cxx 에서 Sharp S 문자를 컴파일러에서 인식하지 못해서 에러가 발생한다. 발생하는 구문의 문자를 변경한다.</li>
<li>$SRC_ROOT/svx/wntmsci10.pro/inc/chinese_direction.hrc 에서 문자를 컴파일러에서 인식하지 못해서 에러가 발생한다. 발생하는 구문의 문자를 변경한다.</li>
<li>$SRC_ROOT/dbaccess/wntmsci10.pro/inc/AutoControls.hrc 에서 문자를 컴파일러에서 인식하지 못해서 에러가 발생한다. 발생하는 구문의 문자를 변경한다.</li>
</ol>
<h3>7. Files</h3>
<p>위에서 Build를 위해 사용하거나 변경한 File들을 <a href='http://ioriy2k.pe.kr/wordpress/wp-content/uploads/2007/03/openoffice-2.0.2-fix.tar.gz'>Download</a>할 수 있습니다. 포함된 File은 각각 다음과 같습니다.</p>
<ul>
<li>Build script : configure_my.sh</li>
<li>FD refresh script : fd_ls.sh</li>
<li>Error 수정한 hunspell.cxx : hunspell.cxx</li>
<li>Error 수정한 chinese_direction.hrc : chinese_direction.hrc</li>
<li>Error 수정한 AutoControls.hrc : AutoControls.hrc</li>
</ul>
<p>&#8211; God Bless..</p>
  
<div class="wp_license">
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/2.0/kr/"><img src="http://i.creativecommons.org/l/by-nc-nd/2.0/kr/88x31.png" alt="Creative Commons Attribution-NonCommercial-NoDerivs 2.0 Korea" class="alignleft" style="margin-top:4px;" />
</a>This work  is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/2.0/kr/">Creative Commons Attribution-NonCommercial-NoDerivs 2.0 Korea</a>.</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://ioriy2k.pe.kr/archives/5/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build OpenOffice.Org 2.0.2 on Win32 (Part 1)</title>
		<link>http://ioriy2k.pe.kr/archives/13</link>
		<comments>http://ioriy2k.pe.kr/archives/13#comments</comments>
		<pubDate>Wed, 28 Mar 2007 05:14:06 +0000</pubDate>
		<dc:creator>ioriy2k</dc:creator>
				<category><![CDATA[OpenOffice.org]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://ioriy2k.pe.kr/2007/03/28/build-openofficeorg-202-on-win32-part-1/</guid>
		<description><![CDATA[1. Overview 이 문서는 OpenOffice 2.0.2 source를 가지고 Win32 binary를 build하는 방법을 다룬다. build를 위한 전체과정을 요약하면 다음과 같다. compiler, SDK, library 등을 받고 설치한다. 소스를 받아 압축을 풀고 설정한 후 build를 시작한다. build가 완료되면 packaging 되어 있는 EXE를 실행하여 OpenOffice.org를 설치한다. OpenOffice.org를 build하는 것은 어려워 보이지만 실제로 해 보면 그다지 어려운 것은 없다. 다만 [...]]]></description>
			<content:encoded><![CDATA[
<h3>1. Overview</h3>
<p>이 문서는 OpenOffice 2.0.2 source를 가지고 Win32 binary를 build하는 방법을 다룬다. build를 위한 전체과정을 요약하면 다음과 같다.</p>
<ol>
<li>compiler, SDK, library 등을 받고 설치한다.</li>
<li>소스를 받아 압축을 풀고 설정한 후 build를 시작한다.</li>
<li>build가 완료되면 packaging 되어 있는 EXE를 실행하여 OpenOffice.org를 설치한다.</li>
</ol>
<p>OpenOffice.org를 build하는 것은 어려워 보이지만 실제로 해 보면 그다지 어려운 것은 없다. 다만 Windows를 Linux환경으로 emulating해서 build 하기 때문에 Linux에 관련한 전반적인 지식을 습득하면 유용할 것이다. 자 그럼, 이제 시작해보자&#8230;  <img src='http://ioriy2k.pe.kr/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><span id="more-13"></span></p>
<h3>2. Build Requirements</h3>
<h4>2.1. Hardware Requirements</h4>
<p><a href="http://tools.openoffice.org/dev_docs/build_windows_tcsh.html">원문</a>에서는 다음과 같은 사양을 최소사양으로 한다.</p>
<ul>
<li>Intel Pentium II PC</li>
<li>128MB RAM (more recommended)</li>
<li>4GB free disk space (8GB for crashdump)</li>
</ul>
<p>그러나 이런 사양에서 빌드한다면 아마 한달은 걸릴 것이다. <img src='http://ioriy2k.pe.kr/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  이것은 어디까지나 최소사양일 뿐이고 권장사양을 적어보겠다.</p>
<ul>
<li>Intel Pentium IV 2.4Ghz 이상<br />
(HyperThreading이 가능한 CPU는 HyperThreading을 끄고 build하는 것이 좋다. HyperThreading이 활성화 된 상황에서 build를 할 경우 문제가 발생하는 것으로 알려져 있다. &#8211; <a href="http://wiki.services.openoffice.org/mwiki/index.php?title=Windows#Miscellaneous_info">자세한 내용</a> )</li>
<li>1GB RAM (多多益善 &#8211; 많으면 많을 수록 좋다.)</li>
<li>10GB 이상의 여유공간<br />
(Build 후 사용된 공간은 약 8GB 정도 된다. 여기에 각 module을 debugging하기 위해서 Debug Mode로 compile을 한다면 용량은 더 커질 것이다.)</li>
</ul>
<h4>2.2. Software Requirements</h4>
<h5>- Operating System</h5>
<p>Windows XP Professional SP2 추천. 98, me는 build가 불가능하다. 그 이상은 다 가능하겠지만, XP Pro SP2가 가장 안정적일 것 같다.</p>
<h5>- Compiler</h5>
<p>Visual Studio .NET 2003 Professional 이상</p>
<blockquote><p>M$에서 무료로 download 받을 수 있는 Visual C++ Toolkit 2003(=Visual C++ 2005 Express Edition)으로는 compile이 불가능하다.</p></blockquote>
<p>- Library</p>
<p>1) Platform SDK (<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&amp;displaylang=en">Download</a>)</p>
<p>M$에서 제공하는 library를 사용할 수 있게 해주는 Development Kit.</p>
<blockquote><p>OS 정품 사용자인지 확인을 하고 정품 사용자일 경우에만 download가 가능하다. SDK download와 정품 인증과는 무슨 상관관계가 있는지&#8230;</p></blockquote>
<p>Platform SDK에서 다음 항목을 반드시 설치해야 한다.</p>
<ul>
<li>Microsoft Windows Core SDK (64bit 환경과 툴은 필요하지 않다.)</li>
<li>Microsoft Web Workshop (IE) SDK</li>
<li>Microsoft Internet Information Server (IIS) SDK</li>
<li>Microsoft Data Access Services (MDAC) SDK</li>
<li>Microsoft DirectShow SDK</li>
</ul>
<blockquote><p>Important note : Platform SDK 2005 april version을 사용하면 <a href="http://www.openoffice.org/issues/show_bug.cgi?id=49856">다음과 같은 문제</a>가 있기 때문에 $PSDK_HOME/Lib/libcp.lib의 이름을 임시로 바꾼다.</p></blockquote>
<p>2) DirectX 9.0 SDK (<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=7AB978B5-5F1A-4F6A-88EB-FC646138BECA&amp;displaylang=en">Download</a>)</p>
<p>OpenOffice.org는 Win32 환경에서 DirectX를 Wrapping한 XCanvas를 통해 화면에 그리기를 수행한다. DirectX를 사용하도록 컴파일 하기 위해서 DirectX SDK를 설치한다.</p>
<blockquote><p>Important note : 설치시 설치 폴더 이름을 짧게 하고 space가 들어있지 않게 한다. Space가 들어있을 경우 나중에 build 환경을 구성할 때 문제를 발생시킨다. (나의 경우 c:\DirectXSDK 에 설치했다.)</p></blockquote>
<p>3) Java 2 SDK (<a href="http://java.sun.com/j2se/1.4.2/download.html">Download</a>)</p>
<p>Java 2 SDK 1.4.2가 필요하다. Java 5,6는 아직 사용이 불가능 하다.</p>
<h5>- Build Tools</h5>
<p>1) Ant (<a href="http://ant.apache.org/bindownload.cgi">Download</a>)</p>
<p>Ant는 Java의 Make utility이다.</p>
<p>설치방법 :<br />
- 받은 Binary 압축 file을 C:\에 푼다. (ex) C:\ant<br />
- 제어판 -&gt; 시스템 -&gt; 고급 -&gt; 환경 변수 에 사용자 변수로 다음을 추가한다.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">변수 : ANT_HOME, 값 : C:\ant<br />
변수 : PATH, 값 : <span style="color: #000000; font-weight: bold;">%</span>PATH<span style="color: #000000; font-weight: bold;">%</span>;<span style="color: #000000; font-weight: bold;">%</span>ANT_HOME<span style="color: #000000; font-weight: bold;">%</span>\bin</div></td></tr></tbody></table></div>
<p>2) Cygwin (<a href="http://www.cygwin.com/">Download</a>)</p>
<p>Cygwin은 Windows에서 Linux와 유사한 환경을 구현해 주는 것이다. 사용할 version은 1.5.10이상이어야 하며, 1.5.18은 피하기 바란다.(빌드 과정 중에 cabextract.exe 실행 되는 경우 빌드가 멈춤 상태가 되는 문제가 있다.)</p>
<p>Cygwin 설치 문서는 <a href="http://cygwin.com/cygwin-ug-net/setup-net.html">여기</a>를 참고하고, 유의할 점은 설치시에 Default Text File Type은 Unix로 설정해야 한다. 물론 기본으로 선택 되어있다. <img src='http://ioriy2k.pe.kr/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Cygwin의 모든 패키지를 설치할 필요는 없고 기본적으로 설치되는 패키지 외에 아래의 패키지만 설치하면 된다.</p>
<p>bision, flex, make, patch, perl, gcc, rxvt, tcsh, unzip, zip, cabextract (설치하면 유용한 패키지 : util-linux, vim)</p>
<blockquote><p>Important note : Cygwin shell 안에서는 Symbolic link가 허락되지만, Windows에서는 Symbolic link의 개념이 없으므로 컴파일 시에 Visual C++ compiler가 인식하지 못한다. 그래서 Cygwin shell을 실행시킨 후, 아래와 같이 build에 사용되는 실행 파일의 Symbolic link를 지우고 link가 가리키고 있는 실제 파일을 복사해서 대체해 준다.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>awk.exe<br />
$ <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gawk.exe <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>awk.exe<br />
$ <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gunzip.exe<br />
$ <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gzip.exe <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gunzip.exe</div></td></tr></tbody></table></div>
</blockquote>
<p>3) Perl Module</p>
<p>OpenOffice.org를 build하기 위해서 Perl의 확장 module을 사용한다. 필요한 module은 Perl의 CPAN을 이용해서 컴파일해서 설치하게 된다. CPAN의 사용법은 <a href="http://ooo.ximian.com/cpan.html">여기</a>를 참고하라.</p>
<p>빌드에 필요한 모듈 :<br />
- XML::Parser : XML로 된 Build List를 위해 XML Parser Module을 사용한다. 기본으로 설치되어 있다.<br />
- Archive::Zip : Image list를 압축하기 위해 사용한다. CPAN을 이용하여 설치할 것.</p>
<p>설치 방법 :</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">$ </span><span style="color: #c20cb9; font-weight: bold;">perl</span> <span style="color: #660033;">-MCPAN</span> <span style="color: #660033;">-e</span> shell</div></td></tr></tbody></table></div>
<p>기본적인 CPAN의 설정을 위한 질문이 나온다. 디폴트로 값이 정해지도록 enter key로 질문을 넘긴다. 질문 중간에 download 받을 mirror의 주소를 질문하는데 그 중에서 Asia -&gt; South Korea -&gt; Freebsd server를 선택하도록 한다.</p>
<div class="codecolorer-container perl mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cpan<span style="color: #339933;">&gt;</span> install Archive<span style="color: #339933;">::</span><span style="color: #006600;">Zip</span><br />
cpan<span style="color: #339933;">&gt;</span> quit</div></td></tr></tbody></table></div>
<h5>- Miscellaneous</h5>
<p>1) Windows의 Temp directory 변경</p>
<p>Build 과정 중 MSI installer로 OpenOffice.org package를 만들 때 error가 나는 경우를 대비하기 위해서 Temp directory를 변경한다.<br />
C:\temp를 만들고, 제어판 -&gt; 시스템 -&gt; 고급 -&gt; 환경 변수 에 사용자 변수로 다음을 추가한다.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">변수 : TEMP, 값 : C:\temp<br />
변수 : TMP, 값 : C:\temp</div></td></tr></tbody></table></div>
<h3>3. More..</h3>
<p>이제 build를 할 수 있는 환경이 갖추어 졌다. Source를 가지고 compile및 설치하는 내용은 Part2에서 다룰 것이다.</p>
<p>&#8211; God Bless..</p>
  
<div class="wp_license">
<p><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/2.0/kr/"><img src="http://i.creativecommons.org/l/by-nc-nd/2.0/kr/88x31.png" alt="Creative Commons Attribution-NonCommercial-NoDerivs 2.0 Korea" class="alignleft" style="margin-top:4px;" />
</a>This work  is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/2.0/kr/">Creative Commons Attribution-NonCommercial-NoDerivs 2.0 Korea</a>.</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://ioriy2k.pe.kr/archives/13/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

