Compare commits

..

10 Commits

Author SHA1 Message Date
joshua 1ba97c7e92 Remove hoto_update_cmake_message.cmake 2026-03-03 21:45:48 +01:00
joshua cd09fc0d32 Re-enable git_update_submodules.cmake
Re-enable git_update_submodules.cmake, use for update the elements repo.
Remove the unused include : fetch_elements.cmake
2026-03-03 21:44:35 +01:00
Laurent Trinques 924fe082fb Update fr_window_build_msys2.md 2026-03-03 06:56:24 +01:00
joshua ad37b0f9a5 Add documentation for build under Windows
The documentation is available in french only.
Contributors, feel free to create a new documentation in English (create
a new directory named 'en' for this purpose).
2026-03-02 22:47:32 +01:00
joshua fedc1cb092 Made available compilation on windows with msys2
The aim of this commit is to easily build qelectrotech under windows
with qt6/cmake and the package tool MSYS2.

-Update some cmake file.
-Remove Git submodule for pugixml and single application
-Use cmake find_package for pugi xml
-Use cmake fetchContent for single application.
-Use cmake find_package for KCoreAddons and KWidgetsAddons.
-Minor change for pugi xml
-Minor change on ProjectPrintWindow class to compatible with Qt6 API.
2026-03-02 22:34:16 +01:00
joshua 5f318e09c8 Add forgotten file and folder.
Add folder and file to cmake.
2026-01-30 19:43:07 +01:00
joshua 27afeaefe2 Upgrade pugixml version.
Upgrade pugixml to be compatible with cmake >= 4.0.0.

Compatibility with CMake < 3.5 has been removed from CMake since 4.0.0.
Pugixml V1.11.4 used cmake 3.4. Latest version V1.15 use cmake VERSION
3.5...3.30
2026-01-30 18:46:21 +01:00
joshua ab2f933fdf Re-enable multi-threading to load collection
The name of the elements and folders of the collection are not displayed
until we hover the item with the mouse.
This due that QtConcurent::run was disabled at loading of collection in
the goal of use QtConcurrent::run with Qt6.
Run is made to run a function once.
Map is made to run a fonction for each item of a sequence (what we need
in this case).
Remove code of run and re-enable code for map.
2026-01-28 19:47:04 +01:00
joshua 7f718f672f Fix : can't open recent file 2026-01-28 00:15:09 +01:00
joshua 9ec02bc088 Build with qt6 and cmake
First build with qt6 and cmake.
QET compil, but a lot of things don't work.
Build tested on debian sid and ubuntu 25.04.

