Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gajim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
206
Issues
206
List
Boards
Labels
Service Desk
Milestones
Merge Requests
21
Merge Requests
21
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
gajim
Commits
ae2d2f10
Commit
ae2d2f10
authored
Feb 14, 2021
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Windows: Set debug env var
This allows us to discover if Gajim was started with Gajim-Debug.exe
parent
94b6b0c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
win/misc/create-launcher.py
win/misc/create-launcher.py
+6
-5
No files found.
win/misc/create-launcher.py
View file @
ae2d2f10
...
...
@@ -58,7 +58,7 @@ def build_exe(source_path, resource_path, is_gui, out_path):
subprocess
.
check_call
(
args
)
def
get_launcher_code
():
def
get_launcher_code
(
debug
):
template
=
"""
\
#include "Python.h"
#define WIN32_LEAN_AND_MEAN
...
...
@@ -89,6 +89,7 @@ def get_launcher_code():
PySys_SetArgvEx(__argc, szArglist, 0);
result = PyRun_SimpleString(
"import sys; import os;"
"os.environ['GAJIM_DEBUG'] = %s;"
"sys.frozen=True;"
"from pathlib import Path;"
"root_path = Path(sys.executable).parents[1];"
...
...
@@ -99,7 +100,7 @@ def get_launcher_code():
Py_Finalize();
return result;
}
"""
"""
%
int
(
debug
)
return
template
...
...
@@ -153,7 +154,7 @@ def to_ver_list(v):
def
build_launcher
(
out_path
,
icon_path
,
file_desc
,
product_name
,
product_version
,
company_name
,
is_gui
):
company_name
,
is_gui
,
debug
=
False
):
src_ico
=
os
.
path
.
abspath
(
icon_path
)
target
=
os
.
path
.
abspath
(
out_path
)
...
...
@@ -165,7 +166,7 @@ def build_launcher(out_path, icon_path, file_desc, product_name, product_version
try
:
os
.
chdir
(
temp
)
with
open
(
"launcher.c"
,
"w"
)
as
h
:
h
.
write
(
get_launcher_code
())
h
.
write
(
get_launcher_code
(
debug
))
shutil
.
copyfile
(
src_ico
,
"launcher.ico"
)
with
open
(
"launcher.rc"
,
"w"
)
as
h
:
h
.
write
(
get_resouce_code
(
...
...
@@ -196,7 +197,7 @@ def main():
build_launcher
(
os
.
path
.
join
(
target
,
"Gajim-Debug.exe"
),
os
.
path
.
join
(
misc
,
"gajim.ico"
),
"Gajim"
,
"Gajim"
,
version
,
company_name
,
False
)
version
,
company_name
,
False
,
debug
=
True
)
# build_launcher(
# os.path.join(target, "history_manager.exe"),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment