Difference between revisions of "Creating A Patch/ja"

From Free Pascal wiki
Jump to navigationJump to search
Line 36: Line 36:
  
 
== トラブルの解消 ==
 
== トラブルの解消 ==
This mostly applies to Windows but could apply for other platforms as well.
+
ほとんどの場合はWindowsだけでなく、他のプラットホームにも当てはまります。
  
'''You get the error "svn command not found" or similar.'''
+
'''"svn command not found"(あるいは、似たような)エラーがでたとき'''
Most probably you do not have svn.exe in your PATH environment variable. The following steps should fix this problem:
 
  
# Locate svn.exe using the Find Files feature of your Start menu.
+
ほとんどの場合、svn.exeが環境変数のPATHにないからでしょう。次のステップでこの問題を解決できます。
# Once you have located svn.exe you need to add the directory it is in to your PATH.
+
 
As an example: From the command prompt type:  
+
# スタートメニューのFind Files機能をつかってsvn.exeをおきます。
 +
# svn.exeを一旦置いたら、PATHにそのディレクトリを必ず追加します。
 +
たとえば: コマンドプロンプトから次のように打ってください:  
 
   set PATH=%PATH%;"C:\Program Files\TortoiseSVN\"
 
   set PATH=%PATH%;"C:\Program Files\TortoiseSVN\"
  
''Note: Your directory containing svn.exe might not be the same on your computer as the one used in this document. It is used here only as an example.''
+
''注意: あなたの環境でのsvn.exeがはいっているディレクトリは、この文書とは違うかもしれません。これはあくまでもサンプルです。''
 
 
  
The following is optional:
+
次はオプション的な事項です。
  
 
'''これを恒久的にするには'''
 
'''これを恒久的にするには'''
  
For Windows98 or lower, you can add the line above (or similar) to your C:\autoexec.bat file near the end.
+
Windows98以前のWindowsOSでは,上に書いたようなことを、C:\autoexec.batの終わりのほうに書きます。
  
For Windows2000 or greater you can add this directory to your PATH by:
+
Windows2000 以降では、ディレクトリをパスに加えるには、:
  
# Right-Clicking on "My Computer"
+
# "マイコンピュータ"を右クリックします。
# Select "Properties"
+
# "プロパティ"を選択します。
# Choose the "Advanced" tab.
+
# "詳細設定" タブを選択します。
# Click the "Environment Variables" button.
+
# "環境変数" ボタンを押します。
# Locate the "Path" line in "System Variables" and add: ;"C:\Program Files\TortoiseSVN\" to the end.
+
# "システム変数""パス"の最後に、"C:\Program Files\TortoiseSVN\" を加えます。
  
''Note: Your directory containing svn.exe might not be the same on your computer as the one used in this document. It is used here only as an example.''
+
''注意: あなたの環境でのsvn.exeがはいっているディレクトリは、この文書とは違うかもしれません。これはあくまでもサンプルです。''
  
 
==パッチを適用する==
 
==パッチを適用する==

Revision as of 00:50, 3 November 2006

Deutsch (de) English (en) español (es) français (fr) 日本語 (ja) português (pt) русский (ru) slovenčina (sk)

日本語版メニュー
メインページ - Lazarus Documentation日本語版 - 翻訳ノート - 日本語障害情報

導入

ここでは、LazarusをSVNから入手しているものと仮定します。 Getting Lazarus Via SVN

コマンドを開くか、cmdプロンプトなどで、Lazarusのソースのあるディレクトリに移動してください。

Windowsでの導入:

あなたがLazarusを C:\lazarus でSVNチェックアウトしたと仮定します。

  1. MS-DOSプロンプトを開いてください。
  2. c: {enterを押す}
  3. cd \lazarus {enterを押す}
  4. svn diff > mypatch.dif {enterを押す}

Linux/BSD、その他での導入:

あなたがLazarusを $HOME/lazarus でSVNチェックアウトしたと仮定します。

  1. 好きなターミナルプログラムを開いて下さい。
  2. cd $HOME {enterを押す}
  3. cd lazarus {enterを押す}
  4. svn diff > mypatch.diff {enterを押す}


注:私はなにかそこにありそうもないものがないかどうか、ファイルを見わたすのも好きです。

パッチを適用するのにおすすめの方法は、bug trackerによる方法です。もし、あなたのパッチを修正したという報告があれば、それを使います。そうでない場合に、新しい問題点の項目を作成します。ファイルをアップロードして、問題点をそれに添付します。

別の方法として、あなたの作ったパッチをzipやgzipで圧縮して、Lazarusメーリングリストにemailすることです。(最大40kBです。)もしくは、パッチ専用メールpatch@lazarus.dommelstein.netへ送って下さい。

これで全てです。

トラブルの解消

ほとんどの場合はWindowsだけでなく、他のプラットホームにも当てはまります。

"svn command not found"(あるいは、似たような)エラーがでたとき

ほとんどの場合、svn.exeが環境変数のPATHにないからでしょう。次のステップでこの問題を解決できます。

  1. スタートメニューのFind Files機能をつかってsvn.exeをおきます。
  2. svn.exeを一旦置いたら、PATHにそのディレクトリを必ず追加します。

たとえば: コマンドプロンプトから次のように打ってください:

  set PATH=%PATH%;"C:\Program Files\TortoiseSVN\"

注意: あなたの環境でのsvn.exeがはいっているディレクトリは、この文書とは違うかもしれません。これはあくまでもサンプルです。

次はオプション的な事項です。

これを恒久的にするには

Windows98以前のWindowsOSでは,上に書いたようなことを、C:\autoexec.batの終わりのほうに書きます。

Windows2000 以降では、ディレクトリをパスに加えるには、:

  1. "マイコンピュータ"を右クリックします。
  2. "プロパティ"を選択します。
  3. "詳細設定" タブを選択します。
  4. "環境変数" ボタンを押します。
  5. "システム変数"の"パス"の最後に、"C:\Program Files\TortoiseSVN\" を加えます。

注意: あなたの環境でのsvn.exeがはいっているディレクトリは、この文書とは違うかもしれません。これはあくまでもサンプルです。

パッチを適用する

To apply a patch is simple. You can test the patch by using the --dry-run toggle switch like this:


  patch --dry-run < mypatch.diff


The output of the patch program will be identical to the actual patching, only it does not alter the sourcecode files. Very handy for testing, without wanting to screw up your source.

To do the final patching, you use the following commandline:


  patch < mypatch.diff

Or, to fix separators:

  patch -p0 < mypatch.diff