Подпишитесь на наш Telegram-канал, чтобы всегда быть в курсе важных обновлений! Перейти

Вопрос Weird network messages logging

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
11 Фев 2023
Сообщения
167
Реакции
4
iam trying to get the network messages data logged
here is what i can see, what am i doing wrong here?
i know that there is protobuff type which can be csated to the message to get the message as formatted as the protobuff type am i right ?


Код:
Expand Collapse Copy
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 0000014692AF8B00
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 223 times
[NetworkFilter] GetSerializer() result: 0000014563D59780
[NetworkFilter] Message ID: 1
[NetworkFilter] Message Name: NetMessagePacketEnd [1073741825]
[NetworkFilter] Group Name: System
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0xFFFFFFFF
[NetworkFilter] Default Buffer Type: 64
[NetworkFilter] Protobuf Binding: 00007FFE3751B910
[NetworkFilter] GetPbMessage() result: 0000014692AF8B30
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] NetMessagePacketEnd [1073741825] [1]
{
    [Unknown message type - ID: 1, Name: NetMessagePacketEnd [1073741825]]
    [Message pointer: 0000014692AF8B30]
    raw_data_preview: 00 E1 4D 37 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 00000146932ABC70
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 224 times
[NetworkFilter] GetSerializer() result: 0000014563D59400
[NetworkFilter] Message ID: 0
[NetworkFilter] Message Name: NetMessagePacketStart [1073741824]
[NetworkFilter] Group Name: System
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0xFFFFFFFF
[NetworkFilter] Default Buffer Type: 64
[NetworkFilter] Protobuf Binding: 00007FFE3751B8B8
[NetworkFilter] GetPbMessage() result: 00000146932ABCA0
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] NetMessagePacketStart [1073741824] [0]
{
    [Unknown message type - ID: 0, Name: NetMessagePacketStart [1073741824]]
    [Message pointer: 00000146932ABCA0]
    raw_data_preview: 88 E7 4D 37 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 0000014513925600
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 225 times
[NetworkFilter] GetSerializer() result: 000001456FBA5A00
[NetworkFilter] Message ID: 4
[NetworkFilter] Message Name: CNETMsg_Tick [4]
[NetworkFilter] Group Name: Game Engine
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0x00000006
[NetworkFilter] Default Buffer Type: 0
[NetworkFilter] Protobuf Binding: 00007FFE47945EE8
[NetworkFilter] GetPbMessage() result: 0000014513925630
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] CNETMsg_Tick [4] [4]
{
    [Unknown message type - ID: 4, Name: CNETMsg_Tick [4]]
    [Message pointer: 0000014513925630]
    raw_data_preview: E8 1D 87 47 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 00000146956BE2C0
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 226 times
[NetworkFilter] GetSerializer() result: 000001457C5C9200
[NetworkFilter] Message ID: 55
[NetworkFilter] Message Name: CSVCMsg_PacketEntities [55]
[NetworkFilter] Group Name: Unknown
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0x00000002
[NetworkFilter] Default Buffer Type: 0
[NetworkFilter] Protobuf Binding: 00007FFE47945B90
[NetworkFilter] GetPbMessage() result: 00000146956BE2F0
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] CSVCMsg_PacketEntities [55] [55]
{
    [Unknown message type - ID: 55, Name: CSVCMsg_PacketEntities [55]]
    [Message pointer: 00000146956BE2F0]
    raw_data_preview: 68 70 86 47 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 00000146956ED320
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 227 times
[NetworkFilter] GetSerializer() result: 0000014563D59780
[NetworkFilter] Message ID: 1
[NetworkFilter] Message Name: NetMessagePacketEnd [1073741825]
[NetworkFilter] Group Name: System
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0xFFFFFFFF
[NetworkFilter] Default Buffer Type: 64
[NetworkFilter] Protobuf Binding: 00007FFE3751B910
[NetworkFilter] GetPbMessage() result: 00000146956ED350
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] NetMessagePacketEnd [1073741825] [1]
{
    [Unknown message type - ID: 1, Name: NetMessagePacketEnd [1073741825]]
    [Message pointer: 00000146956ED350]
    raw_data_preview: 00 E1 4D 37 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 00000146932AAD20
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 228 times
[NetworkFilter] GetSerializer() result: 0000014563D59400
[NetworkFilter] Message ID: 0
[NetworkFilter] Message Name: NetMessagePacketStart [1073741824]
[NetworkFilter] Group Name: System
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0xFFFFFFFF
[NetworkFilter] Default Buffer Type: 64
[NetworkFilter] Protobuf Binding: 00007FFE3751B8B8
[NetworkFilter] GetPbMessage() result: 00000146932AAD50
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] NetMessagePacketStart [1073741824] [0]
{
    [Unknown message type - ID: 0, Name: NetMessagePacketStart [1073741824]]
    [Message pointer: 00000146932AAD50]
    raw_data_preview: 88 E7 4D 37 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 0000014692215510
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 229 times
[NetworkFilter] GetSerializer() result: 000001457C62BF40
[NetworkFilter] Message ID: 522
[NetworkFilter] Message Name: CDOTAUserMsg_TE_UnitAnimationEnd [522]
[NetworkFilter] Group Name: User Messages
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0x00000006
[NetworkFilter] Default Buffer Type: 0
[NetworkFilter] Protobuf Binding: 00007FFE16D69560
[NetworkFilter] GetPbMessage() result: 0000014692215540
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] CDOTAUserMsg_TE_UnitAnimationEnd [522] [522]
{
    [Unknown message type - ID: 522, Name: CDOTAUserMsg_TE_UnitAnimationEnd [522]]
    [Message pointer: 0000014692215540]
    raw_data_preview: B0 0B 3E 15 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 0000014692AFBA30
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 230 times
[NetworkFilter] GetSerializer() result: 000001457C62BF40
[NetworkFilter] Message ID: 522
[NetworkFilter] Message Name: CDOTAUserMsg_TE_UnitAnimationEnd [522]
[NetworkFilter] Group Name: User Messages
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0x00000006
[NetworkFilter] Default Buffer Type: 0
[NetworkFilter] Protobuf Binding: 00007FFE16D69560
[NetworkFilter] GetPbMessage() result: 0000014692AFBA60
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] CDOTAUserMsg_TE_UnitAnimationEnd [522] [522]
{
    [Unknown message type - ID: 522, Name: CDOTAUserMsg_TE_UnitAnimationEnd [522]]
    [Message pointer: 0000014692AFBA60]
    raw_data_preview: B0 0B 3E 15 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 00000146955CA160
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 231 times
[NetworkFilter] GetSerializer() result: 000001458FFDC040
[NetworkFilter] Message ID: 520
[NetworkFilter] Message Name: CDOTAUserMsg_TE_DotaBloodImpact [520]
[NetworkFilter] Group Name: User Messages
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0x00000006
[NetworkFilter] Default Buffer Type: 0
[NetworkFilter] Protobuf Binding: 00007FFE16D694E0
[NetworkFilter] GetPbMessage() result: 00000146955CA190
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] CDOTAUserMsg_TE_DotaBloodImpact [520] [520]
{
    [Unknown message type - ID: 520, Name: CDOTAUserMsg_TE_DotaBloodImpact [520]]
    [Message pointer: 00000146955CA190]
    raw_data_preview: 90 FF 3D 15 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 00000145BB2F4120
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 232 times
[NetworkFilter] GetSerializer() result: 0000014590309B80
[NetworkFilter] Message ID: 208
[NetworkFilter] Message Name: CMsgSosStartSoundEvent [208]
[NetworkFilter] Group Name: Sounds
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0x00000006
[NetworkFilter] Default Buffer Type: 0
[NetworkFilter] Protobuf Binding: 00007FFE16D15648
[NetworkFilter] GetPbMessage() result: 00000145BB2F4150
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] CMsgSosStartSoundEvent [208] [208]
{
    [Unknown message type - ID: 208, Name: CMsgSosStartSoundEvent [208]]
    [Message pointer: 00000145BB2F4150]
    raw_data_preview: 98 EE 24 15 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 0000014694E0FD70
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 233 times
[NetworkFilter] GetSerializer() result: 0000014563D59780
[NetworkFilter] Message ID: 1
[NetworkFilter] Message Name: NetMessagePacketEnd [1073741825]
[NetworkFilter] Group Name: System
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0xFFFFFFFF
[NetworkFilter] Default Buffer Type: 64
[NetworkFilter] Protobuf Binding: 00007FFE3751B910
[NetworkFilter] GetPbMessage() result: 0000014694E0FDA0
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] NetMessagePacketEnd [1073741825] [1]
{
    [Unknown message type - ID: 1, Name: NetMessagePacketEnd [1073741825]]
    [Message pointer: 0000014694E0FDA0]
    raw_data_preview: 00 E1 4D 37 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 00000146956EF3A0
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 234 times
[NetworkFilter] GetSerializer() result: 0000014563D59400
[NetworkFilter] Message ID: 0
[NetworkFilter] Message Name: NetMessagePacketStart [1073741824]
[NetworkFilter] Group Name: System
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0xFFFFFFFF
[NetworkFilter] Default Buffer Type: 64
[NetworkFilter] Protobuf Binding: 00007FFE3751B8B8
[NetworkFilter] GetPbMessage() result: 00000146956EF3D0
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] NetMessagePacketStart [1073741824] [0]
{
    [Unknown message type - ID: 0, Name: NetMessagePacketStart [1073741824]]
    [Message pointer: 00000146956EF3D0]
    raw_data_preview: 88 E7 4D 37 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 0000014691AF6A80
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 235 times
[NetworkFilter] GetSerializer() result: 000001456FBA5A00
[NetworkFilter] Message ID: 4
[NetworkFilter] Message Name: CNETMsg_Tick [4]
[NetworkFilter] Group Name: Game Engine
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0x00000006
[NetworkFilter] Default Buffer Type: 0
[NetworkFilter] Protobuf Binding: 00007FFE47945EE8
[NetworkFilter] GetPbMessage() result: 0000014691AF6AB0
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] CNETMsg_Tick [4] [4]
{
    [Unknown message type - ID: 4, Name: CNETMsg_Tick [4]]
    [Message pointer: 0000014691AF6AB0]
    raw_data_preview: E8 1D 87 47 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 00000146956BE2C0
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 236 times
[NetworkFilter] GetSerializer() result: 000001457C5C9200
[NetworkFilter] Message ID: 55
[NetworkFilter] Message Name: CSVCMsg_PacketEntities [55]
[NetworkFilter] Group Name: Unknown
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0x00000002
[NetworkFilter] Default Buffer Type: 0
[NetworkFilter] Protobuf Binding: 00007FFE47945B90
[NetworkFilter] GetPbMessage() result: 00000146956BE2F0
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] CSVCMsg_PacketEntities [55] [55]
{
    [Unknown message type - ID: 55, Name: CSVCMsg_PacketEntities [55]]
    [Message pointer: 00000146956BE2F0]
    raw_data_preview: 68 70 86 47 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 0000014694DB3540
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 237 times
[NetworkFilter] GetSerializer() result: 0000014563D59780
[NetworkFilter] Message ID: 1
[NetworkFilter] Message Name: NetMessagePacketEnd [1073741825]
[NetworkFilter] Group Name: System
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0xFFFFFFFF
[NetworkFilter] Default Buffer Type: 64
[NetworkFilter] Protobuf Binding: 00007FFE3751B910
[NetworkFilter] GetPbMessage() result: 0000014694DB3570
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] NetMessagePacketEnd [1073741825] [1]
{
    [Unknown message type - ID: 1, Name: NetMessagePacketEnd [1073741825]]
    [Message pointer: 0000014694DB3570]
    raw_data_preview: 00 E1 4D 37 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 00000146932AB310
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 238 times
[NetworkFilter] GetSerializer() result: 0000014563D59400
[NetworkFilter] Message ID: 0
[NetworkFilter] Message Name: NetMessagePacketStart [1073741824]
[NetworkFilter] Group Name: System
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0xFFFFFFFF
[NetworkFilter] Default Buffer Type: 64
[NetworkFilter] Protobuf Binding: 00007FFE3751B8B8
[NetworkFilter] GetPbMessage() result: 00000146932AB340
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] NetMessagePacketStart [1073741824] [0]
{
    [Unknown message type - ID: 0, Name: NetMessagePacketStart [1073741824]]
    [Message pointer: 00000146932AB340]
    raw_data_preview: 88 E7 4D 37 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 0000014691B35030
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 239 times
[NetworkFilter] GetSerializer() result: 000001457C62BF80
[NetworkFilter] Message ID: 521
[NetworkFilter] Message Name: CDOTAUserMsg_TE_UnitAnimation [521]
[NetworkFilter] Group Name: User Messages
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0x00000006
[NetworkFilter] Default Buffer Type: 0
[NetworkFilter] Protobuf Binding: 00007FFE16D69530
[NetworkFilter] GetPbMessage() result: 0000014691B35060
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] CDOTAUserMsg_TE_UnitAnimation [521] [521]
{
    [Unknown message type - ID: 521, Name: CDOTAUserMsg_TE_UnitAnimation [521]]
    [Message pointer: 0000014691B35060]
    raw_data_preview: 80 07 3E 15 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 0000014694C33680
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 240 times
[NetworkFilter] GetSerializer() result: 000001458FFDC000
[NetworkFilter] Message ID: 518
[NetworkFilter] Message Name: CDOTAUserMsg_TE_Projectile [518]
[NetworkFilter] Group Name: User Messages
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0x00000006
[NetworkFilter] Default Buffer Type: 0
[NetworkFilter] Protobuf Binding: 00007FFE16D69490
[NetworkFilter] GetPbMessage() result: 0000014694C336B0
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] CDOTAUserMsg_TE_Projectile [518] [518]
{
    [Unknown message type - ID: 518, Name: CDOTAUserMsg_TE_Projectile [518]]
    [Message pointer: 0000014694C336B0]
    raw_data_preview: E0 F7 3D 15 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 00000145BB2F4120
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 241 times
[NetworkFilter] GetSerializer() result: 000001457C62BF80
[NetworkFilter] Message ID: 521
[NetworkFilter] Message Name: CDOTAUserMsg_TE_UnitAnimation [521]
[NetworkFilter] Group Name: User Messages
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0x00000006
[NetworkFilter] Default Buffer Type: 0
[NetworkFilter] Protobuf Binding: 00007FFE16D69530
[NetworkFilter] GetPbMessage() result: 00000145BB2F4150
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] CDOTAUserMsg_TE_UnitAnimation [521] [521]
{
    [Unknown message type - ID: 521, Name: CDOTAUserMsg_TE_UnitAnimation [521]]
    [Message pointer: 00000145BB2F4150]
    raw_data_preview: 80 07 3E 15 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 00000146956D0B00
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 242 times
[NetworkFilter] GetSerializer() result: 0000014563D59780
[NetworkFilter] Message ID: 1
[NetworkFilter] Message Name: NetMessagePacketEnd [1073741825]
[NetworkFilter] Group Name: System
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0xFFFFFFFF
[NetworkFilter] Default Buffer Type: 64
[NetworkFilter] Protobuf Binding: 00007FFE3751B910
[NetworkFilter] GetPbMessage() result: 00000146956D0B30
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] NetMessagePacketEnd [1073741825] [1]
{
    [Unknown message type - ID: 1, Name: NetMessagePacketEnd [1073741825]]
    [Message pointer: 00000146956D0B30]
    raw_data_preview: 00 E1 4D 37 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
[NetworkFilter] ===== MESSAGE INTERCEPTED =====
[NetworkFilter] Message pointer: 0000014692AF86F0
[NetworkFilter] Channel pointer: 0000014539D8B5C0
[NetworkFilter] Filter called 243 times
[NetworkFilter] GetSerializer() result: 0000014563D59400
[NetworkFilter] Message ID: 0
[NetworkFilter] Message Name: NetMessagePacketStart [1073741824]
[NetworkFilter] Group Name: System
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0xFFFFFFFF
[NetworkFilter] Default Buffer Type: 64
[NetworkFilter] Protobuf Binding: 00007FFE3751B8B8
[NetworkFilter] GetPbMessage() result: 0000014692AF8720
[NetworkFilter] Protobuf message found - displaying structured data...
[Networking] NetMessagePacketStart [1073741824] [0]
{
    [Unknown message type - ID: 0, Name: NetMessagePacketStart [1073741824]]
    [Message pointer: 0000014692AF8720]
    raw_data_preview: 88 E7 4D 37 FE 7F 00 00 00 00 00 00 00 00 00 00
}
[NetworkFilter] ===== END MESSAGE =====
 
C++:
Expand Collapse Copy
std::string MessageToJson(const google::protobuf::Message& msg,
    std::optional<google::protobuf::util::JsonPrintOptions> const& opt_override = {})
{
    std::string MessageDump{};
    google::protobuf::util::JsonPrintOptions opt{};
    if (opt_override.has_value())
    {
        opt = opt_override.value();
    }
    else
    {
        opt.add_whitespace = true;
        opt.always_print_enums_as_ints = false;
        opt.always_print_primitive_fields = true;
        opt.preserve_proto_field_names = true;
    }
    google::protobuf::util::MessageToJsonString(msg, &MessageDump, opt);
    return MessageDump;
}
...
if (const auto pb = msg->GetPbMessage(); pb)
{
    cout_line(MessageToJson(*pb));
}
 
this protobuff shit is pain of my existence

iam sorry about this question but just to make sure i have downloaded this .proto files
Пожалуйста, авторизуйтесь для просмотра ссылки.
{FILENAME} and using the protoc.exe for version 3.19.4 is that correct ?
and this protobuf-cpp-3.19.4.zip ( and used the cmake to generate the libprotobuf.lib


because iam currently getting this error while compiling the project
#error: This file was generated by a newer version of protoc
even ur
Пожалуйста, авторизуйтесь для просмотра ссылки.
repo is not compiling at all ( it used to compile just fine )

Here are the posts I followed:
-https://yougame.biz/threads/285292/
-https://yougame.biz/threads/321117/#post-3279785
-https://yougame.biz/threads/245652/#post-2552951
 
Последнее редактирование:
this protobuff shit is pain of my existence

iam sorry about this question but just to make sure i have downloaded this .proto files
Пожалуйста, авторизуйтесь для просмотра ссылки.
{FILENAME} and using the protoc.exe for version 3.19.4 is that correct ?
and this protobuf-cpp-3.19.4.zip ( and used the cmake to generate the libprotobuf.lib


because iam currently getting this error while compiling the project
#error: This file was generated by a newer version of protoc
even ur
Пожалуйста, авторизуйтесь для просмотра ссылки.
repo is not compiling at all ( it used to compile just fine )

Here are the posts I followed:
-https://yougame.biz/threads/285292/
-https://yougame.biz/threads/321117/#post-3279785
-https://yougame.biz/threads/245652/#post-2552951
just https://yougame.biz/threads/321117/#post-3279785 is enough
mind the version!!! it's not 3.19.4 or whatever
see the post it even has links
the short version is:
1) dota uses 3.21.8(you need to use the same version if you need binary compatibility/interoperability - such as using dota2's in-memory message structures directly(and not just serialized messages))
2) you need the same protoc & libprotobuf versions
3) .proto files are basically meaningless textual garbage and they can't be used as-is - they're just .txt files; they describe "conceptual" layout of the message
4) you compile that textual garbage(using protoc) into actual C++ structures that define the in-memory layout of the message and serialization/deserialization helper functions. these structures internally still use some libprotobuf stuff, so you're going to need it too
(then you add those generated C++ files to your project)
5) you link against libprotobuf to allow for serialization/deserialization of messages and to allow those C++ structures to compile(they are generated by protoc in such a way that they depend on libprotobuf)
6) now you can serialize/deserialize pb messages as well as use their in-memory representations
7) messages can either be serialized(a bunch of "neutral" bytes to be sent over the network), or as in-memory structures(with pointers etc, not neutral and can't be sent over the network). google::protobuf::Message is the in-memory structure(the base type, at least), and when it's serialized it's just an array of bytes. serialization is the process of turning an in-memory structure(with non-neutral data that only your computer can understand - you can't send that over the network) into a neutral representation that can be understood by others(then you send it over the network, or store to disk, etc.). deserialization turns neutral data into an in-memory structure. netchan filter already receives deserialized in-memory messages, so you don't have to worry about serialization/deserialization - but libprotobuf already implements both, so if you needed to, you could do it without any extra effort. also, btw, that "MessageToJson" is also a form of serialization, just not to protobuf wire format but rather to JSON(you had an in-memory structure with a bunch of pointers and shit(they represent locations in YOUR memory - and I, for example, can't understand those pointers since I'm on a different PC and have different data in my RAM, obviously), then you turn that into something neutral(encoding the characters of the strings themselves, rather than just pointers that don't mean anything to someone else, and possibly encoding the layout(such as field names) of your message) that is easily understood/readable by others)
the point is, you need libprotobuf for a bunch of helper functions/structures, and protoc to compile textual-garbage-.proto-files into actual C++ structures
 
