๐Ÿ™‡โ€โ™€๏ธPacketGenerator4

PacketFormat์„ ์ž๋™์œผ๋กœ DummyClient.GenPackets, Server.GenPackets์— ๋„ฃ์–ด์ฃผ๊ธฐ

PDL์„ ์ˆ˜์ •ํ•˜๊ณ  PacketGenerator๋ฅผ ์‹คํ–‰ํ•˜๋ฉด GenPackets๋“ค์ด ์ž๋™์œผ๋กœ ๋ณ€ํ™”๋˜๋Š”๋ฒ•!

๐Ÿช์ฐจ๊ทผ์ฐจ๊ทผ

PacketGenerator์— string pdlPath = "PDL.xml"; ์ถ”๊ฐ€

ํ”„๋กœ๊ทธ๋žจ์ด ์‹คํ–‰ํ• ๋• ์ธ์ž๋กœ ๋ญ”๊ฐ€๋ฅผ ๋„˜๊ฒจ์คฌ๋‹ค๋ฉด ํŒŒ์‹ฑํ•ด์„œ pdlPath์— ๋„ฃ๊ธฐ

  • if (arg.Length >= 1) pdlPath = args[0];

PDL์„ ์ˆ˜์ •ํ•˜๊ณ  PacketGenerator๋ฅผ ์‹คํ–‰ํ•˜๋ฉด GenPackets๋“ค์ด ์ž๋™์œผ๋กœ ๋ณ€ํ™”๋˜๋Š”๋ฒ•!

  • GenPackets.bat๋ผ๋Š” ๋ฐฐ์น˜ํŒŒ์ผ์„ ์ƒ์„ฑ
    • ๋ฐฐ์น˜ ํŒŒ์ผ์€ ์œˆ๋„์šฐ์—์„œ ์ œ๊ณตํ•˜๋Š” ๋ช…๋ น์–ด๋“ค์„ ์ž‘์„ฑํ•ด์„œ ํ•œ๋ฒˆ์— ์‹คํ–‰๋˜๊ฒŒ ํ•˜๋Š” ๊ฒƒ
    • PacketGenerator.exeํŒŒ์ผ์„ ํด๋ฆญํ•˜๋Š” ์ž‘์—…์„ ๋Œ€์‹ ํ•ด์ฃผ๊ณ  ์‹ถ์Œ
  • START ../../PacketGenerator/bin/PacketGenerator.exe ../../PacketGenerator/PDL.xml ์ž…๋ ฅ
    • ๋ฐฐ์น˜ํŒŒ์ผ์˜ ์œ„์น˜์—์„œ PacketGenerator.exeํŒŒ์ผ์˜ ์œ„์น˜๋กœ ์„ค์ •ํ•˜๊ณ  ์ฝ์„ PDL.xml์œ„์น˜๋ฅผ ์„ค์ •
    • ์ฒซ์ธ์ž๋กœ ๋„ฃ์–ด์ค€ ../../PacketGenerator/PDL.xml์ด ์‹ค์ œ๋กœ ํ”„๋กœ๊ทธ๋žจ์ด ์‹คํ–‰๋  ๋•Œ ๋ฉ”์ธ์— args์— ๋“ค์–ด๊ฐ€๊ฒŒ ๋จ!
    • ๊ทธ๋ž˜์„œ args[0]์ด ../../PacketGenerator/PDL.xml๊ฐ€ ๋˜๋ฉฐ pdlPath์— ๋“ค์–ด๊ฐ
  • DummyCient์˜ Packet, Server์˜ Packetํด๋”์•ˆ์— GenPackets.cs ํŒŒ์ผ๋กœ ๋„ฃ๊ธฐ
    • XCOPY /Y GenPackets.cs "../../DummyClient/Packet" ์ž…๋ ฅ
    • XCOPY /Y GenPackets.cs "../../Server/Packet" ์ž…๋ ฅ
      • XCOPY๋Š” ๋ณต์‚ฌํ•œ๋‹ค๋Š” ๋œป
      • /Y๋Š” ๊ฐ™์€ ์ด๋ฆ„์˜ ํŒŒ์ผ์ด ์žˆ์œผ๋ฉด ๋ฎ์–ด์“ด๋‹ค
      • ๋งŒ๋“ค ํŒŒ์ผ์˜ ์œ„์น˜๋ฅผ โ€œโ€ ๋กœ ๊ฐ์‹ธ์ค˜์•ผ ํ•จ

๋ฐฐ์น˜ ํŒŒ์ผ์„ ์ด์šฉํ•ด exeํŒŒ์ผ์„ ํด๋ฆญํ•ด์ฃผ์–ด์„œ GenPackets.csํŒŒ์ผ์„ ์ƒ์„ฑ ์ƒ์„ฑ๋œ ํŒŒ์ผ์„ ๋ณต์‚ฌํ•ด ์›ํ•˜๋Š” ์œ„์น˜์— ๊ฐ๊ฐ ๋„ฃ์–ด์คŒ

๐Ÿช์ถœ๋ ฅ ๊ฒฝ๋กœ ๋ฐ”๊พธ๊ธฐ

์†์„ฑ -> ๋นŒ๋“œ -> ๊ตฌ์„ฑ : ๋ชจ๋“  ๊ตฌ์„ฑ

์ถœ๋ ฅ ๊ฒฝ๋กœ์— ํด๋”์„ค์ •

=> netcoreapp3.1์ด๋ž€ ํด๋”๋กœ ์ƒ์„ฑ๋จ (ํด๋”์ด๋ฆ„์€ ๋ฐ”๋€” ์ˆ˜ ์žˆ์Œ)

  • ํด๋” ์ œ๊ฑฐ ๋ฐฉ๋ฒ•

ํŒŒ์ผํƒ์ƒ‰๊ธฐ์—์„œ ํด๋” ์—ด๊ธฐ -> PacketGenerator.csprojํŒŒ์ผ ์—ด๊ธฐ(๋ฉ”๋ชจ์žฅ) <PropertyGroup> </PropertyGroup> ์‚ฌ์ด์— <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> ์ถ”๊ฐ€

ํƒœ๊ทธ:

์นดํ…Œ๊ณ ๋ฆฌ:

์—…๋ฐ์ดํŠธ: