Difference between revisions of "Talk:Compiling Mudlet"

From Mudlet
Jump to navigation Jump to search
Line 1: Line 1:
 
== MSYS2 ==
 
== MSYS2 ==
* install msys2: https://www.msys2.org
+
* Install MSYS2: https://www.msys2.org
* uncheck run msys2 now, hit finish
+
 
* run MSYS2 MINGW64 from the start menu
+
* At the end of installation uncheck '''run msys2 now''' and click '''finish'''
* run in the opened terminal:
+
 
 +
* Run '''MSYS2 MINGW64''' from the start menu
 +
 
 +
* Run the following in the opened MSYS2 terminal:
 
  pacman --files --refresh
 
  pacman --files --refresh
 
  pacman --sync git mingw-w64-x86_64-qt-creator mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-clang-libs --noconfirm
 
  pacman --sync git mingw-w64-x86_64-qt-creator mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-clang-libs --noconfirm
  
* right-click and paste into msys:
+
* Run the following from the MSYS2 terminal:
 
  git clone --recursive -b development https://github.com/Mudlet/Mudlet.git
 
  git clone --recursive -b development https://github.com/Mudlet/Mudlet.git
* Afterwards run the following. This will take 5-10min:
+
 
 +
* Setup the development environment (~5-10min) by running:
 
  ./Mudlet/CI/setup-windows-sdk.sh  
 
  ./Mudlet/CI/setup-windows-sdk.sh  
Note: this might not work on windows arm64, pacman freezes
+
 
 +
{{note}} This might not work on windows arm64, pacman freezes.
 +
 
 
* Open Qt Creator. You will need to open it via MSYS2 every time:
 
* Open Qt Creator. You will need to open it via MSYS2 every time:
 
  /mingw64/bin/qtcreator.exe
 
  /mingw64/bin/qtcreator.exe
* press link with qt bottom right
+
 
 +
* Press '''link with Qt''' on the bottom right of Qt Creator
 
[[File:Link with qt.png|500px|center]]
 
[[File:Link with qt.png|500px|center]]
* choose <code>C:/msys64/mingw64</code> as the location. restart qt creator
+
 
 +
* Choose <code>C:/msys64/mingw64</code> as the location then restart Qt Creator
 
[[File:Qt location.png|500px|center]]
 
[[File:Qt location.png|500px|center]]
* open new project C:/msys64/home/<user>/Mudlet/src/mudlet.pro  
+
 
 +
* Open a '''new project''' C:/msys64/home/<user>/Mudlet/src/mudlet.pro  
 
[[File:Open new project - qtcreator.png|500px|center]]
 
[[File:Open new project - qtcreator.png|500px|center]]
* in Build Environment details, set environment variables to this:
+
 
 +
* In Build Environment details, set environment variables to the following:
 
  WITH_MAIN_BUILD_SYSTEM=NO
 
  WITH_MAIN_BUILD_SYSTEM=NO
 
  MINGW_BASE_DIR=C:\msys64\mingw64
 
  MINGW_BASE_DIR=C:\msys64\mingw64
 +
 
[[File:Build environment details.png|500px|center]]
 
[[File:Build environment details.png|500px|center]]
  
* in General - Build directory, disable Shadow build
+
* In General - Build directory, disable '''Shadow build'''
  
 
[[File:Disable shadow build.png|500px|center]]
 
[[File:Disable shadow build.png|500px|center]]
  
* build Mudlet (Ctrl+B)
+
* Build Mudlet (Ctrl+B)
* click Run
+
* Run Mudlet (Ctrl+R)
 
 
Mudlet will run, but it won't find any of the Lua DLL's so scripts within the profile won't work correctly. Working on finding a solution.
 

Revision as of 15:37, 28 July 2024

MSYS2

  • At the end of installation uncheck run msys2 now and click finish
  • Run MSYS2 MINGW64 from the start menu
  • Run the following in the opened MSYS2 terminal:
pacman --files --refresh
pacman --sync git mingw-w64-x86_64-qt-creator mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-clang-libs --noconfirm
  • Run the following from the MSYS2 terminal:
git clone --recursive -b development https://github.com/Mudlet/Mudlet.git
  • Setup the development environment (~5-10min) by running:
./Mudlet/CI/setup-windows-sdk.sh 

Note Note: This might not work on windows arm64, pacman freezes.

  • Open Qt Creator. You will need to open it via MSYS2 every time:
/mingw64/bin/qtcreator.exe
  • Press link with Qt on the bottom right of Qt Creator
Link with qt.png
  • Choose C:/msys64/mingw64 as the location then restart Qt Creator
Qt location.png
  • Open a new project C:/msys64/home/<user>/Mudlet/src/mudlet.pro
Open new project - qtcreator.png
  • In Build Environment details, set environment variables to the following:
WITH_MAIN_BUILD_SYSTEM=NO
MINGW_BASE_DIR=C:\msys64\mingw64
Build environment details.png
  • In General - Build directory, disable Shadow build
Disable shadow build.png
  • Build Mudlet (Ctrl+B)
  • Run Mudlet (Ctrl+R)