i have built the protobuffs now and it is working (i guess)

but when i try to get the MessageToJson

C++:
Expand Collapse Copy
pbMsg = msg->GetPbMessage();
        if (pbMsg) {
            Logger::LogInfo("[NetworkFilter] SUCCESS: Got deserialized protobuf message for message #%d\n", messageCount);
            
            // Check if this is a lite message (which doesn't support reflection)
            const google::protobuf::Descriptor* descriptor = nullptr;
            try {
                descriptor = pbMsg->GetDescriptor();
            }
            catch (...) {
                Logger::LogInfo("[NetworkFilter] WARNING: Exception in GetDescriptor() for message #%d\n", messageCount);
                descriptor = nullptr;
            }
            
            if (!descriptor) {
                Logger::LogInfo("[NetworkFilter] WARNING: Lite protobuf message detected for message #%d (no reflection support)\n", messageCount);
                protobufText = "Lite protobuf message - reflection not supported";
            } else {
                // This is a full protobuf message with reflection support
                Logger::LogInfo("[NetworkFilter] SUCCESS: Full protobuf message with reflection for message #%d\n", messageCount);
                
                try {
                    // Use MessageToJson with comprehensive safety checks
                    protobufText = MessageToJson(*pbMsg);
                    Logger::LogInfo("[NetworkFilter] SUCCESS: MessageToJson() for message #%d\n", messageCount);
                    Logger::LogInfo("[NetworkFilter] JSON Content: %s\n", protobufText.c_str());
                    
                    // Try to extract specific fields like chat messages
                    if (messageId == 394) { // Chat message ID
                        Logger::LogInfo("[NetworkFilter] CHAT MESSAGE DETECTED (ID 394)!\n");
                        Logger::LogInfo("[NetworkFilter] Full JSON: %s\n", protobufText.c_str());
                        
                        // Look for message_text field in JSON
                        const auto s_pos = protobufText.find("\"message_text\":");
                        if (s_pos != std::string::npos) {
                            const auto start_pos = protobufText.find("\"", s_pos + 14);
                            if (start_pos != std::string::npos) {
                                const auto end_pos = protobufText.find("\"", start_pos + 1);
                                if (end_pos != std::string::npos) {
                                    std::string chatMessage = protobufText.substr(start_pos + 1, end_pos - start_pos - 1);
                                    Logger::LogInfo("[NetworkFilter] CHAT MESSAGE TEXT: %s\n", chatMessage.c_str());
                                }
                            }
                        }
                    }
                }
                catch (const std::exception& e) {
                    protobufText = "MessageToJson() failed: " + std::string(e.what());
                    Logger::LogInfo("[NetworkFilter] ERROR: MessageToJson() exception for message #%d: %s\n", messageCount, e.what());
                }
                catch (...) {
                    protobufText = "MessageToJson() failed: Unknown exception";
                    Logger::LogInfo("[NetworkFilter] ERROR: Unknown exception in MessageToJson() for message #%d\n", messageCount);
                }
            }
        } else {
            Logger::LogInfo("[NetworkFilter] WARNING: GetPbMessage() returned null for message #%d\n", messageCount);
        }

