Skip to content

Compilation ko KR

ArchiBot edited this page Apr 4, 2024 · 41 revisions

컴파일

μ»΄νŒŒμΌμ€ μ‹€ν–‰κ°€λŠ₯ν•œ νŒŒμΌμ„ λ§Œλ“œλŠ” κ³Όμ •μž…λ‹ˆλ‹€. λ§Œμ•½ ASF에 μžμ‹ μ΄ λ§Œλ“  변경사항을 μΆ”κ°€ν•˜κ³  μ‹Άκ±°λ‚˜ 곡식 릴리슀 μ—μ„œ μ œκ³΅ν•˜λŠ” μ‹€ν–‰νŒŒμΌμ„ 무슨 μ΄μœ μ—μ„œκ±΄ μ‹ λ’°ν•˜μ§€ μ•ŠλŠ” 경우 ν•˜κ²Œ λ©λ‹ˆλ‹€. λ§Œμ•½ 당신이 κ°œλ°œμžκ°€ μ•„λ‹ˆλΌ μ‚¬μš©μžλΌλ©΄ λŒ€λΆ€λΆ„ 이미 컴파일된 λ°”μ΄λ„ˆλ¦¬λ₯Ό μ‚¬μš©ν•˜κΈΈ μ›ν• κ²λ‹ˆλ‹€. ν•˜μ§€λ§Œ μžμ‹ λ§Œμ˜ λ°”μ΄λ„ˆλ¦¬λ₯Ό μ‚¬μš©ν•˜κ³  μ‹Άκ±°λ‚˜ λ­”κ°€ μƒˆλ‘œμš΄ 것을 배우고 μ‹Άλ‹€λ©΄ 계속 μ½μœΌμ‹œκΈ° λ°”λžλ‹ˆλ‹€.

ASFλŠ” ν•„μš”λ‘œ ν•˜λŠ” 도ꡬλ₯Ό λͺ¨λ‘ κ°€μ§€κ³ λ§Œ μžˆλ‹€λ©΄ ν˜„μž¬ μ§€μ›λ˜λŠ” μ–΄λ– ν•œ ν”Œλž«νΌμ—μ„œλ„ 컴파일 될 수 μžˆμŠ΅λ‹ˆλ‹€.


.NET SDK

Regardless of platform, you need full .NET SDK (not just runtime) in order to compile ASF. Installation instructions can be found on .NET download page. You need to install appropriate .NET SDK version for your OS. 성곡적인 μ„€μΉ˜ 후에 dotnet λͺ…령이 μž‘λ™ν•˜κ³  μ‹€ν–‰λ˜μ–΄μ•Ό ν•©λ‹ˆλ‹€. dotnet --info 둜 μž‘λ™ μ—¬λΆ€λ₯Ό 확인할 수 μžˆμŠ΅λ‹ˆλ‹€. Also ensure that your .NET SDK matches ASF runtime requirements.


컴파일

Assuming you have .NET SDK operative and in appropriate version, simply navigate to source ASF directory (cloned or downloaded and unpacked ASF repo) and execute:

dotnet publish ArchiSteamFarm -c "Release" -o "out/generic"

If you're using Linux/macOS, you can instead use cc.sh script which will do the same, in a bit more complex manner.

컴파일이 μ„±κ³΅μ μœΌλ‘œ λλ‚˜λ©΄ out/generic 디렉토리에 μ†ŒμŠ€ λ§›μœΌλ‘œ 된 ASFκ°€ μžˆμŠ΅λ‹ˆλ‹€. 이것은 곡식 일반 ASF λΉŒλ“œλ„ λ™μΌν•˜μ§€λ§Œ, 자체 λΉŒλ“œμ— μ ν•©ν•˜λ„λ‘ UpdateChannelκ³Ό UpdatePeriod이 0 κ°’μœΌλ‘œ λ˜μ–΄μžˆλ‹€λŠ” 점만 λ‹€λ¦…λ‹ˆλ‹€.

OS νŠΉν™”

You can also generate OS-specific .NET package if you have a specific need. In general you shouldn't do that because you've just compiled generic flavour that you can run with your already-installed .NET runtime that you've used for the compilation in the first place, but just in case you want to:

dotnet publish ArchiSteamFarm -c "Release" -o "out/linux-x64" -r "linux-x64" --self-contained

λ¬Όλ‘  λŒ€μƒμœΌλ‘œ ν•˜λŠ” OS 아킀텍쳐에 따라 linux-x64λ₯Ό win-x64 λ“±μœΌλ‘œ λ³€κ²½ν•˜μ‹­μ‹œμ˜€. 이 λΉŒλ“œλ„ μ—…λ°μ΄νŠΈκ°€ λΉ„ν™œμ„±ν™”λ©λ‹ˆλ‹€. When building --self-contained you can also optionally declare two more switches: -p:PublishTrimmed=true will produce trimmed build, while -p:PublishSingleFile=true will produce a single file. Adding both will result in the same settings we use for our own builds.

