Skip to content

Commit

Permalink
update NOTICE
Browse files Browse the repository at this point in the history
  • Loading branch information
s5suzuki committed Feb 12, 2025
1 parent bdc2b34 commit bc079e1
Show file tree
Hide file tree
Showing 28 changed files with 2,198 additions and 782 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ jobs:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/actions/setup-build
with:
os: ${{ matrix.os }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ pnpm-debug.log*
.DS_Store

target/
tmp/
tmp/
tmp.zip
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def download_and_extract(repo: str, name: str, version: str) -> None:
tmp_file.unlink()
shutil.copyfile(
"tmp/ThirdPartyNotice.txt", f"src-tauri/{name}-ThirdPartyNotice.txt"
"tmp/ThirdPartyNotice.txt", f"src-tauri/{name}-NOTICE"
)
shutil.copyfile("tmp/LICENSE", f"src-tauri/{name}-LICENSE")
Expand Down
438 changes: 341 additions & 97 deletions src-tauri/ThirdPartyNotice.txt → NOTICE

Large diffs are not rendered by default.

43 changes: 31 additions & 12 deletions src-tauri/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
use std::path::Path;
use std::{
fs::File,
io::{BufReader, BufWriter, Read, Write},
path::Path,
};

fn main() -> Result<(), Box<dyn std::error::Error>> {
let manifest_dir = Path::new(env!("CARGO_MANIFEST_DIR"));
Expand Down Expand Up @@ -51,24 +55,39 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
}
std::fs::copy(manifest_dir.join("../LICENSE"), license_path)?;

let license_path = manifest_dir.join("LICENSE.txt");
// NOTICE
let license_path = manifest_dir.join("NOTICE");
if license_path.exists() {
std::fs::remove_file(&license_path)?;
}
std::fs::copy(manifest_dir.join("../LICENSE"), license_path)?;
std::fs::copy(manifest_dir.join("../NOTICE"), license_path)?;

// bundle license file
let license_path = manifest_dir.join("LICENSE.rtf");
if license_path.exists() {
std::fs::remove_file(&license_path)?;
}
std::fs::copy(manifest_dir.join("../LICENSE"), license_path)?;
let license_file = File::create(license_path)?;
let mut writer = BufWriter::new(license_file);

// NOTICE
let license_path = manifest_dir.join("NOTICE");
if license_path.exists() {
std::fs::remove_file(&license_path)?;
{
let mut content = String::new();
let f = File::open(manifest_dir.join("LICENSE"))?;
let mut reader = BufReader::new(f);
reader.read_to_string(&mut content)?;
writer.write_all(content.as_bytes())?;
}
std::fs::copy(manifest_dir.join("../ThirdPartyNotice.txt"), license_path)?;
writeln!(
writer,
"
---------------------------------------------------------"
)?;
{
let mut content = String::new();
let f = File::open(manifest_dir.join("NOTICE"))?;
let mut reader = BufReader::new(f);
reader.read_to_string(&mut content)?;
writer.write_all(content.as_bytes())?;
}

writer.flush()?;

tauri_build::build();

Expand Down
6 changes: 3 additions & 3 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
"./LICENSE",
"./NOTICE",
"./autd3-simulator-LICENSE",
"./autd3-simulator-ThirdPartyNotice.txt",
"./autd3-simulator-NOTICE",
"./SOEMAUTDServer-LICENSE",
"./SOEMAUTDServer-ThirdPartyNotice.txt",
"./SOEMAUTDServer-NOTICE",
"./TwinCATAUTDServerLightweight-LICENSE",
"./TwinCATAUTDServerLightweight-ThirdPartyNotice.txt",
"./TwinCATAUTDServerLightweight-NOTICE",
"./TwinCATAUTDServer/LICENSE",
"./TwinCATAUTDServer/README.md",
"./TwinCATAUTDServer/AUTD.xml",
Expand Down
1 change: 0 additions & 1 deletion tools/autd3-license-check
Submodule autd3-license-check deleted from 94eb4d
1 change: 1 addition & 0 deletions tools/license-checker/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
license_file/
Loading

0 comments on commit bc079e1

Please sign in to comment.