C++:
Expand Collapse Copy
std::string MessageToJson(const google::protobuf::Message& msg,
    std::optional<google::protobuf::util::JsonPrintOptions> const& opt_override = {})
{
    try {
        // Check if this is a lite message (which doesn't support reflection)
        const google::protobuf::Descriptor* descriptor = nullptr;
        try {
            descriptor = msg.GetDescriptor();
        }
        catch (...) {
            return "Lite protobuf message - reflection not supported";
        }
       
        if (!descriptor) {
            return "Lite protobuf message - reflection not supported";
        }
       
        std::string MessageDump{};
        google::protobuf::util::JsonPrintOptions opt{};
       
        if (opt_override.has_value())
        {
            opt = opt_override.value();
        }
        else
        {
            opt.add_whitespace = true;
            opt.always_print_enums_as_ints = false;
            // opt.always_print_primitive_fields = true; // Not available in this protobuf version
            opt.preserve_proto_field_names = true;
        }
       
        using namespace google::protobuf::util;
        auto status = MessageToJsonString(msg, &MessageDump, opt);
        if (!status.ok()) {
            return "Error converting to JSON: " + std::string(status.message());
        }
        return MessageDump;
    }
    catch (const std::exception& e) {
        return "Exception in MessageToJson: " + std::string(e.what());
    }
    catch (...) {
        return "Unknown exception in MessageToJson";
    }
}

