mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-25 12:14:41 +00:00
Unify spacing and wording in the Japanese docs pages
Drop the spaces between Japanese text and inline code or alphanumerics in the tour and the few other pages that still had them, and reword sentences that read awkwardly. The client compression page now lists Zstd alongside zlib and Brotli.
This commit is contained in:
1 parent
c95d799180
commit
885ed54b10
23 files changed
+127
-125
No files matched your search
@@ -17,7 +17,7 @@ order: 6
|
||||
|
||||
モデルは初回起動時に自動ダウンロードされるので、ユーザーに渡すのはバイナリ1つだけです。
|
||||
|
||||
## 6.1 webview/webview を導入する
|
||||
## 6.1 webview/webviewを導入する
|
||||
|
||||
[webview/webview](https://github.com/webview/webview)は、OS標準のWebViewコンポーネント(macOSならWKWebView、LinuxならWebKitGTK、WindowsならWebView2)をC/C++から使えるようにするライブラリです。Electronのように独自ブラウザを同梱するわけではないので、バイナリサイズへの影響はほぼありません。
|
||||
|
||||
@@ -78,7 +78,7 @@ int main() {
|
||||
|
||||
5章の`signal_handler`は不要になります。デスクトップアプリではウインドウを閉じることがアプリの終了を意味するからです。
|
||||
|
||||
## 6.3 cpp-embedlib で静的ファイルを埋め込む
|
||||
## 6.3 cpp-embedlibで静的ファイルを埋め込む
|
||||
|
||||
5章では`public/`ディレクトリからファイルを配信していました。これだと配布時に`public/`も一緒に渡す必要があります。[cpp-embedlib](https://github.com/yhirose/cpp-embedlib)を使うと、HTML・CSS・JavaScriptをバイナリに埋め込んで、配布物をバイナリ1つにまとめられます。
|
||||
|
||||
@@ -108,7 +108,7 @@ target_link_libraries(translate-app PRIVATE
|
||||
|
||||
`cpp_embedlib_add`は、`public/`配下のファイルをコンパイル時にバイナリに変換し、`WebAssets`という静的ライブラリを作ります。リンクすると`Web::FS`というオブジェクトから埋め込みファイルにアクセスできます。`cpp-embedlib-httplib`は`httplib::mount()`関数を提供するヘルパーライブラリです。
|
||||
|
||||
### set_mount_point を httplib::mount に置き換える
|
||||
### set_mount_pointをhttplib::mountに置き換える
|
||||
|
||||
5章の`set_mount_point`をcpp-embedlibの`httplib::mount`に置き換えるだけです。
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ CI(GitHub Actionsなど)でクロスプラットフォームビルドを自
|
||||
- **クライアント**: HTTPS接続、リダイレクト追従、コンテンツレシーバーによる大容量ダウンロード、進捗コールバック
|
||||
- **WebView連携**: `bind_to_any_port` + `listen_after_bind`でバックグラウンドスレッド化
|
||||
|
||||
cpp-httplibにはこの他にも、マルチパートによるファイルアップロード、認証、タイムアウト制御、圧縮、レンジリクエストなど便利な機能があります。詳しくは [A Tour of cpp-httplib](../../tour/) をご覧ください。
|
||||
cpp-httplibにはこの他にも、マルチパートによるファイルアップロード、認証、タイムアウト制御、圧縮、レンジリクエストなど便利な機能があります。詳しくは[A Tour of cpp-httplib](../../tour/)をご覧ください。
|
||||
|
||||
これらのパターンは翻訳アプリに限りません。自分のC++ライブラリにWeb APIを付けたい、ブラウザUIで操作できるようにしたい、配布しやすいデスクトップアプリにしたい―そんなときに、この本がリファレンスになれば嬉しいです。
|
||||
|
||||
|
||||
Reference in new issue
Block a user