forked from telegramdesktop/tdesktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9310728
commit b5dc22b
Showing
6 changed files
with
75 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@echo OFF | ||
|
||
set "FullScriptPath=%~dp0" | ||
|
||
python %FullScriptPath%configure.py %* | ||
if %errorlevel% neq 0 goto error | ||
|
||
exit /b | ||
|
||
:error | ||
echo FAILED | ||
exit /b 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
''' | ||
This file is part of Telegram Desktop, | ||
the official desktop application for the Telegram messaging service. | ||
For license and copyright information please follow this link: | ||
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL | ||
''' | ||
import sys, os, re | ||
|
||
sys.dont_write_bytecode = True | ||
scriptPath = os.path.dirname(os.path.realpath(__file__)) | ||
sys.path.append(scriptPath + '/../cmake') | ||
import run_cmake | ||
|
||
executePath = os.getcwd() | ||
def finish(code): | ||
global executePath | ||
os.chdir(executePath) | ||
sys.exit(code) | ||
|
||
def error(message): | ||
print('[ERROR] ' + message) | ||
finish(1) | ||
|
||
if sys.platform == 'win32' and not 'COMSPEC' in os.environ: | ||
error('COMSPEC environment variable is not set.') | ||
|
||
executePath = os.getcwd() | ||
scriptPath = os.path.dirname(os.path.realpath(__file__)) | ||
|
||
arguments = sys.argv[1:] | ||
|
||
officialTarget = '' | ||
officialTargetFile = scriptPath + '/build/target' | ||
if os.path.isfile(officialTargetFile): | ||
with open(officialTargetFile, 'r') as f: | ||
for line in f: | ||
officialTarget = line.strip() | ||
|
||
if officialTarget != '': | ||
officialApiIdFile = scriptPath + '/../../DesktopPrivate/custom_api_id.h' | ||
if not os.path.isfile(officialApiIdFile): | ||
print("[ERROR] DesktopPrivate/custom_api_id.h not found.") | ||
finish(1) | ||
with open(officialApiIdFile, 'r') as f: | ||
for line in f: | ||
apiIdMatch = re.search(r'ApiId\s+=\s+(\d+)', line) | ||
apiHashMatch = re.search(r'ApiHash\s+=\s+"([a-fA-F\d]+)"', line) | ||
if apiIdMatch: | ||
arguments.append('-DTDESKTOP_API_ID=' + apiIdMatch.group(1)) | ||
elif apiHashMatch: | ||
arguments.append('-DTDESKTOP_API_HASH=' + apiHashMatch.group(1)) | ||
|
||
finish(run_cmake.run(os.path.basename(scriptPath), arguments)) |
Submodule cmake
updated
7 files
+3 −1 | CMakeLists.txt | |
+4 −1 | external/auto_updates/xz/CMakeLists.txt | |
+4 −5 | external/openssl/CMakeLists.txt | |
+3 −1 | external/qt/CMakeLists.txt | |
+13 −15 | linux_glibc_wraps/CMakeLists.txt | |
+54 −0 | run_cmake.py | |
+9 −0 | variables.cmake |