iam getting instant crash like
this
Код:
Expand Collapse Copy
NetworkFilter] ===== MESSAGE #1 INTERCEPTED =====
[NetworkFilter] Message Name: NetMessagePacketStart [1073741824]
[NetworkFilter] Group Name: System
[NetworkFilter] Message ID: 0
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0xFFFFFFFF
[NetworkFilter] Buffer Type: 64
[NetworkFilter] ===== END MESSAGE #1 =====
[NetworkFilter] SUCCESS: Got deserialized protobuf message for message #1
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
F0000 00:00:1755850948.512184 29888 message_lite.h:475] Check failed: !is_lite
*** Check failure stack trace: ***
    @00007FFAE13234FD (unknown)
    @00007FFAE1323586 (unknown)
    @00007FFAE1322E88 (unknown)
    @00007FFAE1323894 (unknown)
    @00007FFADE433F43 (unknown)
    @00007FFADE987338 (unknown)
    @00007FFADE41C289 (unknown)
    @00007FFAE5ED72DF (unknown)
    @00007FFAECA1E1D5 (unknown)
    @00007FFAECA5408A (unknown)
    @00007FFAF6F07919 (unknown)
    @00007FFAF70740B7 (unknown)
    @00007FFAF6EE9C7F (unknown)
    @00007FFAF70CA7D1 (unknown)
    @00007FFAF70C5F5E (unknown)
    @00007FFAF70AFC56 (unknown)
    @00007FFAF70A805D (unknown)
    @00007FFAF70A9286 (unknown)
    @00007FFAF70AC0BF (unknown)
    @00007FF780BC4BE0 (unknown)
    @00007FF780BCE8DE (unknown)
    @00007FFBB220E8D7 (unknown)
    @00007FFBB309C34C (unknown)[/CODE ]

[ATTACH type="full" size="507x381"]313867[/ATTACH]
 

Вложения

  • 1755851404580.png
    1755851404580.png
    24.8 KB · Просмотры: 21
Последнее редактирование:
i have built the protobuffs now and it is working (i guess)

but when i try to get the MessageToJson

C++:
Expand Collapse Copy
pbMsg = msg->GetPbMessage();
        if (pbMsg) {
            Logger::LogInfo("[NetworkFilter] SUCCESS: Got deserialized protobuf message for message #%d\n", messageCount);
           
            // Check if this is a lite message (which doesn't support reflection)
            const google::protobuf::Descriptor* descriptor = nullptr;
            try {
                descriptor = pbMsg->GetDescriptor();
            }
            catch (...) {
                Logger::LogInfo("[NetworkFilter] WARNING: Exception in GetDescriptor() for message #%d\n", messageCount);
                descriptor = nullptr;
            }
           
            if (!descriptor) {
                Logger::LogInfo("[NetworkFilter] WARNING: Lite protobuf message detected for message #%d (no reflection support)\n", messageCount);
                protobufText = "Lite protobuf message - reflection not supported";
            } else {
                // This is a full protobuf message with reflection support
                Logger::LogInfo("[NetworkFilter] SUCCESS: Full protobuf message with reflection for message #%d\n", messageCount);
               
                try {
                    // Use MessageToJson with comprehensive safety checks
                    protobufText = MessageToJson(*pbMsg);
                    Logger::LogInfo("[NetworkFilter] SUCCESS: MessageToJson() for message #%d\n", messageCount);
                    Logger::LogInfo("[NetworkFilter] JSON Content: %s\n", protobufText.c_str());
                   
                    // Try to extract specific fields like chat messages
                    if (messageId == 394) { // Chat message ID
                        Logger::LogInfo("[NetworkFilter] CHAT MESSAGE DETECTED (ID 394)!\n");
                        Logger::LogInfo("[NetworkFilter] Full JSON: %s\n", protobufText.c_str());
                       
                        // Look for message_text field in JSON
                        const auto s_pos = protobufText.find("\"message_text\":");
                        if (s_pos != std::string::npos) {
                            const auto start_pos = protobufText.find("\"", s_pos + 14);
                            if (start_pos != std::string::npos) {
                                const auto end_pos = protobufText.find("\"", start_pos + 1);
                                if (end_pos != std::string::npos) {
                                    std::string chatMessage = protobufText.substr(start_pos + 1, end_pos - start_pos - 1);
                                    Logger::LogInfo("[NetworkFilter] CHAT MESSAGE TEXT: %s\n", chatMessage.c_str());
                                }
                            }
                        }
                    }
                }
                catch (const std::exception& e) {
                    protobufText = "MessageToJson() failed: " + std::string(e.what());
                    Logger::LogInfo("[NetworkFilter] ERROR: MessageToJson() exception for message #%d: %s\n", messageCount, e.what());
                }
                catch (...) {
                    protobufText = "MessageToJson() failed: Unknown exception";
                    Logger::LogInfo("[NetworkFilter] ERROR: Unknown exception in MessageToJson() for message #%d\n", messageCount);
                }
            }
        } else {
            Logger::LogInfo("[NetworkFilter] WARNING: GetPbMessage() returned null for message #%d\n", messageCount);
        }

