diff --git a/wolfSSH/src-ja/chapter02.md b/wolfSSH/src-ja/chapter02.md index 76774981..5618b913 100644 --- a/wolfSSH/src-ja/chapter02.md +++ b/wolfSSH/src-ja/chapter02.md @@ -88,35 +88,45 @@ $ make src/libwolfssh.la ## Windows上でのwolfSSHのビルド -Visual Studioプロジェクトファイルは以下で取得できます: -https://github.com/wolfSSL/wolfssh/blob/master/ide/winvs/wolfssh.sln +Visual Studioプロジェクトファイルは`ide\winvs`ディレクトリにあります。 -ソリューションファイル'wolfssh.sln'はwolfSSH,そのサンプルプログラムとテストプログラムをビルドするように構成されています。DebugビルドとReleaseビルドの構成をスタティックリンクライブラリとダイナミック(32/64ビット)ライブラリの両形式で提供しています。user_settings.hはwolfSSLのコンフィギュレーションで必要となります。 +ソリューションファイル`wolfssh.sln`は、wolfSSHとそのサンプルプログラム、テストプログラムをビルドするように構成されています。32ビット版と64ビット版それぞれのスタティックライブラリとダイナミックライブラリについて、DebugビルドとReleaseビルドの構成を提供しています。wolfSSLのビルド設定には`user_settings.h`を使用してください。 -このプロジェクトファイルではwolfSSHとwolfSSLのソースフォルダ階層が隣同士に配置されていることを前提にしています。また、それらのルートフォルダにはバージョン番号が含まれていないフォルダ名となっていることを前提としています。つまり、次のようなフォルダ構成です: +このプロジェクトファイルは、wolfSSHとwolfSSLのソースディレクトリが同じ階層に並べて配置されており、ディレクトリ名にバージョン番号が含まれていないことを前提としています。つまり、次のようなディレクトリ構成です: ``` Projects\ -wolfssh\ -wolfssl\ + wolfssh\ + wolfssl\ ``` -`wolfssh\ide\winvs\user_settings.h`ファイルはwolfSSLに対する設定も既に含んだ適切な内容となっています。このファイルを忘れずに`wolfssh\ide\winvs`フォルダから`wolfssl\IDE\WIN`フォルダにコピーしてください。もし、一方の内容を変更した場合には、 -その内容を他方にもコピーして下さい。 +wolfSSHは次の手順でビルドします: -`WOLFCRYPT_ONLY`マクロ定義はwolfSSLコードをビルド対象から除外し、wolfCryptのアルゴリズム部分のみをビルドするの為に指定してあります。もし、wolfSSLコードもビルドする場合にはこの定義を削除してください。 +1. `wolfssh\ide\winvs\user_settings.h`を`wolfssl\IDE\WIN`にコピーします。 + このファイルにはwolfSSLを構成するための設定が含まれています。 + 一方を変更した場合は、もう一方も同じように変更してください。 + `WOLFCRYPT_ONLY`マクロはwolfSSLコードをビルド対象から除外し、 + wolfCryptのアルゴリズム部分のみをビルドするために定義されています。 + wolfSSLコードもビルドする場合は、この定義を削除してください。 +2. `wolfssl\wolfssl64.sln`を使ってwolfSSLをビルドします。 +3. `wolfssh\ide\winvs\wolfssh.sln`を使ってwolfSSHをビルドします。 + +wolfSSHをビルドする前に、同じ構成(Debug、Release、DLL Debug、DLL Release)と +プラットフォーム(Win32またはx64)でwolfSSLをビルドしておく必要があります。 +wolfSSHのプロジェクトは`wolfssl\<構成>\<プラットフォーム>` +(例:`wolfssl\DLL Release\x64`)にあるwolfSSLライブラリを使用します。 ### Windows上でのビルドに使用するユーザーマクロ定義 -ソリューションではwolfSSLライブラリとヘッダーファイルのロケーションを指定するためにユーザーマクロを利用します。wolfssl64ソリューションでは全てのパスは既定のビルド出力先に設定されます。ユーザーマクロ'wolfCryptDir'はライブラリを検索するためのベースパスとして使用します。初期値として、`..\..\..\..\wolfssl`に設定されています。その後、例えば追加のインクルードファイル検索パスが追加される場合には、`$(wolfCryptDir)`に対して追加を行います。 +ソリューションでは、wolfSSLライブラリとヘッダーファイルの場所を指定するためにユーザーマクロを使用します。すべてのパスは、wolfssl64ソリューションの既定のビルド出力先に設定されています。ユーザーマクロ`wolfCryptDir`は、ライブラリを検索するためのベースパスとして使用します。初期値は`..\..\..\..\wolfssl`です。例えば、APIテストプロジェクトの「追加のインクルードディレクトリ」には`$(wolfCryptDir)`が設定されています。 -wolfCryptDirパスはプロジェクトファイルからの相対位置で表せなければなりません。 +`wolfCryptDir`のパスは、プロジェクトファイルからの相対パスで指定する必要があります。プロジェクトファイルはいずれも1階層下のディレクトリにあります(例): @@ -125,20 +135,20 @@ wolfssh/wolfssh.vcxproj unit-test/unit-test.vcxproj ``` -そのほかのユーザーマクロは異なるビルドターゲットのためのディレクトリを表すために使用されます。例えば、 `wolfCryptDllRelease64` は次のフォルダを表します: +そのほかのユーザーマクロは、各ビルド構成のwolfSSLライブラリが置かれているディレクトリを示します。例えば、`wolfCryptDllRelease64`の初期値は次のとおりです: ``` -$(wolfCryptDir)\x64\DLL Release +$(wolfCryptDir)\DLL Release\x64 ``` -このパスはechoserverサンプルプログラムのデバッグ環境設定で64-bit DLLリリースビルド版の出力先を表現するのに次の様に使われます: +この値は、echoserverの64ビットDLL Releaseビルドのデバッグ環境で次のように使用されます: ``` PATH=$(wolfCryptDllRelease64);%PATH% ``` -echoserverプログラムをデバッガーを使って実行する際にはこの設定によってwolfSSL DLLがこのディレクトリから見つかります。 +デバッガーからechoserverを実行すると、このディレクトリにあるwolfSSL DLLが読み込まれます。 ## その他の環境上でのビルド diff --git a/wolfSSH/src/chapter02.md b/wolfSSH/src/chapter02.md index 654629ff..e5bca189 100644 --- a/wolfSSH/src/chapter02.md +++ b/wolfSSH/src/chapter02.md @@ -73,43 +73,58 @@ $ make src/libwolfssh.la ``` ## Building on Windows -The Visual Studio project file can be found in the directory *ide\\winvs*. +The Visual Studio project file can be found in the directory `ide\winvs`. -The solution file, 'wolfssh.sln', facilitates building wolfSSH and its example and test programs. The solution provides both Debug and Release builds of Static and Dynamic 32- or 64-bit libraries. The file user_settings.h should be used in the wolfSSL build to configure it. +The solution file, `wolfssh.sln`, facilitates building wolfSSH and its example and test programs. The solution provides both Debug and Release builds of Static and Dynamic 32- or 64-bit libraries. The file `user_settings.h` should be used in the wolfSSL build to configure it. This project assumes that the wolfSSH and wolfSSL source directories are installed side-by-side and do not have the version number in their names: ``` Projects\ -wolfssh\ -wolfssl\ + wolfssh\ + wolfssl\ ``` -The file `wolfssh\ide\winvs\user_settings.h` contains the settings used to -configure wolfSSL with the appropriate settings. This file must be copied -from the directory `wolfssh\ide\winvs` to `wolfssl\IDE\WIN`. If you change -one copy you must change both copies. The option `WOLFCRYPT_ONLY` disables -the build of the wolfSSL files and only builds the wolfCrypt algorithms. To -also keep wolfSSL, delete that option. +Build wolfSSH with the following steps: + +1. Copy `wolfssh\ide\winvs\user_settings.h` to `wolfssl\IDE\WIN`. + This file contains the settings used to configure wolfSSL. If you + change one copy, you must change both copies. The option + `WOLFCRYPT_ONLY` disables the build of the wolfSSL files and only + builds the wolfCrypt algorithms. To also keep wolfSSL, delete that + option. +2. Build wolfSSL with `wolfssl\wolfssl64.sln`. +3. Build wolfSSH with `wolfssh\ide\winvs\wolfssh.sln`. + +wolfSSL must be built beforehand with the same configuration (Debug, +Release, DLL Debug, or DLL Release) and platform (Win32 or x64) as the +wolfSSH build. The wolfSSH projects use the wolfSSL library found in +`wolfssl\\`, for example +`wolfssl\DLL Release\x64`. ### User Macros for Building on Windows -The solution is using user macros to indicate the location of the wolfSSL library and headers. All paths are set to the default build destinations in the wolfssl64 solution. The user macro wolfCryptDir is used as the base path for finding the libraries. It is initially set to `..\..\..\..\wolfssl`. And then, for example, the additional include directories value for the API test project is set to `$(wolfCryptDir)`. +The solution uses user macros to indicate the location of the wolfSSL library and headers. All paths are set to the default build destinations in the wolfssl64 solution. The user macro `wolfCryptDir` is used as the base path for finding the libraries. It is initially set to `..\..\..\..\wolfssl`. For example, the additional include directories value for the API test project is set to `$(wolfCryptDir)`. -The wolfCryptDir path must be relative to the project files, which are all one directory down +The `wolfCryptDir` path must be relative to the project files, which are all one directory down, for example: ``` wolfssh/wolfssh.vcxproj unit-test/unit-test.vcxproj ``` -The other user macros are the directories where the wolfSSL libraries for the different builds may be found. So the user macro 'wolfCryptDllRelease64' is initially set to: + +The other user macros are the directories where the wolfSSL libraries for the different builds may be found. So the user macro `wolfCryptDllRelease64` is initially set to: + ``` -$(wolfCryptDir)\x64\DLL Release +$(wolfCryptDir)\DLL Release\x64 ``` -This value is used in the debugging environment for the echoserver's 64-bit DLL Release build is set to: + +This value is used in the debugging environment of the echoserver's 64-bit DLL Release build, where PATH is set to: + ``` PATH=$(wolfCryptDllRelease64);%PATH% ``` + When you run the echoserver from the debugger, it finds the wolfSSL DLL in that directory. ## Building in a non-standard environment