diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 1daa30bdb..48fc2c50d 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -114,9 +114,9 @@ jobs: shell: bash run: | mkdir -p "artifact/${{ env.ASSET_NAME }}" - cp -v target/core.h "artifact/${{ env.ASSET_NAME }}" + cp -v target/voicevox_core.h "artifact/${{ env.ASSET_NAME }}" cp -v target/${{ matrix.target }}/release/*.{dll,so,dylib} "artifact/${{ env.ASSET_NAME }}" || true - cp -v target/${{ matrix.target }}/release/core.dll.lib "artifact/${{ env.ASSET_NAME }}/core.lib" || true + cp -v target/${{ matrix.target }}/release/voicevox_core.dll.lib "artifact/${{ env.ASSET_NAME }}/voicevox_core.lib" || true cp -v -n target/${{ matrix.target }}/release/build/onnxruntime-sys-*/out/onnxruntime_*/onnxruntime-*/lib/*.{dll,so.*,so,dylib} "artifact/${{ env.ASSET_NAME }}" || true # libonnxruntimeについてはバージョン付のshared libraryを使用するためバージョンがついてないものを削除する rm -f artifact/${{ env.ASSET_NAME }}/libonnxruntime.{so,dylib} @@ -126,7 +126,7 @@ jobs: if: startsWith(matrix.os, 'windows') && github.event.inputs.code_signing == 'true' shell: bash run: | - bash build_util/codesign.bash "artifact/${{ env.ASSET_NAME }}/core.dll" + bash build_util/codesign.bash "artifact/${{ env.ASSET_NAME }}/voicevox_core.dll" env: CERT_BASE64: ${{ secrets.CERT_BASE64 }} CERT_PASSWORD: ${{ secrets.CERT_PASSWORD }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e9e00eaed..7eff3eeff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -77,8 +77,8 @@ jobs: - name: 必要なfileをunix用exampleのディレクトリに移動させる run: | mkdir -p example/cpp/unix/voicevox_core/ - cp -v target/core.h example/cpp/unix/voicevox_core/ - cp -v target/debug/libcore.{so,dylib} example/cpp/unix/voicevox_core/ || true + cp -v target/voicevox_core.h example/cpp/unix/voicevox_core/ + cp -v target/debug/libvoicevox_core.{so,dylib} example/cpp/unix/voicevox_core/ || true cp -v target/debug/build/onnxruntime-sys-*/out/onnxruntime_*/onnxruntime-*/lib/libonnxruntime.so.* example/cpp/unix/voicevox_core/ || true cp -v target/debug/build/onnxruntime-sys-*/out/onnxruntime_*/onnxruntime-*/lib/libonnxruntime.*.dylib example/cpp/unix/voicevox_core/ || true diff --git a/crates/voicevox_core_c_api/Cargo.toml b/crates/voicevox_core_c_api/Cargo.toml index 19aab833e..27bdd3d36 100644 --- a/crates/voicevox_core_c_api/Cargo.toml +++ b/crates/voicevox_core_c_api/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.0" edition = "2021" [lib] -name = "core" +name = "voicevox_core" crate-type = ["cdylib"] [features] diff --git a/crates/voicevox_core_c_api/build.rs b/crates/voicevox_core_c_api/build.rs index 97c9cba2d..76eb03095 100644 --- a/crates/voicevox_core_c_api/build.rs +++ b/crates/voicevox_core_c_api/build.rs @@ -8,7 +8,7 @@ fn main() { #[cfg(target_os = "macos")] { println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path/"); - println!("cargo:rustc-link-arg=-Wl,-install_name,@rpath/libcore.dylib"); + println!("cargo:rustc-link-arg=-Wl,-install_name,@rpath/libvoicevox_core.dylib"); } } @@ -19,7 +19,7 @@ fn generate_c_header() { use std::path::PathBuf; let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); - let output_file = target_dir().join("core.h").display().to_string(); + let output_file = target_dir().join("voicevox_core.h").display().to_string(); let config = Config { parse: ParseConfig { parse_deps: true, diff --git a/example/cpp/unix/.gitignore b/example/cpp/unix/.gitignore index 3173c2c9a..2b66c295d 100644 --- a/example/cpp/unix/.gitignore +++ b/example/cpp/unix/.gitignore @@ -2,7 +2,8 @@ *.dylib *.so *.so.* -core.h +vocevox_core.h + # OpenJTalk-dictionary's dir open_jtalk_dic_utf_8-* diff --git a/example/cpp/unix/CMakeLists.txt b/example/cpp/unix/CMakeLists.txt index 2f7172a19..5cef356f8 100644 --- a/example/cpp/unix/CMakeLists.txt +++ b/example/cpp/unix/CMakeLists.txt @@ -9,5 +9,5 @@ file(GLOB ONNXRUNTIME_SHARED_LIB ./libonnxruntime.so.* ./libonnxruntime.*.dylib) target_link_directories(simple_tts PRIVATE ./voicevox_core) -file(GLOB CORE_LIB ./voicevox_core/libcore.so.* ./voicevox_core/libcore.*.dylib) -target_link_libraries(simple_tts core) +file(GLOB CORE_LIB ./voicevox_core/libvoicevox_core.so.* ./voicevox_core/libvoicevox_core.*.dylib) +target_link_libraries(simple_tts voicevox_core) diff --git a/example/cpp/unix/simple_tts.cpp b/example/cpp/unix/simple_tts.cpp index 28f7f5916..f41aaf1ee 100644 --- a/example/cpp/unix/simple_tts.cpp +++ b/example/cpp/unix/simple_tts.cpp @@ -2,7 +2,7 @@ #include #include -#include "voicevox_core/core.h" +#include "voicevox_core/voicevox_core.h" #define OUTPUT_WAV_NAME "audio.wav"