C++:
Expand Collapse Copy
std::string MessageToJson(const google::protobuf::Message& msg,
    std::optional<google::protobuf::util::JsonPrintOptions> const& opt_override = {})
{
    try {
        // Check if this is a lite message (which doesn't support reflection)
        const google::protobuf::Descriptor* descriptor = nullptr;
        try {
            descriptor = msg.GetDescriptor();
        }
        catch (...) {
            return "Lite protobuf message - reflection not supported";
        }
      
        if (!descriptor) {
            return "Lite protobuf message - reflection not supported";
        }
      
        std::string MessageDump{};
        google::protobuf::util::JsonPrintOptions opt{};
      
        if (opt_override.has_value())
        {
            opt = opt_override.value();
        }
        else
        {
            opt.add_whitespace = true;
            opt.always_print_enums_as_ints = false;
            // opt.always_print_primitive_fields = true; // Not available in this protobuf version
            opt.preserve_proto_field_names = true;
        }
      
        using namespace google::protobuf::util;
        auto status = MessageToJsonString(msg, &MessageDump, opt);
        if (!status.ok()) {
            return "Error converting to JSON: " + std::string(status.message());
        }
        return MessageDump;
    }
    catch (const std::exception& e) {
        return "Exception in MessageToJson: " + std::string(e.what());
    }
    catch (...) {
        return "Unknown exception in MessageToJson";
    }
}

iam getting instant crash like
this
Код:
Expand Collapse Copy
NetworkFilter] ===== MESSAGE #1 INTERCEPTED =====
[NetworkFilter] Message Name: NetMessagePacketStart [1073741824]
[NetworkFilter] Group Name: System
[NetworkFilter] Message ID: 0
[NetworkFilter] Group ID: 0
[NetworkFilter] Category Mask: 0xFFFFFFFF
[NetworkFilter] Buffer Type: 64
[NetworkFilter] ===== END MESSAGE #1 =====
[NetworkFilter] SUCCESS: Got deserialized protobuf message for message #1
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
F0000 00:00:1755850948.512184 29888 message_lite.h:475] Check failed: !is_lite
*** Check failure stack trace: ***
    @00007FFAE13234FD (unknown)
    @00007FFAE1323586 (unknown)
    @00007FFAE1322E88 (unknown)
    @00007FFAE1323894 (unknown)
    @00007FFADE433F43 (unknown)
    @00007FFADE987338 (unknown)
    @00007FFADE41C289 (unknown)
    @00007FFAE5ED72DF (unknown)
    @00007FFAECA1E1D5 (unknown)
    @00007FFAECA5408A (unknown)
    @00007FFAF6F07919 (unknown)
    @00007FFAF70740B7 (unknown)
    @00007FFAF6EE9C7F (unknown)
    @00007FFAF70CA7D1 (unknown)
    @00007FFAF70C5F5E (unknown)
    @00007FFAF70AFC56 (unknown)
    @00007FFAF70A805D (unknown)
    @00007FFAF70A9286 (unknown)
    @00007FFAF70AC0BF (unknown)
    @00007FF780BC4BE0 (unknown)
    @00007FF780BCE8DE (unknown)
    @00007FFBB220E8D7 (unknown)
    @00007FFBB309C34C (unknown)[/CODE ]