ASF-ui

While the above steps are everything that is required to have a fully working build of ASF, you may also be interested in building ASF-ui, our graphical web interface. From ASF side, all you need to do is dropping ASF-ui build output in standard ASF-ui/dist location, then building ASF with it (again, if needed).

ASF-ui is part of ASF's source tree as a git submodule, ensure that you've cloned the repo with git clone --recursive, as otherwise you'll not have the required files. You'll also need a working NPM, Node.js comes with it. If you're using Linux/macOS, we recommend our cc.sh script, which will automatically cover building and shipping ASF-ui (if possible, that is, if you're meeting the requirements we've just mentioned).

In addition to the cc.sh script, we also attach the simplified build instructions below, refer to ASF-ui repo for additional documentation. From ASF's source tree location, so as above, execute the following commands:

rm -rf "ASF-ui/dist" # ASF-ui doesn't clean itself after old build

npm ci --prefix ASF-ui
npm run-script deploy --prefix ASF-ui

rm -rf "out/generic/www" # Ensure that our build output is clean of the old files
dotnet publish ArchiSteamFarm -c "Release" -o "out/generic" # Or accordingly to what you need as per the above

You should now be able to find the ASF-ui files in your out/generic/www folder. ASF will be able to serve those files to your browser.

Alternatively, you can simply build ASF-ui, whether manually or with the help of our repo, then copy the build output over to ${OUT}/www folder manually, where ${OUT} is the output folder of ASF that you've specified with -o parameter. This is exactly what ASF is doing as part of the build process, it copies ASF-ui/dist (if exists) over to ${OUT}/www, nothing fancy.


개발

If you'd like to edit ASF code, you can use any .NET compatible IDE for that purpose, although even that is optional, since you can as well edit with a notepad and compile with dotnet command described above.

For Windows we recommend latest Visual Studio (free community version is more than enough). Alternatively you can use latest Visual Studio Code.

If you'd like to work with ASF code on Linux/macOS instead, we recommend latest Visual Studio Code. κ³ μ „ Visual Studio만큼 ν’μ‘±ν•˜μ§„ μ•Šμ§€λ§Œ, μΆ©λΆ„νžˆ μ’‹μŠ΅λ‹ˆλ‹€.

λ¬Όλ‘  μœ„μ˜ λͺ¨λ“  μ œμ•ˆμ€ 단지 ꢌμž₯사항일 뿐이고, 당신은 μ›ν•˜λŠ” λͺ¨λ“  것을 μ‚¬μš©ν•  수 μžˆμ§€λ§Œ, κ²°κ΅­ dotnet build λͺ…λ ΉμœΌλ‘œ κ·€κ²°λ©λ‹ˆλ‹€. We use JetBrains Rider for ASF development, although it's not a free solution.


νƒœκ·Έ

main branch is not guaranteed to be in a state that allows successful compilation or flawless ASF execution in the first place, since it's development branch just like stated in our release cycle. ASFλ₯Ό μ†ŒμŠ€μ—μ„œ μ»΄νŒŒμΌν•˜κ±°λ‚˜ μ°Έμ‘°ν•˜λ €λ©΄ λͺ©μ μ— λ§žλŠ” μ μ ˆν•œ νƒœκ·Έ λ₯Ό μ‚¬μš©ν•΄μ•Ό ν•©λ‹ˆλ‹€. μ΄λŠ” μ΅œμ†Œν•œ 성곡적인 μ»΄νŒŒμΌμ„ 보μž₯ν•˜κ³ , μ•ˆμ • 릴리슀둜 ν‘œμ‹œλœ λΉŒλ“œλŠ” 거의 ν μ—†λŠ” 싀행도 κ°€λŠ₯ν•©λ‹ˆλ‹€. In order to check the current "health" of the tree, you can use our CI - GitHub.


곡식 릴리슀

Official ASF releases are compiled by GitHub, with latest .NET SDK that matches ASF runtime requirements. After passing tests, all packages are deployed as the release, also on GitHub. This also guarantees transparency, since GitHub always uses official public source for all builds, and you can compare checksums of GitHub artifacts with GitHub release assets. ASF κ°œλ°œμžλŠ” 개인 κ°œλ°œκ³Όμ •κ³Ό 디버깅을 μ œμ™Έν•˜κ³ λŠ” 슀슀둜 μ»΄νŒŒμΌν•˜κ±°λ‚˜ λΉŒλ“œλ₯Ό κ²Œμ‹œν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

In addition to the above, ASF maintainers manually validate and publish build checksums on independent from GitHub, remote ASF server, as additional security measure. This step is mandatory for existing ASFs to consider the release as a valid candidate for auto-update functionality.

Clone this wiki locally