User:Hossein/Build/Windowsarm

This manual is for building LibreOffice for Arm64 Windows using Arm64 processor and Cygwin. If this does match your platform, please refer to the development page on Wiki to find the correct build instructions.

LibreOffice Versions
This manual is written for the LibreOffice Dev 7.4, which is the latest git master.

Visual Studio
You need the Microsoft compiler/development suite Visual Studio. There is an edition that is free of charge, the Community Edition, that includes everything needed to build all LibreOffice features:


 * https://visualstudio.microsoft.com/vs/community/

The current master can be built with these versions of Visual Studio or the equivalent Visual Studio Build Tools:

Individual Components
Open the Visual Studio installer, select the Desktop development with C++ workload and check that all of the following components are selected individually:

Cygwin
Install Cygwin from www.cygwin.com. Download the 64 bit version from setup-x86_64.exe.

Individual Packages
Run cmd and navigate to the download folder. copy and paste the command below to run setup-x86_64.exe with the list of required packages preselected.

This launches the GUI and requires you to manually choose installation paths etc, but the packages passed via command line are pre-selected meaning you just need to accept the selection.

Java
You need Java Development Kit (JDK) Version 11 or later. Make sure that you download a 64-bit JDK. You can download it from different sources:


 * microsoft.com (Microsoft builds do not require login)
 * oracle.com (Oracle requires login to download)
 * adoptopenjdk.net (AdoptOpenJDK installer will not be auto detected by default installation. You have to enable the "JavaSoft (Oracle) registry keys" option)

Java is optional. If you want to avoid Java, use the  option in your.

Setup LODE
Choose a place where you want your LODE installation to be. You can put it anywhere you want —in your HOME directory is fine— but you need to have enough space there to have a LibreOffice build and more. Preserve at least 45 GB to be safe with one debug build environment.

Clone the lode git repository:

Change directory to the  directory:

Read the help,  and the prerequisites for your platform:

Once you have met the prerequisites for your platform, run:

Read the notes at the end of the setup.

The setup program does not automatically adjust your shell profile file, since that may not be desirable in your environment. You need to make the necessary adjustment and make sure that the shell environment conforms to the requirements:

If your shell is Bash (Cygwin's default), add the environment variables into  or. Edit your profile file and add the following lines to it, replacing user with your user name:

One way to do that is issuing these commands directly from your terminal:

Restart your terminal: close the terminal window and open it again. On Windows, to start Cygwin run  (this is the default path). A restart is needed for Cygwin to use the new  environment variable from your profile.

If things went well, you can move to the right location and setup a dev build environment by running:

This will setup a  repository. By default it will configure  (the file where one puts the configuration options for the build) to make a debug build.

Build
Now it is time to build. If you are on Windows, before you do this, make sure your anti-virus software will not cause any problems.

You should have a suitable configuration for the build. A sample  for building LibreOffice with Visual Studio 2022 can be:

The first JDK option is the installed Oracle x86_64 Java, the second is the unpacked pre-release of the Windows Arm64 OpenJDK Java.

Then you can start to build LibreOffice:

After 1 to 2 hours, or more depending on your machine (Windows can take more than 8 hours for the first build), you will have a built LibreOffice. Consult the other pages on this wiki to go further or to deal with build problems.

Run LibreOffice
When the build has finished without errors, you can run your fresh build of LibreOffice using

Using LibreOffice with an IDE
An integrated development environment (IDE) helps developers to have a better coding experience. Considering the fact that LibreOffice has a very large code base, you may use an IDE to simplify coding, building and debugging LibreOffice. You can use several IDEs to work on LibreOffice, including Visual Studio, Visual Studio Code, Qt Creator, KDevelop, Vim, Eclipse CDT and several others.

You can refer to the wiki article Development/IDE to understand how to use IDEs.