[ATTACH type="full" size="507x381"]313867[/ATTACH]
// opt.always_print_primitive_fields = true; // Not available in this protobuf version
Пожалуйста, авторизуйтесь для просмотра ссылки.
double check that you have 3.21.8
also wtf is this const auto s_pos = protobufText.find("\"message_text\":");
first of all this is not how you parse JSON(it's a context-free grammar and you need a PDA to parse it - not regexes and certainly not your shit). in general, if you ever need to parse something - then get a proper library... grammar is a lot more complicated than you think, especially with nested/balanced(opening/closing brackets, etc.) structures/symbols
second, you do realize you can just downcast the in-memory structure to the specific message type(after you check the id) and get your data directly from there? why do you think you even compiled the .proto files? that JSON stuff is there just for debug printing purposes, not for you to deserialize it(you already have a deserialized message!!!)
also 394 is for the outcoming chat message(the one you send when you hit enter)
you want 612(CDOTAUserMsg_ChatMessage)
Код:
Expand Collapse Copy
send msg id 394 CDOTAClientMsg_ChatMessage [394] @ 1755855982690564
{
 "channel_type": 12,
 "message_text": "shit"
}

recv msg id 612 CDOTAUserMsg_ChatMessage [612] @ 1755855982717643
{
 "source_player_id": 1,
 "channel_type": 12,
 "message_text": "shit"
}
C++:
Expand Collapse Copy
if (ser->messageID == 612)
{
    CDOTAUserMsg_ChatMessage* cm = static_cast<CDOTAUserMsg_ChatMessage*>(msg->GetPbMessage());
    if (cm->has_message_text())
    {
        cm->message_text();
        ...
 
as usual dude u are the best < 3

i was using protobuf 3.21.8, the compiler is still finding the older vcpkg protobuf headers that don't have always_print_primitive_fields .

so i removed it completely

1 more question please how can i send messages ?
 
as usual dude u are the best < 3

i was using protobuf 3.21.8, the compiler is still finding the older vcpkg protobuf headers that don't have always_print_primitive_fields .

so i removed it completely

1 more question please how can i send messages ?
it's easier to just invoke in-game functions/wrappers that send those messages, rather than directly constructing and sending messages yourself.
place a breakpoint at SendNetMessage(set a condition that the channel is the clientside one), do something that will cause the message to be sent by the game, and then just reverse engineer up the call stack from there. you can find SendNetMessage by xref "CNetChan::SendNetMessage: Trying to send message %s, which is an invalid category for this channel!\n"
also you should only invoke game functions from the main thread.
 
dude there is something new happened yesterday , iam unable to get the message_text anymore it keeps telling me error reading characters of string

1756557680389.png

1756557768029.png

but the other messages are retrived successfully

1756558176655.png
 
Последнее редактирование:
dude there is something new happened yesterday , iam unable to get the message_text anymore it keeps telling me error reading characters of string

Посмотреть вложение 314580
Посмотреть вложение 314581
but the other messages are retrived successfully

Посмотреть вложение 314582
can't reproduce, everything works fine. debug your stuff. also this "error reading characters of the string" is probably because the variable isn't even constructed yet(don't forget that your messageText is NOT the message text. it's your own variable, to which you copy the actual message text. you're making a copy. and that copy hasn't been fully constructed yet)
 
do i need the libprotoc.dll , libprotobuf.dll and libprotobufd.dll files to be placed in my dota2.exe folder ?

if yes i need to know how can i get them
first of all, protoc is the .proto file compiler that turns .txt(.proto) garbage into .h + .cc files; you don't need it for anything else
second, libprotobuf is the actual library that contains serialization/deserialization/in-memory message helpers/arenas/etc. - you need it for google::protobuf::Message and everything related to it
third, C/C++ linkers(and everything else that uses them internally) allow static and dynamic linking(or a mix of both) - i.e. you can either directly embed a library's code into your executable(thus your executable will have a bigger filesize and will be more self-contained), or load that code at runtime from a separate file(by loading dll's); also you can have fully manual linking(LoadLibraryA/W(or GetModuleHandleA/W) + GetProcAddress etc. - what you're doing when you're calling the game functions is actually a form of manual linking) (no linker support - you're responsible for managing everything yourself)
fourth, *d.dll is usually the debug version(with all kinds of debugging features enabled/no code optimization(for easier debugging) etc.)(the d stands for debug)
if you want dynamic linking(i.e. you want dlls to be placed in the search path) - then compile libprotobuf in dynamic library mode(read libprotobuf's docs)
if you want static linking(no dlls, everything self-contained), see https://yougame.biz/threads/321117/#post-3279785
learn the C(++) build process and how it works
you feed source files(.cpp, .cc, .c) to the compiler, it outputs .obj(or .o) files, those can be packaged into .lib(or .a) archives - you then feed all .obj/.o and .lib/.a files to the linker and it produces an executable(PE/ELF/Mach-O); the linker is also responsible for non-manual dynamic imports(since those are a feature of the executable formats and the system's executable loader)
there are also build systems(ninja, make, msbuild) and generators of scripts for these systems(such as CMake) - MSBuild is a build system(the .vcxproj files are MSBuild scripts).
 
ok my libprotobuf.lib and libprotobufd.lib are incorrect while i have already built them from the
Пожалуйста, авторизуйтесь для просмотра ссылки.
cmake here is my full ps1 script


protobuf.ps1:
Expand Collapse Copy
param (
    [string]$projectDir = (Get-Location).Path
)

$ErrorActionPreference = "Stop"

Write-Host "==== Starting Comprehensive Protobuf Setup ====" -ForegroundColor Green

# ===== PART 1: DOWNLOAD AND COMPILE PROTO FILES (from download-compile.ps1) =====
Write-Host "`n==== PART 1: Setting up Protobuf Tools and Proto Files ====" -ForegroundColor Yellow

# Set temp working directory
$workdir = $env:TEMP

# Define necessary subdirectories
$protobufSrcDir = Join-Path $projectDir "protobuf\src"
$protoMsgProtoDir = Join-Path $projectDir "protobuf\msg\proto"
$compiledDir = Join-Path $projectDir "protobuf\msg\compiled"

# Create directories if they don't exist
New-Item -Path $protobufSrcDir -ItemType Directory -Force | Out-Null
New-Item -Path $protoMsgProtoDir -ItemType Directory -Force | Out-Null
New-Item -Path $compiledDir -ItemType Directory -Force | Out-Null

Write-Host "Downloading protobuf C++ source code..."
# Download protobuf C++ source code
$protobufUrl = "https://github.com/protocolbuffers/protobuf/releases/download/v21.8/protobuf-cpp-3.21.8.zip"
$protobufZip = Join-Path $workdir "protobuf-cpp-3.21.8.zip"
Invoke-WebRequest -Uri $protobufUrl -OutFile $protobufZip

# Extract protobuf zip
Expand-Archive -Path $protobufZip -DestinationPath (Join-Path $workdir "protobuf-cpp-3.21.8") -Force

# Copy protobuf source files to your project directory
Copy-Item -Path (Join-Path $workdir "protobuf-cpp-3.21.8\protobuf-3.21.8\src\*") -Destination $protobufSrcDir -Recurse -Force

Write-Host "Downloading latest Dota 2 proto files from SteamDB..."
# Download latest Dota 2 proto files from SteamDB
$protoUrl = "https://github.com/SteamDatabase/Protobufs/archive/refs/heads/master.zip"
$protoZip = Join-Path $workdir "Protobufs-master.zip"
Invoke-WebRequest -Uri $protoUrl -OutFile $protoZip

# Extract proto zip
Expand-Archive -Path $protoZip -DestinationPath (Join-Path $workdir "Protobufs-master") -Force

# Copy Dota 2 proto files to project directory
Copy-Item -Path (Join-Path $workdir "Protobufs-master\Protobufs-master\dota2\*") -Destination $protoMsgProtoDir -Recurse -Force

Write-Host "Downloading protoc compiler..."
# Download protoc compiler
$protocUrl = "https://github.com/protocolbuffers/protobuf/releases/download/v21.8/protoc-21.8-win64.zip"
$protocZip = Join-Path $workdir "protoc-21.8-win64.zip"
Invoke-WebRequest -Uri $protocUrl -OutFile $protocZip

# Extract protoc zip
Expand-Archive -Path $protocZip -DestinationPath (Join-Path $workdir "protoc-21.8-win64") -Force

Write-Host "Compiling .proto files to C++..."
# Compile each .proto file to C++
$protocExe = Join-Path $workdir "protoc-21.8-win64\bin\protoc.exe"
$protoFiles = Get-ChildItem -Path $protoMsgProtoDir -Filter *.proto
foreach ($protoFile in $protoFiles) {
    & $protocExe --proto_path=$protoMsgProtoDir --cpp_out=$compiledDir $protoFile.FullName
}

Write-Host "Part 1 completed: Protobuf and Dota2 messages are set up in: $projectDir" -ForegroundColor Green

# ===== PART 2: BUILD PROTOBUF LIBRARIES (from full.ps1) =====
Write-Host "`n==== PART 2: Building Protobuf Libraaries ====" -ForegroundColor Yellow

# Paths for library building
$zipUrl = "https://github.com/protocolbuffers/protobuf/releases/download/v21.8/protobuf-cpp-3.21.8.zip"
$zipPath = Join-Path $projectDir "protobuf-cpp-3.21.8.zip"
$extractDir = Join-Path $projectDir "protobuf-cpp-3.21.8"
$protobufSrcDir = Join-Path $extractDir "protobuf-3.21.8"
$buildDir = Join-Path $protobufSrcDir "build"
$builtLibDir = Join-Path $projectDir "built-lib"

# Ensure projectDir exists
if (!(Test-Path $projectDir)) {
    New-Item -ItemType Directory -Path $projectDir | Out-Null
}

Write-Host "==== Step 1: Downloading Protobuf v21.8 ===="
Invoke-WebRequest -Uri $zipUrl -OutFile $zipPath -UseBasicParsing

Write-Host "==== Step 2: Extracting Archive ===="
if (Test-Path $extractDir) {
    Remove-Item -Recurse -Force $extractDir
}
Expand-Archive -Path $zipPath -DestinationPath $extractDir

Write-Host "==== Step 3: Locating Visual Studio ===="
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
if (!(Test-Path $vswhere)) {
    throw "vswhere.exe not found. Please install Visual Studio Installer."
}

$vsInstallPath = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath

if (-not $vsInstallPath) {
    throw "No suitable Visual Studio installation found."
}

$vsTools = Join-Path $vsInstallPath "Common7\Tools\VsDevCmd.bat"
if (!(Test-Path $vsTools)) {
    throw "VsDevCmd.bat not found inside $vsInstallPath"
}

Write-Host " → Found Visual Studio at: $vsInstallPath"
Write-Host " → Using Developer Command Prompt: $vsTools"

# Pick generator based on version
$vsVersion = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property catalog_productLineVersion
if ($vsVersion -eq "2022") {
    $generator = "Visual Studio 17 2022"
} elseif ($vsVersion -eq "2019") {
    $generator = "Visual Studio 16 2019"
} else {
    $generator = "Visual Studio 17 2022"
    Write-Warning "Unknown VS version ($vsVersion). Defaulting to $generator"
}

# Run commands inside Developer Command Prompt
function Invoke-DevCmd {
    param([string]$command)
    & cmd /c "`"$vsTools`" && $command"
    if ($LASTEXITCODE -ne 0) {
        throw "Command failed: $command"
    }
}

Write-Host "==== Step 4: Configuring CMake Build ===="
if (Test-Path $buildDir) {
    Remove-Item -Recurse -Force $buildDir
}
New-Item -ItemType Directory -Path $buildDir | Out-Null

Invoke-DevCmd "cd /d `"$buildDir`" && cmake -G `"$generator`" `"$protobufSrcDir`""

$vcxprojPath = Join-Path $buildDir "libprotobuf.vcxproj"

Write-Host "==== Step 5: Building Release ===="
Invoke-DevCmd "msbuild `"$vcxprojPath`" /p:Configuration=Release /p:Platform=x64"

Write-Host "==== Step 6: Building Debug ===="
Invoke-DevCmd "msbuild `"$vcxprojPath`" /p:Configuration=Debug /p:Platform=x64"

Write-Host "==== Step 7: Copying Built .lib and .pdb Files ===="
if (!(Test-Path $builtLibDir)) {
    New-Item -ItemType Directory -Path $builtLibDir | Out-Null
}

$releaseLibs = Get-ChildItem -Path (Join-Path $buildDir "Release") -Filter "*.lib" -Recurse
$debugLibs = Get-ChildItem -Path (Join-Path $buildDir "Debug") -Filter "*.lib" -Recurse
$releasePdbs = Get-ChildItem -Path (Join-Path $buildDir "Release") -Filter "*.pdb" -Recurse
$debugPdbs = Get-ChildItem -Path (Join-Path $buildDir "Debug") -Filter "*.pdb" -Recurse

foreach ($lib in $releaseLibs) {
    Copy-Item $lib.FullName -Destination $builtLibDir -Force
    Write-Host "Copied: $($lib.Name)"
}

foreach ($lib in $debugLibs) {
    Copy-Item $lib.FullName -Destination $builtLibDir -Force
    Write-Host "Copied: $($lib.Name)"
}

foreach ($pdb in $releasePdbs) {
    Copy-Item $pdb.FullName -Destination $builtLibDir -Force
    Write-Host "Copied: $($pdb.Name)"
}

foreach ($pdb in $debugPdbs) {
    Copy-Item $pdb.FullName -Destination $builtLibDir -Force
    Write-Host "Copied: $($pdb.Name)"
}

Write-Host "`n==== COMPREHENSIVE SETUP COMPLETED SUCCESSFULLY! ====" -ForegroundColor Green
Write-Host "`nSummary of what was created:" -ForegroundColor Cyan
Write-Host "• Protobuf source files: $protobufSrcDir" -ForegroundColor White
Write-Host "• Dota 2 proto files: $protoMsgProtoDir" -ForegroundColor White
Write-Host "• Compiled C++ files: $compiledDir" -ForegroundColor White
Write-Host "• Built libraries (.lib + .pdb): $builtLibDir" -ForegroundColor White
Write-Host "`nYou can now use the protobuf libraries and compiled message files in your C++ projects!" -ForegroundColor Yellow
[/CODE ]


protoc version is :  3.21.8
 
Последнее редактирование:
ok my libprotobuf.lib and libprotobufd.lib are incorrect while i have already built them from the
Пожалуйста, авторизуйтесь для просмотра ссылки.
cmake here is my full ps1 script


protobuf.ps1:
Expand Collapse Copy
param (
    [string]$projectDir = (Get-Location).Path
)

$ErrorActionPreference = "Stop"

Write-Host "==== Starting Comprehensive Protobuf Setup ====" -ForegroundColor Green

# ===== PART 1: DOWNLOAD AND COMPILE PROTO FILES (from download-compile.ps1) =====
Write-Host "`n==== PART 1: Setting up Protobuf Tools and Proto Files ====" -ForegroundColor Yellow

# Set temp working directory
$workdir = $env:TEMP

# Define necessary subdirectories
$protobufSrcDir = Join-Path $projectDir "protobuf\src"
$protoMsgProtoDir = Join-Path $projectDir "protobuf\msg\proto"
$compiledDir = Join-Path $projectDir "protobuf\msg\compiled"

# Create directories if they don't exist
New-Item -Path $protobufSrcDir -ItemType Directory -Force | Out-Null
New-Item -Path $protoMsgProtoDir -ItemType Directory -Force | Out-Null
New-Item -Path $compiledDir -ItemType Directory -Force | Out-Null

Write-Host "Downloading protobuf C++ source code..."
# Download protobuf C++ source code
$protobufUrl = "https://github.com/protocolbuffers/protobuf/releases/download/v21.8/protobuf-cpp-3.21.8.zip"
$protobufZip = Join-Path $workdir "protobuf-cpp-3.21.8.zip"
Invoke-WebRequest -Uri $protobufUrl -OutFile $protobufZip

# Extract protobuf zip
Expand-Archive -Path $protobufZip -DestinationPath (Join-Path $workdir "protobuf-cpp-3.21.8") -Force

# Copy protobuf source files to your project directory
Copy-Item -Path (Join-Path $workdir "protobuf-cpp-3.21.8\protobuf-3.21.8\src\*") -Destination $protobufSrcDir -Recurse -Force

Write-Host "Downloading latest Dota 2 proto files from SteamDB..."
# Download latest Dota 2 proto files from SteamDB
$protoUrl = "https://github.com/SteamDatabase/Protobufs/archive/refs/heads/master.zip"
$protoZip = Join-Path $workdir "Protobufs-master.zip"
Invoke-WebRequest -Uri $protoUrl -OutFile $protoZip

# Extract proto zip
Expand-Archive -Path $protoZip -DestinationPath (Join-Path $workdir "Protobufs-master") -Force

# Copy Dota 2 proto files to project directory
Copy-Item -Path (Join-Path $workdir "Protobufs-master\Protobufs-master\dota2\*") -Destination $protoMsgProtoDir -Recurse -Force

Write-Host "Downloading protoc compiler..."
# Download protoc compiler
$protocUrl = "https://github.com/protocolbuffers/protobuf/releases/download/v21.8/protoc-21.8-win64.zip"
$protocZip = Join-Path $workdir "protoc-21.8-win64.zip"
Invoke-WebRequest -Uri $protocUrl -OutFile $protocZip

# Extract protoc zip
Expand-Archive -Path $protocZip -DestinationPath (Join-Path $workdir "protoc-21.8-win64") -Force

Write-Host "Compiling .proto files to C++..."
# Compile each .proto file to C++
$protocExe = Join-Path $workdir "protoc-21.8-win64\bin\protoc.exe"
$protoFiles = Get-ChildItem -Path $protoMsgProtoDir -Filter *.proto
foreach ($protoFile in $protoFiles) {
    & $protocExe --proto_path=$protoMsgProtoDir --cpp_out=$compiledDir $protoFile.FullName
}

Write-Host "Part 1 completed: Protobuf and Dota2 messages are set up in: $projectDir" -ForegroundColor Green

# ===== PART 2: BUILD PROTOBUF LIBRARIES (from full.ps1) =====
Write-Host "`n==== PART 2: Building Protobuf Libraaries ====" -ForegroundColor Yellow

# Paths for library building
$zipUrl = "https://github.com/protocolbuffers/protobuf/releases/download/v21.8/protobuf-cpp-3.21.8.zip"
$zipPath = Join-Path $projectDir "protobuf-cpp-3.21.8.zip"
$extractDir = Join-Path $projectDir "protobuf-cpp-3.21.8"
$protobufSrcDir = Join-Path $extractDir "protobuf-3.21.8"
$buildDir = Join-Path $protobufSrcDir "build"
$builtLibDir = Join-Path $projectDir "built-lib"

# Ensure projectDir exists
if (!(Test-Path $projectDir)) {
    New-Item -ItemType Directory -Path $projectDir | Out-Null
}

Write-Host "==== Step 1: Downloading Protobuf v21.8 ===="
Invoke-WebRequest -Uri $zipUrl -OutFile $zipPath -UseBasicParsing

Write-Host "==== Step 2: Extracting Archive ===="
if (Test-Path $extractDir) {
    Remove-Item -Recurse -Force $extractDir
}
Expand-Archive -Path $zipPath -DestinationPath $extractDir

Write-Host "==== Step 3: Locating Visual Studio ===="
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
if (!(Test-Path $vswhere)) {
    throw "vswhere.exe not found. Please install Visual Studio Installer."
}

$vsInstallPath = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath

if (-not $vsInstallPath) {
    throw "No suitable Visual Studio installation found."
}

$vsTools = Join-Path $vsInstallPath "Common7\Tools\VsDevCmd.bat"
if (!(Test-Path $vsTools)) {
    throw "VsDevCmd.bat not found inside $vsInstallPath"
}

Write-Host " → Found Visual Studio at: $vsInstallPath"
Write-Host " → Using Developer Command Prompt: $vsTools"

# Pick generator based on version
$vsVersion = & $vswhere -latest -products * -requires Microsoft.Component.MSBuild -property catalog_productLineVersion
if ($vsVersion -eq "2022") {
    $generator = "Visual Studio 17 2022"
} elseif ($vsVersion -eq "2019") {
    $generator = "Visual Studio 16 2019"
} else {
    $generator = "Visual Studio 17 2022"
    Write-Warning "Unknown VS version ($vsVersion). Defaulting to $generator"
}

# Run commands inside Developer Command Prompt
function Invoke-DevCmd {
    param([string]$command)
    & cmd /c "`"$vsTools`" && $command"
    if ($LASTEXITCODE -ne 0) {
        throw "Command failed: $command"
    }
}

Write-Host "==== Step 4: Configuring CMake Build ===="
if (Test-Path $buildDir) {
    Remove-Item -Recurse -Force $buildDir
}
New-Item -ItemType Directory -Path $buildDir | Out-Null

Invoke-DevCmd "cd /d `"$buildDir`" && cmake -G `"$generator`" `"$protobufSrcDir`""

$vcxprojPath = Join-Path $buildDir "libprotobuf.vcxproj"

Write-Host "==== Step 5: Building Release ===="
Invoke-DevCmd "msbuild `"$vcxprojPath`" /p:Configuration=Release /p:Platform=x64"

Write-Host "==== Step 6: Building Debug ===="
Invoke-DevCmd "msbuild `"$vcxprojPath`" /p:Configuration=Debug /p:Platform=x64"

Write-Host "==== Step 7: Copying Built .lib and .pdb Files ===="
if (!(Test-Path $builtLibDir)) {
    New-Item -ItemType Directory -Path $builtLibDir | Out-Null
}

$releaseLibs = Get-ChildItem -Path (Join-Path $buildDir "Release") -Filter "*.lib" -Recurse
$debugLibs = Get-ChildItem -Path (Join-Path $buildDir "Debug") -Filter "*.lib" -Recurse
$releasePdbs = Get-ChildItem -Path (Join-Path $buildDir "Release") -Filter "*.pdb" -Recurse
$debugPdbs = Get-ChildItem -Path (Join-Path $buildDir "Debug") -Filter "*.pdb" -Recurse

foreach ($lib in $releaseLibs) {
    Copy-Item $lib.FullName -Destination $builtLibDir -Force
    Write-Host "Copied: $($lib.Name)"
}

foreach ($lib in $debugLibs) {
    Copy-Item $lib.FullName -Destination $builtLibDir -Force
    Write-Host "Copied: $($lib.Name)"
}

foreach ($pdb in $releasePdbs) {
    Copy-Item $pdb.FullName -Destination $builtLibDir -Force
    Write-Host "Copied: $($pdb.Name)"
}

foreach ($pdb in $debugPdbs) {
    Copy-Item $pdb.FullName -Destination $builtLibDir -Force
    Write-Host "Copied: $($pdb.Name)"
}

Write-Host "`n==== COMPREHENSIVE SETUP COMPLETED SUCCESSFULLY! ====" -ForegroundColor Green
Write-Host "`nSummary of what was created:" -ForegroundColor Cyan
Write-Host "• Protobuf source files: $protobufSrcDir" -ForegroundColor White
Write-Host "• Dota 2 proto files: $protoMsgProtoDir" -ForegroundColor White
Write-Host "• Compiled C++ files: $compiledDir" -ForegroundColor White
Write-Host "• Built libraries (.lib + .pdb): $builtLibDir" -ForegroundColor White
Write-Host "`nYou can now use the protobuf libraries and compiled message files in your C++ projects!" -ForegroundColor Yellow
[/CODE ]


protoc version is :  3.21.8
you can just build from visual studio(instead of running msbuild) after you generate msbuild scripts(.vcxproj) with cmake
.lib/.a files are tricky - they're just archives of .obj/.o files, dynamic linking won't just magically work out of the box just because you're using an archive - you also need dllimport/dllexport(or similar) attributes on the functions themselves(then .obj/.o files will contain export stubs instead of actual code and the linker will figure out the rest) - most projects have a preprocessor flag or something for this - read the docs
Пожалуйста, авторизуйтесь для просмотра ссылки.
or just link statically why tf do you need dynamic linking?
compile the code yourself, either directly in your project, or pre-compile it in another project(libprotobuf.vcxproj) and put it into an archive(.lib), then provide that archive to the linker
 
Последнее редактирование:
i dont depend on dynamic links i currently dont know how to get the .lib files and iam not good with visual studio builds
you get the .lib files by compiling libprotobuf yourself in a separate project(cmake generates .vcxproj files, you open them in visual studio, where you can change project settings if needed and compile) - this should probably be the default configuration, even - read the docs anyway; make sure that you're linking the CRT the same way as you're linking it in your project
or you can just directly build .obj files in your project on demand with the rest of your source files instead of pre-compiling them and packaging them into an archive, as I have linked a million times already
Код:
Expand Collapse Copy
build-system.add-external-include-directory "$MyProjectDir/protobuf/src"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/any.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/any.pb.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/any_lite.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/api.pb.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/arena.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/arenastring.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/arenaz_sampler.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/compiler/importer.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/compiler/parser.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/descriptor.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/descriptor.pb.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/descriptor_database.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/duration.pb.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/dynamic_message.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/empty.pb.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/extension_set.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/extension_set_heavy.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/field_mask.pb.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/generated_enum_util.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/generated_message_bases.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/generated_message_reflection.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/generated_message_tctable_full.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/generated_message_tctable_lite.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/generated_message_util.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/implicit_weak_message.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/inlined_string_field.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/io/coded_stream.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/io/gzip_stream.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/io/io_win32.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/io/printer.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/io/strtod.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/io/tokenizer.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/io/zero_copy_stream.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/map.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/map_field.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/message.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/message_lite.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/parse_context.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/reflection_ops.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/repeated_field.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/repeated_ptr_field.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/service.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/source_context.pb.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/struct.pb.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/stubs/bytestream.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/stubs/common.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/stubs/int128.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/stubs/status.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/stubs/statusor.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/stubs/stringpiece.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/stubs/stringprintf.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/stubs/structurally_valid.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/stubs/strutil.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/stubs/substitute.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/stubs/time.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/text_format.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/timestamp.pb.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/type.pb.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/unknown_field_set.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/delimited_message_util.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/field_comparator.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/field_mask_util.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/internal/datapiece.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/internal/error_listener.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/internal/field_mask_utility.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/internal/json_escaping.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/internal/json_objectwriter.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/internal/json_stream_parser.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/internal/object_writer.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/internal/proto_writer.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/internal/protostream_objectsource.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/internal/protostream_objectwriter.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/internal/type_info.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/internal/utility.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/json_util.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/message_differencer.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/time_util.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/util/type_resolver_util.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/wire_format.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/wire_format_lite.cc"
build-system.add-source "$MyProjectDir/protobuf/src/google/protobuf/wrappers.pb.cc"
for msbuild it's as simple as clicking "add existing item" to source files in solution explorer, or editing the .vcxproj file(it's xml); the external include directories(for headers) are under VC++ directories in project settings
again, learn the C(++) build process and how to use visual studio - it's a gui program, you're not on linux...
 
Назад
Сверху Снизу