-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Compilation ro RO
Compilarea este procesul de creare a fișierului executabil. Asta este ceea ce vreți să faceți pentru a adăuga propriile modificări la ASF, sau dacă din orice motiv nu aveți încredere în fișierele executabile furnizate în versiuni oficiale. Dacă sunteți utilizator și nu dezvoltator, cel mai probabil vreți să folosiți binare precompilate, dar dacă doriți să vă folosiți pe cele proprii sau să invățați ceva nou, continuați să citiți.
ASF poate fi compilat pe orice platformă suportată în prezent, atâta timp cât aveți toate instrumentele necesare.
Indiferent de platformă, aveți nevoie de .NET Core SDK complet (nu doar runtime) pentru a compila ASF. Instrucţiunile de instalare pot fi găsite pe pagina de instalare .NET Core. Trebuie să instalați versiunea corespunzătoare .NET Core SDK pentru sistemul dvs. de operare. După o instalare reușită, comanda dotnet
trebuie să fie disponibilă și să funcționeze. Puteţi verifica dacă funcţionează cu dotnet --info
. Asigurați-vă că .NET Core SDK se potrivește cu cerințele de execuție ASF.
Assuming you have .NET Core 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 "net5.0" -o "out/generic"
If you're using Linux/OS X, you can instead use cc.sh
script which will do the same, in a bit more complex manner.
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 Core 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 Core 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 "net5.0" -o "out/linux-x64" -r "linux-x64"
Of course, replace linux-x64
with OS-architecture that you want to target, such as win-x64
. This build will also have updates disabled.
In a very rare case when you'd want to build generic-netf
package, you can change target framework from net5.0
to net48
. Keep in mind that you'll need appropriate .NET Framework developer pack for compiling netf
variant, in addition to .NET Core 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 Core 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 Core 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. Still, for Windows we recommend latest Visual Studio (free community version is more than enough).
If you'd like to work with ASF code on Linux/OS X instead, we recommend latest Visual Studio Code. It's not as rich as classic Visual Studio, but it's good enough.
Of course all suggestions above are only recommendations, you can use whatever you want to, it comes down to dotnet build
command anyway. We use JetBrains Rider for ASF development, with a small part of third-party tools
that you can find in the repo.
master
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 CIs - GitHub, AppVeyor or Travis.
Official ASF releases are compiled by GitHub on Windows, with latest .NET Core 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 developers do not compile or publish builds themselves, except for private development process and debugging.
- 🏡 Pagina principală
- 🔧 Configurare
- 💬 Întrebări frecvente (FAQ)
- ⚙️ Configurare (începeți aici)
- 👥 Activatorul de coduri în plan secundar
- 📢 Comenzi
- 🛠️ Compatibilitate
- 🧩 ItemsMatcherPlugin
- 📋 Gestionare
- ⏱️ Performanță
- 📡 Comunicare la distanță
- 👪 Împărtășire în familie Steam
- 🔄 Schimburi