Skip to content

Commit 0917904

Browse files
committed
UI: suppression du champ Target Name dans cx_freeze (géré via ark.yml)
1 parent 184106d commit 0917904

1 file changed

Lines changed: 2 additions & 30 deletions

File tree

engines/cx_freeze/__init__.py

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def build_command(self, context: BuildContext) -> list[str]:
9797
if icon_path:
9898
cmd.extend(["--icon", icon_path])
9999

100-
target_name = str(cfg.get("target_name") or context.project_name or "").strip()
100+
target_name = str(context.project_name or "").strip()
101101
if target_name:
102102
cmd.extend(["--target-name", target_name])
103103

@@ -215,28 +215,15 @@ def create_tab(self, gui):
215215
diagnostics_layout.addWidget(self._cx_verbose)
216216
diagnostics_group.setLayout(diagnostics_layout)
217217

218-
output_group = QGroupBox("Target", tab)
219-
output_layout = QVBoxLayout()
220-
output_layout.setSpacing(6)
221-
222-
# Target name
223-
self._cx_target_name = add_output_dir(
224-
output_layout,
225-
"Nom de sortie (--target-name)",
226-
"cx_target_name_dynamic",
227-
)
228-
output_group.setLayout(output_layout)
229-
230218
hint = QLabel(
231-
"Tip: use target name for the executable label. Global icon and output are managed in ark.yml.",
219+
"Tip: use the console visibility option. Global icon and output are managed in ark.yml.",
232220
tab,
233221
)
234222
hint.setStyleSheet("color: #888; font-size: 11px;")
235223
hint.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
236224

237225
layout.addWidget(build_group)
238226
layout.addWidget(diagnostics_group)
239-
layout.addWidget(output_group)
240227
layout.addWidget(hint)
241228
layout.addStretch()
242229

@@ -261,8 +248,6 @@ def get_config(self, gui) -> dict:
261248
cfg = {}
262249
if hasattr(self, "_cx_windowed") and self._cx_windowed is not None:
263250
cfg["windowed"] = bool(self._cx_windowed.isChecked())
264-
if hasattr(self, "_cx_target_name") and self._cx_target_name is not None:
265-
cfg["target_name"] = self._cx_target_name.text().strip()
266251
if hasattr(self, "_cx_debug") and self._cx_debug is not None:
267252
cfg["debug"] = bool(self._cx_debug.isChecked())
268253
if hasattr(self, "_cx_verbose") and self._cx_verbose is not None:
@@ -286,13 +271,6 @@ def set_config(self, gui, cfg: dict) -> None:
286271
and "windowed" in cfg
287272
):
288273
self._cx_windowed.setChecked(bool(cfg.get("windowed")))
289-
if (
290-
hasattr(self, "_cx_target_name")
291-
and self._cx_target_name is not None
292-
and "target_name" in cfg
293-
):
294-
val = cfg.get("target_name") or ""
295-
self._cx_target_name.setText(str(val))
296274
if (
297275
hasattr(self, "_cx_debug")
298276
and self._cx_debug is not None
@@ -355,12 +333,6 @@ def apply_i18n(self, gui, tr: dict) -> None:
355333
)
356334
if hasattr(self, "_cx_verbose"):
357335
self._cx_verbose.setToolTip(self.engine_translate("tt_verbose", ""))
358-
if hasattr(self, "_cx_target_name"):
359-
self._cx_target_name.setPlaceholderText(
360-
self.engine_translate(
361-
"target_name_placeholder", "Target executable name"
362-
)
363-
)
364336
except Exception:
365337
pass
366338

0 commit comments

Comments
 (0)