-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Compilation zh HK
็ทจ่ญฏๆฏๅตๅปบๅฏๅท่กๆช็้็จใ ๅฆๆๆจๆณๅฐ่ชๅทฑ็ๆดๆนๆทปๅ ๅฐASF๏ผๆ่ ๅบๆผไปปไฝๅๅ ไธไฟกไปปๅฎๆน releases ไธญๆไพ็ๅฏๅท่กๆช๏ผๅ้่ฆๅท่กๆญคๆไฝใ ๅฆๆๆจๆฏๆฎ้็จๆถ่ไธๆฏ้็ผไบบๅก๏ผๅๅพๅฏ่ฝ้่ฆไฝฟ็จๅทฒ้ ็ทจ่ญฏ็ไบ้ฒไฝๆชๆก๏ผไฝๅฆๆๆจๅธๆไฝฟ็จ่ชๅทฑ็ไบ้ฒไฝๆชๆก๏ผๆๅญธ็ฟๆฐๅ งๅฎน๏ผ่ซ็นผ็บ้ฑ่ฎใ
ๅช่ฆๆจๆๆๆๆ้่ฆ็ๅทฅๅ ท๏ผ ๅณๅฏไปฅๅจ็ถๅๆฏๆด็ไปปไฝๅนณๅฐไธ็ทจ่ญฏASFใ
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
ๅฝไปคๆๅฏๆญฃๅธธ้่กใ ๆจๅฏไปฅ้ฉ่ญๅฎๆฏๅฆ้ฉ็จไบ < 0>dotnet-info</0 >ใ 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" -f "net6.0" -o "out/generic"
ๅฆๆๆจๅจไฝฟ็จ Linux/OS X๏ผๆจไนๅฏไปฅไฝฟ็จ cc.sh
่
ณๆฌๅฏฆ็พๅๆจฃ็ๆๆ๏ผๆญค็จฎ็ทจ่ญฏๆนๆณๆนๅผ็จ่ค้ใ
If compilation ended successfully, you can find your ASF in source
flavour in out/generic
directory. This is the same as official generic
ASF build, but it has forced UpdateChannel
and UpdatePeriod
of 0
, which is appropriate for self-builds.
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" -f "net6.0" -o "out/linux-x64" -r "linux-x64"
็ถ็ถ๏ผๆจ้่ฆๅฐ linux-x64
ๆฟๆๆๆจ้่ฆ็็ฎๆจๆไฝ็ณป็ตฑๆถๆง๏ผไพๅฆ win-x64
ใ ้ไธๆงๅปบไนๅฐ็ฆ็จ่ชๅๆดๆฐใ
In a very rare case when you'd want to build generic-netf
package, you can change target framework from net6.0
to net48
. Keep in mind that you'll need appropriate .NET Framework developer pack for compiling netf
variant, in addition to .NET SDK, so the below will work only on Windows:
dotnet publish ArchiSteamFarm -c "Release" -f "net48" -o "out/generic-netf"
In case of being unable to install .NET Framework or even .NET SDK itself (e.g. because of building on linux-x86
with mono
), you can call msbuild
directly. You'll also need to specify ASFNetFramework
manually, as ASF by default disables netf
build on non-Windows platforms:
msbuild /m /r /t:Publish /p:Configuration=Release /p:TargetFramework=net48 /p:PublishDir=out/generic-netf /p:ASFNetFramework=true ArchiSteamFarm
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. ไธ้๏ผๅฐๆผ Windows ็ณป็ตฑ๏ผๆๅๆจ่ฆไฝฟ็จโ**ๆๆฐ็ๆฌ็ Visual Studio**๏ผๅ
่ฒป็็คพๅ็ๅณๅฏ๏ผใ
ๅฆๆๆจ่ฆๅจ Linux/OS X ไธ้็ผ ASF ไปฃ็ขผ๏ผๆๅๆจ่ฆไฝฟ็จโ**ๆๆฐ็็ 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. If you want to compile or reference ASF from source, then you should use appropriate tag for that purpose, which guarantees at least successful compilation, and very likely also flawless execution (if build was marked as stable release). In order to check the current "health" of the tree, you can use our CI - GitHub.
Official ASF releases are compiled by GitHub on Windows, 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 ้็ผไบบๅกไธๆ่ช่ก็ทจ่ญฏๆ็ผไฝๆงๅปบ็ๆฌใ
- ๐ก Home
- ๐ง Configuration
- ๐ฌ FAQ
- โ๏ธ Setting up (start here)
- ๐ฅ ๅพๅฐๅบ่ๅๅๅจ
- ๐ข Commands
- ๐ ๏ธ Compatibility
- ๐งฉ ItemsMatcherPlugin
- ๐ Management
- โฑ๏ธ Performance
- ๐ก Remote communication
- ๐ช Steam ่ฆชๅๅไบซ
- ๐ Trading