+ - Copy these folders:
+ C:\LyX\lyx-windows-deps-msvc2017\bin
+ C:\LyX\lyx-windows-deps-msvc2017\imagemagick
+ C:\LyX\lyx-windows-deps-msvc2017\Python
+ C:\LyX\lyx-windows-deps-msvc2017\ghostscript
+ C:\LyX\lyx-windows-deps-msvc2017\Resources
+ to C:\LyX\build\LYX_INSTALLED
+ (allow the request to overwrite)
+
+ - Go to the Qt-kit directory, which you have specified as CMAKE_PREFIX_PATH, enter the bin folder
+ Copy these files:
+ Qt5Core.dll
+ Qt5Gui.dll
+ Qt5Svg.dll
+ Qt5Widgets.dll
+ Qt5WinExtras.dll
+ Qt6Core5Compat.dll (if compiling with Qt6)
+ Qt5Cored.dll (if compiling Debug version)
+ Qt5Guid.dll (if compiling Debug version)
+ Qt5Svgd.dll (if compiling Debug version)
+ Qt5Widgetsd.dll (if compiling Debug version)
+ Qt5WinExtrasd.dll (if compiling Debug version)
+ Qt6Core5Compatd.dll (if compiling with Qt6 and debug version)
+ to C:\LyX\build\LYX_INSTALLED\bin
+
+ - Go to the Qt-kit directory, which you have specified as CMAKE_PREFIX_PATH, enter the plugins folder
+ Copy these subdirectories:
+ iconengines
+ imageformats
+ platforms
+ styles
+ to C:\LyX\build\LYX_INSTALLED\bin
+
+9 Start LyX
+
+ C:\LyX\build\LYX_INSTALLED\bin\lyx.exe
+
+10 Define path prefix
+
+ In LyX use the menu Tools->Preferences
+ There input the the following the the field "Path prefix":
+
+ "$LyXDir\bin;$LyXDir\Python;$LyXDir\imagemagick;$LyXDir\ghostscript"
+
+ You may also add the location of your LaTeX installation if it's not on the
+ system PATH, and the location of JabRef.
+
+
+Debugging
+=========
+
+ - Open LyX.sln
+
+ - In Solution Explorer open applications\LyX\LyX\main.cpp, the main function is the entry point,
+ you can e.g. place breakpoints in there.
+
+ - On the menu bar in Solution Explorer there is a button "Switch Views", click on that and choose "Folder view"
+ (to go back to normal view, click Switch Views again and choose "LyX.sln")
+
+ - In folder view find "LyX.exe" in "LYX_INSTALLED\bin" folder, rightclick > Set as Startup Item
+
+ - Start debugging with F5, clicking the Debug button (it shows now "LyX.exe") or rigchtlicking on LyX.exe in
+ Solution Explorer - Folder View and choosing "Debug".
+ (Starting debugging will have to be always with active Folder View. Attempting to start debugging with
+ normal view active will start LyX.exe located in e.g. C:\LyX\build\bin\Debug, it won't find the dependencies
+ and will therefore fail. Once debugging has started you can switch back to normal view of the Solution Explorer)
+
+ - Don't forget to build the INSTALL project each time you change the source code.
+
+
+Creating a patch file containing a bugfix
+=========================================
+
+ If you managed to fix a bug but dont have the rights to push your commits, you will want to create a patch file
+ and share it with other developers. To do so you will have to do following:
+
+ - Make sure you are working on the newest versions, pull from git before you start bugfixing.
+
+ - After fixing a bug create a commit (it will be on your local repo and not on server), choose an approproate description,
+ e.g. the ticket nr. if there is a bugreport for it
+
+ - Use this command in git bash:
+ git format-patch -1 HEAD
+ it will create a patch file in your repository folder, this is what you share.
+
+ Another usefull command is
+ git diff --cached > file.diff
+ which will create a .diff file of staged changes. There is no option for the description with it though.
+
+
+Creating the Installer
+======================
+
+ - The installer is done with NSIS from http://nsis.sourceforge.net
+ - In the LyX source directory, go to development\Win32\packaging\installer
+ - Follow the steps in the file Readme.txt
+
+
+Compiling with GCC with MinGW64 + MSYS2 Environment using autotools
+===================================================================
+1 Install MSYS2, MINGW64, Qt5+
+ https://wiki.qt.io/MSYS2
+2 Install bc (Bench calculater), which autotools uses for some reason to compile LyX
+ pacman -S bc
+3 Run the standard autotools install (Adapt paths and arguments accordingly)
+ ./autogen.sh
+ ./configure --without-x --enable-qt5 --disable-debug --enable-optimization --prefix=/mingw64
+ make
+ make install
+
+
+Cross-Compiling on unix with MXE using autotools
+=================================================
+1 Install MXE: http://mxe.cc
+ You can either install from sources, the generic .tar binaries or debian .deb packages.
+ Installing the following .deb packages will drag in all needed dependencies:
+ mxe-x86-64-w64-mingw32.shared-file
+ mxe-x86-64-w64-mingw32.shared-gcc
+ mxe-x86-64-w64-mingw32.shared-libiconv
+ mxe-x86-64-w64-mingw32.shared-qtimageformats
+ mxe-x86-64-w64-mingw32.shared-qtsvg
+ mxe-x86-64-w64-mingw32.shared-qtwinextras
+ Of course you can also use the static and/or 32bit versions.
+2 Run the standard autotools install (Adapt paths and arguments accordingly)
+ ./autogen.sh
+ mkdir builddir-mingw
+ cd builddir-mingw
+ PATH="/usr/lib/mxe/usr/bin:$PATH" ../configure --host=x86-64-w64-mingw32.shared --with-qt-dir=/usr/lib/mxe/usr/x86_64-w64-mingw32.shared/qt5 --enable-qt5 --with-included-boost --with-included-hunspell --with-included-mythes --disable-debug --enable-optimization --prefix=/mingw64
+ PATH="/usr/lib/mxe/usr/bin:$PATH" make
+ PATH="/usr/lib/mxe/usr/bin:$PATH" DESTDIR=/tmp/lyxinstall make install
+ This uses the paths from the 64bit shared MXE version installed from .deb packages.
+3 If you want to run the resulting lyx.exe from the build directory using wine,
+ create symlinks for all needed .dlls:
+ cd builddir-mingw/src
+ ln -s /usr/lib/mxe/usr/x86_64-w64-mingw32.shared/bin/*.dll .
+ ln -s /usr/lib/mxe/usr/x86_64-w64-mingw32.shared/qt5/bin/*.dll .
+ wine64 lyx.exe