fix: windows crashes & builds (#55)
- Doing jobs in parallels in GHA (Divide build time by 3).
- Now use custom webrtc builds for this repo
- Windows crashes when receiving video is now fixed (thanks @cloudwebrtc)
- Now reading defines from webrtc.ninja
- Added a small create_pc test to be sure libwebrtc is working/linked correctly
- Fix MacOS builds
- Fixed Linux duplicated main build error (due to nasm)
This commit is contained in:
@@ -1,26 +1,48 @@
|
|||||||
name: WebRTC builds
|
name: WebRTC builds
|
||||||
on: workflow_dispatch
|
on: workflow_dispatch
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
os:
|
||||||
|
- windows-latest
|
||||||
|
- ubuntu-latest
|
||||||
|
- macos-latest
|
||||||
|
arch:
|
||||||
|
- x64
|
||||||
|
- arm64
|
||||||
|
profile:
|
||||||
|
- release
|
||||||
|
- debug
|
||||||
include:
|
include:
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
cmd: .\build_windows.cmd
|
cmd: .\build_windows.cmd
|
||||||
artifacts: windows
|
name: win
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
cmd: ./build_linux.sh
|
cmd: ./build_linux.sh
|
||||||
artifacts: linux
|
name: linux
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
cmd: ./build_macos.sh
|
cmd: ./build_macos.sh
|
||||||
artifacts: macos
|
name: macos
|
||||||
|
|
||||||
name: Build webrtc (${{ matrix.os }})
|
name: Build webrtc (${{ matrix.name }}-${{ matrix.arch }}-${{ matrix.profile }})
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Setup vars
|
||||||
|
id: setup
|
||||||
|
run: |
|
||||||
|
echo "OUT=${{ matrix.name }}-${{ matrix.arch }}-${{ matrix.profile }}" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "ZIP=webrtc-${{ matrix.name }}-${{ matrix.arch }}-${{ matrix.profile }}.zip" >> "$GITHUB_OUTPUT"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
# Print some debug infos to be sure everything is ok before doing really long tasks..
|
||||||
|
- name: Info
|
||||||
|
run: |
|
||||||
|
echo "OutName: ${{ steps.setup.outputs.OUT }}"
|
||||||
|
echo "OutZip: ${{ steps.setup.outputs.ZIP }}"
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -33,22 +55,34 @@ jobs:
|
|||||||
if: ${{ matrix.os == 'macos-latest' }}
|
if: ${{ matrix.os == 'macos-latest' }}
|
||||||
run: brew install ninja
|
run: brew install ninja
|
||||||
|
|
||||||
|
# It doesn't seem to be used?
|
||||||
- name: Install windows dependencies
|
- name: Install windows dependencies
|
||||||
if: ${{ matrix.os == 'windows-latest' }}
|
if: ${{ matrix.os == 'windows-latest' }}
|
||||||
run: |
|
run: |
|
||||||
Invoke-WebRequest -Uri "https://github.com/ninja-build/ninja/releases/latest/download/ninja-win.zip" -OutFile ninja.zip
|
Invoke-WebRequest -Uri "https://github.com/ninja-build/ninja/releases/latest/download/ninja-win.zip" -OutFile ninja.zip
|
||||||
Expand-Archive -Path ninja.zip -DestinationPath ninja
|
Expand-Archive -Path ninja.zip -DestinationPath ninja
|
||||||
echo "${{github.workspace}}\ninja" >> $GITHUB_PATH
|
echo "${{ github.workspace }}\ninja" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Print ninja version
|
- name: Print ninja version
|
||||||
run: ninja --version
|
run: ninja --version
|
||||||
|
|
||||||
- name: Build
|
- name: Build WebRTC
|
||||||
run: ${{ matrix.cmd }}
|
run: ${{ matrix.cmd }} --arch ${{ matrix.arch }} --profile ${{ matrix.profile }}
|
||||||
working-directory: webrtc-sys/libwebrtc
|
working-directory: webrtc-sys/libwebrtc
|
||||||
|
|
||||||
|
- name: Zip artifact (Unix)
|
||||||
|
if: ${{ matrix.os != 'windows-latest' }}
|
||||||
|
run: |
|
||||||
|
cd webrtc-sys/libwebrtc/${{ steps.setup.outputs.OUT }}
|
||||||
|
zip ${{ github.workspace }}/${{ steps.setup.outputs.ZIP }} ./* -r
|
||||||
|
|
||||||
|
- name: Zip artifact (Windows)
|
||||||
|
if: ${{ matrix.os == 'windows-latest' }}
|
||||||
|
run: Compress-Archive -Path .\webrtc-sys\libwebrtc\${{ steps.setup.outputs.OUT }}\* -DestinationPath ${{ steps.setup.outputs.ZIP }}
|
||||||
|
|
||||||
|
# doublezip here but I don't think there is an alternative
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: builds-${{ matrix.artifacts }}
|
name: ${{ steps.setup.outputs.ZIP }}
|
||||||
path: webrtc-sys/libwebrtc/${{ matrix.artifacts }}
|
path: ${{ steps.setup.outputs.ZIP }}
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ impl From<sys_pc::ffi::SignalingState> for SignalingState {
|
|||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct PeerConnection {
|
pub struct PeerConnection {
|
||||||
|
#[allow(dead_code)]
|
||||||
native_observer: SharedPtr<sys_pc::ffi::NativePeerConnectionObserver>,
|
native_observer: SharedPtr<sys_pc::ffi::NativePeerConnectionObserver>,
|
||||||
observer: Arc<PeerObserver>,
|
observer: Arc<PeerObserver>,
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
use crate::rtp_parameters::*;
|
use crate::rtp_parameters::*;
|
||||||
use crate::MediaType;
|
|
||||||
use webrtc_sys::rtp_parameters as sys_rp;
|
use webrtc_sys::rtp_parameters as sys_rp;
|
||||||
use webrtc_sys::webrtc as sys_webrtc;
|
use webrtc_sys::webrtc as sys_webrtc;
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ use crate::rtp_receiver;
|
|||||||
use crate::rtp_sender;
|
use crate::rtp_sender;
|
||||||
use crate::rtp_transceiver::RtpTransceiverDirection;
|
use crate::rtp_transceiver::RtpTransceiverDirection;
|
||||||
use crate::rtp_transceiver::RtpTransceiverInit;
|
use crate::rtp_transceiver::RtpTransceiverInit;
|
||||||
use crate::MediaType;
|
|
||||||
use crate::RtcError;
|
use crate::RtcError;
|
||||||
use cxx::SharedPtr;
|
use cxx::SharedPtr;
|
||||||
use webrtc_sys::rtc_error as sys_err;
|
use webrtc_sys::rtc_error as sys_err;
|
||||||
@@ -33,7 +32,6 @@ impl From<RtpTransceiverDirection> for sys_webrtc::ffi::RtpTransceiverDirection
|
|||||||
RtpTransceiverDirection::RecvOnly => Self::RecvOnly,
|
RtpTransceiverDirection::RecvOnly => Self::RecvOnly,
|
||||||
RtpTransceiverDirection::Inactive => Self::Inactive,
|
RtpTransceiverDirection::Inactive => Self::Inactive,
|
||||||
RtpTransceiverDirection::Stopped => Self::Stopped,
|
RtpTransceiverDirection::Stopped => Self::Stopped,
|
||||||
_ => panic!("unknown RtpTransceiverDirection"),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -238,3 +238,84 @@ impl Debug for PeerConnection {
|
|||||||
.finish()
|
.finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use crate::peer_connection::*;
|
||||||
|
use crate::peer_connection_factory::*;
|
||||||
|
use log::trace;
|
||||||
|
use tokio::sync::mpsc;
|
||||||
|
|
||||||
|
fn init_log() {
|
||||||
|
let _ = env_logger::builder().is_test(true).try_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
#[tokio::test]
|
||||||
|
async fn create_pc() {
|
||||||
|
init_log();
|
||||||
|
|
||||||
|
let factory = PeerConnectionFactory::default();
|
||||||
|
let config = RtcConfiguration {
|
||||||
|
ice_servers: vec![IceServer {
|
||||||
|
urls: vec!["stun:stun1.l.google.com:19302".to_string()],
|
||||||
|
username: "".into(),
|
||||||
|
password: "".into(),
|
||||||
|
}],
|
||||||
|
continual_gathering_policy: ContinualGatheringPolicy::GatherOnce,
|
||||||
|
ice_transport_type: IceTransportsType::All,
|
||||||
|
};
|
||||||
|
|
||||||
|
let bob = factory.create_peer_connection(config.clone()).unwrap();
|
||||||
|
let alice = factory.create_peer_connection(config.clone()).unwrap();
|
||||||
|
|
||||||
|
let (bob_ice_tx, mut bob_ice_rx) = mpsc::channel::<IceCandidate>(16);
|
||||||
|
let (alice_ice_tx, mut alice_ice_rx) = mpsc::channel::<IceCandidate>(16);
|
||||||
|
let (alice_dc_tx, mut alice_dc_rx) = mpsc::channel::<DataChannel>(16);
|
||||||
|
|
||||||
|
bob.on_ice_candidate(Some(Box::new(move |candidate| {
|
||||||
|
bob_ice_tx.blocking_send(candidate).unwrap();
|
||||||
|
})));
|
||||||
|
|
||||||
|
alice.on_ice_candidate(Some(Box::new(move |candidate| {
|
||||||
|
alice_ice_tx.blocking_send(candidate).unwrap();
|
||||||
|
})));
|
||||||
|
|
||||||
|
alice.on_data_channel(Some(Box::new(move |dc| {
|
||||||
|
alice_dc_tx.blocking_send(dc).unwrap();
|
||||||
|
})));
|
||||||
|
|
||||||
|
let bob_dc = bob
|
||||||
|
.create_data_channel("test_dc", DataChannelInit::default())
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
let offer = bob.create_offer(OfferOptions::default()).await.unwrap();
|
||||||
|
trace!("Bob offer: {:?}", offer);
|
||||||
|
bob.set_local_description(offer.clone()).await.unwrap();
|
||||||
|
alice.set_remote_description(offer).await.unwrap();
|
||||||
|
|
||||||
|
let answer = alice.create_answer(AnswerOptions::default()).await.unwrap();
|
||||||
|
trace!("Alice answer: {:?}", answer);
|
||||||
|
alice.set_local_description(answer.clone()).await.unwrap();
|
||||||
|
bob.set_remote_description(answer).await.unwrap();
|
||||||
|
|
||||||
|
let bob_ice = bob_ice_rx.recv().await.unwrap();
|
||||||
|
let alice_ice = alice_ice_rx.recv().await.unwrap();
|
||||||
|
|
||||||
|
bob.add_ice_candidate(alice_ice).await.unwrap();
|
||||||
|
alice.add_ice_candidate(bob_ice).await.unwrap();
|
||||||
|
|
||||||
|
let (data_tx, mut data_rx) = mpsc::channel::<String>(1);
|
||||||
|
let alice_dc = alice_dc_rx.recv().await.unwrap();
|
||||||
|
alice_dc.on_message(Some(Box::new(move |buffer| {
|
||||||
|
data_tx
|
||||||
|
.blocking_send(String::from_utf8_lossy(buffer.data).to_string())
|
||||||
|
.unwrap();
|
||||||
|
})));
|
||||||
|
|
||||||
|
bob_dc.send(b"This is a test", true).unwrap();
|
||||||
|
assert_eq!(data_rx.recv().await.unwrap(), "This is a test");
|
||||||
|
|
||||||
|
alice.close();
|
||||||
|
bob.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+55
-48
@@ -1,17 +1,22 @@
|
|||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
use std::io::BufRead;
|
||||||
use std::io::{self, Write};
|
use std::io::{self, Write};
|
||||||
use std::path;
|
use std::path;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
const WEBRTC_TAG: &str = "webrtc-beb0471";
|
const WEBRTC_TAG: &str = "webrtc-beb0471";
|
||||||
|
const IGNORE_DEFINES: [&str; 2] = ["CR_CLANG_REVISION", "CR_XCODE_VERSION"];
|
||||||
|
|
||||||
fn download_prebuilt_webrtc(
|
fn download_prebuilt_webrtc(
|
||||||
out_path: path::PathBuf,
|
out_path: path::PathBuf,
|
||||||
) -> Result<path::PathBuf, Box<dyn std::error::Error>> {
|
) -> Result<path::PathBuf, Box<dyn std::error::Error>> {
|
||||||
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
|
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
|
||||||
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
|
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
|
||||||
|
|
||||||
|
// This is not yet supported on all platforms.
|
||||||
|
// On Windows, we need Rust to link against libcmtd.
|
||||||
let use_debug = {
|
let use_debug = {
|
||||||
let var = env::var("LK_DEBUG_WEBRTC");
|
let var = env::var("LK_DEBUG_WEBRTC");
|
||||||
var.is_ok() && var.unwrap() == "true"
|
var.is_ok() && var.unwrap() == "true"
|
||||||
@@ -95,19 +100,26 @@ fn main() {
|
|||||||
let var = env::var("LK_CUSTOM_WEBRTC");
|
let var = env::var("LK_CUSTOM_WEBRTC");
|
||||||
var.is_ok() && var.unwrap() == "true"
|
var.is_ok() && var.unwrap() == "true"
|
||||||
};
|
};
|
||||||
|
println!("cargo:rerun-if-env-changed=LK_CUSTOM_WEBRTC");
|
||||||
|
|
||||||
let (webrtc_include, webrtc_lib) = if use_custom_webrtc {
|
let (webrtc_dir, webrtc_include, webrtc_lib) = if use_custom_webrtc {
|
||||||
// Use a local WebRTC version (libwebrtc folder)
|
// Use a local WebRTC version (libwebrtc folder)
|
||||||
let webrtc_dir = path::PathBuf::from("./libwebrtc");
|
let webrtc_dir = path::PathBuf::from("./libwebrtc");
|
||||||
(webrtc_dir.join("src"), webrtc_dir.join("src/out/Dev/obj"))
|
(
|
||||||
|
webrtc_dir.clone(),
|
||||||
|
webrtc_dir.join("include"),
|
||||||
|
webrtc_dir.join("lib"),
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
// Download a prebuilt version of WebRTC
|
// Download a prebuilt version of WebRTC
|
||||||
let download_dir = env::var("OUT_DIR").unwrap() + "/webrtc-sdk";
|
let download_dir = env::var("OUT_DIR").unwrap() + "/webrtc-sdk";
|
||||||
let webrtc_dir = download_prebuilt_webrtc(path::PathBuf::from(download_dir)).unwrap();
|
let webrtc_dir = download_prebuilt_webrtc(path::PathBuf::from(download_dir)).unwrap();
|
||||||
|
(
|
||||||
(webrtc_dir.join("include"), webrtc_dir.join("lib"))
|
webrtc_dir.clone(),
|
||||||
|
webrtc_dir.join("include"),
|
||||||
|
webrtc_dir.join("lib"),
|
||||||
|
)
|
||||||
};
|
};
|
||||||
println!("cargo:rerun-if-env-changed=LK_CUSTOM_WEBRTC");
|
|
||||||
|
|
||||||
// Just required for the bridge build to succeed.
|
// Just required for the bridge build to succeed.
|
||||||
let includes = &[
|
let includes = &[
|
||||||
@@ -140,23 +152,25 @@ fn main() {
|
|||||||
"src/helper.rs",
|
"src/helper.rs",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
builder.file("src/peer_connection.cpp");
|
builder.files(&[
|
||||||
builder.file("src/peer_connection_factory.cpp");
|
"src/peer_connection.cpp",
|
||||||
builder.file("src/media_stream.cpp");
|
"src/peer_connection_factory.cpp",
|
||||||
builder.file("src/data_channel.cpp");
|
"src/media_stream.cpp",
|
||||||
builder.file("src/jsep.cpp");
|
"src/data_channel.cpp",
|
||||||
builder.file("src/candidate.cpp");
|
"src/jsep.cpp",
|
||||||
builder.file("src/rtp_receiver.cpp");
|
"src/candidate.cpp",
|
||||||
builder.file("src/rtp_sender.cpp");
|
"src/rtp_receiver.cpp",
|
||||||
builder.file("src/rtp_transceiver.cpp");
|
"src/rtp_sender.cpp",
|
||||||
builder.file("src/rtp_parameters.cpp");
|
"src/rtp_transceiver.cpp",
|
||||||
builder.file("src/rtc_error.cpp");
|
"src/rtp_parameters.cpp",
|
||||||
builder.file("src/webrtc.cpp");
|
"src/rtc_error.cpp",
|
||||||
builder.file("src/video_frame.cpp");
|
"src/webrtc.cpp",
|
||||||
builder.file("src/video_frame_buffer.cpp");
|
"src/video_frame.cpp",
|
||||||
builder.file("src/video_encoder_factory.cpp");
|
"src/video_frame_buffer.cpp",
|
||||||
builder.file("src/video_decoder_factory.cpp");
|
"src/video_encoder_factory.cpp",
|
||||||
builder.file("src/audio_device.cpp");
|
"src/video_decoder_factory.cpp",
|
||||||
|
"src/audio_device.cpp",
|
||||||
|
]);
|
||||||
|
|
||||||
for include in includes {
|
for include in includes {
|
||||||
builder.include(include);
|
builder.include(include);
|
||||||
@@ -167,6 +181,20 @@ fn main() {
|
|||||||
webrtc_lib.canonicalize().unwrap().to_str().unwrap()
|
webrtc_lib.canonicalize().unwrap().to_str().unwrap()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Read preprocessor definitions from webrtc.ninja
|
||||||
|
let webrtc_gni = fs::File::open(webrtc_dir.join("webrtc.ninja")).unwrap();
|
||||||
|
let mut reader = io::BufReader::new(webrtc_gni).lines();
|
||||||
|
let defines_line = reader.next().unwrap().unwrap(); // The first line contains the defines
|
||||||
|
let defines_re = Regex::new(r"-D(\w+)(?:=([^\s]+))?").unwrap();
|
||||||
|
for cap in defines_re.captures_iter(&defines_line) {
|
||||||
|
let define_name = &cap[1];
|
||||||
|
let define_value = cap.get(2).map(|m| m.as_str());
|
||||||
|
if IGNORE_DEFINES.contains(&define_name) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
builder.define(define_name, define_value);
|
||||||
|
}
|
||||||
|
|
||||||
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
|
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
|
||||||
match target_os.as_str() {
|
match target_os.as_str() {
|
||||||
"windows" => {
|
"windows" => {
|
||||||
@@ -186,12 +214,7 @@ fn main() {
|
|||||||
println!("cargo:rustc-link-lib=dylib=dwmapi");
|
println!("cargo:rustc-link-lib=dylib=dwmapi");
|
||||||
println!("cargo:rustc-link-lib=static=webrtc");
|
println!("cargo:rustc-link-lib=static=webrtc");
|
||||||
|
|
||||||
builder
|
builder.flag("/std:c++17").flag("/EHsc");
|
||||||
.flag("/std:c++17")
|
|
||||||
.flag("/EHsc")
|
|
||||||
.define("WEBRTC_WIN", None)
|
|
||||||
//.define("WEBRTC_ENABLE_SYMBOL_EXPORT", None) Not necessary when using WebRTC as a static library
|
|
||||||
.define("NOMINMAX", None);
|
|
||||||
}
|
}
|
||||||
"linux" => {
|
"linux" => {
|
||||||
println!("cargo:rustc-link-lib=dylib=Xext");
|
println!("cargo:rustc-link-lib=dylib=Xext");
|
||||||
@@ -203,10 +226,7 @@ fn main() {
|
|||||||
println!("cargo:rustc-link-lib=dylib=m");
|
println!("cargo:rustc-link-lib=dylib=m");
|
||||||
println!("cargo:rustc-link-lib=static=webrtc");
|
println!("cargo:rustc-link-lib=static=webrtc");
|
||||||
|
|
||||||
builder
|
builder.flag("-std=c++17");
|
||||||
.flag("-std=c++17")
|
|
||||||
.define("WEBRTC_POSIX", None)
|
|
||||||
.define("WEBRTC_LINUX", None);
|
|
||||||
}
|
}
|
||||||
"macos" => {
|
"macos" => {
|
||||||
println!("cargo:rustc-link-lib=framework=Foundation");
|
println!("cargo:rustc-link-lib=framework=Foundation");
|
||||||
@@ -254,19 +274,10 @@ fn main() {
|
|||||||
builder
|
builder
|
||||||
.flag("-stdlib=libc++")
|
.flag("-stdlib=libc++")
|
||||||
.flag("-std=c++17")
|
.flag("-std=c++17")
|
||||||
.flag(format!("-isysroot{}", sysroot).as_str())
|
.flag(format!("-isysroot{}", sysroot).as_str());
|
||||||
.define("WEBRTC_ENABLE_OBJC_SYMBOL_EXPORT", None)
|
|
||||||
.define("WEBRTC_POSIX", None)
|
|
||||||
.define("WEBRTC_MAC", None);
|
|
||||||
}
|
}
|
||||||
"ios" => {
|
"ios" => {
|
||||||
builder
|
builder.flag("-std=c++17");
|
||||||
.flag("-std=c++17")
|
|
||||||
.file("src/objc_test.mm")
|
|
||||||
.define("WEBRTC_ENABLE_OBJC_SYMBOL_EXPORT", None)
|
|
||||||
.define("WEBRTC_MAC", None)
|
|
||||||
.define("WEBRTC_POSIX", None)
|
|
||||||
.define("WEBRTC_IOS", None);
|
|
||||||
}
|
}
|
||||||
"android" => {
|
"android" => {
|
||||||
let ndk_env = env::var("ANDROID_NDK_HOME").expect(
|
let ndk_env = env::var("ANDROID_NDK_HOME").expect(
|
||||||
@@ -330,11 +341,7 @@ fn main() {
|
|||||||
vs_path.to_str().unwrap()
|
vs_path.to_str().unwrap()
|
||||||
);
|
);
|
||||||
|
|
||||||
builder
|
builder.flag("-std=c++17");
|
||||||
.flag("-std=c++17")
|
|
||||||
.define("WEBRTC_LINUX", None)
|
|
||||||
.define("WEBRTC_POSIX", None)
|
|
||||||
.define("WEBRTC_ANDROID", None);
|
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
panic!("Unsupported target, {}", target_os);
|
panic!("Unsupported target, {}", target_os);
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
src
|
src
|
||||||
.gclient_*
|
.gclient_*
|
||||||
depot_tools
|
depot_tools
|
||||||
|
ninja
|
||||||
|
|
||||||
# builds
|
# builds
|
||||||
macos
|
win*
|
||||||
linux
|
macos*
|
||||||
|
linux*
|
||||||
|
|||||||
@@ -1,5 +1,42 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
arch=""
|
||||||
|
profile="release"
|
||||||
|
|
||||||
|
while [ "$#" -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
--arch)
|
||||||
|
arch="$2"
|
||||||
|
if [ "$arch" != "x64" ] && [ "$arch" != "arm64" ]; then
|
||||||
|
echo "Error: Invalid value for --arch. Must be 'x64' or 'arm64'."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
--profile)
|
||||||
|
profile="$2"
|
||||||
|
if [ "$profile" != "debug" ] && [ "$profile" != "release" ]; then
|
||||||
|
echo "Error: Invalid value for --profile. Must be 'debug' or 'release'."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Error: Unknown argument '$1'"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$arch" ]; then
|
||||||
|
echo "Error: --arch must be set."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Building LiveKit WebRTC"
|
||||||
|
echo "Arch: $arch"
|
||||||
|
echo "Profile: $profile"
|
||||||
|
|
||||||
if [ ! -e "$(pwd)/depot_tools" ]
|
if [ ! -e "$(pwd)/depot_tools" ]
|
||||||
then
|
then
|
||||||
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||||
@@ -7,71 +44,70 @@ fi
|
|||||||
|
|
||||||
export COMMAND_DIR=$(cd $(dirname $0); pwd)
|
export COMMAND_DIR=$(cd $(dirname $0); pwd)
|
||||||
export PATH="$(pwd)/depot_tools:$PATH"
|
export PATH="$(pwd)/depot_tools:$PATH"
|
||||||
export OUTPUT_DIR="$(pwd)/src/out"
|
export OUTPUT_DIR="$(pwd)/src/out-$arch-$profile"
|
||||||
export ARTIFACTS_DIR="$(pwd)/linux"
|
export ARTIFACTS_DIR="$(pwd)/linux-$arch-$profile"
|
||||||
|
|
||||||
if [ ! -e "$(pwd)/src" ]
|
if [ ! -e "$(pwd)/src" ]
|
||||||
then
|
then
|
||||||
gclient sync
|
gclient sync -D --no-history
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd src
|
cd src
|
||||||
git apply "$COMMAND_DIR/patches/add_license_dav1d.patch" -v
|
git apply "$COMMAND_DIR/patches/add_license_dav1d.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
|
||||||
git apply "$COMMAND_DIR/patches/ssl_verify_callback_with_native_handle.patch" -v
|
git apply "$COMMAND_DIR/patches/ssl_verify_callback_with_native_handle.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
|
||||||
git apply "$COMMAND_DIR/patches/fix_mocks.patch" -v
|
git apply "$COMMAND_DIR/patches/fix_mocks.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
mkdir -p "$ARTIFACTS_DIR/lib"
|
mkdir -p "$ARTIFACTS_DIR/lib"
|
||||||
|
|
||||||
for is_debug in "true" "false"
|
python3 "./src/build/linux/sysroot_scripts/install-sysroot.py" --arch="$arch"
|
||||||
do
|
|
||||||
for target_cpu in "x64" "arm64"
|
|
||||||
do
|
|
||||||
args="is_debug=${is_debug} \
|
|
||||||
target_os=\"linux\" \
|
|
||||||
target_cpu=\"${target_cpu}\" \
|
|
||||||
rtc_enable_protobuf=false \
|
|
||||||
treat_warnings_as_errors=false \
|
|
||||||
use_custom_libcxx=false \
|
|
||||||
rtc_include_tests=false \
|
|
||||||
rtc_build_tools=false \
|
|
||||||
rtc_build_examples=false \
|
|
||||||
rtc_libvpx_build_vp9=true \
|
|
||||||
is_component_build=false \
|
|
||||||
enable_stripping=true \
|
|
||||||
use_goma=false \
|
|
||||||
rtc_use_h264=false \
|
|
||||||
rtc_use_pipewire=false \
|
|
||||||
symbol_level=0 \
|
|
||||||
enable_iterator_debugging=false \
|
|
||||||
use_rtti=true \
|
|
||||||
rtc_use_x11=false"
|
|
||||||
|
|
||||||
if [ $is_debug = "true" ]; then
|
debug="false"
|
||||||
args="${args} is_asan=true is_lsan=true";
|
if [ "$profile" = "debug" ]; then
|
||||||
fi
|
debug="true"
|
||||||
|
fi
|
||||||
|
|
||||||
# generate ninja files
|
args="is_debug=$debug \
|
||||||
gn gen "$OUTPUT_DIR" --root="src" --args="${args}"
|
target_os=\"linux\" \
|
||||||
|
target_cpu=\"$arch\" \
|
||||||
|
rtc_enable_protobuf=false \
|
||||||
|
treat_warnings_as_errors=false \
|
||||||
|
use_custom_libcxx=false \
|
||||||
|
rtc_include_tests=false \
|
||||||
|
rtc_build_tools=false \
|
||||||
|
rtc_build_examples=false \
|
||||||
|
rtc_libvpx_build_vp9=true \
|
||||||
|
is_component_build=false \
|
||||||
|
enable_stripping=true \
|
||||||
|
use_goma=false \
|
||||||
|
rtc_use_h264=false \
|
||||||
|
rtc_use_pipewire=false \
|
||||||
|
symbol_level=0 \
|
||||||
|
enable_iterator_debugging=false \
|
||||||
|
use_rtti=true \
|
||||||
|
rtc_use_x11=false"
|
||||||
|
|
||||||
# build static library
|
if [ "$debug" = "true" ]; then
|
||||||
ninja -C "$OUTPUT_DIR" webrtc
|
args="${args} is_asan=true is_lsan=true";
|
||||||
|
fi
|
||||||
|
|
||||||
filename="libwebrtc.a"
|
# generate ninja files
|
||||||
if [ $is_debug = "true" ]; then
|
gn gen "$OUTPUT_DIR" --root="src" --args="${args}"
|
||||||
filename="libwebrtcd.a"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# cppy static library
|
# build static library
|
||||||
mkdir -p "$ARTIFACTS_DIR/lib/${target_cpu}"
|
ninja -C "$OUTPUT_DIR" :default
|
||||||
cp "$OUTPUT_DIR/obj/libwebrtc.a" "$ARTIFACTS_DIR/lib/${target_cpu}/${filename}"
|
|
||||||
done
|
# make libwebrtc.a
|
||||||
done
|
# don't include nasm
|
||||||
|
ar -rc "$ARTIFACTS_DIR/lib/libwebrtc.a" `find "$OUTPUT_DIR/obj" -name '*.o' -not -path "*/third_party/nasm/*"`
|
||||||
|
|
||||||
python3 "./src/tools_webrtc/libs/generate_licenses.py" \
|
python3 "./src/tools_webrtc/libs/generate_licenses.py" \
|
||||||
--target :webrtc "$OUTPUT_DIR" "$OUTPUT_DIR"
|
--target :default "$OUTPUT_DIR" "$OUTPUT_DIR"
|
||||||
|
|
||||||
|
cp "$OUTPUT_DIR/obj/webrtc.ninja" "$ARTIFACTS_DIR"
|
||||||
|
cp "$OUTPUT_DIR/args.gn" "$ARTIFACTS_DIR"
|
||||||
|
cp "$OUTPUT_DIR/LICENSE.md" "$ARTIFACTS_DIR"
|
||||||
|
|
||||||
cd src
|
cd src
|
||||||
find . -name "*.h" -print | cpio -pd "$ARTIFACTS_DIR/include"
|
find . -name "*.h" -print | cpio -pd "$ARTIFACTS_DIR/include"
|
||||||
|
|
||||||
cp "$OUTPUT_DIR/LICENSE.md" "$ARTIFACTS_DIR"
|
|
||||||
|
|||||||
@@ -1,4 +1,41 @@
|
|||||||
#!/bin/bash -eu
|
#!/bin/bash
|
||||||
|
|
||||||
|
arch=""
|
||||||
|
profile="release"
|
||||||
|
|
||||||
|
while [ "$#" -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
--arch)
|
||||||
|
arch="$2"
|
||||||
|
if [ "$arch" != "x64" ] && [ "$arch" != "arm64" ]; then
|
||||||
|
echo "Error: Invalid value for --arch. Must be 'x64' or 'arm64'."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
--profile)
|
||||||
|
profile="$2"
|
||||||
|
if [ "$profile" != "debug" ] && [ "$profile" != "release" ]; then
|
||||||
|
echo "Error: Invalid value for --profile. Must be 'debug' or 'release'."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Error: Unknown argument '$1'"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$arch" ]; then
|
||||||
|
echo "Error: --arch must be set."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Building LiveKit WebRTC"
|
||||||
|
echo "Arch: $arch"
|
||||||
|
echo "Profile: $profile"
|
||||||
|
|
||||||
if [ ! -e "$(pwd)/depot_tools" ]
|
if [ ! -e "$(pwd)/depot_tools" ]
|
||||||
then
|
then
|
||||||
@@ -7,69 +44,71 @@ fi
|
|||||||
|
|
||||||
export COMMAND_DIR=$(cd $(dirname $0); pwd)
|
export COMMAND_DIR=$(cd $(dirname $0); pwd)
|
||||||
export PATH="$(pwd)/depot_tools:$PATH"
|
export PATH="$(pwd)/depot_tools:$PATH"
|
||||||
export OUTPUT_DIR="$(pwd)/src/out"
|
export OUTPUT_DIR="$(pwd)/src/out-$arch-$profile"
|
||||||
export ARTIFACTS_DIR="$(pwd)/macos"
|
export ARTIFACTS_DIR="$(pwd)/macos-$arch-$profile"
|
||||||
|
|
||||||
if [ ! -e "$(pwd)/src" ]
|
if [ ! -e "$(pwd)/src" ]
|
||||||
then
|
then
|
||||||
gclient sync
|
gclient sync -D --no-history
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd src
|
cd src
|
||||||
git apply "$COMMAND_DIR/patches/add_license_dav1d.patch" -v
|
git apply "$COMMAND_DIR/patches/add_license_dav1d.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
|
||||||
git apply "$COMMAND_DIR/patches/ssl_verify_callback_with_native_handle.patch" -v
|
git apply "$COMMAND_DIR/patches/ssl_verify_callback_with_native_handle.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
|
||||||
git apply "$COMMAND_DIR/patches/fix_mocks.patch" -v
|
git apply "$COMMAND_DIR/patches/fix_mocks.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
mkdir -p "$ARTIFACTS_DIR/lib"
|
mkdir -p "$ARTIFACTS_DIR/lib"
|
||||||
|
|
||||||
for is_debug in "true" "false"
|
debug="false"
|
||||||
do
|
if [ "$profile" = "debug" ]; then
|
||||||
for target_cpu in "x64" "arm64"
|
debug="true"
|
||||||
do
|
fi
|
||||||
|
|
||||||
# generate ninja files
|
# generate ninja files
|
||||||
gn gen "$OUTPUT_DIR" --root="src" \
|
gn gen "$OUTPUT_DIR" --root="src" \
|
||||||
--args="is_debug=${is_debug} \
|
--args="is_debug=$debug \
|
||||||
enable_dsyms=${is_debug} \
|
enable_dsyms=$debug \
|
||||||
target_os=\"mac\" \
|
target_os=\"mac\" \
|
||||||
target_cpu=\"${target_cpu}\" \
|
target_cpu=\"$arch\" \
|
||||||
mac_deployment_target=\"10.11\" \
|
mac_deployment_target=\"10.11\" \
|
||||||
treat_warnings_as_errors=false \
|
treat_warnings_as_errors=false \
|
||||||
rtc_enable_protobuf=false \
|
rtc_enable_protobuf=false \
|
||||||
rtc_include_tests=false \
|
rtc_include_tests=false \
|
||||||
rtc_build_examples=false \
|
rtc_build_examples=false \
|
||||||
rtc_build_tools=false \
|
rtc_build_tools=false \
|
||||||
rtc_libvpx_build_vp9=true \
|
rtc_libvpx_build_vp9=true \
|
||||||
is_component_build=false \
|
is_component_build=false \
|
||||||
enable_stripping=true \
|
enable_stripping=true \
|
||||||
use_goma=false \
|
rtc_enable_symbol_export=true \
|
||||||
rtc_use_h264=false \
|
rtc_enable_objc_symbol_export=false \
|
||||||
rtc_enable_symbol_export=true \
|
rtc_use_h264=false \
|
||||||
rtc_enable_objc_symbol_export=false \
|
use_custom_libcxx=false \
|
||||||
clang_use_chrome_plugins=false \
|
clang_use_chrome_plugins=false \
|
||||||
symbol_level=0 \
|
use_rtti=true \
|
||||||
enable_iterator_debugging=false \
|
use_lld=false"
|
||||||
use_rtti=true"
|
|
||||||
|
|
||||||
# build static library
|
# build static library
|
||||||
ninja -C "$OUTPUT_DIR" webrtc
|
ninja -C "$OUTPUT_DIR" :default \
|
||||||
|
api/audio_codecs:builtin_audio_decoder_factory \
|
||||||
|
api/task_queue:default_task_queue_factory \
|
||||||
|
sdk:native_api \
|
||||||
|
sdk:default_codec_factory_objc \
|
||||||
|
pc:peerconnection \
|
||||||
|
sdk:videocapture_objc \
|
||||||
|
sdk:mac_framework_objc
|
||||||
|
|
||||||
filename="libwebrtc.a"
|
# make libwebrtc.a
|
||||||
if [ $is_debug = "true" ]; then
|
# don't include nasm
|
||||||
filename="libwebrtcd.a"
|
ar -rc "$ARTIFACTS_DIR/lib/libwebrtc.a" `find "$OUTPUT_DIR/obj" -name '*.o' -not -path "*/third_party/nasm/*"`
|
||||||
fi
|
|
||||||
|
|
||||||
# cppy static library
|
|
||||||
mkdir -p "$ARTIFACTS_DIR/lib/${target_cpu}"
|
|
||||||
cp "$OUTPUT_DIR/obj/libwebrtc.a" "$ARTIFACTS_DIR/lib/${target_cpu}/${filename}"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
python3 "./src/tools_webrtc/libs/generate_licenses.py" \
|
python3 "./src/tools_webrtc/libs/generate_licenses.py" \
|
||||||
--target :webrtc "$OUTPUT_DIR" "$OUTPUT_DIR"
|
--target :webrtc "$OUTPUT_DIR" "$OUTPUT_DIR"
|
||||||
|
|
||||||
|
cp "$OUTPUT_DIR/obj/webrtc.ninja" "$ARTIFACTS_DIR"
|
||||||
|
cp "$OUTPUT_DIR/args.gn" "$ARTIFACTS_DIR"
|
||||||
|
cp "$OUTPUT_DIR/LICENSE.md" "$ARTIFACTS_DIR"
|
||||||
|
|
||||||
cd src
|
cd src
|
||||||
find . -name "*.h" -print | cpio -pd "$ARTIFACTS_DIR/include"
|
find . -name "*.h" -print | cpio -pd "$ARTIFACTS_DIR/include"
|
||||||
|
|
||||||
cp "$OUTPUT_DIR/LICENSE.md" "$ARTIFACTS_DIR"
|
|
||||||
|
|||||||
@@ -1,5 +1,37 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
|
set arch=
|
||||||
|
set profile=release
|
||||||
|
|
||||||
|
:arg_loop
|
||||||
|
if "%1" == "" goto end_arg_loop
|
||||||
|
if "%1" == "--arch" (
|
||||||
|
set "arch=%2"
|
||||||
|
shift & shift & goto arg_loop
|
||||||
|
)
|
||||||
|
if "%1" == "--profile" (
|
||||||
|
set "profile=%2"
|
||||||
|
shift & shift & goto arg_loop
|
||||||
|
)
|
||||||
|
echo Error: Unknown argument '%1'
|
||||||
|
exit /b 1
|
||||||
|
:end_arg_loop
|
||||||
|
|
||||||
|
if not "!arch!" == "x64" if not "!arch!" == "arm64" (
|
||||||
|
echo Error: Invalid value for --arch. Must be 'x64' or 'arm64'.
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
if not "!profile!" == "debug" if not "!profile!" == "release" (
|
||||||
|
echo Error: Invalid value for --profile. Must be 'debug' or 'release'.
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo "Building LiveKit WebRTC"
|
||||||
|
echo "Arch: !arch!"
|
||||||
|
echo "Profile: !profile!"
|
||||||
|
|
||||||
if not exist depot_tools (
|
if not exist depot_tools (
|
||||||
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||||
)
|
)
|
||||||
@@ -9,55 +41,45 @@ set PATH=%cd%\depot_tools;%PATH%
|
|||||||
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
|
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
|
||||||
set GYP_GENERATORS=ninja,msvs-ninja
|
set GYP_GENERATORS=ninja,msvs-ninja
|
||||||
set GYP_MSVS_VERSION=2019
|
set GYP_MSVS_VERSION=2019
|
||||||
set OUTPUT_DIR=src/out
|
set OUTPUT_DIR=src\out-!arch!-!profile!
|
||||||
set ARTIFACTS_DIR=%cd%\windows
|
set ARTIFACTS_DIR=%cd%\win-!arch!-!profile!
|
||||||
set vs2019_install=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional
|
set vs2019_install=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional
|
||||||
|
|
||||||
if not exist src (
|
if not exist src (
|
||||||
call gclient.bat sync
|
call gclient.bat sync -D --no-history
|
||||||
)
|
)
|
||||||
|
|
||||||
cd src
|
cd src
|
||||||
call git apply "%COMMAND_DIR%/patches/add_license_dav1d.patch" -v
|
call git apply "%COMMAND_DIR%/patches/add_license_dav1d.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
|
||||||
call git apply "%COMMAND_DIR%/patches/ssl_verify_callback_with_native_handle.patch" -v
|
call git apply "%COMMAND_DIR%/patches/ssl_verify_callback_with_native_handle.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
|
||||||
call git apply "%COMMAND_DIR%/patches/fix_mocks.patch" -v
|
call git apply "%COMMAND_DIR%/patches/fix_mocks.patch" -v --ignore-space-change --ignore-whitespace --whitespace=nowarn
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
mkdir "%ARTIFACTS_DIR%\lib"
|
mkdir "%ARTIFACTS_DIR%\lib"
|
||||||
|
|
||||||
setlocal enabledelayedexpansion
|
set "debug=false"
|
||||||
|
if "!profile!" == "debug" (
|
||||||
for %%i in (x64 arm64) do (
|
set "debug=true"
|
||||||
mkdir "%ARTIFACTS_DIR%/lib/%%i"
|
|
||||||
for %%j in (true false) do (
|
|
||||||
|
|
||||||
rem generate ninja for release
|
|
||||||
call gn.bat gen %OUTPUT_DIR% --root="src" ^
|
|
||||||
--args="is_debug=%%j is_clang=true target_cpu=\"%%i\" use_custom_libcxx=false rtc_include_tests=false rtc_build_examples=false rtc_use_h264=false symbol_level=0 enable_iterator_debugging=false"
|
|
||||||
|
|
||||||
rem build
|
|
||||||
ninja.exe -C %OUTPUT_DIR% webrtc
|
|
||||||
|
|
||||||
set filename=
|
|
||||||
if true==%%j (
|
|
||||||
set filename=webrtcd.lib
|
|
||||||
) else (
|
|
||||||
set filename=webrtc.lib
|
|
||||||
)
|
|
||||||
|
|
||||||
rem copy static library for release build
|
|
||||||
copy "%OUTPUT_DIR%\obj\webrtc.lib" "%ARTIFACTS_DIR%\lib\%%i\!filename!"
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
endlocal
|
rem generate ninja for release
|
||||||
|
call gn.bat gen %OUTPUT_DIR% --root="src" ^
|
||||||
|
--args="is_debug=!debug! is_clang=true target_cpu=\"!arch!\" use_custom_libcxx=false rtc_include_tests=false rtc_build_examples=false rtc_build_tools=false is_component_build=false rtc_enable_protobuf=false rtc_use_h264=false symbol_level=0 enable_iterator_debugging=false"
|
||||||
|
|
||||||
|
rem build
|
||||||
|
ninja.exe -C %OUTPUT_DIR% :default
|
||||||
|
|
||||||
|
rem copy static library for release build
|
||||||
|
copy "%OUTPUT_DIR%\obj\webrtc.lib" "%ARTIFACTS_DIR%\lib"
|
||||||
|
|
||||||
rem generate license
|
rem generate license
|
||||||
call python3 "%cd%\src\tools_webrtc\libs\generate_licenses.py" ^
|
call python3 "%cd%\src\tools_webrtc\libs\generate_licenses.py" ^
|
||||||
--target :webrtc %OUTPUT_DIR% %OUTPUT_DIR%
|
--target :default %OUTPUT_DIR% %OUTPUT_DIR%
|
||||||
|
|
||||||
|
copy "%OUTPUT_DIR%\obj\webrtc.ninja" "%ARTIFACTS_DIR%"
|
||||||
|
copy "%OUTPUT_DIR%\args.gn" "%ARTIFACTS_DIR%"
|
||||||
|
copy "%OUTPUT_DIR%\LICENSE.md" "%ARTIFACTS_DIR%"
|
||||||
|
|
||||||
rem copy header
|
rem copy header
|
||||||
xcopy src\*.h "%ARTIFACTS_DIR%\include" /C /S /I /F /H
|
xcopy src\*.h "%ARTIFACTS_DIR%\include" /C /S /I /F /H
|
||||||
|
|
||||||
rem copy license
|
|
||||||
copy "%OUTPUT_DIR%\LICENSE.md" "%ARTIFACTS_DIR%\LICENSE.md"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user