mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
chore: add build note for Windows
This commit is contained in:
@@ -36,3 +36,48 @@ Go to ***BuildPath*\\tdesktop\\Telegram** and run
|
||||
* Open ***BuildPath*\\tdesktop\\out\\Telegram.sln** in Visual Studio 2022
|
||||
* Select Telegram project and press Build > Build Telegram (Debug and Release configurations)
|
||||
* The result AyuGram.exe will be located in **D:\TBuild\tdesktop\out\Debug** (and **Release**)
|
||||
|
||||
If you encounter issue like `error C1090: PDB API call failed, error code '12'` on Release build, apply the following patch in `tdesktop/cmake` folder (via pwsh or manually):
|
||||
|
||||
```diff
|
||||
@'
|
||||
diff --git a/options_win.cmake b/options_win.cmake
|
||||
index c2d66cf..ccceb53 100644
|
||||
--- a/options_win.cmake
|
||||
+++ b/options_win.cmake
|
||||
@@ -32,6 +32,7 @@ if (MSVC)
|
||||
/utf-8
|
||||
/W4
|
||||
/MP # Enable multi process build.
|
||||
+ /FS
|
||||
/EHsc # Catch C++ exceptions only, extern C functions never throw a C++ exception.
|
||||
/w15038 # wrong initialization order
|
||||
/w14265 # class has virtual functions, but destructor is not virtual
|
||||
@@ -64,7 +65,7 @@ if (MSVC)
|
||||
INTERFACE
|
||||
$<$<CONFIG:Debug>:/NODEFAULTLIB:LIBCMT>
|
||||
$<$<AND:$<CONFIG:Debug>,$<BOOL:${build_win64}>>:/DEBUG:FASTLINK>
|
||||
- $<$<NOT:$<AND:$<CONFIG:Debug>,$<BOOL:${build_win64}>>>:$<IF:$<STREQUAL:$<GENEX_EVAL:
|
||||
$<TARGET_PROPERTY:MSVC_DEBUG_INFORMATION_FORMAT>>,ProgramDatabase>,/DEBUG,/DEBUG:NONE>>
|
||||
+ $<$<NOT:$<AND:$<CONFIG:Debug>,$<BOOL:${build_win64}>>>:$<IF:$<BOOL:$<GENEX_EVAL:
|
||||
$<TARGET_PROPERTY:MSVC_DEBUG_INFORMATION_FORMAT>>>,/DEBUG,/DEBUG:NONE>>
|
||||
$<$<NOT:$<CONFIG:Debug>>:/OPT:REF>
|
||||
/INCREMENTAL:NO
|
||||
/DEPENDENTLOADFLAG:0x800
|
||||
diff --git a/variables.cmake b/variables.cmake
|
||||
index d6ac6c5..b2f492a 100644
|
||||
--- a/variables.cmake
|
||||
+++ b/variables.cmake
|
||||
@@ -21,7 +21,9 @@ if (DESKTOP_APP_SPECIAL_TARGET STREQUAL ""
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_SCAN_FOR_MODULES OFF CACHE BOOL "")
|
||||
-set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "ProgramDatabase" CACHE STRING "")
|
||||
+set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
|
||||
+ "$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>$<$<CONFIG:Release,MinSizeRel>:Embedded>"
|
||||
+ CACHE STRING "" FORCE)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" CACHE STRING "")
|
||||
option(DESKTOP_APP_TEST_APPS "Build test apps, development only." OFF)
|
||||
option(DESKTOP_APP_LOTTIE_DISABLE_RECOLORING "Disable recoloring of lottie animations." OFF)
|
||||
'@ | git -C cmake apply -
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user