Dependency needed under debian and ubuntu :
qtcreator cmake qt6-tools-dev qt6-svg-dev libsqlite3-dev
libkf6coreaddons-dev extra-cmake-modules libkf6widgetsaddons-dev
2026-01-27 23:31:34 +01:00
128 changed files with 17124 additions and 57080 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ jobs:
doxygen:
permissions:
contents: write
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
@@ -18,7 +18,7 @@ jobs:
submodules: 'recursive'
show-progress: ''
- name: Setup and run doxygen
run: sudo apt update && sudo apt install doxygen graphviz qhelpgenerator-qt5 -y
run: sudo apt install doxygen graphviz qhelpgenerator-qt5 -y
- name: Set up Git LFS
run: |
git lfs install
+27 -36
View File
@@ -14,12 +14,10 @@
# You should have received a copy of the GNU General Public License
# along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
include(cmake/hoto_update_cmake_message.cmake)
cmake_minimum_required(VERSION 3.14...3.19 FATAL_ERROR)
cmake_minimum_required(VERSION 3.5...4.2)
project(qelectrotech
VERSION 0.9.0
VERSION 0.100.0
DESCRIPTION "QET is a CAD/CAE editor focusing on schematics drawing features."
HOMEPAGE_URL "https://qelectrotech.org/"
LANGUAGES CXX)
@@ -27,9 +25,16 @@ project(qelectrotech
include(cmake/copyright_message.cmake)
set(QET_DIR ${PROJECT_SOURCE_DIR})
include(cmake/qet_compilation_vars.cmake)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt6 REQUIRED COMPONENTS ${QET_COMPONENTS})
qt_standard_project_setup()
# Add sub directories
option(PACKAGE_TESTS "Build the tests" ON)
option(PACKAGE_TESTS "Build the tests" NO)
if(PACKAGE_TESTS)
message("Add sub directory tests")
add_subdirectory(tests)
@@ -43,42 +48,16 @@ include(cmake/git_last_commit_sha.cmake)
include(cmake/fetch_kdeaddons.cmake)
include(cmake/fetch_singleapplication.cmake)
include(cmake/fetch_pugixml.cmake)
include(cmake/qet_compilation_vars.cmake)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
SET(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(
QT
NAMES
Qt6
Qt5
COMPONENTS
${QET_COMPONENTS}
REQUIRED
)
find_package(
Qt${QT_VERSION_MAJOR}
COMPONENTS
${QET_COMPONENTS}
REQUIRED)
set(CMAKE_AUTOUIC_SEARCH_PATHS ${QET_DIR}/sources/ui)
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${QET_DIR}/lang")
qt5_add_translation(QM_FILES ${TS_FILES})
# als laatse
include(cmake/define_definitions.cmake)
add_executable(
qt_add_executable(
${PROJECT_NAME}
${QET_RES_FILES}
${QET_SRC_FILES}
@@ -86,13 +65,24 @@ add_executable(
${QET_DIR}/qelectrotech.qrc
)
if(QMFILES_AS_RESOURCE)
qt_add_translations(${PROJECT_NAME} TS_FILES ${TS_FILES} RESOURCE_PREFIX "/lang")
else()
qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${QET_DIR}/lang")
qt_add_translation(QM_FILES ${TS_FILES})
endif()
find_package(SQLite3 REQUIRED)
target_link_libraries(
${PROJECT_NAME}
PUBLIC
PRIVATE
pugixml::pugixml
SingleApplication::SingleApplication
${KF5_PRIVATE_LIBRARIES}
SQLite::SQLite3
${KF6_PRIVATE_LIBRARIES}
${QET_PRIVATE_LIBRARIES}
)
@@ -125,11 +115,11 @@ target_include_directories(
${QET_DIR}/sources/NameList
${QET_DIR}/sources/NameList/ui
${QET_DIR}/sources/utils
${QET_DIR}/pugixml/src
${QET_DIR}/sources/dataBase
${QET_DIR}/sources/dataBase/ui
${QET_DIR}/sources/factory/ui
${QET_DIR}/sources/print
${QET_DIR}/sources/svg
)
install(TARGETS ${PROJECT_NAME})
@@ -149,6 +139,7 @@ install(FILES LICENSE ELEMENTS.LICENSE CREDIT README ChangeLog DESTINATION share
install(FILES misc/org.qelectrotech.qelectrotech.desktop DESTINATION share/applications)
install(FILES misc/qelectrotech.xml DESTINATION share/mime/packages)
install(FILES misc/qelectrotech.appdata.xml DESTINATION ${QET_APPDATA_PATH})
install(FILES ${QM_FILES} DESTINATION ${QET_LANG_PATH})
if(NOT QMFILES_AS_RESOURCE)
install(FILES ${QM_FILES} DESTINATION ${QET_LANG_PATH})
endif()
endif()
-32
View File
@@ -266,35 +266,3 @@ Dank aan Chipsterjulien voor de pakkette Archlinux AUR
Dank aan Elbert voor de pakkette OS/2
Dank aan Zloidemon fvoor de pakkette (port GCC)
Dank aan Mrbit van ebuild voor de pakkette Gentoo
[ko]
Qt 라이브러리(Qt Software, http://www.qtsoftware.com/)를 제공해 주신 Qt Software에 감사드립니다. (GNU/GPL 라이선스)
KDE 프로젝트 ( http://www.kde.org/ )에 감사드립니다.
수학적인 설명을 제공해 주신 Loic에게 감사드립니다.
Fedora 패키지를 제공해 주신 Remi Collet에게 감사드립니다.
Debian 패키지를 제공해 주신 Laurent Trinques에게 감사드립니다.
Mandriva 패키지를 제공해 주신 `trem`에게 감사드립니다.
프로젝트 호스팅을 지원해 주신 TuxFamily ( http://tuxfamily.org/ )에 감사드립니다.
요소 제공 및 지원을 해주신 `Nishiki`에게 감사드립니다.
SingleApplication 클래스를 제공해 준 qtcentre.org에 감사드립니다.
스페인어 번역 및 번역 수정에 기여해 주신 Alfredo Carreto ( http://electronicosmx.net )에게 감사드립니다.
이탈리아어 번역에 기여해 주신 'Dr.Slump'와 Silvio에게 감사드립니다.
포르투갈어 번역에 기여해 주신 Jose Carlos Martins에게 감사드립니다.
체코어 번역에 기여해 주신 Pavel Fric에게 감사드립니다.
폴란드어 번역에 기여해 주신 Pawel Smiech에게 감사드립니다.
러시아어 번역에 기여해 주신 Yuriy Litkevich에게 감사드립니다.
카탈로니아어 번역에 기여해 주신 Youssef Ouamalkran에게 감사드립니다.
루마니아어 번역에 기여해 주신 Gabi Mandoc에게 감사드립니다.
독일어 번역에 기여해 주신 Markus Budde, Jonas Stein, Noah Braden에게 감사드립니다.
아랍어 번역에 기여해 주신 Mohamed Souabni에게 감사드립니다.
슬로베니아어 번역에 기여해 주신 Uroš Platiše에게 감사드립니다.
크로아티아어 번역에 기여해 주신 Antun Marakovic에게 감사드립니다.
그리스어 번역에 기여해 주신 Nikos Papadopoylos와 Yannis Gyftomitros에게 감사드립니다.
한국어 번역에 기여해 주신 정광호 님께 감사드립니다.
Gentoo 패키지를 제공해 주신 Markos Chandras에게 감사드립니다.
Slackware 패키지를 제공해 주신 David에게 감사드립니다.
Arch Linux AUR 패키지를 제공해 주신 Chipsterjulien에게 감사드립니다.
OS/2 패키지를 제공해 주신 Elbert에게 감사드립니다.
FreeBSD(GCC 포트) 패키지를 제공해 주신 zloidemon에게 감사드립니다.
Gentoo ebuild 패키지를 제공해 주신 Mrbit에게 감사드립니다.
-17
View File
@@ -214,20 +214,3 @@ QElectroTech と一緒に提供される要素コレクションは現状のま
ライセンスのコピーを見るには http://creativecommons.org/licenses/by/3.0/ にアクセスするか、
「Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.」に
手紙を送ってください。
[ko]
QElectroTech와 함께 제공되는 요소 컬렉션은 “있는 그대로(as is)” 제공되며,
특정 목적에 대한 적합성이나 정상 동작에 대한 어떠한 보증도 제공되지 않습니다.
요소의 사용, 수정 및 전기 도면에의 통합은 도면의 최종 라이선스와 관계없이
아무런 조건 없이 허용됩니다.
본 소프트웨어 또는 관련 파일을 기계 학습(machine learning) 모델을 구축하기 위한
샘플 데이터로 사용하는 것은 허용되지 않습니다.
전기 도면과 분리된 형태로 QElectroTech 요소 컬렉션의 전부 또는 일부를,
수정 여부와 관계없이 재배포하는 경우에는 CC-BY 라이선스 조건을 준수해야 합니다.
본 저작물은 Creative Commons Attribution 3.0 라이선스에 따라 제공됩니다.
라이선스 사본은 다음 주소에서 확인할 수 있습니다.
http://creativecommons.org/licenses/by/3.0/
또는 다음 주소로 서신을 보내실 수 있습니다.
Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
+5 -2
View File
@@ -15,10 +15,10 @@ The main goal of the developers is to provide a libre, easy to use and effective
### Version
The current stable version is 0.100 and was released on 2026.01.25.
The current stable version is 0.90 and was released on 2023.01.06.
Once it has been officially released, the stable version is always frozen and is no longer developed.
New functionalities, bug and issue fixings are further made in the development version (currently 0.100.1 or 0.200.0 if based on new Qt6 port), which can also be [downloaded](https://qelectrotech.org/download.php).
New functionalities, bug and issue fixings are further made in the development version (currently 0.100), which can also be [downloaded](https://qelectrotech.org/download.php).
Users who want to test and take benefits from the last software implementations should use the development version. But... use it at your own risk, since things are sometimes broken or only partially implemented until they are done!
@@ -59,6 +59,9 @@ Here are the technical choices made for the software development:
If you wish to be informed of the latest developments, browse the [archive](https://listengine.tuxfamily.org/lists.tuxfamily.org/qet/) of the project mailing list where all commits (changes) are registered. This archive is publicly available, you don't need any account to access it.
### Build QElectroTech under Windows
To build QElectroTech under microsoft Windows, please follow [these instructions (french)](md/fr/fr_window_build_summary.md)
# Features
@@ -1,7 +1,8 @@
{
"id": "org.qelectrotech.QElectroTech",
"base-version": "5.15-23.08",
"runtime": "org.kde.Platform",
"runtime-version": "5.15-25.08",
"runtime-version": "5.15-23.08",
"sdk": "org.kde.Sdk",
"command": "qelectrotech",
"rename-desktop-file": "org.qelectrotech.qelectrotech.desktop",
@@ -17,17 +18,51 @@
"--socket=cups",
"--filesystem=host"
],
"cleanup": [
"/include",
"/man",
"/share/doc",
"/share/man",
"*.la",
"*.a"
],
"modules": [
"tkinter.json",
"pypi-dependencies.json",
{
"name": "tkinter",
"buildsystem": "simple",
"build-commands": [
"pip3 install --prefix=${FLATPAK_DEST} ."
],
"sources": [
{
"type": "git",
"url": "https://github.com/iwalton3/tkinter-standalone",
"commit": "23c793bad2429f4a81eee9f50e2d07ae845b7785"
}
],
"modules": [
{
"name": "tcl",
"sources": [
{
"type": "archive",
"url": "https://sourceforge.net/projects/tcl/files/Tcl/8.6.11/tcl8.6.11-src.tar.gz",
"sha256": "8c0486668586672c5693d7d95817cb05a18c5ecca2f40e2836b9578064088258"
}
],
"subdir": "unix",
"post-install": [
"chmod +w ${FLATPAK_DEST}/lib/libtcl8.6.so"
]
},
{
"name": "tk",
"sources": [
{
"type": "archive",
"url": "https://sourceforge.net/projects/tcl/files/Tcl/8.6.11/tk8.6.11-src.tar.gz",
"sha256": "5228a8187a7f70fa0791ef0f975270f068ba9557f57456f51eb02d9d4ea31282"
}
],
"subdir": "unix",
"post-install": [
"chmod +w ${FLATPAK_DEST}/lib/libtk8.6.so"
]
}
]
},
{
"name": "qelectrotech",
"buildsystem": "qmake",
@@ -41,11 +76,37 @@
},
{
"type": "patch",
"paths": [
"patches/fix-the-installation-paths.patch"
]
"path": "patches/0001-build-Fix-the-installation-paths.patch"
}
]
}
},
{
"name": "python3-PySimpleGUI",
"buildsystem": "simple",
"build-commands": [
"pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} PySimpleGUI"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/d0/c3/c1ce811a1e48d5e0f2df0b393ff189fae4842ec840bb6e4db79c8da55e74/PySimpleGUI-4.41.2.tar.gz",
"sha256": "cf42d9f61f28c8e790a9c031ce900a9cee5fd2f950da2f055ed36bbc487dcf11"
}
]
},
{
"name": "python3-qet-tb-generator",
"buildsystem": "simple",
"build-commands": [
"pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} qet-tb-generator"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/70/aa/ebde0dddfbde799a4e8cf0564e52f95089105a7f562739ee1d16ff5a495a/qet_tb_generator-1.3.1.tar.gz",
"sha256": "52c9836387d54bc30ea29272068ec156fc65c3905e0cb863afd9418abc3c0907"
}
]
}
]
}
@@ -1,6 +1,16 @@
diff -ruN a/qelectrotech.pro b/qelectrotech.pro
--- a/qelectrotech.pro 2023-04-20 11:47:07.695847458 +0200
+++ b/qelectrotech.pro 2023-04-20 11:51:14.843611898 +0200
From 14f0685ddcf3a7d64bb85a3e9a9ac97c369bb508 Mon Sep 17 00:00:00 2001
From: Laurent Trinques <scorpio@qelectrotech.org>
Date: Sat, 26 Sep 2020 22:52:52 +0200
Subject: [PATCH] build: Fix the installation paths
---
qelectrotech.pro | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/qelectrotech.pro b/qelectrotech.pro
index 7baddbb08..5dcda04b6 100644
--- a/qelectrotech.pro
+++ b/qelectrotech.pro
@@ -5,18 +5,18 @@
# Chemins utilises pour la compilation et l'installation de QET
unix {
@@ -25,3 +35,6 @@ diff -ruN a/qelectrotech.pro b/qelectrotech.pro
QET_APPDATA_PATH = 'share/appdata'
}
win32 {
--
2.35.1
@@ -1,54 +0,0 @@
From 5cb80674cec7363ed00bab5248b3674ca5241c2f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sabri=20=C3=9Cnal?= <yakushabb@gmail.com>
Date: Fri, 20 Feb 2026 22:56:52 +0300
Subject: [PATCH] Fix appdata paper cuts
---
misc/qelectrotech.appdata.xml | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/misc/qelectrotech.appdata.xml b/misc/qelectrotech.appdata.xml
index dd06ab7..eb02119 100644
--- a/misc/qelectrotech.appdata.xml
+++ b/misc/qelectrotech.appdata.xml
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2006-2023 The QElectroTech Team -->
-<application>
- <id type="desktop">qelectrotech.desktop</id>
+<component type="desktop-application">
+ <id>org.qelectrotech.QElectroTech</id>
+ <launchable type="desktop-id">qelectrotech.desktop</launchable>
<metadata_license>MIT</metadata_license>
<project_license>GPL-2.0-or-later</project_license>
<name>QElectroTech</name>
@@ -83,9 +84,22 @@
QET は要素と回路図に XML 形式を利用し、回路図エディタ、要素エディタ、表題欄エディタを含みます。
</p>
</description>
- <url type="homepage">http://qelectrotech.org</url>
+ <url type="homepage">https://qelectrotech.org</url>
+ <url type="bugtracker">https://qelectrotech.org/bugtracker</url>
+ <url type="vcs-browser">https://github.com/qelectrotech/qelectrotech-source-mirror</url>
+ <developer id="org.qelectrotech">
+ <name>QElectroTech</name>
+ </developer>
<screenshots>
- <screenshot type="default">http://download.tuxfamily.org/qet/screens/qelectrotech5.png</screenshot>
+ <screenshot type="default">
+ <image>https://qelectrotech.org/screenshots/qet_overview04.png</image>
+ </screenshot>
+ <screenshot>
+ <image>https://qelectrotech.org/screenshots/qet_overview06.png</image>
+ </screenshot>
+ <screenshot>
+ <image>https://qelectrotech.org/screenshots/qet_overview09.png</image>
+ </screenshot>
</screenshots>
- <updatecontact>qet@lists.tuxfamily.org</updatecontact>
-</application>
+ <update_contact>qet@lists.tuxfamily.org</update_contact>
+</component>
--
2.53.0
@@ -1,184 +0,0 @@
commit 3bbb09a0598fc976d2bf8dac932b27740086c1bd
Author: Hubert Figuière <hub@figuiere.net>
Date: Sun Dec 21 17:49:43 2025 -0500
Port to Python 3.13
Signed-off-by: Hubert Figuière <hub@figuiere.net>
diff --git a/_tkinter.c b/_tkinter.c
index e537707..dfc5789 100644
--- a/_tkinter.c
+++ b/_tkinter.c
@@ -21,7 +21,6 @@ Copyright (C) 1994 Steen Lumholt.
*/
-#define PY_SSIZE_T_CLEAN
#ifndef Py_BUILD_CORE_BUILTIN
# define Py_BUILD_CORE_MODULE 1
#endif
@@ -32,6 +31,9 @@ Copyright (C) 1994 Steen Lumholt.
# include "pycore_fileutils.h" // _Py_stat()
#endif
+#include "pycore_long.h" // _PyLong_IsNegative()
+#include "pycore_sysmodule.h" // _PySys_GetOptionalAttrString()
+
#ifdef MS_WINDOWS
#include <windows.h>
#endif
@@ -135,7 +137,7 @@ _get_tcl_lib_path()
struct stat stat_buf;
int stat_return_value;
- prefix = PyUnicode_FromWideChar(Py_GetPrefix(), -1);
+ (void) _PySys_GetOptionalAttrString("base_prefix", &prefix);
if (prefix == NULL) {
return NULL;
}
@@ -143,9 +145,11 @@ _get_tcl_lib_path()
/* Check expected location for an installed Python first */
tcl_library_path = PyUnicode_FromString("\\tcl\\tcl" TCL_VERSION);
if (tcl_library_path == NULL) {
+ Py_DECREF(prefix);
return NULL;
}
tcl_library_path = PyUnicode_Concat(prefix, tcl_library_path);
+ Py_DECREF(prefix);
if (tcl_library_path == NULL) {
return NULL;
}
@@ -959,7 +963,8 @@ AsObj(PyObject *value)
(unsigned char *)(void *)&wideValue,
sizeof(wideValue),
PY_LITTLE_ENDIAN,
- /* signed */ 1) == 0) {
+ /* signed */ 1,
+ /* with_exceptions */ 1) == 0) {
return Tcl_NewWideIntObj(wideValue);
}
PyErr_Clear();
@@ -1988,7 +1993,7 @@ _tkinter_tkapp_getboolean(TkappObject *self, PyObject *arg)
int v;
if (PyLong_Check(arg)) { /* int or bool */
- return PyBool_FromLong(Py_SIZE(arg) != 0);
+ return PyBool_FromLong(!_PyLong_IsZero((PyLongObject *)arg));
}
if (PyTclObject_Check(arg)) {
diff --git a/clinic/_tkinter.c.h b/clinic/_tkinter.c.h
index 9103565..f43510d 100644
--- a/clinic/_tkinter.c.h
+++ b/clinic/_tkinter.c.h
@@ -2,6 +2,8 @@
preserve
[clinic start generated code]*/
+#include "pycore_modsupport.h" // _PyArg_BadArgument()
+
PyDoc_STRVAR(_tkinter_tkapp_eval__doc__,
"eval($self, script, /)\n"
"--\n"
@@ -426,7 +428,7 @@ _tkinter_tkapp_createfilehandler(TkappObject *self, PyObject *const *args, Py_ss
goto exit;
}
file = args[0];
- mask = _PyLong_AsInt(args[1]);
+ mask = PyLong_AsInt(args[1]);
if (mask == -1 && PyErr_Occurred()) {
goto exit;
}
@@ -490,7 +492,7 @@ _tkinter_tkapp_createtimerhandler(TkappObject *self, PyObject *const *args, Py_s
if (!_PyArg_CheckPositional("createtimerhandler", nargs, 2, 2)) {
goto exit;
}
- milliseconds = _PyLong_AsInt(args[0]);
+ milliseconds = PyLong_AsInt(args[0]);
if (milliseconds == -1 && PyErr_Occurred()) {
goto exit;
}
@@ -524,7 +526,7 @@ _tkinter_tkapp_mainloop(TkappObject *self, PyObject *const *args, Py_ssize_t nar
if (nargs < 1) {
goto skip_optional;
}
- threshold = _PyLong_AsInt(args[0]);
+ threshold = PyLong_AsInt(args[0]);
if (threshold == -1 && PyErr_Occurred()) {
goto exit;
}
@@ -558,7 +560,7 @@ _tkinter_tkapp_dooneevent(TkappObject *self, PyObject *const *args, Py_ssize_t n
if (nargs < 1) {
goto skip_optional;
}
- flags = _PyLong_AsInt(args[0]);
+ flags = PyLong_AsInt(args[0]);
if (flags == -1 && PyErr_Occurred()) {
goto exit;
}
@@ -741,29 +743,29 @@ _tkinter_create(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
if (nargs < 4) {
goto skip_optional;
}
- interactive = _PyLong_AsInt(args[3]);
- if (interactive == -1 && PyErr_Occurred()) {
+ interactive = PyObject_IsTrue(args[3]);
+ if (interactive < 0) {
goto exit;
}
if (nargs < 5) {
goto skip_optional;
}
- wantobjects = _PyLong_AsInt(args[4]);
- if (wantobjects == -1 && PyErr_Occurred()) {
+ wantobjects = PyObject_IsTrue(args[4]);
+ if (wantobjects < 0) {
goto exit;
}
if (nargs < 6) {
goto skip_optional;
}
- wantTk = _PyLong_AsInt(args[5]);
- if (wantTk == -1 && PyErr_Occurred()) {
+ wantTk = PyObject_IsTrue(args[5]);
+ if (wantTk < 0) {
goto exit;
}
if (nargs < 7) {
goto skip_optional;
}
- sync = _PyLong_AsInt(args[6]);
- if (sync == -1 && PyErr_Occurred()) {
+ sync = PyObject_IsTrue(args[6]);
+ if (sync < 0) {
goto exit;
}
if (nargs < 8) {
@@ -814,7 +816,7 @@ _tkinter_setbusywaitinterval(PyObject *module, PyObject *arg)
PyObject *return_value = NULL;
int new_val;
- new_val = _PyLong_AsInt(arg);
+ new_val = PyLong_AsInt(arg);
if (new_val == -1 && PyErr_Occurred()) {
goto exit;
}
diff --git a/setup.py b/setup.py
index f379305..cf7b6ad 100644
--- a/setup.py
+++ b/setup.py
@@ -3,11 +3,11 @@ from distutils.core import setup, Extension
module1 = Extension('_tkinter',
libraries=['tcl8.6', 'tk8.6'],
sources=['_tkinter.c'],
- include_dirs=['/app/include/'])
+ include_dirs=['/app/include/', '/usr/include/python3.13/internal/'])
setup(
name='tkinter-standalone',
- version='3.11',
+ version='3.13',
description='Tkinter packaged as an external package for flatpak.',
ext_modules=[module1],
packages=["tkinter"]
-40
View File
@@ -1,40 +0,0 @@
{
"name": "pypi-dependencies",
"buildsystem": "simple",
"build-commands": [],
"modules": [
{
"name": "python3-PySimpleGUI",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"PySimpleGUI\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/4d/d9/3de4b7ca71a7779e4f4a160088621b072a29d9b814a7fa9b5411571f4849/pysimplegui-5.0.8.3-py3-none-any.whl",
"sha256": "67e35ad6dd76e9369051261114f4711308e87815a0488f7fa28b37c29a546f8b"
}
]
},
{
"name": "python3-qet-tb-generator",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"qet-tb-generator\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/4d/d9/3de4b7ca71a7779e4f4a160088621b072a29d9b814a7fa9b5411571f4849/pysimplegui-5.0.8.3-py3-none-any.whl",
"sha256": "67e35ad6dd76e9369051261114f4711308e87815a0488f7fa28b37c29a546f8b"
},
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/63/d6/81de49a3ccec259583241fec4d79c668eff4acf9eb4d0226db36e1399f2d/qet_tb_generator-1.3.1-py3-none-any.whl",
"sha256": "80fb4af229edfd5774e61f96fa387ff394d5060abd0ca45c3c74d29de1ce9b53"
}
]
}
]
}
-58
View File
@@ -1,58 +0,0 @@
{
"//note": "The `tkinter` module is missing from the Freedesktop Sdk's Python installation",
"name": "tkinter",
"buildsystem": "simple",
"build-commands": [
"pip3 install --prefix=${FLATPAK_DEST} --no-build-isolation ."
],
"sources": [
{
"type": "git",
"url": "https://github.com/iwalton3/tkinter-standalone",
"commit": "88aa05075d90d393a29a484bce676e237d311082"
},
{
"type": "patch",
"path": "patches/tkinter-build.patch"
}
],
"modules": [
{
"name": "tcl",
"buildsystem": "autotools",
"subdir": "unix",
"post-install": [
"chmod 755 /app/lib/libtcl*.so"
],
"cleanup": [
"/bin"
],
"sources": [
{
"type": "archive",
"url": "https://prdownloads.sourceforge.net/tcl/tcl8.6.17-src.tar.gz",
"sha256": "a3903371efcce8a405c5c245d029e9f6850258a60fa3761c4d58995610949b31"
}
]
},
{
"name": "tk",
"buildsystem": "autotools",
"subdir": "unix",
"post-install": [
"chmod 755 /app/lib/libtk*.so"
],
"cleanup": [
"/bin",
"/lib/tk*/demos"
],
"sources": [
{
"type": "archive",
"url": "https://prdownloads.sourceforge.net/tcl/tk8.6.17-src.tar.gz",
"sha256": "e4982df6f969c08bf9dd858a6891059b4a3f50dc6c87c10abadbbe2fc4838946"
}
]
}
]
}
+191
View File
@@ -0,0 +1,191 @@
# Header, don't edit
NLF v6
# Start editing here
# Language ID
2067
# Font and size - dash (-) means default
-
-
# Codepage - dash (-) means ANSI code page
1252
# RTL - anything else than RTL means LTR
-
# Translation by Ronny Desmedt (any credits should go here)
# ^Branding
Nullsoft Install System %s
# ^SetupCaption
$(^Name) Installatie
# ^UninstallCaption
$(^Name) Deïnstallatie
# ^LicenseSubCaption
: Licentie overeenkomst
# ^ComponentsSubCaption
: Installatie Opties
# ^DirSubCaption
: Installatie Map
# ^InstallingSubCaption
: Installeren
# ^CompletedSubCaption
: Voltooid
# ^UnComponentsSubCaption
: Deïnstallatie Opties
# ^UnDirSubCaption
: Deïnstallatie Map
# ^ConfirmSubCaption
: Bevestigen
# ^UninstallingSubCaption
: Deïnstalleren
# ^UnCompletedSubCaption
: Voltooid
# ^BackBtn
< &Terug
# ^NextBtn
&Volgende >
# ^AgreeBtn
Ik ben &Akkoord
# ^AcceptBtn
Ik &Accepteer de licentie overeenkomst
# ^DontAcceptBtn
Ik &Accepteer de licentie overeenkomst niet
# ^InstallBtn
&Installeer
# ^UninstallBtn
&Deïnstalleer
# ^CancelBtn
Afbreken
# ^CloseBtn
&Sluiten
# ^BrowseBtn
B&laderen...
# ^ShowDetailsBtn
Toon &details
# ^ClickNext
Klik op volgende om verder te gaan.
# ^ClickInstall
Klik op installeren om de installatie te starten.
# ^ClickUninstall
Klik op deïnstalleren om de installatie te verwijderen.
# ^Name
Naam
# ^Completed
Voltooid
# ^LicenseText
Gelieve de licentie overeenkomst te lezen alvorens $(^NameDA) te installeren. Als u akkord bent met de licentie overeenkomst, klik op akkoord.
# ^LicenseTextCB
Gelieve de licentie overeenkomst te lezen alvorens $(^NameDA) te installeren. Als u akkord bent met de licentie overeenkomst, klik op onderstaande selectievakje. $_CLICK
# ^LicenseTextRB
Gelieve de licentie overeenkomst te lezen alvorens $(^NameDA) te installeren. Als u akkord bent met de licentie overeenkomst, selecteer de eerste onderstaande optie. $_CLICK
# ^UnLicenseText
Gelieve de licentie overeenkomst te lezen alvorens $(^NameDA) te deïnstalleren. Als u akkord bent met de licentie overeenkomst, klik op akkoord.
# ^UnLicenseTextCB
Gelieve de licentie overeenkomst te lezen alvorens $(^NameDA) te deïnstalleren. Als u akkord bent met de licentie overeenkomst, klik op onderstaande selectievakje. $_CLICK
# ^UnLicenseTextRB
Gelieve de licentie overeenkomst te lezen alvorens $(^NameDA) te deïnstalleren. Als u akkord bent met de licentie overeenkomst, selecteer de eerste onderstaande optie. $_CLICK
# ^Custom
Aangepast
# ^ComponentsText
Selecteer de onderdelen die u wilt installeren en deselecteer de onderdelen die u niet wilt installeren. $_CLICK
# ^ComponentsSubText1
Selecteer een installatie type:
# ^ComponentsSubText2_NoInstTypes
Selecteer de onderdelen om te installeren:
# ^ComponentsSubText2
Of, selecteer optionelen onderdelen die u wilt installeren:
# ^UnComponentsText
Selecteer de onderdelen die u wilt deïnstalleren en deselecteer de onderdelen die u niet wilt deïinstalleren. $_CLICK
# ^UnComponentsSubText1
Selecteer een deïnstallatie type:
# ^UnComponentsSubText2_NoInstTypes
Selecteer de onderdelen om te deïnstalleren:
# ^UnComponentsSubText2
Of, selecteer optionelen onderdelen die u wilt deïnstalleren:
# ^DirText
De installatie van $(^NameDA) wordt in volgende map uitgevoerd. Om in een andere map te installeren, klik op bladeren om een andere map te selecteren. $_CLICK
# ^DirSubText
Installatie map
# ^DirBrowseText
Selecteerd de map om $(^NameDA) in te installeren:
# ^UnDirText
De deïnstallatie van $(^NameDA) in de volgende map. Om een andere map te deïnstalleren, klik op bladren om een andere map te selecteren. $_CLICK
# ^UnDirSubText
""
# ^UnDirBrowseText
Selecteer en map om $(^NameDA) van te deînstalleren:
# ^SpaceAvailable
"Beschikbare ruimte: "
# ^SpaceRequired
"Benodigde ruimte: "
# ^UninstallingText
$(^NameDA) wordt gedeïnstalleerd uit volgende map. $_CLICK
# ^UninstallingSubText
Deïnstalleren van:
# ^FileError
Fout bij openen van bestand om te schrijven: \r\n\r\n$0\r\n\r\nKlik op afbreken om de installatie te stoppen,\r\nOpnieuw om te proberen, of\r\nNegeren om dit bestand over te slaan.
# ^FileError_NoIgnore
Fout bij openen van bestand om te schrijven: \r\n\r\n$0\r\n\r\nOpnieuw om te proberen, of\r\nAfbreken om de installatie te stoppen.
# ^CantWrite
"Kan niet schrijven: "
# ^CopyFailed
Kopieren mislukt
# ^CopyTo
"Copier naar "
# ^Registering
"Registreren: "
# ^Unregistering
"Deregistreren: "
# ^SymbolNotFound
"Kan symbool niet vinden: "
# ^CouldNotLoad
"Kan niet laden: "
# ^CreateFolder
"Map maken: "
# ^CreateShortcut
"Snelkoppeling maken: "
# ^CreatedUninstaller
"Doe deïnstallatie: "
# ^Delete
"Verwijder bestanden: "
# ^DeleteOnReboot
Verwijder bij herstarten: "
# ^ErrorCreatingShortcut
"Fout bij maken snelkoppeling: "
# ^ErrorCreating
"Fout bij maken: "
# ^ErrorDecompressing
Fout bij uitpakken gegevens! Beschadigd bestand?
# ^ErrorRegistering
Fout bij registreren DLL
# ^ExecShell
"ExecShell: "
# ^Exec
"Uitvoeren: "
# ^Extract
"Extract: "
# ^ErrorWriting
Fout: fout bij schrijven naar bestand "
# ^InvalidOpcode
Installie beschadigd: niet toegestane opcode
# ^NoOLE
"Geen OLE voor: "
# ^OutputFolder
"Bestemmings map: "
# ^RemoveFolder
"Verwijder mapr: "
# ^RenameOnReboot
"Hernoem bij opstarten: "
# ^Rename
"Hernoem: "
# ^Skipped
Overgeslagen: "
# ^CopyDetails
Copier details naar klembord
# ^LogInstall
Log instaltie proces
# ^Byte
B
# ^Kilo
K
# ^Mega
M
# ^Giga
G
+128
View File
@@ -0,0 +1,128 @@
;Language:Dutch_Belgium (2067)
;By Ronny Desmedt
!insertmacro LANGFILE "Dutch_Belgium" "Dutch_Belgium"
!ifdef MUI_WELCOMEPAGE
${LangFileString} MUI_TEXT_WELCOME_INFO_TITLE "Welkom bij $(^NameDA) installatie Wizard"
${LangFileString} MUI_TEXT_WELCOME_INFO_TEXT "Deze wizard zal u begeleiden bij de installatie van $(^NameDA).$\r$\n$\r$\nHet is aanbevol dat u alle andere programmas afsluit voordat u deze installatie uitvoerd. Dit geeft de mogelijkheid om relevante systeem bestanden bij te werken zonder dat uw systeem terug moet opstarten.$\r$\n$\r$\n$_CLICK"
!endif
!ifdef MUI_UNWELCOMEPAGE
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TITLE "Welkom bij de $(^NameDA) deïnstallatie wizard"
${LangFileString} MUI_UNTEXT_WELCOME_INFO_TEXT "Deze wizard zal u begeleiden bij de deïnstallatie van $(^NameDA).$\r$\n$\r$\nControleer of $(^NameDA) is afgesloten alvorens de deïnstallatie te starten.$\r$\n$\r$\n$_CLICK"
!endif
!ifdef MUI_LICENSEPAGE
${LangFileString} MUI_TEXT_LICENSE_TITLE "Licentie overeenkomst"
${LangFileString} MUI_TEXT_LICENSE_SUBTITLE "Gelieve de licentie te lezen alvorens U $(^NameDA) installeert."
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM "Klik op akkoord om de overeenkomst te aanvaarden. U moet de overeenkomst aanvaarden om $(^NameDA) te installeren."
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_CHECKBOX "Als u de voorwaarden van de overeenkomst aanvaard, Klik op onderstaande selectievakje. U moet de overeenkomst aanvaarden om $(^NameDA) te installeren. $_CLICK"
${LangFileString} MUI_INNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Als u de voorwaarden van de overeenkomst aanvaard, selecteer de eerste onderstaande optie. U moet de overeenkomst aanvaarden om $(^NameDA) te installeren. $_CLICK"
!endif
!ifdef MUI_UNLICENSEPAGE
${LangFileString} MUI_UNTEXT_LICENSE_TITLE "Licentie overeenkomst"
${LangFileString} MUI_UNTEXT_LICENSE_SUBTITLE "Gelieve de licentie overeenkomst te herlezen alvorens met de deïnstallatie van $(^NameDA) verder te doen."
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM "Klik op akkoord om de overeenkomst te aanvaarden. U moet de overeenkomst aanvaarden om $(^NameDA) te deïnstalleren."
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_CHECKBOX "Als u de voorwaarden van de overeenkomst aanvaard, Klik op onderstaande selectievakje. U moet de overeenkomst aanvaarden om $(^NameDA) te deïnstalleren. $_CLICK"
${LangFileString} MUI_UNINNERTEXT_LICENSE_BOTTOM_RADIOBUTTONS "Als u de voorwaarden van de overeenkomst aanvaard, selecteer de eerste onderstaande optie. U moet de overeenkomst aanvaarden om $(^NameDA) te deïnstalleren. $_CLICK"
!endif
!ifdef MUI_LICENSEPAGE | MUI_UNLICENSEPAGE
${LangFileString} MUI_INNERTEXT_LICENSE_TOP "Gebruik pagina neer om de rest van de overeenkomst te lezen."
!endif
!ifdef MUI_COMPONENTSPAGE
${LangFileString} MUI_TEXT_COMPONENTS_TITLE "Kies onderdelen"
${LangFileString} MUI_TEXT_COMPONENTS_SUBTITLE "Kies de onderdelen van $(^NameDA) die u wilt installeren."
!endif
!ifdef MUI_UNCOMPONENTSPAGE
${LangFileString} MUI_UNTEXT_COMPONENTS_TITLE "Kies onderdelen"
${LangFileString} MUI_UNTEXT_COMPONENTS_SUBTITLE "Kies de onderdelen van $(^NameDA) die u wilt deïnstalleren."
!endif
!ifdef MUI_COMPONENTSPAGE | MUI_UNCOMPONENTSPAGE
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_TITLE "Beschrijving"
!ifndef NSIS_CONFIG_COMPONENTPAGE_ALTERNATIVE
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beweeg de muisaanwijzer over de onderdelen om de beschrijving te zien."
!else
${LangFileString} MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO "Beweeg de muisaanwijzer over de onderdelen om de beschrijving te zien."
!endif
!endif
!ifdef MUI_DIRECTORYPAGE
${LangFileString} MUI_TEXT_DIRECTORY_TITLE "Kies een installatie locatie"
${LangFileString} MUI_TEXT_DIRECTORY_SUBTITLE "Kies een map waar U $(^NameDA) wilt installeren."
!endif
!ifdef MUI_UNDIRECTORYPAGE
${LangFileString} MUI_UNTEXT_DIRECTORY_TITLE "Kies een deïnstallatie locatie"
${LangFileString} MUI_UNTEXT_DIRECTORY_SUBTITLE "Kies een map waar U $(^NameDA) wilt deïnstalleren."
!endif
!ifdef MUI_INSTFILESPAGE
${LangFileString} MUI_TEXT_INSTALLING_TITLE "Installeren"
${LangFileString} MUI_TEXT_INSTALLING_SUBTITLE "Even gedult terwijl $(^NameDA) wordt geinstalleerd."
${LangFileString} MUI_TEXT_FINISH_TITLE "Installatie voltooid"
${LangFileString} MUI_TEXT_FINISH_SUBTITLE "De installatie is succesvol afgerond."
${LangFileString} MUI_TEXT_ABORT_TITLE "Installatie is afgebroken"
${LangFileString} MUI_TEXT_ABORT_SUBTITLE "De installatie is niet voltooid."
!endif
!ifdef MUI_UNINSTFILESPAGE
${LangFileString} MUI_UNTEXT_UNINSTALLING_TITLE "DeïnEven geduld terwijl $(^NameDA) wordt gedeïnstalleerd."
${LangFileString} MUI_UNTEXT_FINISH_TITLE "Deïnstallatie voltooid"
${LangFileString} MUI_UNTEXT_FINISH_SUBTITLE "Deïnstallatie succesvol afgerond."
${LangFileString} MUI_UNTEXT_ABORT_TITLE "Deïnstallatie onderbroken"
${LangFileString} MUI_UNTEXT_ABORT_SUBTITLE "Deïnstallatie is niet voltooid."
!endif
!ifdef MUI_FINISHPAGE
${LangFileString} MUI_TEXT_FINISH_INFO_TITLE "Voltooien van de $(^NameDA) installatie Wizard"
${LangFileString} MUI_TEXT_FINISH_INFO_TEXT "$(^NameDA) is geinstalleerd op uw computer.$\r$\n$\r$\nKlik op einde om de installatie wizard af te sluiten."
${LangFileString} MUI_TEXT_FINISH_INFO_REBOOT "Uw computer moet herstarten op de installatie van $(^NameDA) te voltooien. Wilt u nu opnieuw opstarten?"
!endif
!ifdef MUI_UNFINISHPAGE
${LangFileString} MUI_UNTEXT_FINISH_INFO_TITLE "Voltooien van de $(^NameDA) deïnstallatie wizard"
${LangFileString} MUI_UNTEXT_FINISH_INFO_TEXT "$(^NameDA) is gedeïnstalleerd op uw computer.$\r$\n$\r$\nKlik op einde om de installatie wizard af te sluiten."
${LangFileString} MUI_UNTEXT_FINISH_INFO_REBOOT "Uw computer moet herstarten op de deïnstallatie van $(^NameDA)te voltooien. Wilt u nu opnieuw opstarten?"
!endif
!ifdef MUI_FINISHPAGE | MUI_UNFINISHPAGE
${LangFileString} MUI_TEXT_FINISH_REBOOTNOW "Nu herstarten"
${LangFileString} MUI_TEXT_FINISH_REBOOTLATER "Ik wil later herstarten"
${LangFileString} MUI_TEXT_FINISH_RUN "&Starten $(^NameDA)"
${LangFileString} MUI_TEXT_FINISH_SHOWREADME "&Toon leesmij"
${LangFileString} MUI_BUTTONTEXT_FINISH "&Einde"
!endif
!ifdef MUI_STARTMENUPAGE
${LangFileString} MUI_TEXT_STARTMENU_TITLE "Kies start menu map"
${LangFileString} MUI_TEXT_STARTMENU_SUBTITLE "Kies een map in start menu voor de snelkoppeling van $(^NameDA)."
${LangFileString} MUI_INNERTEXT_STARTMENU_TOP "Kies een map in start menu waar u de programma snelkoppelingen wilt aanmaken. U kan ook de naam van een nieuwe map opgeven."
${LangFileString} MUI_INNERTEXT_STARTMENU_CHECKBOX "Maak geen snelkoppelingen"
!endif
!ifdef MUI_UNCONFIRMPAGE
${LangFileString} MUI_UNTEXT_CONFIRM_TITLE "Deïnstalleer$(^NameDA)"
${LangFileString} MUI_UNTEXT_CONFIRM_SUBTITLE "Verwijder $(^NameDA) van uw computer."
!endif
!ifdef MUI_ABORTWARNING
${LangFileString} MUI_TEXT_ABORTWARNING "Weet u zeker dat U installatie van $(^Name) wilt afbreken?"
!endif
!ifdef MUI_UNABORTWARNING
${LangFileString} MUI_UNTEXT_ABORTWARNING "Weet u zeker dat U de deïnstallatie van $(^Name)wilt afbreken?"
!endif
!ifdef MULTIUSER_INSTALLMODEPAGE
${LangFileString} MULTIUSER_TEXT_INSTALLMODE_TITLE "Kies gebruikers"
${LangFileString} MULTIUSER_TEXT_INSTALLMODE_SUBTITLE "Kies voor welke gebruikers U $(^NameDA) wilt installeren."
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_TOP "Kies of U $(^NameDA) alleen voor u zelf of voor alle gebruikers op deze computer wilt installeren. $(^ClickNext)"
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_ALLUSERS "Installeer voor iedereen die deze computer gebruikt"
${LangFileString} MULTIUSER_INNERTEXT_INSTALLMODE_CURRENTUSER "Installeer alleen voor mij"
!endif
+407 -485
View File
@@ -1,485 +1,407 @@
; this file is part of installer for QElectroTech
; Copyright (C)2015 QElectroTech Team <scorpio@qelectrotech.org>
;
; This program is free software; you can redistribute it and/or
; modify it under the terms of the GNU General Public License
; as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
; WebSite : https://qelectrotech.org/
;==============================================================================
; NSIS 3.x compatibility notes:
; - Unicode is native in NSIS 3 (no need for Unicode installer plugin)
; - XPStyle is deprecated/removed; ManifestSupportedOS replaces it
; - SetCompressor must appear before any Section/Function
; - SetRegView 64 moved to top of the hidden section (before WriteRegStr)
; - x64.nsh is still available but ${RunningX64} is now also in x64.nsh
; - MUI2.nsh is unchanged; MUI_LANGDLL_ALLLANGUAGES is still valid
; - FileFunc.nsh / Locate macro: unchanged
; - Var /GLOBAL must be declared at global scope, not inside a Section
;==============================================================================
;--------------------------------
; NSIS 3 requires SetCompressor BEFORE any Section or Function
SetCompressor /FINAL /SOLID lzma
;--------------------------------
; Includes
!include x64.nsh
!include "MUI2.nsh"
!include "FileFunc.nsh"
!insertmacro Locate
!insertmacro GetParameters
!insertmacro GetOptions
;--------------------------------
; NSIS 3: Unicode is the default. The installer binary will be Unicode.
; No extra plugin needed.
!ifndef PROC
!define PROC 64
!endif
;--------------------------------
; General Product Description Definitions
!define SOFT_NAME "QElectroTech"
!define SOFT_VERSION "0.5-dev_x86_64-win64+4094"
!define SOFT_WEB_SITE "https://qelectrotech.org/"
!define SOFT_BUILD "1"
;--------------------------------
; General settings
CRCCheck force
BrandingText "${SOFT_NAME}-${SOFT_VERSION}-${SOFT_BUILD}"
; NSIS 3: XPStyle is removed. Use ManifestSupportedOS to declare modern OS support.
; This replaces "XPStyle on" and enables proper DPI awareness + visual styles.
ManifestSupportedOS all
ManifestDPIAware true
; Name and output file
Name "${SOFT_NAME} ${SOFT_VERSION}"
OutFile "Installer_${SOFT_NAME}-${SOFT_VERSION}-${SOFT_BUILD}.exe"
; Default installation folder
InstallDir "$PROGRAMFILES64\${SOFT_NAME}"
; Get installation folder from registry if available
; NSIS 3: InstallDirRegKey still works, but SetRegView 64 must be set at
; runtime (in .onInit) to read 64-bit registry hive correctly.
InstallDirRegKey HKCU "Software\${SOFT_NAME}" ""
; Request admin privileges (required for HKLM / file associations)
RequestExecutionLevel admin
;--------------------------------
; Declare global variables at script scope (NSIS 3 requirement)
; In NSIS 2 these could be declared inside a Section; that still compiles
; in NSIS 3 but triggers a warning. Declare them here.
Var final_qet_exe
Var final_project_ico
Var final_element_ico
Var final_titleblock_ico
;--------------------------------
; MUI Interface Settings
!define MUI_ABORTWARNING
; NSIS 3 ships updated icons; XPUI icons are still present for compatibility.
; You may switch to the modern ones:
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\nsis3-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\nsis3-uninstall.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP ".\images\wizard.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP ".\images\header.bmp"
;--------------------------------
; Language Selection Dialog Settings (remember chosen language in registry)
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\${SOFT_NAME}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
;--------------------------------
; Pages
!define MUI_COMPONENTSPAGE_SMALLDESC
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "files\LICENSE"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
; Finish page checkbox to launch QElectroTech
!define MUI_FINISHPAGE_RUN "$INSTDIR\Lancer QET.bat"
!define MUI_FINISHPAGE_RUN_NOTCHECKED
!define MUI_FINISHPAGE_RUN_TEXT "$(Check)"
!insertmacro MUI_PAGE_FINISH
;--------------------------------
; Languages
; NSIS 3: MUI_LANGDLL_ALLLANGUAGES is still supported and works as before.
!define MUI_LANGDLL_ALLLANGUAGES
!insertmacro MUI_LANGUAGE "English" ; first = default
!insertmacro MUI_LANGUAGE "Korean"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "Spanish"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "Czech"
!insertmacro MUI_LANGUAGE "Polish"
!insertmacro MUI_LANGUAGE "Greek"
!insertmacro MUI_LANGUAGE "Arabic"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Romanian"
!insertmacro MUI_LANGUAGE "Catalan"
!insertmacro MUI_LANGUAGE "Croatian"
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "Danish"
!insertmacro MUI_RESERVEFILE_LANGDLL
; Language strings for all supported locales
!include lang_extra.nsh
!include lang_extra_fr.nsh
; NOTE: The string "uninstFailed" must be defined in lang_extra.nsh and
; lang_extra_fr.nsh (and any other lang_extra_*.nsh) like so:
; LangString uninstFailed ${LANG_ENGLISH} "Uninstallation of the previous version failed.$\nPlease uninstall QElectroTech manually before continuing."
; LangString uninstFailed ${LANG_FRENCH} "La désinstallation de la version précédente a échoué.$\nVeuillez désinstaller QElectroTech manuellement avant de continuer."
;==============================================================================
; SECTIONS
;==============================================================================
SetOverwrite on
Section "Main Program"
SectionIn RO ; Read-only always installed
SetOutPath "$INSTDIR\bin\"
File "./files/bin/${SOFT_NAME}.exe"
SetOutPath "$INSTDIR"
File "./files/ChangeLog"
File "./files/CREDIT"
File "./files/ELEMENTS.LICENSE"
File "./files/LICENSE"
File "./files/qet_uninstall_file_associations.reg"
File "./files/README"
File "./files/register_filetypes.bat"
File "Lancer QET.bat"
SetOutPath "$INSTDIR"
File /r "./files/ico"
SectionEnd
;---------------------------
SetOverwrite on
SubSection "$(Elements)" SEC01
SetOverwrite on
Section "$(Electric)"
SetOutPath "$INSTDIR\elements"
File /r "./files/elements/10_electric"
SectionEnd
SetOverwrite on
Section "$(Logic)"
SetOutPath "$INSTDIR\elements"
File /r "./files/elements/20_logic"
SectionEnd
SetOverwrite on
Section "$(Hydraulic)"
SetOutPath "$INSTDIR\elements"
File /r "./files/elements/30_hydraulic"
SectionEnd
SetOverwrite on
Section "$(Pneumatic)"
SetOutPath "$INSTDIR\elements"
File /r "./files/elements/50_pneumatic"
SectionEnd
;---------------------------------
SubSection "$(Energy)"
SetOverwrite on
Section "$(water)"
SetOutPath "$INSTDIR\elements\60_energy"
File /r "./files/elements/60_energy/11_water"
File /r "./files/elements/60_energy/"
SectionEnd
SetOverwrite on
Section "$(Refrigeration)"
SetOutPath "$INSTDIR\elements\60_energy"
File /r "./files/elements/60_energy/21_refrigeration"
File /r "./files/elements/60_energy/"
SectionEnd
SetOverwrite on
Section "$(Solar_thermal)"
SetOutPath "$INSTDIR\elements\60_energy"
File /r "./files/elements/60_energy/31_solar_thermal"
File /r "./files/elements/60_energy/"
SectionEnd
SubSectionEnd
SubSectionEnd
;-------------------------------
SetOverwrite on
Section "$(Lang)" SEC02
SetOutPath "$INSTDIR\lang"
File "./files/lang/*.qm"
SectionEnd
SetOverwrite on
Section "$(Titleblocks)" SEC03
SetOutPath "$INSTDIR"
File /r "./files/titleblocks"
SectionEnd
SetOverwrite on
Section "$(Examples)" SEC04
SetOutPath "$INSTDIR"
File /r "./files/examples"
SectionEnd
;--------------------------------
; Component descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $(var1)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC02} $(var2)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $(var3)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $(var4)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
;--------------------------------
; Hidden section: registry, shortcuts, file associations
Section ""
SetOutPath "$INSTDIR"
; NSIS 3 on 64-bit Windows: set 64-bit registry view BEFORE any WriteRegStr
; so keys land in HKLM\SOFTWARE (not the Wow6432Node redirect).
SetRegView 64
; Store installation folder
WriteRegStr HKCU "Software\${SOFT_NAME}" "" $INSTDIR
; Uninstall registry entries
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${SOFT_NAME}" \
"DisplayName" "${SOFT_NAME} (remove only)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${SOFT_NAME}" \
"UninstallString" '"$INSTDIR\Uninstall.exe"'
; Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
; Build paths for icons and launch script
StrCpy $final_qet_exe "$INSTDIR\Lancer QET.bat"
StrCpy $final_project_ico "$INSTDIR\ico\application-x-qet-project.ico"
StrCpy $final_element_ico "$INSTDIR\ico\application-x-qet-element.ico"
StrCpy $final_titleblock_ico "$INSTDIR\ico\application-x-qet-titleblock.ico"
; File associations .qet
WriteRegStr HKEY_CLASSES_ROOT "Applications\qelectrotech.exe\shell\open\command" "" \
'"$final_qet_exe" "%1"'
WriteRegStr HKEY_CLASSES_ROOT ".qet" "" "qet_diagram_file"
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file" "" "Diagram QET"
WriteRegDWORD HKEY_CLASSES_ROOT "qet_diagram_file" "EditFlags" 0x00000000
WriteRegDWORD HKEY_CLASSES_ROOT "qet_diagram_file" "BrowserFlags" 0x00000008
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file\DefaultIcon" "" "$final_project_ico"
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file\shell\open\command" "" '"$final_qet_exe" "%1"'
; File associations .elmt
WriteRegStr HKEY_CLASSES_ROOT ".elmt" "" "qet_element_file"
WriteRegStr HKEY_CLASSES_ROOT "qet_element_file" "" "Element QET"
WriteRegDWORD HKEY_CLASSES_ROOT "qet_element_file" "EditFlags" 0x00000000
WriteRegDWORD HKEY_CLASSES_ROOT "qet_element_file" "BrowserFlags" 0x00000008
WriteRegStr HKEY_CLASSES_ROOT "qet_element_file\DefaultIcon" "" "$final_element_ico"
WriteRegStr HKEY_CLASSES_ROOT "qet_element_file\shell\open\command" "" '"$final_qet_exe" "%1"'
; File associations .titleblock
WriteRegStr HKEY_CLASSES_ROOT ".titleblock" "" "qet_titleblock_file"
WriteRegStr HKEY_CLASSES_ROOT "qet_titleblock_file" "" "Titleblock QET"
WriteRegDWORD HKEY_CLASSES_ROOT "qet_titleblock_file" "EditFlags" 0x00000000
WriteRegDWORD HKEY_CLASSES_ROOT "qet_titleblock_file" "BrowserFlags" 0x00000008
WriteRegStr HKEY_CLASSES_ROOT "qet_titleblock_file\DefaultIcon" "" "$final_titleblock_ico"
WriteRegStr HKEY_CLASSES_ROOT "qet_titleblock_file\shell\open\command" "" '"$final_qet_exe" "%1"'
SetShellVarContext all ; apply shortcuts for all users
; Start Menu shortcuts
CreateDirectory "$SMPROGRAMS\${SOFT_NAME}"
CreateDirectory "$SMPROGRAMS\${SOFT_NAME}\Manual"
CreateDirectory "$SMPROGRAMS\${SOFT_NAME}\Upgrade"
CreateShortCut "$SMPROGRAMS\${SOFT_NAME}\QElectroTech.lnk" \
"$INSTDIR\Lancer QET.bat" 0 "$INSTDIR\ico\qelectrotech.ico"
CreateShortCut "$SMPROGRAMS\${SOFT_NAME}\Uninstall QElectroTech.lnk" \
"$INSTDIR\Uninstall.exe"
; Desktop shortcut
CreateShortCut "$DESKTOP\QElectroTech.lnk" \
"$INSTDIR\Lancer QET.bat" 0 "$INSTDIR\ico\qelectrotech.ico"
; Internet shortcuts
WriteINIStr "$SMPROGRAMS\${SOFT_NAME}\Manual\Manual_English.url" \
"InternetShortcut" "URL" "https://download.qelectrotech.org/qet/manual_0.7/build/index.html"
WriteINIStr "$SMPROGRAMS\${SOFT_NAME}\Manual\Manual_Russian.url" \
"InternetShortcut" "URL" "https://download.qelectrotech.org/qet/joshua/html/QET_ru.html"
WriteINIStr "$SMPROGRAMS\${SOFT_NAME}\Upgrade\Download.url" \
"InternetShortcut" "URL" "https://download.qelectrotech.org/qet/builds/nightly/"
WriteINIStr "$SMPROGRAMS\${SOFT_NAME}\Donate.url" \
"InternetShortcut" "URL" "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZZHC9D7C3MDPC"
; Mark installed elements as read-only
${Locate} "$INSTDIR\elements\" "/L=FD /M=*.elmt" "LocateCallback"
IfErrors 0 +2
; MessageBox MB_OK "Error in Locate" ; uncomment for debugging
SectionEnd
;--------------------------------
; Locate callback sets FILE_ATTRIBUTE_READONLY on each .elmt file
Function LocateCallback
SetFileAttributes $R9 FILE_ATTRIBUTE_READONLY
Push $0
FunctionEnd
;==============================================================================
; INSTALLER FUNCTIONS
;==============================================================================
Function .onInit
; NSIS 3: SetRegView in .onInit ensures InstallDirRegKey reads the right hive
SetRegView 64
!insertmacro MUI_LANGDLL_DISPLAY
; Abort if not running on a 64-bit OS
${IfNot} ${RunningX64}
MessageBox MB_OK|MB_ICONSTOP $(wrongArch)
Abort
${EndIf}
; ----------------------------------------------------------------
; Auto-uninstall previous version before installing new one
; ----------------------------------------------------------------
ReadRegStr $R0 HKLM \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${SOFT_NAME}" \
"UninstallString"
; No previous installation found → proceed normally
StrCmp $R0 "" done
; Also read the install dir of the previous version
ReadRegStr $R1 HKCU "Software\${SOFT_NAME}" ""
; Ask user whether to uninstall the existing version
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "$(installed)" IDOK uninst
Abort ; user clicked Cancel → stop the installer
uninst:
; Remove surrounding quotes from the UninstallString if present
; (some installers write: "C:\path\Uninstall.exe" — ExecWait needs clean path)
StrCpy $R2 $R0 1 ; first character
StrCmp $R2 '"' 0 unquoted
; Strip leading and trailing quote
StrCpy $R0 $R0 "" 1 ; remove leading "
StrLen $R3 $R0
IntOp $R3 $R3 - 1
StrCpy $R0 $R0 $R3 ; remove trailing "
unquoted:
; Run the uninstaller silently, keeping it in its own directory
; _?= prevents NSIS from copying the uninstaller to a temp folder,
; so it can delete itself and the whole $INSTDIR tree.
ClearErrors
${If} $R1 != ""
ExecWait '"$R0" /S _?=$R1' ; silent uninstall using saved install dir
${Else}
ExecWait '"$R0" /S' ; fallback if install dir unknown
${EndIf}
IfErrors uninstall_failed
; Verify the old installation is gone before continuing
${If} $R1 != ""
IfFileExists "$R1\${SOFT_NAME}.exe" uninstall_failed
IfFileExists "$R1\bin\${SOFT_NAME}.exe" uninstall_failed
${EndIf}
Goto done
uninstall_failed:
MessageBox MB_OK|MB_ICONSTOP "$(uninstFailed)"
Abort
done:
FunctionEnd
;==============================================================================
; UNINSTALLER SECTION
;==============================================================================
Section "Uninstall"
SetRegView 64 ; NSIS 3: required so we delete from the correct hive
SetShellVarContext all
; Remove Start Menu shortcuts
RMDir /r "$SMPROGRAMS\${SOFT_NAME}"
; Remove Desktop shortcut
Delete "$DESKTOP\QElectroTech.lnk"
; Remove application files
Delete "$INSTDIR\*.*"
RMDir /r "$INSTDIR"
; Remove installation registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${SOFT_NAME}"
DeleteRegKey /ifempty HKCU "Software\${SOFT_NAME}"
; Remove file associations registry keys
DeleteRegKey HKEY_CLASSES_ROOT "Applications\qelectrotech.exe"
DeleteRegKey HKEY_CLASSES_ROOT ".qet"
DeleteRegKey HKEY_CLASSES_ROOT "qet_diagram_file"
DeleteRegKey HKEY_CLASSES_ROOT ".elmt"
DeleteRegKey HKEY_CLASSES_ROOT "qet_element_file"
DeleteRegKey HKEY_CLASSES_ROOT ".titleblock"
DeleteRegKey HKEY_CLASSES_ROOT "qet_titleblock_file"
IfFileExists "$INSTDIR" 0 NoErrorMsg
; MessageBox MB_OK "Note: $INSTDIR could not be removed!"
NoErrorMsg:
SectionEnd
;==============================================================================
; UNINSTALLER FUNCTIONS
;==============================================================================
Function un.onInit
SetRegView 64 ; NSIS 3: match the view used during install
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd
; this file is part of installer for QElectroTech
; Copyright (C)2015 QElectroTech Team <scorpio@qelectrotech.org>
;
; This program is free software; you can redistribute it and/or
; modify it under the terms of the GNU General Public License
; as published by the Free Software Foundation; either
; version 2 of the License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
; WebSite : http://qelectrotech.org/
;--------------------------------
;Include Modern UI
!include x64.nsh
!include "MUI2.nsh"
!include "FileFunc.nsh"
!insertmacro Locate
!include FileFunc.nsh
!insertmacro GetParameters
!insertmacro GetOptions
!ifndef PROC
!define PROC 32 ;
!endif
; MUI Settings
;--------------------------------
;General
; General Product Description Definitions
!define SOFT_NAME "QElectroTech"
!define SOFT_VERSION "0.5-dev_x86_64-win64+4094"
!define SOFT_WEB_SITE "http://qelectrotech.org/"
!define SOFT_BUILD "1"
SetCompressor /final /solid lzma
CRCCheck force
XPStyle on
BrandingText "${SOFT_NAME}-${SOFT_VERSION}-${SOFT_BUILD}" ; Shows in the Bottom Left of the installer
;Name and file
Name "${SOFT_NAME} ${SOFT_VERSION}"
OutFile "Installer_${SOFT_NAME}-${SOFT_VERSION}-${SOFT_BUILD}.exe"
;Default installation folder
InstallDir "$PROGRAMFILES64\${SOFT_NAME}"
;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\${SOFT_NAME}" ""
;Request application privileges for Windows Vista
; we request for admin because we write stuff into the registry
RequestExecutionLevel admin
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\XPUI-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\XPUI-uninstall.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP ".\images\wizard.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP ".\images\header.bmp" ; optional
;--------------------------------
;Language Selection Dialog Settings
;Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\${SOFT_NAME}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
;--------------------------------
;Pages
!define MUI_COMPONENTSPAGE_SMALLDESC
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "files\LICENSE"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
; Finish page and checkbox to run QElectroTech
!define MUI_FINISHPAGE_RUN "$INSTDIR\Lancer QET.bat"
!define MUI_FINISHPAGE_RUN_NOTCHECKED
!define MUI_FINISHPAGE_RUN_TEXT "$(Check)"
!insertmacro MUI_PAGE_FINISH
;--------------------------------
;Languages
;Since NSIS 2.26, the language selection dialog of Modern UI hides languages unsupported by the user's selected codepage by default.
;To revert to the old behavior and display all languages, no matter what the user will see when they're selected, use MUI_LANGDLL_ALLLANGUAGES.
!define MUI_LANGDLL_ALLLANGUAGES
; For consistency, we limit the installer to languages supported by QElectroTech itself
!insertmacro MUI_LANGUAGE "English" ;first language is the default language
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "Spanish"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "Czech"
!insertmacro MUI_LANGUAGE "Polish"
!insertmacro MUI_LANGUAGE "Greek"
!insertmacro MUI_LANGUAGE "Arabic"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Romanian"
!insertmacro MUI_LANGUAGE "Catalan"
!insertmacro MUI_LANGUAGE "Croatian"
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "Dutch_Belgium"
!insertmacro MUI_LANGUAGE "Danish"
!insertmacro MUI_LANGUAGE "Swedish"
!insertmacro MUI_RESERVEFILE_LANGDLL
!include lang_extra.nsh
!include lang_extra_fr.nsh
SetOverwrite on
Section "Main Program"
SectionIn RO ; Read only, always installed
Setoutpath "$INSTDIR\bin\"
File "./files/bin/${SOFT_NAME}.exe"
Setoutpath "$INSTDIR"
File "./files/ChangeLog"
File "./files/CREDIT"
File "./files/ELEMENTS.LICENSE"
File "./files/LICENSE"
File "./files/qet_uninstall_file_associations.reg"
File "./files/README"
File "./files/register_filetypes.bat"
File "Lancer QET.bat"
SetOutPath "$INSTDIR"
File /r "./files/ico"
SectionEnd
;---------------------------
SetOverwrite on
SubSection "$(Elements)" SEC01
SetOverwrite on
Section "$(Electric)"
SetOutPath "$INSTDIR\elements"
File /r "./files/elements/10_electric"
SectionEnd
SetOverwrite on
Section "$(Logic)"
SetOutPath "$INSTDIR\elements"
File /r "./files/elements/20_logic"
SectionEnd
SetOverwrite on
Section "$(Hydraulic)"
SetOutPath "$INSTDIR\elements"
File /r "./files/elements/30_hydraulic"
SectionEnd
SetOverwrite on
Section "$(Pneumatic)"
SetOutPath "$INSTDIR\elements"
File /r "./files/elements/50_pneumatic"
SectionEnd
;---------------------------------
SubSection "$(Energy)"
SetOverwrite on
Section "$(water)"
SetOutPath "$INSTDIR\elements\60_energy"
File /r "./files/elements/60_energy/11_water"
File /r "./files/elements/60_energy/"
SectionEnd
SetOverwrite on
Section "$(Refrigeration)"
SetOutPath "$INSTDIR\elements\60_energy"
File /r "./files/elements/60_energy/21_refrigeration"
File /r "./files/elements/60_energy/"
SectionEnd
SetOverwrite on
Section "$(Solar_thermal)"
SetOutPath "$INSTDIR\elements\60_energy"
File /r "./files/elements/60_energy/31_solar_thermal"
File /r "./files/elements/60_energy/"
SectionEnd
SubSectionEnd
SubSectionEnd
;-------------------------------
SetOverwrite on
Section "$(Lang)" SEC02
SetOutPath "$INSTDIR\lang"
File "./files/lang/*.qm"
SectionEnd
SetOverwrite on
Section "$(Titleblocks)" SEC03
SetOutPath "$INSTDIR"
File /r "./files/titleblocks"
SectionEnd
SetOverwrite on
Section "$(Examples)" SEC04
SetOutPath "$INSTDIR"
File /r "./files/examples"
SectionEnd
;--------------------------------
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $(var1)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC02} $(var2)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $(var3)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $(var4)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
;--------------------------------
;Installer Sections
Section ""
SetOutPath "$INSTDIR"
;Store installation folder
WriteRegStr HKCU "Software\${SOFT_NAME}" "" $INSTDIR
; write uninstall strings
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${SOFT_NAME}" "DisplayName" "${SOFT_NAME} (remove only)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${SOFT_NAME}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
SetRegView 64
; get the final path for the icons and the launch script
Var /GLOBAL final_qet_exe
Var /GLOBAL final_project_ico
Var /GLOBAL final_element_ico
Var /GLOBAL final_titleblock_ico
StrCpy $final_qet_exe "$INSTDIR\Lancer QET.bat"
StrCpy $final_project_ico "$INSTDIR\ico\application-x-qet-project.ico"
StrCpy $final_element_ico "$INSTDIR\ico\application-x-qet-element.ico"
StrCpy $final_titleblock_ico "$INSTDIR\ico\application-x-qet-titleblock.ico"
; write file associations registry keys
WriteRegStr HKEY_CLASSES_ROOT "Applications\qelectrotech.exe\shell\open\command" "" "$\"$final_qet_exe$\" $\"%1$\""
WriteRegStr HKEY_CLASSES_ROOT ".qet" "" "qet_diagram_file"
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file" "" "Diagram QET"
WriteRegDWORD HKEY_CLASSES_ROOT "qet_diagram_file" "EditFlags" 0x00000000
WriteRegDWORD HKEY_CLASSES_ROOT "qet_diagram_file" "BrowserFlags" 0x00000008
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file\DefaultIcon" "" "$final_project_ico"
WriteRegStr HKEY_CLASSES_ROOT "qet_diagram_file\shell\open\command" "" "$\"$final_qet_exe$\" $\"%1$\""
WriteRegStr HKEY_CLASSES_ROOT ".elmt" "" "qet_element_file"
WriteRegStr HKEY_CLASSES_ROOT "qet_element_file" "" "Element QET"
WriteRegDWORD HKEY_CLASSES_ROOT "qet_element_file" "EditFlags" 0x00000000
WriteRegDWORD HKEY_CLASSES_ROOT "qet_element_file" "BrowserFlags" 0x00000008
WriteRegStr HKEY_CLASSES_ROOT "qet_element_file\DefaultIcon" "" "$final_element_ico"
WriteRegStr HKEY_CLASSES_ROOT "qet_element_file\shell\open\command" "" "$\"$final_qet_exe$\" $\"%1$\""
WriteRegStr HKEY_CLASSES_ROOT ".titleblock" "" "qet_titleblock_file"
WriteRegStr HKEY_CLASSES_ROOT "qet_titleblock_file" "" "Titleblock QET"
WriteRegDWORD HKEY_CLASSES_ROOT "qet_titleblock_file" "EditFlags" 0x00000000
WriteRegDWORD HKEY_CLASSES_ROOT "qet_titleblock_file" "BrowserFlags" 0x00000008
WriteRegStr HKEY_CLASSES_ROOT "qet_titleblock_file\DefaultIcon" "" "$final_titleblock_ico"
WriteRegStr HKEY_CLASSES_ROOT "qet_titleblock_file\shell\open\command" "" "$\"$final_qet_exe$\" $\"%1$\""
SetShellVarContext all ; all users
; shortcuts in the start menu
CreateDirectory "$SMPROGRAMS\${SOFT_NAME}"
CreateDirectory "$SMPROGRAMS\${SOFT_NAME}\Manual"
CreateDirectory "$SMPROGRAMS\${SOFT_NAME}\Upgrade"
CreateShortCut "$SMPROGRAMS\${SOFT_NAME}\QElectroTech.lnk" "$INSTDIR\Lancer QET.bat" 0 "$INSTDIR\ico\qelectrotech.ico"
CreateShortCut "$SMPROGRAMS\${SOFT_NAME}\Uninstall QElectroTech.lnk" "$INSTDIR\Uninstall.exe"
; TODO : add the QuickStart Guide (or any other documentation) when available
; shortcut on the desktop
CreateShortCut "$DESKTOP\QElectroTech.lnk" "$INSTDIR\Lancer QET.bat" 0 "$INSTDIR\ico\qelectrotech.ico"
WriteINIStr "$SMPROGRAMS\${SOFT_NAME}\Manual\Manual_English.url" "InternetShortcut" "URL" "https://download.qelectrotech.org/qet/manual_0.7/build/index.html"
WriteINIStr "$SMPROGRAMS\${SOFT_NAME}\Manual\Manual_Russian.url" "InternetShortcut" "URL" "https://download.qelectrotech.org/qet/joshua/html/QET_ru.html"
WriteINIStr "$SMPROGRAMS\${SOFT_NAME}\Upgrade\Download.url" "InternetShortcut" "URL" "https://download.qelectrotech.org/qet/builds/nightly/"
WriteINIStr "$SMPROGRAMS\${SOFT_NAME}\Donate.url" "InternetShortcut" "URL" "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZZHC9D7C3MDPC"
;changing $INSTDIR\elements\ *.elmt to read-only attribute
${Locate} "$INSTDIR\elements\" "/L=FD /M=*.elmt" "LocateCallback"
IfErrors 0 +2
;MessageBox MB_OK "Error"
SectionEnd
Function LocateCallback
SetFileAttributes $R9 FILE_ATTRIBUTE_READONLY
Push $0
FunctionEnd
;--------------------------------
;Installer Functions
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
${If} ${RunningX64}
${Else}
MessageBox MB_OK|MB_ICONSTOP $(wrongArch)
Abort $(wrongArch)
${EndIf}
;Auto-uninstall old before installing new
ReadRegStr $R0 HKLM \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${SOFT_NAME}" \
"UninstallString"
StrCmp $R0 "" done
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
"$(installed)" \
IDOK uninst
Abort
;Run the uninstaller
uninst:
ClearErrors
ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
IfErrors no_remove_uninstaller done
;You can either use Delete /REBOOTOK in the uninstaller or add some code
;here to remove the uninstaller. Use a registry key to check
;whether the user has chosen to uninstall. If you are using an uninstaller
;components page, make sure all sections are uninstalled.
no_remove_uninstaller:
done:
FunctionEnd
;--------------------------------
;Descriptions
;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC
;Assign descriptions to sections
;!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
; !insertmacro MUI_DESCRIPTION_TEXT ${CopyFiles} "CopyFiles"
;!insertmacro MUI_FUNCTION_DESCRIPTION_END
;--------------------------------
;Uninstaller Section
Section "Uninstall"
SetShellVarContext all ; all users
; remove start menu shortcuts
RMDir /r "$SMPROGRAMS\${SOFT_NAME}"
; remove shortcut on the desktop
Delete "$DESKTOP\QElectroTech.lnk"
; remove the application files
Delete "$INSTDIR\*.*"
RMDir /r "$INSTDIR"
;remove installation registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${SOFT_NAME}"
DeleteRegKey /ifempty HKCU "Software\${SOFT_NAME}"
; remove file associations registry keys
DeleteRegKey HKEY_CLASSES_ROOT "Applications\qelectrotech.exe"
DeleteRegKey HKEY_CLASSES_ROOT ".qet"
DeleteRegKey HKEY_CLASSES_ROOT "qet_diagram_file"
DeleteRegKey HKEY_CLASSES_ROOT ".elmt"
DeleteRegKey HKEY_CLASSES_ROOT "qet_element_file"
DeleteRegKey HKEY_CLASSES_ROOT ".titleblock"
DeleteRegKey HKEY_CLASSES_ROOT "qet_titleblock_file"
IfFileExists "$INSTDIR" 0 NoErrorMsg
;MessageBox MB_OK "Note: $INSTDIR could not be removed!" IDOK 0 ; skipped if file doesn't exist
NoErrorMsg:
SectionEnd
;--------------------------------
;Uninstaller Functions
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd
+22 -38
View File
@@ -17,31 +17,8 @@
LangString var2 ${LANG_ENGLISH} "languagues files"
LangString var3 ${LANG_ENGLISH} "Examples of cartridges"
LangString var4 ${LANG_ENGLISH} "Examples of diagrams"
LangString uninstFailed ${LANG_ENGLISH} "Uninstallation of the previous version failed.$\nPlease uninstall ${SOFT_NAME} manually before continuing."
LangString installed ${LANG_KOREAN} "${SOFT_NAME}이(가) 이미 설치되어 있습니다. $\n$\n이전 버전을 제거하려면 `OK`를, 업그레이드를 취소하려면 `Cancel`을 클릭하세요."
LangString wrongArch ${LANG_KOREAN} "이 배포판은 64비트 컴퓨터에서만 사용할 수 있습니다."
LangString Elements ${LANG_KOREAN} "요소"
LangString Electric ${LANG_KOREAN} "전기"
LangString Logic ${LANG_KOREAN} "로직"
LangString Hydraulic ${LANG_KOREAN} "유압"
LangString Pneumatic ${LANG_KOREAN} "공압"
LangString Energy ${LANG_KOREAN} "에너지"
LangString water ${LANG_KOREAN} ""
LangString Refrigeration ${LANG_KOREAN} "냉동"
LangString Solar_thermal ${LANG_KOREAN} "태양열"
LangString Lang ${LANG_KOREAN} "언어"
LangString Titleblocks ${LANG_KOREAN} "표제란"
LangString Examples ${LANG_KOREAN} "예제"
LangString Check ${LANG_KOREAN} "${SOFT_NAME} 실행"
LangString var1 ${LANG_KOREAN} "공식 컬렉션 요소"
LangString var2 ${LANG_KOREAN} "언어 파일"
LangString var3 ${LANG_KOREAN} "표제란 예제"
LangString var4 ${LANG_KOREAN} "도면 예제"
LangString uninstFailed ${LANG_KOREAN} "이전 버전을 제거하지 못했습니다.$\n계속하기 전에 ${SOFT_NAME}을(를) 수동으로 제거해 주세요."
LangString installed ${LANG_POLISH} "${SOFT_NAME} jest już zainstalowany. $\n$\nKliknij `OK` aby odinstalować poprzednią wersję lub `Anuluj` aby przerwać aktualizację."
LangString wrongArch ${LANG_POLISH} "To oprogramowanie jest przeznaczone wyłącznie dla komputerów 64 bitowych."
LangString Elements ${LANG_POLISH} "Elementy"
@@ -61,7 +38,6 @@
LangString var2 ${LANG_POLISH} "languagues files"
LangString var3 ${LANG_POLISH} "Examples of cartridges"
LangString var4 ${LANG_POLISH} "Examples of diagrams"
LangString uninstFailed ${LANG_POLISH} "Odinstalowanie poprzedniej wersji nie powiodło się.$\nPrzed kontynuowaniem odinstaluj ręcznie program ${SOFT_NAME}."
LangString installed ${LANG_GREEK} "${SOFT_NAME} είναι ήδη εγκατεστημένο. $\n$\nΠάτησε `OK` για αφαίρεση της προηγούμενης έκδοσης ή `Cancel` για ακύρωση της αναβάθμισης."
@@ -83,7 +59,6 @@
LangString var2 ${LANG_GREEK} "Αρχεία γλωσσών"
LangString var3 ${LANG_GREEK} "Examples of cartridges"
LangString var4 ${LANG_GREEK} "Παραδείγματα διαγραμμάτων"
LangString uninstFailed ${LANG_GREEK} "Η απεγκατάσταση της προηγούμενης έκδοσης απέτυχε.$\nΠαρακαλώ απεγκαταστήστε χειροκίνητα το ${SOFT_NAME} πριν συνεχίσετε."
LangString installed ${LANG_CZECH} "${SOFT_NAME} is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
@@ -105,7 +80,6 @@
LangString var2 ${LANG_CZECH} "languagues files"
LangString var3 ${LANG_CZECH} "Examples of cartridges"
LangString var4 ${LANG_CZECH} "Examples of diagrams"
LangString uninstFailed ${LANG_CZECH} "Odinstalování předchozí verze se nezdařilo.$\nPřed pokračováním prosím odinstalujte ${SOFT_NAME} ručně."
LangString installed ${LANG_SPANISH} "${SOFT_NAME} is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
@@ -127,7 +101,6 @@
LangString var2 ${LANG_SPANISH} "languagues files"
LangString var3 ${LANG_SPANISH} "Examples of cartridges"
LangString var4 ${LANG_SPANISH} "Examples of diagrams"
LangString uninstFailed ${LANG_SPANISH} "La desinstalación de la versión anterior ha fallado.$\nPor favor, desinstale ${SOFT_NAME} manualmente antes de continuar."
LangString installed ${LANG_GERMAN} "${SOFT_NAME} ist bereits installiert. $\n$\nKlicken Sie auf `OK`, um die alte Version zu deinstallieren, oder auf `Abbrechen`, um das Upgrade abzubrechen."
@@ -149,7 +122,6 @@
LangString var2 ${LANG_GERMAN} "Sprachdateien"
LangString var3 ${LANG_GERMAN} "Schriftfeld-Beispiele"
LangString var4 ${LANG_GERMAN} "Schaltplan-Beispiele"
LangString uninstFailed ${LANG_GERMAN} "Die Deinstallation der vorherigen Version ist fehlgeschlagen.$\nBitte deinstallieren Sie ${SOFT_NAME} manuell, bevor Sie fortfahren."
LangString installed ${LANG_RUSSIAN} "${SOFT_NAME} уже установлен. $\n$\nДля удаления предыдущей версии нажмите `OK` или `Cancel` для отмены обновления."
@@ -171,7 +143,6 @@
LangString var2 ${LANG_RUSSIAN} "языковые файлы"
LangString var3 ${LANG_RUSSIAN} "Примеры штампов"
LangString var4 ${LANG_RUSSIAN} "Примеры схем"
LangString uninstFailed ${LANG_RUSSIAN} "Удаление предыдущей версии завершилось с ошибкой.$\nПожалуйста, удалите ${SOFT_NAME} вручную перед продолжением."
LangString installed ${LANG_ARABIC} "${SOFT_NAME} is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
@@ -193,7 +164,6 @@
LangString var2 ${LANG_ARABIC} "languagues files"
LangString var3 ${LANG_ARABIC} "Examples of cartridges"
LangString var4 ${LANG_ARABIC} "Examples of diagrams"
LangString uninstFailed ${LANG_ARABIC} "فشل إلغاء تثبيت الإصدار السابق. يرجى إلغاء تثبيت ${SOFT_NAME} يدويًا قبل المتابعة."
LangString installed ${LANG_CATALAN} "${SOFT_NAME} is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
@@ -215,7 +185,6 @@
LangString var2 ${LANG_CATALAN} "languagues files"
LangString var3 ${LANG_CATALAN} "Examples of cartridges"
LangString var4 ${LANG_CATALAN} "Examples of diagrams"
LangString uninstFailed ${LANG_CATALAN} "La desinstal·lació de la versió anterior ha fallat.$\nSi us plau, desinstal·leu ${SOFT_NAME} manualment abans de continuar."
LangString installed ${LANG_ITALIAN} "${SOFT_NAME} &egrave; già installato. $\n$\nFare click su `OK` per rimuovere la versione precedente o su `Annulla` per annullare questo aggiornamento."
@@ -237,7 +206,6 @@
LangString var2 ${LANG_ITALIAN} "File della lingua"
LangString var3 ${LANG_ITALIAN} "Cartigli di esempio"
LangString var4 ${LANG_ITALIAN} "Schemi di esempio"
LangString uninstFailed ${LANG_ITALIAN} "La disinstallazione della versione precedente non è riuscita.$\nSi prega di disinstallare ${SOFT_NAME} manualmente prima di continuare."
LangString installed ${LANG_PORTUGUESE} "${SOFT_NAME} is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
@@ -259,7 +227,6 @@
LangString var2 ${LANG_PORTUGUESE} "languagues files"
LangString var3 ${LANG_PORTUGUESE} "Examples of cartridges"
LangString var4 ${LANG_PORTUGUESE} "Examples of diagrams"
LangString uninstFailed ${LANG_PORTUGUESE} "A desinstalação da versão anterior falhou.$\nPor favor, desinstale ${SOFT_NAME} manualmente antes de continuar."
LangString installed ${LANG_ROMANIAN} "${SOFT_NAME} is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
@@ -281,7 +248,6 @@
LangString var2 ${LANG_ROMANIAN} "languagues files"
LangString var3 ${LANG_ROMANIAN} "Examples of cartridges"
LangString var4 ${LANG_ROMANIAN} "Examples of diagrams"
LangString uninstFailed ${LANG_ROMANIAN} "Dezinstalarea versiunii anterioare a eșuat.$\nVă rugăm să dezinstalați ${SOFT_NAME} manual înainte de a continua."
LangString installed ${LANG_CROATIAN} "${SOFT_NAME} is already installed. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade."
@@ -303,7 +269,6 @@
LangString var2 ${LANG_CROATIAN} "languagues files"
LangString var3 ${LANG_CROATIAN} "Examples of cartridges"
LangString var4 ${LANG_CROATIAN} "Examples of diagrams"
LangString uninstFailed ${LANG_CROATIAN} "Deinstalacija prethodne verzije nije uspjela.$\nMolimo deinstalirajte ${SOFT_NAME} ručno prije nastavka."
LangString installed ${LANG_DUTCH} "${SOFT_NAME} is al geinstalleerd. $\n$\nklik `OK` om vorige versie te verwijderen of `annuleer` om deze upgrade te annuleren."
@@ -321,11 +286,31 @@
LangString Titleblocks ${LANG_DUTCH} "Titelblok"
LangString Examples ${LANG_DUTCH} "Voorbeelden"
LangString Check ${LANG_DUTCH} "Check to start ${SOFT_NAME}"
LangString Check ${LANG_DUTCH} "Check to start ${SOFT_NAME}"
LangString var1 ${LANG_DUTCH} "Elements of the official collection"
LangString var2 ${LANG_DUTCH} "languagues files"
LangString var3 ${LANG_DUTCH} "Examples of cartridges"
LangString var4 ${LANG_DUTCH} "Examples of diagrams"
LangString uninstFailed ${LANG_DUTCH} "Het verwijderen van de vorige versie is mislukt.$\nVerwijder ${SOFT_NAME} handmatig voordat u verdergaat."
LangString installed ${LANG_DUTCH_BELGIUM} "${SOFT_NAME} is reeds geinstallerd. $\n$\nKlik`OK` om vorige versie te verwijderen of `Afbreken` om de upgrade niet uit te voeren."
LangString wrongArch ${LANG_DUTCH_BELGIUM} "Deze distributie werkt enkel op 64 bits computers."
LangString Elements ${LANG_DUTCH_BELGIUM} "Elementen"
LangString Electric ${LANG_DUTCH_BELGIUM} "Electrisch"
LangString Logic ${LANG_DUTCH_BELGIUM} "Logica"
LangString Hydraulic ${LANG_DUTCH_BELGIUM} "Hydraulisch"
LangString Pneumatic ${LANG_DUTCH_BELGIUM} "Pneumatisch"
LangString Energy ${LANG_DUTCH_BELGIUM} "Energie"
LangString water ${LANG_DUTCH_BELGIUM} "Water"
LangString Refrigeration ${LANG_DUTCH_BELGIUM} "Klimatisatie"
LangString Solar_thermal ${LANG_DUTCH_BELGIUM} "Termisch & zonlicht"
LangString Lang ${LANG_DUTCH_BELGIUM} "Taal"
LangString Titleblocks ${LANG_DUTCH_BELGIUM} "Titelhoek"
LangString Examples ${LANG_DUTCH_BELGIUM} "Voorbeelden"
LangString Check ${LANG_DUTCH_BELGIUM} "Controleer om te beginnen ${SOFT_NAME}"
LangString var1 ${LANG_DUTCH_BELGIUM} "Symbolen van de officielen verzameling"
LangString var2 ${LANG_DUTCH_BELGIUM} "taal bestanden"
LangString var3 ${LANG_DUTCH_BELGIUM} "Voorbeel titelhoeken"
LangString var4 ${LANG_DUTCH_BELGIUM} "Voorbeeld schema's"
LangString installed ${LANG_DANISH} "${SOFT_NAME} er allerede installeret. $\n$\nKlik `Ok` for at fjerne foregående version eller `Annuller` for at annullere opgraderingen."
@@ -347,6 +332,5 @@
LangString var2 ${LANG_DANISH} "Sprog filer"
LangString var3 ${LANG_DANISH} "Titel blokke eksempler"
LangString var4 ${LANG_DANISH} "Diagram eksempler"
LangString uninstFailed ${LANG_DANISH} "Afinstallation af den tidligere version mislykkedes.$\nAfinstaller venligst ${SOFT_NAME} manuelt, inden du fortsætter."
+4 -5
View File
@@ -1,6 +1,6 @@
LangString wrongArch ${LANG_FRENCH} "Ce programme est pour Windows 64 bits seulement."
LangString installed ${LANG_FRENCH} "${SOFT_NAME} est déja installé. $\n$\nCliquer sur `OK` pour désinstaller l'ancienne version `Annuler` pour annuler cet upgrade."
LangString Elements ${LANG_FRENCH} "Eléments"
LangString installed ${LANG_FRENCH} "${SOFT_NAME} est déja installé. $\n$\nCliquer sur `OK` pour désinstaller l'ancienne version `Annuler` pour annuler cet upgrade."
LangString Elements ${LANG_FRENCH} "Eléments"
LangString Electric ${LANG_FRENCH} "Electrique"
LangString Logic ${LANG_FRENCH} "Logique"
LangString Hydraulic ${LANG_FRENCH} "Hydraulique"
@@ -13,8 +13,7 @@
LangString Titleblocks ${LANG_FRENCH} "Cartouches"
LangString Examples ${LANG_FRENCH} "Exemples"
LangString Check ${LANG_FRENCH} "Cocher pour lancer ${SOFT_NAME}"
LangString var1 ${LANG_FRENCH} "Eléments de la collection officielle"
LangString var1 ${LANG_FRENCH} "Eléments de la collection officielle"
LangString var2 ${LANG_FRENCH} "Fichiers de langues"
LangString var3 ${LANG_FRENCH} "Exemples de cartouches"
LangString var4 ${LANG_FRENCH} "Exemples de schémas"
LangString uninstFailed ${LANG_FRENCH} "La désinstallation de la version précédente a échoué.$\nVeuillez désinstaller ${SOFT_NAME} manuellement avant de continuer."
LangString var4 ${LANG_FRENCH} "Exemples de schémas"
+10 -5
View File
@@ -62,10 +62,15 @@ message("PROJECT_SOURCE_DIR :" ${PROJECT_SOURCE_DIR})
message("QET_DIR :" ${QET_DIR})
message("GIT_COMMIT_SHA :" ${GIT_COMMIT_SHA})
if(BUILD_WITH_KF5)
message("KF5_GIT_TAG :" ${KF5_GIT_TAG})
else()
add_definitions(-DBUILD_WITHOUT_KF5)
if(BUILD_WITH_KF6 AND BUILD_KF6)
message("KF6_GIT_TAG :" ${KF6_GIT_TAG})
endif()
if(NOT BUILD_WITH_KF6)
add_definitions(-DBUILD_WITHOUT_KF6)
endif()
message("QET_COMPONENTS :" ${QET_COMPONENTS})
message("QT_VERSION_MAJOR :" ${QT_VERSION_MAJOR})
message("Qt version :" ${Qt6_VERSION})
if(QMFILES_AS_RESOURCE)
add_definitions(-DQMFILES_AS_RESOURCE)
endif()
+5 -2
View File
@@ -31,5 +31,8 @@ add_definitions(-DQT_MESSAGELOGCONTEXT)
# In order to do so, uncomment the following line.
#add_definitions(-DTODO_LIST)
# Build with KF5
option(BUILD_WITH_KF5 "Build with KF5" ON)
# Build with KF6
option(BUILD_WITH_KF6 "Build with KF6" ON)
# Use translations as a Qt resource
option(QMFILES_AS_RESOURCE "Use .qm files as Qt resource" ON)
+26 -38
View File
@@ -1,4 +1,4 @@
# Copyright 2006 The QElectroTech Team
# Copyright 2006-2026 The QElectroTech Team
# This file is part of QElectroTech.
#
# QElectroTech is free software: you can redistribute it and/or modify
@@ -14,54 +14,42 @@
# You should have received a copy of the GNU General Public License
# along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
message(" - fetch_kdeaddons")
option(BUILD_KF6 "Build KF6 libraries, use system ones otherwise" OFF)
if(BUILD_KF6)
block(PROPAGATE KF6_GIT_TAG)
message(STATUS " - fetch_kdeaddons")
set(KDE_SKIP_TEST_SETTINGS ON)
set(KCOREADDONS_USE_QML OFF)
set(KWIDGETSADDONS_USE_QML OFF)
set(BUILD_TESTING OFF)
set(BUILD_DESIGNERPLUGIN OFF)
set(BUILD_QCH OFF)
set(BUILD_SHARED_LIBS OFF)
if(DEFINED BUILD_WITH_KF5)
Include(FetchContent)
Include(FetchContent)
option(BUILD_KF5 "Build KF5 libraries, use system ones otherwise" YES)
if(BUILD_KF5)
if(NOT DEFINED KF5_GIT_TAG)
#https://qelectrotech.org/forum/viewtopic.php?pid=13924#p13924
set(KF5_GIT_TAG v5.77.0)
if(NOT DEFINED KF6_GIT_TAG)
set(KF6_GIT_TAG v6.22.0)
endif()
# Fix stop the run autotests of kcoreaddons
# see
# https://invent.kde.org/frameworks/kcoreaddons/-/blob/master/CMakeLists.txt#L98
# issue:
# CMake Error at /usr/share/ECM/modules/ECMAddTests.cmake:89 (add_executable):
# Cannot find source file:
# see
# https://qelectrotech.org/forum/viewtopic.php?pid=13929#p13929
set(KDE_SKIP_TEST_SETTINGS "TRUE")
set(BUILD_TESTING "0")
FetchContent_Declare(
ecm
GIT_REPOSITORY https://invent.kde.org/frameworks/extra-cmake-modules.git
GIT_TAG ${KF5_GIT_TAG})
FetchContent_MakeAvailable(ecm)
FetchContent_Declare(
kcoreaddons
GIT_REPOSITORY https://invent.kde.org/frameworks/kcoreaddons.git
GIT_TAG ${KF5_GIT_TAG})
GIT_TAG ${KF6_GIT_TAG})
FetchContent_MakeAvailable(kcoreaddons)
FetchContent_Declare(
kwidgetsaddons
GIT_REPOSITORY https://invent.kde.org/frameworks/kwidgetsaddons.git
GIT_TAG ${KF5_GIT_TAG})
GIT_TAG ${KF6_GIT_TAG})
FetchContent_MakeAvailable(kwidgetsaddons)
else()
find_package(KF5CoreAddons REQUIRED)
find_package(KF5WidgetsAddons REQUIRED)
endif()
set(KF5_PRIVATE_LIBRARIES
KF5::WidgetsAddons
KF5::CoreAddons
)
endblock()
else()
find_package(KF6CoreAddons REQUIRED)
find_package(KF6WidgetsAddons REQUIRED)
endif()
set(KF6_PRIVATE_LIBRARIES
KF6::CoreAddons
KF6::WidgetsAddons
)
+5 -9
View File
@@ -1,4 +1,4 @@
# Copyright 2006 The QElectroTech Team
# Copyright 2006-2026 The QElectroTech Team
# This file is part of QElectroTech.
#
# QElectroTech is free software: you can redistribute it and/or modify
@@ -14,18 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
message(" - fetch_pugixml")
Include(FetchContent)
option(BUILD_PUGIXML "Build pugixml library, use system one otherwise" YES)
option(BUILD_PUGIXML "Build pugixml library, use system one otherwise" OFF)
if(BUILD_PUGIXML)
Include(FetchContent)
message(" - fetch pugixml")
FetchContent_Declare(
pugixml
GIT_REPOSITORY https://github.com/zeux/pugixml.git
GIT_TAG v1.11.4)
GIT_TAG v1.15)
FetchContent_MakeAvailable(pugixml)
else()
+2 -5
View File
@@ -1,4 +1,4 @@
# Copyright 2006 The QElectroTech Team
# Copyright 2006-2026 The QElectroTech Team
# This file is part of QElectroTech.
#
# QElectroTech is free software: you can redistribute it and/or modify
@@ -16,9 +16,6 @@
message(" - fetch_singleapplication")
# https://github.com/itay-grudev/SingleApplication/issues/18
#qmake
#DEFINES += QAPPLICATION_CLASS=QGuiApplication
set(QAPPLICATION_CLASS QApplication)
Include(FetchContent)
@@ -26,6 +23,6 @@ Include(FetchContent)
FetchContent_Declare(
SingleApplication
GIT_REPOSITORY https://github.com/itay-grudev/SingleApplication.git
GIT_TAG v3.2.0)
GIT_TAG v3.5.4)
FetchContent_MakeAvailable(SingleApplication)
-25
View File
@@ -1,25 +0,0 @@
# Copyright 2006 The QElectroTech Team
# This file is part of QElectroTech.
#
# QElectroTech is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# QElectroTech is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
if(${CMAKE_VERSION} VERSION_LESS 3.14)
message(
"_____________________________________________________________________")
message("to update Cmake on linux:")
message("https://github.com/Kitware/CMake/")
message("linux => cmake-3.19.1-Linux-x86_64.sh")
message(" sudo ./cmake.sh --prefix=/usr/local/ --exclude-subdir")
message("windows good luck :)")
endif()
+14 -12
View File
@@ -17,6 +17,8 @@
message(" - qet_compilation_vars")
set(QET_COMPONENTS
Core
Gui
LinguistTools
PrintSupport
Xml
@@ -88,7 +90,6 @@ set(QET_RES_FILES
${QET_DIR}/sources/ui/dynamicelementtextitemeditor.ui
${QET_DIR}/sources/ui/elementinfopartwidget.ui
${QET_DIR}/sources/ui/elementinfowidget.ui
${QET_DIR}/sources/ui/terminalnumberingdialog.ui
${QET_DIR}/sources/ui/formulaassistantdialog.ui
${QET_DIR}/sources/ui/imagepropertieswidget.ui
${QET_DIR}/sources/ui/importelementdialog.ui
@@ -110,11 +111,15 @@ set(QET_SRC_FILES
${QET_DIR}/sources/borderproperties.h
${QET_DIR}/sources/bordertitleblock.cpp
${QET_DIR}/sources/bordertitleblock.h
# ${QET_DIR}/sources/colorbutton.cpp
# ${QET_DIR}/sources/colorbutton.h
# ${QET_DIR}/sources/colorcombobox.cpp
# ${QET_DIR}/sources/colorcombobox.h
# ${QET_DIR}/sources/colorcomboboxdelegate.cpp
# ${QET_DIR}/sources/colorcomboboxdelegate.h
${QET_DIR}/sources/conductorautonumerotation.cpp
${QET_DIR}/sources/conductorautonumerotation.h
${QET_DIR}/sources/conductornumexport.cpp
${QET_DIR}/sources/wiringlistexport.h
${QET_DIR}/sources/wiringlistexport.cpp
${QET_DIR}/sources/conductornumexport.h
${QET_DIR}/sources/conductorprofile.cpp
${QET_DIR}/sources/conductorprofile.h
@@ -416,10 +421,6 @@ set(QET_SRC_FILES
${QET_DIR}/sources/PropertiesEditor/propertieseditorwidget.cpp
${QET_DIR}/sources/PropertiesEditor/propertieseditorwidget.h
${QET_DIR}/pugixml/src/pugiconfig.hpp
${QET_DIR}/pugixml/src/pugixml.cpp
${QET_DIR}/pugixml/src/pugixml.hpp
${QET_DIR}/sources/qetgraphicsitem/conductor.cpp
${QET_DIR}/sources/qetgraphicsitem/conductor.h
${QET_DIR}/sources/qetgraphicsitem/conductortextitem.cpp
@@ -498,6 +499,9 @@ set(QET_SRC_FILES
${QET_DIR}/sources/SearchAndReplace/ui/searchandreplacewidget.cpp
${QET_DIR}/sources/SearchAndReplace/ui/searchandreplacewidget.h
${QET_DIR}/sources/svg/qetsvg.cpp
${QET_DIR}/sources/svg/qetsvg.h
${QET_DIR}/sources/titleblock/dimension.cpp
${QET_DIR}/sources/titleblock/dimension.h
${QET_DIR}/sources/titleblock/dimensionwidget.cpp
@@ -633,8 +637,6 @@ set(QET_SRC_FILES
${QET_DIR}/sources/ui/elementinfopartwidget.h
${QET_DIR}/sources/ui/elementinfowidget.cpp
${QET_DIR}/sources/ui/elementinfowidget.h
${QET_DIR}/sources/ui/terminalnumberingdialog.cpp
${QET_DIR}/sources/ui/terminalnumberingdialog.h
${QET_DIR}/sources/ui/elementpropertieswidget.cpp
${QET_DIR}/sources/ui/elementpropertieswidget.h
${QET_DIR}/sources/ui/formulaassistantdialog.cpp
@@ -711,6 +713,8 @@ set(QET_SRC_FILES
${QET_DIR}/sources/xml/terminalstripitemxml.cpp
${QET_DIR}/sources/xml/terminalstripitemxml.h
${QET_DIR}/sources/xml/terminalstriplayoutpatternxml.cpp
${QET_DIR}/sources/xml/terminalstriplayoutpatternxml.h
)
set(TS_FILES
@@ -731,19 +735,17 @@ set(TS_FILES
${QET_DIR}/lang/qet_mn.ts
${QET_DIR}/lang/qet_nb.ts
${QET_DIR}/lang/qet_nl.ts
${QET_DIR}/lang/qet_nl_BE.ts
${QET_DIR}/lang/qet_nl_BE.ts
${QET_DIR}/lang/qet_no.ts
${QET_DIR}/lang/qet_pl.ts
${QET_DIR}/lang/qet_pt.ts
${QET_DIR}/lang/qet_pt_BR.ts
${QET_DIR}/lang/qet_ro.ts
${QET_DIR}/lang/qet_rs.ts
${QET_DIR}/lang/qet_ru.ts
${QET_DIR}/lang/qet_sk.ts
${QET_DIR}/lang/qet_sl.ts
${QET_DIR}/lang/qet_sr.ts
${QET_DIR}/lang/qet_sv.ts
${QET_DIR}/lang/qet_tr.ts
${QET_DIR}/lang/qet_uk.ts
${QET_DIR}/lang/qet_zh.ts
)
+2 -2
View File
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7b7798233e8251baac7717d4b0f991ad5fdf23a76d9fbe864d363e3b93458560
size 529821696
oid sha256:7081c74e1f0de4f21f22c596bd70dcf580f97436686b799ee64bfa2df06cbf2c
size 529809408
File diff suppressed because it is too large Load Diff
+533 -777
View File
File diff suppressed because it is too large Load Diff
+665 -948
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+585 -834
View File
File diff suppressed because it is too large Load Diff
+533 -777
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+534 -920
View File
File diff suppressed because it is too large Load Diff
+533 -777
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+533 -785
View File
File diff suppressed because it is too large Load Diff
+533 -777
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
+536 -781
View File
File diff suppressed because it is too large Load Diff
+535 -779
View File
File diff suppressed because it is too large Load Diff
+533 -777
View File
File diff suppressed because it is too large Load Diff
+532 -776
View File
File diff suppressed because it is too large Load Diff
+533 -777
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
-14538
View File
File diff suppressed because it is too large Load Diff
+533 -777
View File
File diff suppressed because it is too large Load Diff
+533 -777
View File
File diff suppressed because it is too large Load Diff
+533 -777
View File
File diff suppressed because it is too large Load Diff
-14539
View File
File diff suppressed because it is too large Load Diff
+534 -777
View File
File diff suppressed because it is too large Load Diff
+535 -779
View File
File diff suppressed because it is too large Load Diff
+533 -777
View File
File diff suppressed because it is too large Load Diff
+535 -779
View File
File diff suppressed because it is too large Load Diff
+533 -777
View File
File diff suppressed because it is too large Load Diff
+533 -777
View File
File diff suppressed because it is too large Load Diff
+535 -779
View File
File diff suppressed because it is too large Load Diff
+535 -779
View File
File diff suppressed because it is too large Load Diff
+535 -779
View File
File diff suppressed because it is too large Load Diff
+664 -942
View File
File diff suppressed because it is too large Load Diff
+534 -777
View File
File diff suppressed because it is too large Load Diff
+533 -777
View File
File diff suppressed because it is too large Load Diff
+533 -777
View File
File diff suppressed because it is too large Load Diff
-76
View File
@@ -1,76 +0,0 @@
.TH QELECTROTECH 1 "AOÛT 2008" QElectroTech "사용자 설명서"
.SH 이름
qelectrotech \- 전기 도면 편집기
.SH 사용법
.B qelectrotech
.B [\-\-common\-elements\-dir\fR=\fI경로\fB]
.B [\-\-config\-dir\fR=\fI경로\fB]
.B [\-\-lang\-dir\fR=\fI경로\fB]
.B [\-\-help]
.B [\-v\fR|\fB\-\-version]
.B [\-\-license]
.B [\fI파일\fB]...
.SH 설명
QElectroTech는 전기 도면 편집기입니다. 도면(*.qet)과 전기 요소(*.elmt)는 XML 형식으로 저장됩니다.
도면에서 사용할 수 있는 요소는 공용 컬렉션 또는 사용자 컬렉션에서 가져올 수 있습니다.
일반적으로 공용 컬렉션은 모든 사용자가 접근할 수 있지만 사용자가 편집할 수는 없습니다.
사용자 컬렉션은 각 사용자에게 고유하며 사용자가 원하는 대로 수정할 수 있습니다.
.SH 옵션
.TP
\fB\-\-common\-elements\-dir\fR=\fI경로\fR
공용 요소(Elements) 컬렉션의 루트로 \fI경로\fR 폴더를 사용합니다.
참고: 이 옵션은 컴파일 시 QET_ALLOW_OVERRIDE_CED_OPTION 지시문이 지정된 경우에만 활성화됩니다.
.TP
\fB\-\-config\-dir\fR=\fI경로\fR
현재 사용자의 설정 폴더로 \fI경로\fR 폴더를 사용합니다.
이 폴더에는 애플리케이션 설정을 담은 qelectrotech.conf 파일과, 사용자 요소 컬렉션을 담는 elements 하위 폴더가 포함됩니다.
참고: 이 옵션은 컴파일 시 QET_ALLOW_OVERRIDE_CD_OPTION 지시문이 지정된 경우에만 활성화됩니다.
.TP
\fB\-\-lang\-dir\fR=\fI경로\fR
애플리케이션 번역 파일을 \fI경로\fR 폴더에서 찾습니다.
.TP
\fB\-\-help\fR
사용 가능한 옵션에 대한 간단한 설명을 표시합니다.
.TP
\fB\-v\fR, \fB\-\-version\fR
애플리케이션 버전을 표시합니다(예: 0.1).
.TP
\fB\-\-license\fR
애플리케이션 라이선스(GNU/GPL)를 표시합니다.
.P
참고: 위 옵션 중 마지막 3개(\-\-lang\-dir, \-\-help, \-\-version, \-\-license 관련)는 명령행에서 지정되면
해당 정보를 표시한 뒤 프로그램이 종료됩니다.
사용자가 이미 애플리케이션을 실행 중인 경우에는, 실행 중인 인스턴스가 명령행을 처리하며 특히 열 파일 목록에 적용됩니다.
다만 폴더를 재정의하는 옵션(공용 컬렉션/설정 폴더/언어 파일 폴더)은 적용되지 않습니다.
열 파일의 확장자가 .elmt로 끝나면 QElectroTech는 요소 편집기로 열려고 시도합니다.
그 외에는 도면 파일로 간주합니다.
.SH 작성자
Benoît Ansieau <benoit@qelectrotech.org>
.br
Xavier Guerrin <xavier@qelectrotech.org>
.br
Laurent Trinques <scorpio@qelectrotech.org>
.br
Joshua Claveau <joshua@qelectrotech.org>
.br
Cyril.frausti <cyril@qelectrotech.org>
.br
.SH 버그 신고
애플리케이션에서 비정상 동작이 의심되면, FAQ <http://qelectrotech.org/wiki/doku.php?id=doc:faq> 와
BugTracker <http://qelectrotech.org/bugtracker/> 를 확인하여 이미 알려진 문제인지 확인해 주세요.
해당 문제가 없다면 BugTracker를 통해 버그 리포트를 제출해 주세요.
.SH 저작권
Copyright © QElectroTech 개발자
.br
라이선스: GNU/GPL v2+ : <http://www.gnu.org/licenses/old\-licenses/gpl\-2.0.html>
.br
이 프로그램은 자유 소프트웨어입니다. 수정 및 재배포할 수 있습니다. 이 프로그램은 “있는 그대로(as is)” 제공되며 어떠한 보증도 없습니다.
.SH 참고
공식 사이트: <http://qelectrotech.org/>
Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

+101
View File
@@ -0,0 +1,101 @@
Compiler QElectroTech sous microsoft Windows 10 et 11 avec MSYS2
================================
Ce document décrit les étapes nécessaire afin de compilé QElectroTech sous Windows avec Qt6 et cmake en utilisant MSYS2.
# MSYS2
L'ensemble des outils nécessaire au développement et à la compilation de QElectroTech sous Windows sera installé par lintermédiaire de [MSYS2](https://www.msys2.org/). Cela comprend entre autre le framework [Qt6](https://www.qt.io/development/qt-framework/qt6), les outils cmake, les dépendances ([kde framework](https://develop.kde.org/docs/), [sqlite](https://sqlite.org/), [pugixml](https://pugixml.org/)), les outils de compilation [minGW](https://www.mingw-w64.org/)...
>Il sera nécessaire d'utiliser [winget](https://learn.microsoft.com/fr-fr/windows/package-manager/winget/), celui-ci est présent par défaut sous Windows 11, dans le cas de Windows 10, winget peut necessité d'être activé manuellement
# Installer GIT et MSYS2 avec winget
Avec power shell.
```
winget install Git.Git
```
puis
```
winget install MSYS2.MSYS2
```
## Mise à jour de MSYS2
Lors de la première utilisation de MSYS2 il est nécessaire de mettre celui-ci à jour.
Lancer "MSYS2 MSYS" depuis le menu démarré de Windows.
Une fenêtre avec un shell s'ouvre, dans celui-ci lancer la commande :
```
pacman -Syu
```
A la fin de la mise à jour MSYS2 MSYS se fermera automatiquement. Ouvrez le à nouveau et relancé la commande
```
pacman -Syu
```
## Installation des outils de devellopement
Toujours dans le shell MSYS2 MSYS lancer la commande suivante.
```
pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-qt6-svg mingw-w64-ucrt-x86_64-qt6-base mingw-w64-ucrt-x86_64-sqlite3 mingw-w64-ucrt-x86_64-pugixml mingw-w64-ucrt-x86_64-kcoreaddons mingw-w64-ucrt-x86_64-kwidgetsaddons mingw-w64-ucrt-x86_64-extra-cmake-modules mingw-w64-ucrt-x86_64-gdb mingw-w64-ucrt-x86_64-qt6-translations mingw-w64-ucrt-x86_64-qt6-tools
```
> La quantité de paquets à installer est conséquent, en fonction de votre connexion internet cela peut prendre plusieurs dizaine de minute
L'ensemble des outils est mantenant installé 😀
# Installer Qt creator
Télécharger [l'installateur online de Qt](https://www.qt.io/development/download-qt-installer-oss) et lancer l'installation en suivant les indications de ce dernier.
>Dans le cas où vous comptez utilisé Qt Creator uniquement pour développez QElectroTech, lors de l'installation choisissez l'option "installation personnalisée" puis dans la page suivante sélectionné uniquement Qt Creator.
## Configurer Qt creator
Ouvrir Qt creator puis rendez vous dans "édition -> préférence -> kit"
### Versions de Qt
- Cliquer sur _ajouter_
- Renseigner _Chemin de qmake_ (exemple C:\\msys64\\ucrt64\\bin\\qmake.exe).
- Dans le champ _Nom :_ ajouter (msys2).
![](assets/windows_msys2_setup/qt_version.png)
### Compilateurs
- Cliquer sur _ajouter_ puis choisir _MinGW_.
- Renseigner _Emplacement du compilateur C_ (exemple C:\\msys64\\ucrt64\\bin\\g++.exe).
- Dans le champ _Nom :_ ajouter (msys2).
![](assets/windows_msys2_setup/compiler.png)
### Débogueurs
- Cliquer sur _ajouter_
- Renseigner _Chemin :_ (exemple C:\\msys64\\ucrt64\\bin\\gdb.exe).
- Dans le champ _Nom :_ ajouter (msys2).
![](assets/windows_msys2_setup/debugger.png)
### cmake
- Outils -> _Ajouter_
- Renseigner _Chemin :_ (exemple C:\\msys64\\ucrt64\\bin\\cmake.exe).
- Dans le champ _Nom :_ ajouter (msys2).
![](assets/windows_msys2_setup/cmake.png)
### KIT
Maintenant que tous les prérequis sont fait nous allons crée un kit utilisant les outils fournis par MSYS2. Cliquer sur _Ajouter_, un nouveau kit _manuel_ apparaît, nommer celui-ci par exemple _Qt6 msys2_ puis renseigner le compilateur, le débogueur, la version de Qt et Outils CMake en choisissant à chaque fois ceux que nous venons de créer.
puis cliquer sur _appliquer_.
![](assets/windows_msys2_setup/kit.png)
Bravo 🥳🥳 vous avez terminé l'installation de la totalité des outils de développement.
# Clonez le dépôts de QElectrotech
Clonez le dépôt de QElectroTech comme vous le faite habituellement, sinon utilisez les commandes suivante dans power shell.
Crée et/ou se rendre dans le dossier dans lequel vous voulez clonez le dépôt (dans l'exemple nous allons crée un dossier QElectroTech dans C:)
```
mkdir C:\QElectroTech
cd C:\QElectroTech
git clone --recursive https://github.com/qelectrotech/qelectrotech-source-mirror.git
```
Une fois le dépôt cloné lancer Qt creator puis choisir d'ouvrir un projet existant, en choisissant le _CMakeLists.txt_ se trouvant à la racine du projet QElectroTech, enfin dans l'assistant de création de projet choisir comme kit le kit que nous avons créer précédemment.
+13
View File
@@ -0,0 +1,13 @@
Compiler QElectroTech sous microsoft Windows 10 et 11
================================
Compiler QElectroTech pour et/ou sous Windows peut être effectué avec plusieurs méthode différente.
Ce document énumère uniquement les différentes méthode possible
N'est mentionné que les étapes nécessaire afin de compilé QElectroTech sous Windows avec Qt6 et cmake. Ce document ne traite pas la compilation avec Qt5 et qmake.
>QElectroTech 0.100 est la dernière version à utiliser Qt5. Les version suivante sont développé avec Qt6 et utilise cmake au lieu de qmake.
Il existe deux méthodes pour cela :
1. [Utiliser msys2 (méthode recommandé)](fr_window_build_msys2.md)
2. Télécharger et compiler l'ensemble des dépendances (non rédigé)
+1 -3
View File
@@ -7,7 +7,7 @@ Icon=qelectrotech
Terminal=false
Type=Application
MimeType=application/x-qet-project;application/x-qet-element;application/x-qet-titleblock;
Categories=Graphics;
Categories=Graphics;Qt;VectorGraphics;Science;Electricity;Engineering;
Keywords=Graphics;Science;Electricity;Engineering;
Comment=Edit electrical diagrams.
Comment[ar]=تحرير مخططات كهربائية
@@ -22,7 +22,6 @@ Comment[fr]=Éditer des schémas électriques.
Comment[hr]=Uredi elektro sheme
Comment[it]=Disegnare schemi elettrici
Comment[ja]=電気回路図の編集。
Comment[ko]=전기 도면을 편집합니다.
Comment[nl]=Bewerken bedradingsdiagrammen.
Comment[pl]=Edycja schematów elektrycznych
Comment[pt]=Criar esquemas eléctricos.
@@ -41,7 +40,6 @@ GenericName[fr]=Éditeur de schémas électriques
GenericName[hr]=Editor elektro sheme
GenericName[it]=Programma per disegnare schemi elettrici
GenericName[ja]=電気回路図エディタ
GenericName[ko]=전기 도면 편집기
GenericName[nl]=Elektrische schema editor
GenericName[pl]=Edytor schematów elektrycznych
GenericName[pt]=Editor de esquemas eléctricos.
+10 -27
View File
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2006-2026 The QElectroTech Team -->
<component type="desktop-application">
<id>org.qelectrotech.QElectroTech</id>
<launchable type="desktop-id">org.qelectrotech.QElectroTech.desktop</launchable>
<application>
<id type="desktop">qelectrotech.desktop</id>
<metadata_license>MIT</metadata_license>
<project_license>GPL-2.0-or-later</project_license>
<name>QElectroTech</name>
@@ -14,19 +13,18 @@
<summary xml:lang="da">Elektrisk diagram redigering</summary>
<summary xml:lang="de">Zeichenprogramm für Schaltpläne</summary>
<summary xml:lang="el">Επεξεργαστής ηλεκτρικών διαγραμμάτων</summary>
<summary xml:lang="es">Editor de esquemas eléctricos</summary>
<summary xml:lang="ex">Editor de esquemas eléctricos</summary>
<summary xml:lang="fr">Éditeur de schémas électriques</summary>
<summary xml:lang="hr">Editor elektro sheme</summary>
<summary xml:lang="it">Programma per disegnare schemi elettrici</summary>
<summary xml:lang="ja">電気回路図エディタ</summary>
<summary xml:lang="ko">전기 도면 편집기</summary>
<summary xml:lang="nl">Elektrische schema bewerker</summary>
<summary xml:lang="pl">Edytor schematów elektrycznych</summary>
<summary xml:lang="pt">Editor de esquemas eléctricos</summary>
<summary xml:lang="ru">Редактор электрических схем</summary>
<content_rating type="oars-1.1"/>
<releases>
<release version="0.100.1-dev" date="2026"/>
<release version="0.9-dev" date="2021-02-21"/>
</releases>
<description>
<p>
@@ -73,10 +71,6 @@
QElectroTech は電気回路図を作成する Qt5 アプリケーションです。
QET は要素と回路図に XML 形式を利用し、回路図エディタ、要素エディタ、表題欄エディタを含みます。
</p>
<p xml:lang="ko">
QElectroTech는 전기 도면을 설계하기 위한 Qt5 기반 애플리케이션입니다.
요소와 도면을 XML 형식으로 관리하며, 도면 편집기, 요소 편집기, 표제란 편집기를 포함하고 있습니다.
</p>
<p xml:lang="nl">
QElectroTech is een Qt5 applicatie om elektrische schema's te ontwerpen.
Het maakt gebruik van XML-bestanden voor elementen en diagrammen, en omvat zowel een diagram bewerker, een element bewerker, en een bloksjabloon bewerker.
@@ -94,20 +88,9 @@
Приложение использует для хранения проектов и библиотек элементов файлы в XML формате. Приложение помимо редактора электричесих схем, содержит также редакторы элементов и редактор шаблонов листов.
</p>
</description>
<url type="homepage">https://qelectrotech.org</url>
<url type="bugtracker">https://qelectrotech.org/bugtracker</url>
<url type="vcs-browser">https://github.com/qelectrotech/qelectrotech-source-mirror</url>
<developer id="org.qelectrotech">
<name>QElectroTech</name>
</developer>
<screenshot type="default">
<image>https://qelectrotech.org/screenshots/qet_overview04.png</image>
</screenshot>
<screenshot>
<image>https://qelectrotech.org/screenshots/qet_overview06.png</image>
</screenshot>
<screenshot>
<image>https://qelectrotech.org/screenshots/qet_overview09.png</image>
</screenshot>
<update_contact>scorpio@qelectrotech.org</update_contact>
</component>
<url type="homepage">http://qelectrotech.org</url>
<screenshots>
<screenshot type="default">http://download.tuxfamily.org/qet/screens/qelectrotech5.png</screenshot>
</screenshots>
<updatecontact>qet@lists.tuxfamily.org</updatecontact>
</application>
-3
View File
@@ -14,7 +14,6 @@
<comment xml:lang="fr">Fichier projet QElectroTech</comment>
<comment xml:lang="it">File del progetto QElectroTech</comment>
<comment xml:lang="ja">QElectroTech プロジェクト・ファイル</comment>
<comment xml:lang="ko">QElectroTech 프로젝트 파일</comment>
<comment xml:lang="nl">QElectroTech project bestand</comment>
<comment xml:lang="pl">Plik projektu QElectrotech</comment>
<comment xml:lang="pt">Ficheiro de projecto QElectroTech</comment>
@@ -35,7 +34,6 @@
<comment xml:lang="fr">Fichier élément QElectroTech</comment>
<comment xml:lang="it">File del progetto QElectroTech</comment>
<comment xml:lang="ja">QElectroTech 要素ファイル</comment>
<comment xml:lang="ko">QElectroTech 요소 파일</comment>
<comment xml:lang="nl">QElectroTech element bestand</comment>
<comment xml:lang="pl">Plik elementu QElectroTech</comment>
<comment xml:lang="pt">Ficheiro de projecto QElectroTech</comment>
@@ -56,7 +54,6 @@
<comment xml:lang="fr">Modèle de cartouche QElectroTech</comment>
<comment xml:lang="it">Modello di cartiglio per QElectroTech</comment>
<comment xml:lang="ja">QElectroTech 表題欄テンプレート</comment>
<comment xml:lang="ko">QElectroTech 표제란 템플릿 파일</comment>
<comment xml:lang="nl">QElectroTech titel bloksjabloon</comment>
<comment xml:lang="pl">Szablon tabliczki rysunkowej QElectroTech</comment>
<comment xml:lang="pt">Modelo de moldura QElectroTech</comment>
Submodule pugixml deleted from 5a1892b321
@@ -26,12 +26,7 @@
#include "xmlprojectelementcollectionitem.h"
#include <QFutureWatcher>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
#include <QtConcurrentMap>
#else
#include <QtConcurrentRun>
#endif
/**
@brief ElementsCollectionModel::ElementsCollectionModel
Constructor
@@ -298,15 +293,8 @@ void ElementsCollectionModel::loadCollections(bool common_collection,
&QFutureWatcher<void>::finished,
watcher,
&QFutureWatcher<void>::deleteLater);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // ### Qt 6: remove
m_future = QtConcurrent::map(m_items_list_to_setUp, setUpData);
#else
# if TODO_LIST
# pragma message("@TODO remove code for QT 6 or later")
# endif
qDebug() << "Help code for QT 6 or later"
<< "QtConcurrent::run its backwards now...function, object, args";
#endif
watcher->setFuture(m_future);
}
@@ -807,13 +807,13 @@ bool ElementsLocation::setXml(const QDomDocument &xml_document) const
QString path_ = collectionPath(false);
QRegularExpression rx("^(.*)/(.*\\.elmt)$");
if (rx.exactMatch(path_))
if (auto regex_match = rx.match(path_); regex_match.hasMatch())
{
return project()
->embeddedElementCollection()
->addElementDefinition(
rx.cap(1),
rx.cap(2),
regex_match.captured(1),
regex_match.captured(2),
xml_document.documentElement());
}
else
@@ -20,7 +20,7 @@
#include "../NameList/nameslist.h"
#include "../diagramcontext.h"
#include "pugixml/src/pugixml.hpp"
#include "pugixml.hpp"
#include <QIcon>
#include <QString>
@@ -58,10 +58,6 @@ XmlElementCollection::XmlElementCollection(QETProject *project) :
QChar(0x30A4), QChar(0x30F3), QChar(0x30D0), QChar(0x30FC),
QChar(0x30C8), QChar(0x3055), QChar(0x308C), QChar(0x305F),
QChar(0x8981), QChar(0x7D20)};
const QChar korean_data[8] = {
QChar(0xC804), QChar(0xAE30), QChar(0x0020),
QChar(0xC2EC), QChar(0xBCFC), QChar(0x0020),
QChar(0xC694), QChar(0xC18C)};
const QChar russian_data[24] = {
QChar(0x0418), QChar(0x043C), QChar(0x043F), QChar(0x043E),
QChar(0x0440), QChar(0x0442), QChar(0x0438), QChar(0x0440),
@@ -92,8 +88,6 @@ XmlElementCollection::XmlElementCollection(QETProject *project) :
names.addName("it", "Elementi importati");
names.addName("ja", QString(japanese_data, 10));
//names.addName("ja", "インバートされた要素");
names.addName("ko", QString(korean_data, 8));
names.addName("ko_KR", QString(korean_data, 8));
names.addName("nl", "Elementen geïmporteerd");
names.addName("nl_BE", "Elementen geïmporteerd");
names.addName("pl", "Elementy importowane");
+1 -1
View File
@@ -17,7 +17,7 @@
*/
#ifndef NAMES_LIST_H
#define NAMES_LIST_H
#include "pugixml/src/pugixml.hpp"
#include "pugixml.hpp"
#include <QtXml>
/**
@@ -18,6 +18,7 @@
#include "terminalstripdrawer.h"
#include <QPainter>
#include <QHash>
namespace TerminalStripDrawer {
+1 -1
View File
@@ -131,7 +131,7 @@ bool PhysicalTerminal::setLevelOf(const QSharedPointer<RealTerminal> &terminal,
if (i >= 0)
{
#if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
m_real_terminal.swapItemsAt(i, std::min(level, m_real_terminal.size()-1));
m_real_terminal.swapItemsAt(i, std::min(static_cast<qsizetype>(level), m_real_terminal.size()-1));
#else
auto j = std::min(level, m_real_terminal.size()-1);
std::swap(m_real_terminal.begin()[i], m_real_terminal.begin()[j]);
+1 -1
View File
@@ -17,7 +17,7 @@
*/
#ifndef DIAGRAM_CONTEXT_H
#define DIAGRAM_CONTEXT_H
#include "pugixml/src/pugixml.hpp"
#include "pugixml.hpp"
#include <QDomElement>
#include <QHash>
@@ -1,4 +1,4 @@
/*
/*
Copyright 2006-2026 The QElectroTech Team
This file is part of QElectroTech.
@@ -96,18 +96,8 @@ void ElementPropertiesEditorWidget::upDateInterface()
}
else if (m_data.m_type == ElementData::Master) {
ui->m_master_type_cb->setCurrentIndex(
ui->m_master_type_cb->findData (
m_data.m_master_type));
// NEU: Checkbox und Zahlenbox für max_slaves einstellen
if (m_data.m_max_slaves == -1) {
ui->max_slaves_checkbox->setChecked(false);
ui->max_slaves_spinbox->setEnabled(false);
} else {
ui->max_slaves_checkbox->setChecked(true);
ui->max_slaves_spinbox->setEnabled(true);
ui->max_slaves_spinbox->setValue(m_data.m_max_slaves);
}
ui->m_master_type_cb->findData (
m_data.m_master_type));
} else if (m_data.m_type == ElementData::Terminal) {
ui->m_terminal_type_cb->setCurrentIndex(
ui->m_terminal_type_cb->findData(
@@ -161,13 +151,10 @@ void ElementPropertiesEditorWidget::setUpInterface()
ui->m_terminal_func_cb->addItem(tr("Phase"), ElementData::TFPhase);
ui->m_terminal_func_cb->addItem(tr("Neutre"), ElementData::TFNeutral);
//Disable the edition of the first column of the information tree
//by this little workaround
//Disable the edition of the first column of the information tree
//by this little workaround
ui->m_tree->setItemDelegate(new EditorDelegate(this));
// NEU: Checkbox mit der Zahlenbox verbinden (Aktivieren/Deaktivieren)
connect(ui->max_slaves_checkbox, SIGNAL(toggled(bool)), ui->max_slaves_spinbox, SLOT(setEnabled(bool)));
ui->m_tree->header()->resizeSection(0, 150);
populateTree();
}
@@ -239,13 +226,6 @@ void ElementPropertiesEditorWidget::on_m_buttonBox_accepted()
}
else if (m_data.m_type == ElementData::Master) {
m_data.m_master_type = ui->m_master_type_cb->currentData().value<ElementData::MasterType>();
//If the checkbox is checked, save the number; otherwise, -1 (infinity)
if (ui->max_slaves_checkbox->isChecked()) {
m_data.m_max_slaves = ui->max_slaves_spinbox->value();
} else {
m_data.m_max_slaves = -1;
}
}
else if (m_data.m_type == ElementData::Terminal)
{
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>527</width>
<height>492</height>
<height>442</height>
</rect>
</property>
<property name="windowTitle">
@@ -104,23 +104,6 @@
<item row="0" column="1">
<widget class="QComboBox" name="m_master_type_cb"/>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="max_slaves_checkbox">
<property name="text">
<string>Définir le nombre maximal d'esclaves</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="max_slaves_spinbox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimum">
<number>1</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
+13 -95
View File
@@ -67,10 +67,7 @@ ElementsPanel::ElementsPanel(QWidget *parent) :
connect(this, &ElementsPanel::itemDoubleClicked, this, &ElementsPanel::slot_doubleClick);
connect(this, &GenericPanel::firstActivated, [this]() {QTimer::singleShot(250, this, SLOT(reload()));});
connect(this, &ElementsPanel::panelContentChanged, this, &ElementsPanel::panelContentChange);
// manage signal itemClicked
connect(this, &ElementsPanel::itemClicked, this, &ElementsPanel::slot_clicked);
//Emit a signal instead au manage is own context menu
setContextMenuPolicy(Qt::CustomContextMenu);
}
@@ -142,26 +139,15 @@ QTreeWidgetItem *ElementsPanel::addProject(QETProject *project,
Q_UNUSED(options)
bool first_add = (first_reload_ || !projects_to_display_.contains(project));
clearSelection();
// create the QTreeWidgetItem representing the project
// create the QTreeWidgetItem representing the project
QTreeWidgetItem *qtwi_project = GenericPanel::addProject(project, nullptr, GenericPanel::All);
// the project will be inserted right before the common tb templates collection
// the project will be inserted right before the common tb templates collection
invisibleRootItem() -> insertChild(
indexOfTopLevelItem(common_tbt_collection_item_),
qtwi_project
);
if (first_add){
qtwi_project -> setExpanded(true);
// on adding an project select first diagram
setCurrentItem(qtwi_project -> child(0));
qtwi_project -> child(0)->setSelected(true);
}
else {
// on adding an diagram to project select the last diagram
setCurrentItem(qtwi_project->child(qtwi_project->childCount()-2));
qtwi_project->child(qtwi_project->childCount()-2)->setSelected(true);
}
if (first_add) qtwi_project -> setExpanded(true);
if (TitleBlockTemplatesCollection *tbt_collection = project -> embeddedTitleBlockTemplatesCollection()) {
if (QTreeWidgetItem *tbt_collection_qtwi = itemForTemplatesCollection(tbt_collection)) {
@@ -272,28 +258,21 @@ void ElementsPanel::reload()
}
/**
@brief ElementsPanel::slot_clicked
handle click on qtwi
@param qtwi item that was clickerd on
*/
void ElementsPanel::slot_clicked(QTreeWidgetItem *clickedItem, int) {
requestForItem(clickedItem);
}
/**
@brief ElementsPanel::slot_doubleClick
handle double click on qtwi
Gere le double-clic sur un element.
Si un double-clic sur un projet est effectue, le signal requestForProject
est emis.
Si un double-clic sur un schema est effectue, le signal requestForDiagram
est emis.
@param qtwi
*/
void ElementsPanel::slot_doubleClick(QTreeWidgetItem *qtwi, int) {
int qtwi_type = qtwi -> type();
if (qtwi_type == QET::Project) {
// open project properties
emit(requestForProjectPropertiesEdition());
QETProject *project = valueForItem<QETProject *>(qtwi);
emit(requestForProject(project));
} else if (qtwi_type == QET::Diagram) {
// open diagram properties
emit(requestForDiagramPropertiesEdition());
Diagram *diagram = valueForItem<Diagram *>(qtwi);
diagram->showMe();
} else if (qtwi_type == QET::TitleBlockTemplate) {
TitleBlockTemplateLocation tbt = valueForItem<TitleBlockTemplateLocation>(qtwi);
emit(requestForTitleBlockTemplate(tbt));
@@ -465,64 +444,3 @@ void ElementsPanel::ensureHierarchyIsVisible(const QList<QTreeWidgetItem *> &ite
if (parent_qtwi -> isHidden()) parent_qtwi -> setHidden(false);
}
}
/**
* @brief ElementsPanel::syncTabBars
* set the project- or diagram Tab corresponding to
* the selection in the treeView
*/
void ElementsPanel::requestForItem(QTreeWidgetItem *clickedItem)
{
// activate diagram
if(clickedItem->type() == QET::Diagram){
Diagram *diagram = valueForItem<Diagram *>(clickedItem);
// if we click on diagramItem in annother project we need the other project
emit(requestForProject(projectForItem(clickedItem->parent())));
// required for keyPressEvent
// after emit the focus is on the diagram editor, we put it back to elementsPanel
this->setFocus();
// activate diagram
diagram->showMe();
}
// activate project
else if(clickedItem->type() == QET::Project) {
QETProject *project = projectForItem(clickedItem);
emit(requestForProject(project));
this->setFocus();
}
}
/**
* @brief ElementsPanel::keyPressEvent
* @param event
*/
void ElementsPanel::keyPressEvent(QKeyEvent *event)
{
switch (event->key())
{
case Qt::Key_Up:{
// check if there is another item abbove
if(!itemAbove(currentItem()))
break;
setCurrentItem(itemAbove(currentItem()));
if (currentItem()->type()==QET::Diagram || currentItem()->type()==QET::Project){
requestForItem(currentItem());
}
break;
}
case Qt::Key_Down:{
// check if there is another item below
if(!itemBelow(currentItem()))
break;
setCurrentItem(itemBelow(currentItem()));
if (currentItem()->type()==QET::Diagram || currentItem()->type()==QET::Project){
requestForItem(currentItem());
}
break;
}
default:
QTreeView::keyPressEvent(event);
}
}
+2 -9
View File
@@ -53,13 +53,8 @@ class ElementsPanel : public GenericPanel {
signals:
void requestForProject(QETProject *);
void requestForTitleBlockTemplate(const TitleBlockTemplateLocation &);
// Signal to open the project properties
void requestForProjectPropertiesEdition();
// Signal to open the diagram properties
void requestForDiagramPropertiesEdition();
public slots:
void slot_clicked(QTreeWidgetItem *, int);
void slot_doubleClick(QTreeWidgetItem *, int);
void reload();
void filter(const QString &, QET::Filtering = QET::RegularFilter);
@@ -68,9 +63,7 @@ class ElementsPanel : public GenericPanel {
void buildFilterList();
void applyCurrentFilter(const QList<QTreeWidgetItem *> &);
void ensureHierarchyIsVisible(const QList<QTreeWidgetItem *> &);
void requestForItem(QTreeWidgetItem *);
void keyPressEvent(QKeyEvent *event)override;
protected:
void startDrag(Qt::DropActions) override;
void startTitleBlockTemplateDrag(const TitleBlockTemplateLocation &);
-14
View File
@@ -120,12 +120,6 @@ ElementsPanelWidget::ElementsPanelWidget(QWidget *parent) : QWidget(parent) {
SLOT(openTitleBlockTemplate(const TitleBlockTemplateLocation &))
);
// manage double click on TreeWidgetItem
connect(elements_panel, SIGNAL(requestForProjectPropertiesEdition()), this, SLOT(editProjectProperties()) );
connect(elements_panel, SIGNAL(requestForDiagramPropertiesEdition()), this, SLOT(editDiagramProperties()) );
// manage project activation
connect(elements_panel, SIGNAL(requestForProject(QETProject*)), this, SIGNAL(requestForProject(QETProject*)));
// disposition verticale
QVBoxLayout *vlayout = new QVBoxLayout(this);
vlayout -> setContentsMargins(0,0,0,0);
@@ -242,7 +236,6 @@ void ElementsPanelWidget::deleteDiagram()
{
if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) {
emit(requestForDiagramDeletion(selected_diagram));
elements_panel->reload();
}
}
@@ -480,33 +473,28 @@ void ElementsPanelWidget::keyPressEvent (QKeyEvent *e) {
break;
case Qt::Key_F3:
if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) {
elements_panel->setSelectedItem(elements_panel->getItemForDiagram(selected_diagram));
emit(requestForDiagramMoveUp(selected_diagram));
}
break;
case Qt::Key_F4:
if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) {
elements_panel->setSelectedItem(elements_panel->getItemForDiagram(selected_diagram));
emit(requestForDiagramMoveDown(selected_diagram));
}
break;
case Qt::Key_F5:
if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) {
elements_panel->setSelectedItem(elements_panel->getItemForDiagram(selected_diagram));
emit(requestForDiagramMoveUpTop(selected_diagram));
}
break;
case Qt::Key_F6:
if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) {
elements_panel->setSelectedItem(elements_panel->getItemForDiagram(selected_diagram));
emit(requestForDiagramMoveDownx10(selected_diagram));
}
break;
case Qt::Key_F7:
if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) {
elements_panel->setSelectedItem(elements_panel->getItemForDiagram(selected_diagram));
emit(requestForDiagramMoveDownx100(selected_diagram));
}
@@ -514,14 +502,12 @@ void ElementsPanelWidget::keyPressEvent (QKeyEvent *e) {
break;
case Qt::Key_F8:
if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) {
elements_panel->setSelectedItem(elements_panel->getItemForDiagram(selected_diagram));
emit(requestForDiagramMoveUpx10(selected_diagram));
}
break;
case Qt::Key_F9:
if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) {
elements_panel->setSelectedItem(elements_panel->getItemForDiagram(selected_diagram));
emit(requestForDiagramMoveUpx100(selected_diagram));
}
break;
+1 -2
View File
@@ -418,8 +418,7 @@ void ExportDialog::generateSvg(
// "joue" la QPicture sur un QSvgGenerator
QSvgGenerator svg_engine;
svg_engine.setSize(QSize(width, height));
svg_engine.setViewBox(QRect(0, 0, width*0.75, height*0.75));
svg_engine.setSize(QSize((width*9/16), (height*9/16)));
svg_engine.setOutputDevice(&io_device);
QPainter svg_painter(&svg_engine);
picture.play(&svg_painter);
+2 -16
View File
@@ -766,6 +766,7 @@ void GenericPanel::projectDiagramsOrderChanged(QETProject *project,
if (!moved_qtwi_diagram) return;
// remove the QTWI then insert it back at the adequate location
bool was_selected = moved_qtwi_diagram -> isSelected();
qtwi_project -> removeChild (moved_qtwi_diagram);
qtwi_project -> insertChild (to, moved_qtwi_diagram);
@@ -780,14 +781,8 @@ void GenericPanel::projectDiagramsOrderChanged(QETProject *project,
updateDiagramItem(qtwi_diagram, diagram);
}
// select the moved diagram
if(m_selected_item){
if (was_selected)
setCurrentItem(moved_qtwi_diagram);
}
else{
setCurrentItem(qtwi_project -> child(from));
}
m_selected_item = nullptr;
emit(panelContentChanged());
}
@@ -1046,12 +1041,3 @@ void GenericPanel::emitFirstActivated()
{
emit(firstActivated());
}
/**
@brief GenericPanel::setSelectedItem
@param selectedItem
*/
void GenericPanel::setSelectedItem(QTreeWidgetItem *selectedItem)
{
m_selected_item = selectedItem;
}
+1 -6
View File
@@ -95,8 +95,8 @@ class GenericPanel : public QTreeWidget {
virtual QTreeWidgetItem *addDiagram(Diagram *,
QTreeWidgetItem * = nullptr,
PanelOptions = AddAllChild);
virtual QTreeWidgetItem *getItemForDiagram(Diagram *, bool * = nullptr);
protected:
virtual QTreeWidgetItem *getItemForDiagram(Diagram *, bool * = nullptr);
virtual QTreeWidgetItem *updateDiagramItem(QTreeWidgetItem *,
Diagram *,
PanelOptions = AddAllChild,
@@ -171,9 +171,6 @@ class GenericPanel : public QTreeWidget {
const QString &);
// various other methods
public:
void setSelectedItem(QTreeWidgetItem *selectedItem);
protected:
virtual QString defaultText(QET::ItemType);
virtual QIcon defaultIcon(QET::ItemType);
@@ -225,7 +222,5 @@ class GenericPanel : public QTreeWidget {
representing a title block template
*/
QHash<TitleBlockTemplateLocation, QTreeWidgetItem *> tb_templates_;
QTreeWidgetItem *m_selected_item = nullptr;
};
#endif
+3 -9
View File
@@ -188,10 +188,8 @@ void MachineInfo::send_info_to_debug()
QDirIterator it1(QETApp::commonElementsDir().toLatin1(),nameFilters, QDir::Files, QDirIterator::Subdirectories);
while (it1.hasNext())
{
if(it1.next() > 0 )
{
it1.next();
commomElementsDir ++;
}
}
qInfo()<< " Common Elements count:"<< commomElementsDir << "Elements";
@@ -200,10 +198,8 @@ void MachineInfo::send_info_to_debug()
QDirIterator it2(QETApp::customElementsDir().toLatin1(), nameFilters, QDir::Files, QDirIterator::Subdirectories);
while (it2.hasNext())
{
if(it2.next() > 0 )
{
it2.next();
customElementsDir ++;
}
}
qInfo()<< " Custom Elements count:"<< customElementsDir << "Elements";
@@ -211,10 +207,8 @@ void MachineInfo::send_info_to_debug()
QDirIterator it3(QETApp::companyElementsDir().toLatin1(), nameFilters, QDir::Files, QDirIterator::Subdirectories);
while (it3.hasNext())
{
if(it3.next() > 0 )
{
it3.next();
companyElementsDir ++;
}
}
qInfo()<< " Company Elements count:"<< companyElementsDir << "Elements";
+31 -28
View File
@@ -190,25 +190,28 @@ ProjectPrintWindow::~ProjectPrintWindow()
*/
void ProjectPrintWindow::requestPaint()
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
#ifdef Q_OS_WIN
#ifdef QT_DEBUG
qDebug() << "--";
qDebug() << "DiagramPrintDialog::print printer_->resolution() before " << m_printer->resolution();
qDebug() << "DiagramPrintDialog::print screennumber " << QApplication::desktop()->screenNumber();
#endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
#ifdef Q_OS_WIN
auto screen = this->screen();
if(screen)
{
#ifdef QT_DEBUG
qDebug() << "--";
qDebug() << "DiagramPrintDialog::print printer_->resolution() before " << m_printer->resolution();
qDebug() << "DiagramPrintDialog::print screennumber " << screen->name();
#endif
QScreen *srn = QApplication::screens().at(QApplication::desktop()->screenNumber());
qreal dotsPerInch = (qreal)srn->logicalDotsPerInch();
m_printer->setResolution(dotsPerInch);
qreal dotsPerInch = (qreal)screen->logicalDotsPerInch();
m_printer->setResolution(dotsPerInch);
#ifdef QT_DEBUG
qDebug() << "DiagramPrintDialog::print dotsPerInch " << dotsPerInch;
qDebug() << "DiagramPrintDialog::print printer_->resolution() after" << m_printer->resolution();
qDebug() << "--";
#endif
#endif
#endif
#ifdef QT_DEBUG
qDebug() << "DiagramPrintDialog::print dotsPerInch " << dotsPerInch;
qDebug() << "DiagramPrintDialog::print printer_->resolution() after" << m_printer->resolution();
qDebug() << "--";
#endif
}
#endif
#endif
if (!m_project->diagrams().count()) {
return;
@@ -265,9 +268,9 @@ void ProjectPrintWindow::printDiagram(Diagram *diagram, bool fit_page, QPainter
#if TODO_LIST
#pragma message("@TODO remove code for QT 6 or later")
#endif
qDebug()<<"Help code for QT 6 or later";
auto printed_rect = full_page ? printer->paperRect(QPrinter::Millimeter) :
printer->pageRect(QPrinter::Millimeter);
qDebug()<<"Help code for QT 6 or later";
auto printed_rect = full_page ? printer->paperRect(QPrinter::Millimeter) :
printer->pageRect(QPrinter::Millimeter);
#endif
auto used_width = printed_rect.width();
auto used_height = printed_rect.height();
@@ -341,7 +344,7 @@ QRect ProjectPrintWindow::diagramRect(Diagram *diagram, const ExportProperties &
diagram_rect.setHeight(diagram_rect.height() - titleblock_height);
}
//Adjust the border of diagram to 1px (width of the line)
//Adjust the border of diagram to 1px (width of the line)
diagram_rect.adjust(0,0,1,1);
return (diagram_rect.toAlignedRect());
@@ -356,7 +359,7 @@ QRect ProjectPrintWindow::diagramRect(Diagram *diagram, const ExportProperties &
* with the orientation and the paper format used by the actual printer
*/
int ProjectPrintWindow::horizontalPagesCount(
Diagram *diagram, const ExportProperties &option, bool full_page) const
Diagram *diagram, const ExportProperties &option, bool full_page) const
{
QRect printable_area;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 1) // ### Qt 6: remove
@@ -385,7 +388,7 @@ int ProjectPrintWindow::horizontalPagesCount(
* with the orientation and paper format used by the actual printer
*/
int ProjectPrintWindow::verticalPagesCount(
Diagram *diagram, const ExportProperties &option, bool full_page) const
Diagram *diagram, const ExportProperties &option, bool full_page) const
{
QRect printable_area;
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 1) // ### Qt 6: remove
@@ -511,7 +514,7 @@ void ProjectPrintWindow::loadPageSetupForCurrentPrinter()
QString value = settings.value("orientation", "landscape").toString();
m_printer->setPageOrientation(
value == "landscape" ? QPageLayout::Landscape :
QPageLayout::Portrait);
QPageLayout::Portrait);
}
if (settings.contains("papersize"))
{
@@ -780,9 +783,9 @@ void ProjectPrintWindow::print()
void ProjectPrintWindow::on_m_date_cb_userDateChanged(const QDate &date)
{
auto index = ui->m_date_from_cb->currentIndex();
// 0 = all date
// 1 = from the date
// 2 = at the date
// 0 = all date
// 1 = from the date
// 2 = at the date
if (index) { on_m_uncheck_all_clicked(); }
else { on_m_check_all_pb_clicked(); }
@@ -792,7 +795,7 @@ void ProjectPrintWindow::on_m_date_cb_userDateChanged(const QDate &date)
{
auto diagram_date = diagram->border_and_titleblock.date();
if ( (index == 1 && diagram_date >= date) ||
(index == 2 && diagram_date == date) )
(index == 2 && diagram_date == date) )
m_diagram_list_hash.value(diagram)->setChecked(true);
}
+15 -54
View File
@@ -721,14 +721,6 @@ void ProjectView::initActions()
m_end_view = new QAction(QET::Icons::ArrowRightDouble, tr("Aller à la fin du projet"),this);
connect(m_end_view, &QAction::triggered, [this](){this->m_tab->setCurrentWidget(lastDiagram());});
// button to scroll one page left
m_next_view_left = new QAction(QET::Icons::ArrowLeft, tr("go one page left"),this);
connect(m_next_view_left, &QAction::triggered, [this](){this->m_tab->setCurrentWidget(previousDiagram());});
// button to scroll one page right
m_next_view_right = new QAction(QET::Icons::ArrowRight, tr("go one page right"),this);
connect(m_next_view_right, &QAction::triggered, [this](){this->m_tab->setCurrentWidget(nextDiagram());});
}
/**
@@ -756,65 +748,34 @@ void ProjectView::initWidgets()
m_tab = new QTabWidget(this);
#endif
m_tab -> setMovable(true);
// setting UsesScrollButton ensures that when the tab bar is full, the tabs are scrolled.
m_tab -> setUsesScrollButtons(true);
// disable the internal scroll buttons of the TabWidget, we will use our own buttons.
m_tab->setStyleSheet("QTabBar QToolButton {border-image: ;border-width: 0px}");
m_tab->setStyleSheet("QTabBar::scroller {width: 0px;}");
// add layouts
QHBoxLayout *TopRightCorner_Layout = new QHBoxLayout();
TopRightCorner_Layout->setContentsMargins(0,0,0,0);
// some place left to the 'next_right_view_button' button
TopRightCorner_Layout->insertSpacing(1,10);
QHBoxLayout *TopLeftCorner_Layout = new QHBoxLayout();
TopLeftCorner_Layout->setContentsMargins(0,0,0,0);
// add buttons
QToolButton *m_next_right_view_button =new QToolButton;
m_next_right_view_button->setDefaultAction(m_next_view_right);
m_next_right_view_button->setAutoRaise(true);
TopRightCorner_Layout->addWidget(m_next_right_view_button);
QToolButton *m_end_view_button =new QToolButton;
m_end_view_button->setDefaultAction(m_end_view);
m_end_view_button->setAutoRaise(true);
TopRightCorner_Layout->addWidget(m_end_view_button);
QToolButton *add_new_diagram_button = new QToolButton;
add_new_diagram_button -> setDefaultAction(m_add_new_diagram);
add_new_diagram_button -> setAutoRaise(true);
TopRightCorner_Layout->addWidget(add_new_diagram_button);
// some place right to the 'add_new_diagram_button' button
TopRightCorner_Layout->addSpacing(5);
connect(m_tab, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));
connect(m_tab, SIGNAL(tabBarDoubleClicked(int)), this, SLOT(tabDoubleClicked(int)));
connect(m_tab->tabBar(), SIGNAL(tabMoved(int, int)), this, SLOT(tabMoved(int, int)), Qt::QueuedConnection);
//arrows button to return on first view
QToolButton *m_first_view_button =new QToolButton;
m_first_view_button->setDefaultAction(m_first_view);
m_first_view_button->setAutoRaise(true);
TopLeftCorner_Layout->addWidget(m_first_view_button);
m_tab->setCornerWidget(m_first_view_button, Qt::TopLeftCorner);
//arrows button to go on last view
QToolButton *m_end_view_button =new QToolButton;
m_end_view_button->setDefaultAction(m_end_view);
m_end_view_button->setAutoRaise(true);
TopRightCorner_Layout->addWidget(m_end_view_button);
QToolButton *m_next_left_view_button =new QToolButton;
m_next_left_view_button->setDefaultAction(m_next_view_left);
m_next_left_view_button->setAutoRaise(true);
TopLeftCorner_Layout->addWidget(m_next_left_view_button);
// some place right to the 'first_view_button' button
TopLeftCorner_Layout->addSpacing(10);
// add widgets to tabbar
QWidget *tabwidgetRight=new QWidget(this);
tabwidgetRight->setLayout(TopRightCorner_Layout);
m_tab -> setCornerWidget(tabwidgetRight, Qt::TopRightCorner);
QWidget *tabwidgetLeft=new QWidget(this);
tabwidgetLeft->setLayout(TopLeftCorner_Layout);
m_tab -> setCornerWidget(tabwidgetLeft, Qt::TopLeftCorner);
// manage signals
connect(m_tab, SIGNAL(currentChanged(int)), this, SLOT(tabChanged(int)));
connect(m_tab, SIGNAL(tabBarDoubleClicked(int)), this, SLOT(tabDoubleClicked(int)));
connect(m_tab->tabBar(), SIGNAL(tabMoved(int,int)), this, SLOT(tabMoved(int,int)), Qt::QueuedConnection);
QWidget *tabwidget=new QWidget(this);
tabwidget->setLayout(TopRightCorner_Layout);
m_tab -> setCornerWidget(tabwidget, Qt::TopRightCorner);
fallback_widget_ -> setVisible(false);
m_tab -> setVisible(false);
+2 -4
View File
@@ -168,10 +168,8 @@ class ProjectView : public QWidget
// attributes
private:
QAction *m_add_new_diagram,
*m_first_view,
*m_end_view,
*m_next_view_left,
*m_next_view_right;
*m_first_view,
*m_end_view;
QETProject *m_project;
QVBoxLayout *layout_;
QWidget *fallback_widget_;
+3 -16
View File
@@ -76,16 +76,6 @@ QDomElement ElementData::kindInfoToXml(QDomDocument &document)
xml_type.appendChild(type_txt);
returned_elmt.appendChild(xml_type);
// Save max_slaves only if a specific limit is set (not default -1)
if (m_max_slaves != -1) {
auto xml_max_slaves = document.createElement(QStringLiteral("kindInformation"));
xml_max_slaves.setAttribute(QStringLiteral("name"), QStringLiteral("max_slaves"));
auto max_slaves_txt = document.createTextNode(QString::number(m_max_slaves));
xml_max_slaves.appendChild(max_slaves_txt);
returned_elmt.appendChild(xml_max_slaves);
}
}
else if (m_type == ElementData::Slave)
{
@@ -568,12 +558,9 @@ void ElementData::kindInfoFromXml(const QDomElement &xml_element)
}
auto name = dom_elmt.attribute(QStringLiteral("name"));
if (m_type == ElementData::Master) {
if (name == QLatin1String("type")) {
m_master_type = masterTypeFromString(dom_elmt.text());
} else if (name == QLatin1String("max_slaves")) {
m_max_slaves = dom_elmt.text().toInt();
}
if (m_type == ElementData::Master &&
name == QLatin1String("type")) {
m_master_type = masterTypeFromString(dom_elmt.text());
}
else if (m_type == ElementData::Slave ) {
if (name == QLatin1String("type")) {
+1 -2
View File
@@ -134,7 +134,6 @@ class ElementData : public PropertiesInterface
ElementData::Type m_type = ElementData::Simple;
ElementData::MasterType m_master_type = ElementData::Coil;
int m_max_slaves{-1};
ElementData::SlaveType m_slave_type = ElementData::SSimple;
ElementData::SlaveState m_slave_state = ElementData::NO;
@@ -142,7 +141,7 @@ class ElementData : public PropertiesInterface
ElementData::TerminalType m_terminal_type = ElementData::TTGeneric;
ElementData::TerminalFunction m_terminal_function = ElementData::TFGeneric;
int m_contact_count{1};
int m_contact_count = 1;
DiagramContext m_informations;
NamesList m_names_list;
QString m_drawing_information;

Some files were not shown because too many files have changed in this diff Show More