-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Step-by-step instructions so anyone can compile the source code at home on Windows and Linux. #344
Comments
For Windows, it is difficult to build. You need to install:
Then:
Building LLVM... (you can add additional options and/or partially build if you like)
An example of the full build progress exists inside .github/workflows/remoteBuild.yml, which is the code that generates the nightly releases and installers. For linux, it's a little easier, You need to install developer versions of llvm, libcurl, libz, and zstd (most likely using your distro's package manager) Then use CMake to configure and build Adept. Lastly, put the resulting
This process is also documented inside .github/workflows/remoteBuild.yml, although it might be hard to follow since it's not just for linux. You can then optionally add it to the path and/or symlink it. Additionally if you want, there is always the option to fork this repo and customize |
Hello, IsaacShelton! 1 - we install sudo apt install build-essential. after this, 2 - install llvm, libcurl, libz, and zstd all sources in a specific folder? 3 - Clone https://github.com/AdeptLanguage/Adept/ Am I on the right path of understanding or are there a few more steps and which commands should we use to generate Adept.exe? Can you help? |
Yes, if you are using WSL then it is a lot easier. What you describe is correct I just tested the below which works:
🎉 |
Hello! I noticed that the procedure generates the Linux executable. What parameter is used to generate Windows bins? I appreciate your support. And I saw that it is now in a new version in Rust, is there any reason? |
To build for Windows, it is a lot more painful. You have to use mingw-w64 instead of gcc/g++. It would be easiest to use something like https://www.msys2.org/ instead of WSL. I can't test it on my VM, but it would be something like:
For the standalone release, it is just a zipped version of the build (minus generated CMake files).
For the installer, we use Inno Setup with the installer template: https://github.com/IsaacShelton/AdeptWindowsInstaller We use Then we perform substitutions of the values inside the template file. You would have to modify the below depending on where you build and stage the files. Also, each alternativeBinaryName is
Then we use Inno Setup to build the installer. With regards to Adept 3.0 (the Rust version), it is in early development won't be ready for a couple of years. It will be an improvement upon Adept 2.x, and fix many issues with the language. It will:
However, even after Adept 3.0 is released, Adept 2.x will still be maintained, and may eventually gain support in the new compiler as well. |
Another question: Is the platform you use to create MAC or Linux Arch? PATH=$(echo "$PATH" | sed -e 's/:/mnt.*//g') 1 - Thank you, I will test the issue in WSL and test if it works, your example here is to compile in the Linux environment to generate a native Adept.exe for Windows. After zipping, take it to the Windows environment. |
Yes I primarily use macOS for development. I'm not very familiar with WSL, but that might work. One thing that could be weird though, is that the generated exe would be linked against Ubuntu's LLVM libraries. This means that the default target for the I could be wrong though, you'd have to try it. Currently the automated builds use MinGW-64, MSYS, and manually building LLVM. I've heard from others that building it with MSYS exclusively works well, they should have all the packages so nothing would need to be built from scratch. If WSL doesn't work then MSYS could also be a good option. |
Hello! When you have special time, you can try to create a step-by-step guide for compiling on Windows. Software to be downloaded, similar to what was done for Linux or a way in WSL to cross compile and generate the .exe for Windows. It should help too. I managed to compile Adept for Linux nbo WSL. |
Yes I just added a step-by-step guide https://github.com/AdeptLanguage/Adept/blob/master/HOW_TO_BUILD.md I recently discovered an easier way to build it with MSYS2, so that's what this guide uses. Here is the excerpt on building on Windows: WindowsMSYS2 Setup:
MSYS2 Mingw64 Command Prompt
There is also information about how to link against LLVM statically if you wish: https://github.com/AdeptLanguage/Adept/blob/master/HOW_TO_BUILD.md#linking-llvm-statically |
Also sorry for taking so long to get back to you, I was away on vacation |
The primary CMakeLists.txt has been recently updated to allow for this easier. Linking LLVM statically on Windows is actually supposed the default (I remembered when looking through the build file), but somehow it stopped working due to changes in CMake, which has been fixed in the most recent commit. Since linking statically is now properly the default on Windows, you only need:
|
Hello! Can you tell us which tools should be downloaded for compilation, such as Nodejs, Visual C++ 2022, Python. And how to generate it. Thanks.
The text was updated successfully, but these errors were encountered: