diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e0e2d59..3ee9889 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,11 +40,14 @@ jobs: cargo fmt --all -- --check cargo clippy - name: Cache prebuilt and cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ ~/prebuilt - ~/.cargo !~/prebuilt/exclude key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} # - name: Generate coverage @@ -114,11 +117,14 @@ jobs: env: RUSTFLAGS: "-C link-dead-code" - name: Cache prebuilt and cargo - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ ~/prebuilt - ~/.cargo !~/prebuilt/exclude key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} - name: Package diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..c34ce04 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,14 @@ +name: "Mark and close stale issues" +on: + schedule: + - cron: "30 2 * * *" + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v7 + with: + stale-issue-message: "This issue was marked as stale due to lack of activity." + days-before-issue-stale: 90 + exempt-issue-labels: "do-not-stale" diff --git a/LICENSE b/LICENSE index a0c9228..bd62a19 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 xresloader +Copyright (c) 2023 xresloader Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index c777774..d52254a 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ You can use environment `RUST_LOG=` to control log level and `RUST_LOG_ST Example output: `./xresloader-dump-bin -p ./sample-conf/kind.pb -b ./sample-data/role_upgrade_cfg.bin` (Without `--pretty`) -``` +```bash ======================== Header: .\sample-data\role_upgrade_cfg.bin ======================== xresloader version: 2.8.0 data version: 2.8.0.20200609192757 diff --git a/src/exec/Cargo.toml b/src/exec/Cargo.toml index 2840373..cd8e072 100644 --- a/src/exec/Cargo.toml +++ b/src/exec/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xresloader-dump-bin" -version = "2.0.0" +version = "2.1.0" authors = ["owent "] license = "MIT" description = "A tool to dump human readable text from binary output of xresloader" @@ -22,5 +22,5 @@ bytes = { version = "1" } log = "0.*" env_logger = "0.*" json = "0.*" -clap = { version = "3", features = ["derive"] } +clap = { version = "4", features = ["derive"] } xresloader-protocol = { path = "../protocol" } diff --git a/src/protocol/Cargo.toml b/src/protocol/Cargo.toml index ff21c19..9c6af81 100644 --- a/src/protocol/Cargo.toml +++ b/src/protocol/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xresloader-protocol" -version = "2.0.0" +version = "2.1.0" authors = ["owent "] license = "MIT" description = "A tool to dump human readable text from binary output of xresloader" diff --git a/src/protocol/src/proto/pb_header_v3.rs b/src/protocol/src/proto/pb_header_v3.rs index 7c4f8b0..4281865 100644 --- a/src/protocol/src/proto/pb_header_v3.rs +++ b/src/protocol/src/proto/pb_header_v3.rs @@ -1,4 +1,4 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit +// This file is generated by rust-protobuf 3.2.0. Do not edit // .proto file is parsed by protoc 3.19.4 // @generated @@ -23,7 +23,7 @@ /// Generated files are compatible only with the same version /// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:org.xresloader.pb.xresloader_data_source) diff --git a/src/protocol/src/proto/xresloader.rs b/src/protocol/src/proto/xresloader.rs index 8443667..2dffdb1 100644 --- a/src/protocol/src/proto/xresloader.rs +++ b/src/protocol/src/proto/xresloader.rs @@ -1,4 +1,4 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit +// This file is generated by rust-protobuf 3.2.0. Do not edit // .proto file is parsed by protoc 3.19.4 // @generated @@ -23,7 +23,7 @@ /// Generated files are compatible only with the same version /// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; /// Extension fields pub mod exts { @@ -48,6 +48,8 @@ pub mod exts { pub const field_required: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(1015, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); + pub const field_origin_value: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::FieldOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(1016, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); + pub const oneof_description: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::OneofOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(1001, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); pub const oneof_separator: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::OneofOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(1002, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); @@ -75,14 +77,15 @@ static file_descriptor_proto_data: &'static [u8] = b"\ uf.FieldOptionsR\nfieldRatio:G\n\x0ffield_separator\x18\xf6\x07\x20\x01(\ \t\x12\x1d.google.protobuf.FieldOptionsR\x0efieldSeparator:E\n\x0efield_\ required\x18\xf7\x07\x20\x01(\x08\x12\x1d.google.protobuf.FieldOptionsR\ - \rfieldRequired:K\n\x11oneof_description\x18\xe9\x07\x20\x01(\t\x12\x1d.\ - google.protobuf.OneofOptionsR\x10oneofDescription:G\n\x0foneof_separator\ - \x18\xea\x07\x20\x01(\t\x12\x1d.google.protobuf.OneofOptionsR\x0eoneofSe\ - parator:H\n\x10enum_description\x18\xe9\x07\x20\x01(\t\x12\x1c.google.pr\ - otobuf.EnumOptionsR\x0fenumDescription:O\n\x11enumv_description\x18\xe9\ - \x07\x20\x01(\t\x12!.google.protobuf.EnumValueOptionsR\x10enumvDescripti\ - on:A\n\nenum_alias\x18\xea\x07\x20\x01(\t\x12!.google.protobuf.EnumValue\ - OptionsR\tenumAliasb\x06proto3\ + \rfieldRequired:L\n\x12field_origin_value\x18\xf8\x07\x20\x01(\t\x12\x1d\ + .google.protobuf.FieldOptionsR\x10fieldOriginValue:K\n\x11oneof_descript\ + ion\x18\xe9\x07\x20\x01(\t\x12\x1d.google.protobuf.OneofOptionsR\x10oneo\ + fDescription:G\n\x0foneof_separator\x18\xea\x07\x20\x01(\t\x12\x1d.googl\ + e.protobuf.OneofOptionsR\x0eoneofSeparator:H\n\x10enum_description\x18\ + \xe9\x07\x20\x01(\t\x12\x1c.google.protobuf.EnumOptionsR\x0fenumDescript\ + ion:O\n\x11enumv_description\x18\xe9\x07\x20\x01(\t\x12!.google.protobuf\ + .EnumValueOptionsR\x10enumvDescription:A\n\nenum_alias\x18\xea\x07\x20\ + \x01(\t\x12!.google.protobuf.EnumValueOptionsR\tenumAliasb\x06proto3\ "; /// `FileDescriptorProto` object which was a source for this generated file diff --git a/src/protocol/src/proto/xresloader_ue.rs b/src/protocol/src/proto/xresloader_ue.rs index 88aa838..6c0e59c 100644 --- a/src/protocol/src/proto/xresloader_ue.rs +++ b/src/protocol/src/proto/xresloader_ue.rs @@ -1,4 +1,4 @@ -// This file is generated by rust-protobuf 3.1.0. Do not edit +// This file is generated by rust-protobuf 3.2.0. Do not edit // .proto file is parsed by protoc 3.19.4 // @generated @@ -23,7 +23,65 @@ /// Generated files are compatible only with the same version /// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_1_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; + +#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] +// @@protoc_insertion_point(enum:org.xresloader.ue.loader_mode) +pub enum Loader_mode { + // @@protoc_insertion_point(enum_value:org.xresloader.ue.loader_mode.EN_LOADER_MODE_DEFAULT) + EN_LOADER_MODE_DEFAULT = 0, + // @@protoc_insertion_point(enum_value:org.xresloader.ue.loader_mode.EN_LOADER_MODE_ENABLE) + EN_LOADER_MODE_ENABLE = 1, + // @@protoc_insertion_point(enum_value:org.xresloader.ue.loader_mode.EN_LOADER_MODE_DISABLE) + EN_LOADER_MODE_DISABLE = 2, +} + +impl ::protobuf::Enum for Loader_mode { + const NAME: &'static str = "loader_mode"; + + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(Loader_mode::EN_LOADER_MODE_DEFAULT), + 1 => ::std::option::Option::Some(Loader_mode::EN_LOADER_MODE_ENABLE), + 2 => ::std::option::Option::Some(Loader_mode::EN_LOADER_MODE_DISABLE), + _ => ::std::option::Option::None + } + } + + const VALUES: &'static [Loader_mode] = &[ + Loader_mode::EN_LOADER_MODE_DEFAULT, + Loader_mode::EN_LOADER_MODE_ENABLE, + Loader_mode::EN_LOADER_MODE_DISABLE, + ]; +} + +impl ::protobuf::EnumFull for Loader_mode { + fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor { + static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new(); + descriptor.get(|| file_descriptor().enum_by_package_relative_name("loader_mode").unwrap()).clone() + } + + fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor { + let index = *self as usize; + Self::enum_descriptor().value_by_index(index) + } +} + +impl ::std::default::Default for Loader_mode { + fn default() -> Self { + Loader_mode::EN_LOADER_MODE_DEFAULT + } +} + +impl Loader_mode { + fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData { + ::protobuf::reflect::GeneratedEnumDescriptorData::new::("loader_mode") + } +} /// Extension fields pub mod exts { @@ -37,17 +95,27 @@ pub mod exts { pub const helper: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, ::std::string::String> = ::protobuf::ext::ExtFieldOptional::new(1101, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); pub const not_data_table: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, bool> = ::protobuf::ext::ExtFieldOptional::new(1102, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_BOOL); + + pub const default_loader: ::protobuf::ext::ExtFieldOptional<::protobuf::descriptor::MessageOptions, ::protobuf::EnumOrUnknown> = ::protobuf::ext::ExtFieldOptional::new(1103, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_ENUM); + + pub const include_header: ::protobuf::ext::ExtFieldRepeated<::protobuf::descriptor::MessageOptions, ::std::string::String> = ::protobuf::ext::ExtFieldRepeated::new(1104, ::protobuf::descriptor::field_descriptor_proto::Type::TYPE_STRING); } static file_descriptor_proto_data: &'static [u8] = b"\ \n\x13xresloader_ue.proto\x12\x11org.xresloader.ue\x1a\x20google/protobu\ - f/descriptor.proto:7\n\x07key_tag\x18\xcd\x08\x20\x01(\x03\x12\x1d.googl\ - e.protobuf.FieldOptionsR\x06keyTag:@\n\x0cue_type_name\x18\xce\x08\x20\ - \x01(\t\x12\x1d.google.protobuf.FieldOptionsR\nueTypeName:G\n\x10ue_type\ - _is_class\x18\xcf\x08\x20\x01(\x08\x12\x1d.google.protobuf.FieldOptionsR\ - \rueTypeIsClass:8\n\x06helper\x18\xcd\x08\x20\x01(\t\x12\x1f.google.prot\ - obuf.MessageOptionsR\x06helper:F\n\x0enot_data_table\x18\xce\x08\x20\x01\ - (\x08\x12\x1f.google.protobuf.MessageOptionsR\x0cnotDataTableb\x06proto3\ + f/descriptor.proto*`\n\x0bloader_mode\x12\x1a\n\x16EN_LOADER_MODE_DEFAUL\ + T\x10\0\x12\x19\n\x15EN_LOADER_MODE_ENABLE\x10\x01\x12\x1a\n\x16EN_LOADE\ + R_MODE_DISABLE\x10\x02:7\n\x07key_tag\x18\xcd\x08\x20\x01(\x03\x12\x1d.g\ + oogle.protobuf.FieldOptionsR\x06keyTag:@\n\x0cue_type_name\x18\xce\x08\ + \x20\x01(\t\x12\x1d.google.protobuf.FieldOptionsR\nueTypeName:G\n\x10ue_\ + type_is_class\x18\xcf\x08\x20\x01(\x08\x12\x1d.google.protobuf.FieldOpti\ + onsR\rueTypeIsClass:8\n\x06helper\x18\xcd\x08\x20\x01(\t\x12\x1f.google.\ + protobuf.MessageOptionsR\x06helper:F\n\x0enot_data_table\x18\xce\x08\x20\ + \x01(\x08\x12\x1f.google.protobuf.MessageOptionsR\x0cnotDataTable:g\n\ + \x0edefault_loader\x18\xcf\x08\x20\x01(\x0e2\x1e.org.xresloader.ue.loade\ + r_mode\x12\x1f.google.protobuf.MessageOptionsR\rdefaultLoader:G\n\x0einc\ + lude_header\x18\xd0\x08\x20\x03(\t\x12\x1f.google.protobuf.MessageOption\ + sR\rincludeHeaderb\x06proto3\ "; /// `FileDescriptorProto` object which was a source for this generated file @@ -67,7 +135,8 @@ pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { let mut deps = ::std::vec::Vec::with_capacity(1); deps.push(::protobuf::descriptor::file_descriptor().clone()); let mut messages = ::std::vec::Vec::with_capacity(0); - let mut enums = ::std::vec::Vec::with_capacity(0); + let mut enums = ::std::vec::Vec::with_capacity(1); + enums.push(Loader_mode::generated_enum_descriptor_data()); ::protobuf::reflect::GeneratedFileDescriptor::new_generated( file_descriptor_proto(), deps, diff --git a/third_party/xresloader-protocol b/third_party/xresloader-protocol index 10cbbdf..f3fc37a 160000 --- a/third_party/xresloader-protocol +++ b/third_party/xresloader-protocol @@ -1 +1 @@ -Subproject commit 10cbbdf50c571f6e2a05f3e768cd4e4f13f9e183 +Subproject commit f3fc37a2c3ec772e0b2b997ed890b3feba055126