Compare commits
3 Commits
2.7.2
...
feature/al
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c251f568a9 | ||
|
|
8c2dd29f39 | ||
|
|
360f42868d |
18
.gitmodules
vendored
18
.gitmodules
vendored
@@ -1,24 +1,18 @@
|
||||
[submodule "lib/stdex"]
|
||||
path = lib/stdex
|
||||
url = https://git.amebis.si/Amebis/stdex.git
|
||||
url = https://github.com/Amebis/stdex.git
|
||||
[submodule "lib/WinStd"]
|
||||
path = lib/WinStd
|
||||
url = https://git.amebis.si/Amebis/WinStd.git
|
||||
url = https://github.com/Amebis/WinStd.git
|
||||
[submodule "lib/wxExtend"]
|
||||
path = lib/wxExtend
|
||||
url = https://git.amebis.si/Amebis/wxExtend.git
|
||||
url = https://github.com/Amebis/wxExtend.git
|
||||
[submodule "MSI/MSIBuild"]
|
||||
path = MSI/MSIBuild
|
||||
url = https://git.amebis.si/Amebis/MSIBuild.git
|
||||
url = https://github.com/Amebis/MSIBuild.git
|
||||
[submodule "MSI/MSICA"]
|
||||
path = MSI/MSICA
|
||||
url = https://git.amebis.si/Amebis/MSICA.git
|
||||
url = https://github.com/Amebis/MSICA.git
|
||||
[submodule "Updater"]
|
||||
path = Updater
|
||||
url = https://git.amebis.si/Amebis/Updater.git
|
||||
[submodule "lib/oatpp"]
|
||||
path = lib/oatpp
|
||||
url = https://github.com/oatpp/oatpp.git
|
||||
[submodule "lib/oatpp-swagger"]
|
||||
path = lib/oatpp-swagger
|
||||
url = https://github.com/oatpp/oatpp-swagger.git
|
||||
url = https://github.com/Amebis/Updater.git
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Localization of ZRCola
|
||||
# Localization of ZRCola
|
||||
|
||||
In order to get ZRCola experience in your language the following resources should be translated:
|
||||
|
||||
|
||||
Submodule MSI/MSIBuild updated: 0d567bb504...320f7e9ee5
Submodule MSI/MSICA updated: aa2a57ac79...7ca8b9e7c9
Binary file not shown.
@@ -1,5 +1,21 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# Copyright © 1991-2022 Amebis
|
||||
#
|
||||
# Copyright 1991-2018 Amebis
|
||||
#
|
||||
# This file is part of ZRCola.
|
||||
#
|
||||
# ZRCola 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
!INCLUDE "..\..\include\MSIBuildCfg.mak"
|
||||
!INCLUDE "..\MSIBuild\Makefile"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,28 +1,24 @@
|
||||
#
|
||||
# Translators:
|
||||
# Simon Rozman <simon.rozman@amebis.si>, 2022
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: ZRCola MSI\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-02-17 13:32+0100\n"
|
||||
"PO-Revision-Date: 2018-09-19 07:19+0000\n"
|
||||
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>, 2022\n"
|
||||
"Language-Team: German (Germany) (https://app.transifex.com/amebis/teams/91592/de_DE/)\n"
|
||||
"POT-Creation-Date: 2018-09-19 08:59+0200\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Simon Rozman <simon@rozman.si>, 2018\n"
|
||||
"Language-Team: German (Germany) (https://www.transifex.com/amebis/teams/91592/de_DE/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: de_DE\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Poedit 2.4.2\n"
|
||||
"X-Generator: Poedit 2.1.1\n"
|
||||
"X-Poedit-Basepath: ../Main\n"
|
||||
"X-Poedit-KeywordsList: __\n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:4 en_US.ARM64.Release.Control-2.idtx:4
|
||||
#: en_US.Win32.Debug.Control-2.idtx:4 en_US.Win32.Release.Control-2.idtx:4
|
||||
#: en_US.x64.Debug.Control-2.idtx:4 en_US.x64.Release.Control-2.idtx:4
|
||||
msgid ""
|
||||
@@ -3466,22 +3462,18 @@ msgstr ""
|
||||
"Heading;}}{\\*\\datastore "
|
||||
"0105000002000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000c0ef044c8850cf01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}}"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:5 en_US.ARM64.Debug.Control-2.idtx:12
|
||||
#: en_US.ARM64.Release.Control-2.idtx:5 en_US.ARM64.Release.Control-2.idtx:12
|
||||
#: en_US.Win32.Debug.Control-2.idtx:5 en_US.Win32.Debug.Control-2.idtx:12
|
||||
#: en_US.Win32.Release.Control-2.idtx:5 en_US.Win32.Release.Control-2.idtx:12
|
||||
#: en_US.x64.Debug.Control-2.idtx:5 en_US.x64.Debug.Control-2.idtx:12
|
||||
#: en_US.x64.Release.Control-2.idtx:5 en_US.x64.Release.Control-2.idtx:12
|
||||
msgid "UIHeader.bmp"
|
||||
msgstr "UIHeader.bmp"
|
||||
msgid "binUIHeader.bmp"
|
||||
msgstr "binUIHeader.bmp"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:6 en_US.ARM64.Release.Control-2.idtx:6
|
||||
#: en_US.Win32.Debug.Control-2.idtx:6 en_US.Win32.Release.Control-2.idtx:6
|
||||
#: en_US.x64.Debug.Control-2.idtx:6 en_US.x64.Release.Control-2.idtx:6
|
||||
msgid "[DlgTitleFont][SimpleProductName] Declaration"
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:7 en_US.ARM64.Release.Control-2.idtx:7
|
||||
#: en_US.Win32.Debug.Control-2.idtx:7 en_US.Win32.Release.Control-2.idtx:7
|
||||
#: en_US.x64.Debug.Control-2.idtx:7 en_US.x64.Release.Control-2.idtx:7
|
||||
msgid ""
|
||||
@@ -3489,7 +3481,6 @@ msgid ""
|
||||
"or some other appropriate part of the publication the note below:"
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:8 en_US.ARM64.Release.Control-2.idtx:8
|
||||
#: en_US.Win32.Debug.Control-2.idtx:8 en_US.Win32.Release.Control-2.idtx:8
|
||||
#: en_US.x64.Debug.Control-2.idtx:8 en_US.x64.Release.Control-2.idtx:8
|
||||
msgid ""
|
||||
@@ -3503,7 +3494,6 @@ msgid ""
|
||||
"(http://www.zrc-sazu.si) by Peter Weiss.\\f1\\par}"
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:9 en_US.ARM64.Release.Control-2.idtx:9
|
||||
#: en_US.Win32.Debug.Control-2.idtx:9 en_US.Win32.Release.Control-2.idtx:9
|
||||
#: en_US.x64.Debug.Control-2.idtx:9 en_US.x64.Release.Control-2.idtx:9
|
||||
msgid ""
|
||||
@@ -3511,14 +3501,11 @@ msgid ""
|
||||
"dialog or on its website."
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:10 en_US.ARM64.Release.Control-2.idtx:10
|
||||
#: en_US.Win32.Debug.Control-2.idtx:10 en_US.Win32.Release.Control-2.idtx:10
|
||||
#: en_US.x64.Debug.Control-2.idtx:10 en_US.x64.Release.Control-2.idtx:10
|
||||
msgid "I &agree."
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:11 en_US.ARM64.Debug.Control-2.idtx:16
|
||||
#: en_US.ARM64.Release.Control-2.idtx:11 en_US.ARM64.Release.Control-2.idtx:16
|
||||
#: en_US.Win32.Debug.Control-2.idtx:11 en_US.Win32.Debug.Control-2.idtx:16
|
||||
#: en_US.Win32.Release.Control-2.idtx:11 en_US.Win32.Release.Control-2.idtx:16
|
||||
#: en_US.x64.Debug.Control-2.idtx:11 en_US.x64.Debug.Control-2.idtx:16
|
||||
@@ -3526,19 +3513,16 @@ msgstr ""
|
||||
msgid "&Continue"
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:13 en_US.ARM64.Release.Control-2.idtx:13
|
||||
#: en_US.Win32.Debug.Control-2.idtx:13 en_US.Win32.Release.Control-2.idtx:13
|
||||
#: en_US.x64.Debug.Control-2.idtx:13 en_US.x64.Release.Control-2.idtx:13
|
||||
msgid "[DlgTitleFont]\"00 ZRCola\" to \"ZRCola\" Font"
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:14 en_US.ARM64.Release.Control-2.idtx:14
|
||||
#: en_US.Win32.Debug.Control-2.idtx:14 en_US.Win32.Release.Control-2.idtx:14
|
||||
#: en_US.x64.Debug.Control-2.idtx:14 en_US.x64.Release.Control-2.idtx:14
|
||||
msgid "fontsubst.bmp"
|
||||
msgstr "fontsubst.bmp"
|
||||
msgid "binfontsubst.bmp"
|
||||
msgstr "binfontsubst.bmp"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:15 en_US.ARM64.Release.Control-2.idtx:15
|
||||
#: en_US.Win32.Debug.Control-2.idtx:15 en_US.Win32.Release.Control-2.idtx:15
|
||||
#: en_US.x64.Debug.Control-2.idtx:15 en_US.x64.Release.Control-2.idtx:15
|
||||
msgid ""
|
||||
@@ -3547,103 +3531,86 @@ msgid ""
|
||||
"computer that will take effect after the next restart."
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Directory-2.idtx:4 en_US.ARM64.Release.Directory-2.idtx:4
|
||||
#: en_US.Win32.Debug.Directory-2.idtx:4 en_US.Win32.Release.Directory-2.idtx:4
|
||||
#: en_US.x64.Debug.Directory-2.idtx:4 en_US.x64.Release.Directory-2.idtx:4
|
||||
msgid "ZRCola:."
|
||||
msgstr "ZRCola:."
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:4 en_US.ARM64.Release.Feature-2.idtx:4
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4
|
||||
#: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4
|
||||
msgid "Fonts"
|
||||
msgstr "Schriftarten"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:4 en_US.ARM64.Release.Feature-2.idtx:4
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4
|
||||
#: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4
|
||||
msgid "Fonts used by ZRCola"
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:5 en_US.ARM64.Release.Feature-2.idtx:5
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5
|
||||
#: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5
|
||||
msgid "ZRCola"
|
||||
msgstr "ZRCola"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:5 en_US.ARM64.Release.Feature-2.idtx:5
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5
|
||||
#: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5
|
||||
msgid "Times New Roman based font"
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:6 en_US.ARM64.Release.Feature-2.idtx:6
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6
|
||||
#: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6
|
||||
msgid "Documentation"
|
||||
msgstr "Dokumentation"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:6 en_US.ARM64.Release.Feature-2.idtx:6
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6
|
||||
#: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6
|
||||
msgid "ZRCola Documentation"
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:7 en_US.ARM64.Release.Feature-2.idtx:7
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7
|
||||
#: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7
|
||||
msgid "Keyboard Shortcuts"
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:7 en_US.ARM64.Release.Feature-2.idtx:7
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7
|
||||
#: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7
|
||||
msgid "PDF document with a list of ZRCola keyboard shortcuts"
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:4 en_US.ARM64.Release.Property-2.idtx:4
|
||||
#: en_US.Win32.Debug.Property-2.idtx:4 en_US.Win32.Release.Property-2.idtx:4
|
||||
#: en_US.x64.Debug.Property-2.idtx:4 en_US.x64.Release.Property-2.idtx:4
|
||||
msgid "Amebis, Slovenia, E.U."
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:5 en_US.ARM64.Release.Property-2.idtx:5
|
||||
#: en_US.Win32.Debug.Property-2.idtx:5 en_US.Win32.Release.Property-2.idtx:5
|
||||
#: en_US.x64.Debug.Property-2.idtx:5 en_US.x64.Release.Property-2.idtx:5
|
||||
msgid "Fran Ramovš Institute of Slovenian Language ZRC SAZU"
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:6 en_US.ARM64.Release.Property-2.idtx:6
|
||||
#: en_US.Win32.Debug.Property-2.idtx:6 en_US.Win32.Release.Property-2.idtx:6
|
||||
#: en_US.x64.Debug.Property-2.idtx:6 en_US.x64.Release.Property-2.idtx:6
|
||||
msgid "+386 1 470 6170"
|
||||
msgstr "+386 1 470 6170"
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:7 en_US.ARM64.Release.Property-2.idtx:7
|
||||
#: en_US.Win32.Debug.Property-2.idtx:7 en_US.Win32.Release.Property-2.idtx:7
|
||||
#: en_US.x64.Debug.Property-2.idtx:7 en_US.x64.Release.Property-2.idtx:7
|
||||
msgid "http://zrcola.zrc-sazu.si/en/contact/"
|
||||
msgstr "http://zrcola.zrc-sazu.si/de/contact/"
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:8 en_US.ARM64.Release.Property-2.idtx:8
|
||||
#: en_US.Win32.Debug.Property-2.idtx:8 en_US.Win32.Release.Property-2.idtx:8
|
||||
#: en_US.x64.Debug.Property-2.idtx:8 en_US.x64.Release.Property-2.idtx:8
|
||||
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
|
||||
msgstr "http://zrcola.zrc-sazu.si/de/info/instructions/"
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:9 en_US.ARM64.Release.Property-2.idtx:9
|
||||
#: en_US.Win32.Debug.Property-2.idtx:9 en_US.Win32.Release.Property-2.idtx:9
|
||||
#: en_US.x64.Debug.Property-2.idtx:9 en_US.x64.Release.Property-2.idtx:9
|
||||
msgid "http://zrcola.zrc-sazu.si/en/install/"
|
||||
msgstr "http://zrcola.zrc-sazu.si/de/install/"
|
||||
|
||||
#: en_US.ARM64.Debug.Shortcut-2.idtx:4 en_US.ARM64.Release.Shortcut-2.idtx:4
|
||||
#: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4
|
||||
#: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4
|
||||
msgid "ZRCOLA~1|ZRCola Keyboard Shortcuts"
|
||||
msgstr ""
|
||||
|
||||
#: en_US.ARM64.Debug.Shortcut-2.idtx:4 en_US.ARM64.Release.Shortcut-2.idtx:4
|
||||
#: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4
|
||||
#: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4
|
||||
msgid "ZRCola Keyboard Shortcuts"
|
||||
|
||||
@@ -1,28 +1,24 @@
|
||||
#
|
||||
# Translators:
|
||||
# Simon Rozman <simon.rozman@amebis.si>, 2022
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: ZRCola MSI\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-02-17 13:32+0100\n"
|
||||
"PO-Revision-Date: 2018-09-19 07:19+0000\n"
|
||||
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>, 2022\n"
|
||||
"Language-Team: Russian (Russia) (https://app.transifex.com/amebis/teams/91592/ru_RU/)\n"
|
||||
"POT-Creation-Date: 2018-09-19 08:59+0200\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Simon Rozman <simon@rozman.si>, 2018\n"
|
||||
"Language-Team: Russian (Russia) (https://www.transifex.com/amebis/teams/91592/ru_RU/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: ru_RU\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
|
||||
"X-Generator: Poedit 2.4.2\n"
|
||||
"X-Generator: Poedit 2.1.1\n"
|
||||
"X-Poedit-Basepath: ../Main\n"
|
||||
"X-Poedit-KeywordsList: __\n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:4 en_US.ARM64.Release.Control-2.idtx:4
|
||||
#: en_US.Win32.Debug.Control-2.idtx:4 en_US.Win32.Release.Control-2.idtx:4
|
||||
#: en_US.x64.Debug.Control-2.idtx:4 en_US.x64.Release.Control-2.idtx:4
|
||||
msgid ""
|
||||
@@ -3466,22 +3462,18 @@ msgstr ""
|
||||
"Heading;}}{\\*\\datastore "
|
||||
"0105000002000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000c0ef044c8850cf01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}}"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:5 en_US.ARM64.Debug.Control-2.idtx:12
|
||||
#: en_US.ARM64.Release.Control-2.idtx:5 en_US.ARM64.Release.Control-2.idtx:12
|
||||
#: en_US.Win32.Debug.Control-2.idtx:5 en_US.Win32.Debug.Control-2.idtx:12
|
||||
#: en_US.Win32.Release.Control-2.idtx:5 en_US.Win32.Release.Control-2.idtx:12
|
||||
#: en_US.x64.Debug.Control-2.idtx:5 en_US.x64.Debug.Control-2.idtx:12
|
||||
#: en_US.x64.Release.Control-2.idtx:5 en_US.x64.Release.Control-2.idtx:12
|
||||
msgid "UIHeader.bmp"
|
||||
msgstr "UIHeader.bmp"
|
||||
msgid "binUIHeader.bmp"
|
||||
msgstr "binUIHeader.bmp"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:6 en_US.ARM64.Release.Control-2.idtx:6
|
||||
#: en_US.Win32.Debug.Control-2.idtx:6 en_US.Win32.Release.Control-2.idtx:6
|
||||
#: en_US.x64.Debug.Control-2.idtx:6 en_US.x64.Release.Control-2.idtx:6
|
||||
msgid "[DlgTitleFont][SimpleProductName] Declaration"
|
||||
msgstr "[DlgTitleFont][SimpleProductName] Декларация"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:7 en_US.ARM64.Release.Control-2.idtx:7
|
||||
#: en_US.Win32.Debug.Control-2.idtx:7 en_US.Win32.Release.Control-2.idtx:7
|
||||
#: en_US.x64.Debug.Control-2.idtx:7 en_US.x64.Release.Control-2.idtx:7
|
||||
msgid ""
|
||||
@@ -3491,7 +3483,6 @@ msgstr ""
|
||||
"Текст, созданный с помощью системы ZRCola, должен в примечании или другом "
|
||||
"соответствующем месте в публикации сопровождаться следующей записью"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:8 en_US.ARM64.Release.Control-2.idtx:8
|
||||
#: en_US.Win32.Debug.Control-2.idtx:8 en_US.Win32.Release.Control-2.idtx:8
|
||||
#: en_US.x64.Debug.Control-2.idtx:8 en_US.x64.Release.Control-2.idtx:8
|
||||
msgid ""
|
||||
@@ -3521,7 +3512,6 @@ msgstr ""
|
||||
"\\'cb\\'fe\\'e1\\'eb\\'ff\\'ed\\'e5 (http://www.zrc-sazu.si) "
|
||||
"\\'cf\\'e5\\'f2\\'f0\\'ee\\'ec \\'c2\\'e5\\'e9\\'f1\\'f1o\\'ec.\\f1\\par}"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:9 en_US.ARM64.Release.Control-2.idtx:9
|
||||
#: en_US.Win32.Debug.Control-2.idtx:9 en_US.Win32.Release.Control-2.idtx:9
|
||||
#: en_US.x64.Debug.Control-2.idtx:9 en_US.x64.Release.Control-2.idtx:9
|
||||
msgid ""
|
||||
@@ -3531,14 +3521,11 @@ msgstr ""
|
||||
"Примечание: Ета декларация доступна также в диалоговом окне «О программе» "
|
||||
"либо на вебсайте системы ZRCola."
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:10 en_US.ARM64.Release.Control-2.idtx:10
|
||||
#: en_US.Win32.Debug.Control-2.idtx:10 en_US.Win32.Release.Control-2.idtx:10
|
||||
#: en_US.x64.Debug.Control-2.idtx:10 en_US.x64.Release.Control-2.idtx:10
|
||||
msgid "I &agree."
|
||||
msgstr "Согласен."
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:11 en_US.ARM64.Debug.Control-2.idtx:16
|
||||
#: en_US.ARM64.Release.Control-2.idtx:11 en_US.ARM64.Release.Control-2.idtx:16
|
||||
#: en_US.Win32.Debug.Control-2.idtx:11 en_US.Win32.Debug.Control-2.idtx:16
|
||||
#: en_US.Win32.Release.Control-2.idtx:11 en_US.Win32.Release.Control-2.idtx:16
|
||||
#: en_US.x64.Debug.Control-2.idtx:11 en_US.x64.Debug.Control-2.idtx:16
|
||||
@@ -3546,19 +3533,16 @@ msgstr "Согласен."
|
||||
msgid "&Continue"
|
||||
msgstr "Продолжить"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:13 en_US.ARM64.Release.Control-2.idtx:13
|
||||
#: en_US.Win32.Debug.Control-2.idtx:13 en_US.Win32.Release.Control-2.idtx:13
|
||||
#: en_US.x64.Debug.Control-2.idtx:13 en_US.x64.Release.Control-2.idtx:13
|
||||
msgid "[DlgTitleFont]\"00 ZRCola\" to \"ZRCola\" Font"
|
||||
msgstr "[DlgTitleFont]Шрифт «00 ZRCola» в «ZRCola»"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:14 en_US.ARM64.Release.Control-2.idtx:14
|
||||
#: en_US.Win32.Debug.Control-2.idtx:14 en_US.Win32.Release.Control-2.idtx:14
|
||||
#: en_US.x64.Debug.Control-2.idtx:14 en_US.x64.Release.Control-2.idtx:14
|
||||
msgid "fontsubst.bmp"
|
||||
msgstr "fontsubst.bmp"
|
||||
msgid "binfontsubst.bmp"
|
||||
msgstr "binfontsubst.bmp"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:15 en_US.ARM64.Release.Control-2.idtx:15
|
||||
#: en_US.Win32.Debug.Control-2.idtx:15 en_US.Win32.Release.Control-2.idtx:15
|
||||
#: en_US.x64.Debug.Control-2.idtx:15 en_US.x64.Release.Control-2.idtx:15
|
||||
msgid ""
|
||||
@@ -3570,103 +3554,86 @@ msgstr ""
|
||||
"предыдущих документов в вашем компьютере проведена субституция шрифтов, "
|
||||
"которая вступит в силу после следующего запуска компьютера."
|
||||
|
||||
#: en_US.ARM64.Debug.Directory-2.idtx:4 en_US.ARM64.Release.Directory-2.idtx:4
|
||||
#: en_US.Win32.Debug.Directory-2.idtx:4 en_US.Win32.Release.Directory-2.idtx:4
|
||||
#: en_US.x64.Debug.Directory-2.idtx:4 en_US.x64.Release.Directory-2.idtx:4
|
||||
msgid "ZRCola:."
|
||||
msgstr "ZRCola:."
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:4 en_US.ARM64.Release.Feature-2.idtx:4
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4
|
||||
#: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4
|
||||
msgid "Fonts"
|
||||
msgstr "Шрифты"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:4 en_US.ARM64.Release.Feature-2.idtx:4
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4
|
||||
#: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4
|
||||
msgid "Fonts used by ZRCola"
|
||||
msgstr "Шрифты, использованные системой ZRCola"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:5 en_US.ARM64.Release.Feature-2.idtx:5
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5
|
||||
#: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5
|
||||
msgid "ZRCola"
|
||||
msgstr "ZRCola"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:5 en_US.ARM64.Release.Feature-2.idtx:5
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5
|
||||
#: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5
|
||||
msgid "Times New Roman based font"
|
||||
msgstr "Шрифт на основе Times New Roman"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:6 en_US.ARM64.Release.Feature-2.idtx:6
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6
|
||||
#: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6
|
||||
msgid "Documentation"
|
||||
msgstr "Документация"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:6 en_US.ARM64.Release.Feature-2.idtx:6
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6
|
||||
#: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6
|
||||
msgid "ZRCola Documentation"
|
||||
msgstr "Документация системы ZRCola"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:7 en_US.ARM64.Release.Feature-2.idtx:7
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7
|
||||
#: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7
|
||||
msgid "Keyboard Shortcuts"
|
||||
msgstr "Сочетание клавиш"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:7 en_US.ARM64.Release.Feature-2.idtx:7
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7
|
||||
#: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7
|
||||
msgid "PDF document with a list of ZRCola keyboard shortcuts"
|
||||
msgstr "Документ PDF со списком сочетаний клавиш системы ZRCola "
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:4 en_US.ARM64.Release.Property-2.idtx:4
|
||||
#: en_US.Win32.Debug.Property-2.idtx:4 en_US.Win32.Release.Property-2.idtx:4
|
||||
#: en_US.x64.Debug.Property-2.idtx:4 en_US.x64.Release.Property-2.idtx:4
|
||||
msgid "Amebis, Slovenia, E.U."
|
||||
msgstr "Amebis, Словения, ЕС"
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:5 en_US.ARM64.Release.Property-2.idtx:5
|
||||
#: en_US.Win32.Debug.Property-2.idtx:5 en_US.Win32.Release.Property-2.idtx:5
|
||||
#: en_US.x64.Debug.Property-2.idtx:5 en_US.x64.Release.Property-2.idtx:5
|
||||
msgid "Fran Ramovš Institute of Slovenian Language ZRC SAZU"
|
||||
msgstr "Институт словенского языка им. Франа Рамовша ZRC SAZU"
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:6 en_US.ARM64.Release.Property-2.idtx:6
|
||||
#: en_US.Win32.Debug.Property-2.idtx:6 en_US.Win32.Release.Property-2.idtx:6
|
||||
#: en_US.x64.Debug.Property-2.idtx:6 en_US.x64.Release.Property-2.idtx:6
|
||||
msgid "+386 1 470 6170"
|
||||
msgstr "+386 1 470 6170"
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:7 en_US.ARM64.Release.Property-2.idtx:7
|
||||
#: en_US.Win32.Debug.Property-2.idtx:7 en_US.Win32.Release.Property-2.idtx:7
|
||||
#: en_US.x64.Debug.Property-2.idtx:7 en_US.x64.Release.Property-2.idtx:7
|
||||
msgid "http://zrcola.zrc-sazu.si/en/contact/"
|
||||
msgstr "http://zrcola.zrc-sazu.si/ru/contact/"
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:8 en_US.ARM64.Release.Property-2.idtx:8
|
||||
#: en_US.Win32.Debug.Property-2.idtx:8 en_US.Win32.Release.Property-2.idtx:8
|
||||
#: en_US.x64.Debug.Property-2.idtx:8 en_US.x64.Release.Property-2.idtx:8
|
||||
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
|
||||
msgstr "http://zrcola.zrc-sazu.si/ru/info/instructions/"
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:9 en_US.ARM64.Release.Property-2.idtx:9
|
||||
#: en_US.Win32.Debug.Property-2.idtx:9 en_US.Win32.Release.Property-2.idtx:9
|
||||
#: en_US.x64.Debug.Property-2.idtx:9 en_US.x64.Release.Property-2.idtx:9
|
||||
msgid "http://zrcola.zrc-sazu.si/en/install/"
|
||||
msgstr "http://zrcola.zrc-sazu.si/ru/install/"
|
||||
|
||||
#: en_US.ARM64.Debug.Shortcut-2.idtx:4 en_US.ARM64.Release.Shortcut-2.idtx:4
|
||||
#: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4
|
||||
#: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4
|
||||
msgid "ZRCOLA~1|ZRCola Keyboard Shortcuts"
|
||||
msgstr "ZRCOLA~1|Сочетание клавиш системы ZRCola"
|
||||
|
||||
#: en_US.ARM64.Debug.Shortcut-2.idtx:4 en_US.ARM64.Release.Shortcut-2.idtx:4
|
||||
#: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4
|
||||
#: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4
|
||||
msgid "ZRCola Keyboard Shortcuts"
|
||||
|
||||
@@ -1,28 +1,24 @@
|
||||
#
|
||||
# Translators:
|
||||
# Simon Rozman <simon.rozman@amebis.si>, 2022
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: ZRCola MSI\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-02-17 13:32+0100\n"
|
||||
"PO-Revision-Date: 2018-09-19 07:19+0000\n"
|
||||
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>, 2022\n"
|
||||
"Language-Team: Slovenian (Slovenia) (https://app.transifex.com/amebis/teams/91592/sl_SI/)\n"
|
||||
"POT-Creation-Date: 2018-09-19 08:59+0200\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Simon Rozman <simon@rozman.si>, 2018\n"
|
||||
"Language-Team: Slovenian (Slovenia) (https://www.transifex.com/amebis/teams/91592/sl_SI/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: sl_SI\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
|
||||
"X-Generator: Poedit 2.4.2\n"
|
||||
"X-Generator: Poedit 2.1.1\n"
|
||||
"X-Poedit-Basepath: ../Main\n"
|
||||
"X-Poedit-KeywordsList: __\n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:4 en_US.ARM64.Release.Control-2.idtx:4
|
||||
#: en_US.Win32.Debug.Control-2.idtx:4 en_US.Win32.Release.Control-2.idtx:4
|
||||
#: en_US.x64.Debug.Control-2.idtx:4 en_US.x64.Release.Control-2.idtx:4
|
||||
msgid ""
|
||||
@@ -3466,22 +3462,18 @@ msgstr ""
|
||||
"Heading;}}{\\*\\datastore "
|
||||
"0105000002000000180000004d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000c0ef044c8850cf01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}}"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:5 en_US.ARM64.Debug.Control-2.idtx:12
|
||||
#: en_US.ARM64.Release.Control-2.idtx:5 en_US.ARM64.Release.Control-2.idtx:12
|
||||
#: en_US.Win32.Debug.Control-2.idtx:5 en_US.Win32.Debug.Control-2.idtx:12
|
||||
#: en_US.Win32.Release.Control-2.idtx:5 en_US.Win32.Release.Control-2.idtx:12
|
||||
#: en_US.x64.Debug.Control-2.idtx:5 en_US.x64.Debug.Control-2.idtx:12
|
||||
#: en_US.x64.Release.Control-2.idtx:5 en_US.x64.Release.Control-2.idtx:12
|
||||
msgid "UIHeader.bmp"
|
||||
msgstr "UIHeader.bmp"
|
||||
msgid "binUIHeader.bmp"
|
||||
msgstr "binUIHeader.bmp"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:6 en_US.ARM64.Release.Control-2.idtx:6
|
||||
#: en_US.Win32.Debug.Control-2.idtx:6 en_US.Win32.Release.Control-2.idtx:6
|
||||
#: en_US.x64.Debug.Control-2.idtx:6 en_US.x64.Release.Control-2.idtx:6
|
||||
msgid "[DlgTitleFont][SimpleProductName] Declaration"
|
||||
msgstr "[DlgTitleFont]Deklaracija [SimpleProductName]"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:7 en_US.ARM64.Release.Control-2.idtx:7
|
||||
#: en_US.Win32.Debug.Control-2.idtx:7 en_US.Win32.Release.Control-2.idtx:7
|
||||
#: en_US.x64.Debug.Control-2.idtx:7 en_US.x64.Release.Control-2.idtx:7
|
||||
msgid ""
|
||||
@@ -3492,7 +3484,6 @@ msgstr ""
|
||||
"opombi ali na drugem ustreznem mestu v publikaciji opremljeno z naslednjim "
|
||||
"zapisom:"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:8 en_US.ARM64.Release.Control-2.idtx:8
|
||||
#: en_US.Win32.Debug.Control-2.idtx:8 en_US.Win32.Release.Control-2.idtx:8
|
||||
#: en_US.x64.Debug.Control-2.idtx:8 en_US.x64.Release.Control-2.idtx:8
|
||||
msgid ""
|
||||
@@ -3510,11 +3501,10 @@ msgstr ""
|
||||
"Roman;}Times New Roman CE;}}{\\colortbl "
|
||||
";\\red0\\green0\\blue255;}{\\*\\generator Msftedit "
|
||||
"5.41.21.2510;}\\viewkind4\\uc1\\pard\\sa200\\sl276\\slmult1\\i\\f0\\fs22 "
|
||||
"Besedilo je bilo pripravljeno z vna\\'9aalnim sistemom ZRCola "
|
||||
"(http://zrcola.zrc-sazu.si), ki ga je na Znanstvenoraziskovalnem centru SAZU"
|
||||
" v Ljubljani (http://www.zrc-sazu.si) razvil Peter Weiss.\\i0\\f1\\par}"
|
||||
"Besedilo je bilo pripravljeno z vna\\'9aalnim sistemom ZRCola (http://zrcola"
|
||||
".zrc-sazu.si), ki ga je na Znanstvenoraziskovalnem centru SAZU v Ljubljani "
|
||||
"(http://www.zrc-sazu.si) razvil Peter Weiss.\\i0\\f1\\par}"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:9 en_US.ARM64.Release.Control-2.idtx:9
|
||||
#: en_US.Win32.Debug.Control-2.idtx:9 en_US.Win32.Release.Control-2.idtx:9
|
||||
#: en_US.x64.Debug.Control-2.idtx:9 en_US.x64.Release.Control-2.idtx:9
|
||||
msgid ""
|
||||
@@ -3524,14 +3514,11 @@ msgstr ""
|
||||
"Opomba: Ta deklaracija je na voljo tudi v dialogu vizitke "
|
||||
"[SimpleProductName] ali na spletni strani."
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:10 en_US.ARM64.Release.Control-2.idtx:10
|
||||
#: en_US.Win32.Debug.Control-2.idtx:10 en_US.Win32.Release.Control-2.idtx:10
|
||||
#: en_US.x64.Debug.Control-2.idtx:10 en_US.x64.Release.Control-2.idtx:10
|
||||
msgid "I &agree."
|
||||
msgstr "&Strinjam se."
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:11 en_US.ARM64.Debug.Control-2.idtx:16
|
||||
#: en_US.ARM64.Release.Control-2.idtx:11 en_US.ARM64.Release.Control-2.idtx:16
|
||||
#: en_US.Win32.Debug.Control-2.idtx:11 en_US.Win32.Debug.Control-2.idtx:16
|
||||
#: en_US.Win32.Release.Control-2.idtx:11 en_US.Win32.Release.Control-2.idtx:16
|
||||
#: en_US.x64.Debug.Control-2.idtx:11 en_US.x64.Debug.Control-2.idtx:16
|
||||
@@ -3539,19 +3526,16 @@ msgstr "&Strinjam se."
|
||||
msgid "&Continue"
|
||||
msgstr "&Nadaljuj"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:13 en_US.ARM64.Release.Control-2.idtx:13
|
||||
#: en_US.Win32.Debug.Control-2.idtx:13 en_US.Win32.Release.Control-2.idtx:13
|
||||
#: en_US.x64.Debug.Control-2.idtx:13 en_US.x64.Release.Control-2.idtx:13
|
||||
msgid "[DlgTitleFont]\"00 ZRCola\" to \"ZRCola\" Font"
|
||||
msgstr "[DlgTitleFont]\"00 ZRCola\" v pisavo \"ZRCola\""
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:14 en_US.ARM64.Release.Control-2.idtx:14
|
||||
#: en_US.Win32.Debug.Control-2.idtx:14 en_US.Win32.Release.Control-2.idtx:14
|
||||
#: en_US.x64.Debug.Control-2.idtx:14 en_US.x64.Release.Control-2.idtx:14
|
||||
msgid "fontsubst.bmp"
|
||||
msgstr "fontsubst.bmp"
|
||||
msgid "binfontsubst.bmp"
|
||||
msgstr "binfontsubst.bmp"
|
||||
|
||||
#: en_US.ARM64.Debug.Control-2.idtx:15 en_US.ARM64.Release.Control-2.idtx:15
|
||||
#: en_US.Win32.Debug.Control-2.idtx:15 en_US.Win32.Release.Control-2.idtx:15
|
||||
#: en_US.x64.Debug.Control-2.idtx:15 en_US.x64.Release.Control-2.idtx:15
|
||||
msgid ""
|
||||
@@ -3563,103 +3547,86 @@ msgstr ""
|
||||
" dokumenti prikazani pravilno, smo na vašem računalniku uredili nadomeščanje"
|
||||
" pisave, ki bo stopilo v veljavo po naslednjem zagonu."
|
||||
|
||||
#: en_US.ARM64.Debug.Directory-2.idtx:4 en_US.ARM64.Release.Directory-2.idtx:4
|
||||
#: en_US.Win32.Debug.Directory-2.idtx:4 en_US.Win32.Release.Directory-2.idtx:4
|
||||
#: en_US.x64.Debug.Directory-2.idtx:4 en_US.x64.Release.Directory-2.idtx:4
|
||||
msgid "ZRCola:."
|
||||
msgstr "ZRCola:."
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:4 en_US.ARM64.Release.Feature-2.idtx:4
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4
|
||||
#: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4
|
||||
msgid "Fonts"
|
||||
msgstr "Pisave"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:4 en_US.ARM64.Release.Feature-2.idtx:4
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:4 en_US.Win32.Release.Feature-2.idtx:4
|
||||
#: en_US.x64.Debug.Feature-2.idtx:4 en_US.x64.Release.Feature-2.idtx:4
|
||||
msgid "Fonts used by ZRCola"
|
||||
msgstr "Pisave, ki jih uporablja ZRCola"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:5 en_US.ARM64.Release.Feature-2.idtx:5
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5
|
||||
#: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5
|
||||
msgid "ZRCola"
|
||||
msgstr "ZRCola"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:5 en_US.ARM64.Release.Feature-2.idtx:5
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:5 en_US.Win32.Release.Feature-2.idtx:5
|
||||
#: en_US.x64.Debug.Feature-2.idtx:5 en_US.x64.Release.Feature-2.idtx:5
|
||||
msgid "Times New Roman based font"
|
||||
msgstr "Pisava na osnovi Times New Roman"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:6 en_US.ARM64.Release.Feature-2.idtx:6
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6
|
||||
#: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6
|
||||
msgid "Documentation"
|
||||
msgstr "Dokumentacija"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:6 en_US.ARM64.Release.Feature-2.idtx:6
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:6 en_US.Win32.Release.Feature-2.idtx:6
|
||||
#: en_US.x64.Debug.Feature-2.idtx:6 en_US.x64.Release.Feature-2.idtx:6
|
||||
msgid "ZRCola Documentation"
|
||||
msgstr "Dokumentacija ZRCola"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:7 en_US.ARM64.Release.Feature-2.idtx:7
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7
|
||||
#: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7
|
||||
msgid "Keyboard Shortcuts"
|
||||
msgstr "Bližnjice na tipkovnici"
|
||||
|
||||
#: en_US.ARM64.Debug.Feature-2.idtx:7 en_US.ARM64.Release.Feature-2.idtx:7
|
||||
#: en_US.Win32.Debug.Feature-2.idtx:7 en_US.Win32.Release.Feature-2.idtx:7
|
||||
#: en_US.x64.Debug.Feature-2.idtx:7 en_US.x64.Release.Feature-2.idtx:7
|
||||
msgid "PDF document with a list of ZRCola keyboard shortcuts"
|
||||
msgstr "Dokument PDF s seznamom ZRColinih bližnjic na tipkovnici"
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:4 en_US.ARM64.Release.Property-2.idtx:4
|
||||
#: en_US.Win32.Debug.Property-2.idtx:4 en_US.Win32.Release.Property-2.idtx:4
|
||||
#: en_US.x64.Debug.Property-2.idtx:4 en_US.x64.Release.Property-2.idtx:4
|
||||
msgid "Amebis, Slovenia, E.U."
|
||||
msgstr "Amebis, d. o. o., Kamnik"
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:5 en_US.ARM64.Release.Property-2.idtx:5
|
||||
#: en_US.Win32.Debug.Property-2.idtx:5 en_US.Win32.Release.Property-2.idtx:5
|
||||
#: en_US.x64.Debug.Property-2.idtx:5 en_US.x64.Release.Property-2.idtx:5
|
||||
msgid "Fran Ramovš Institute of Slovenian Language ZRC SAZU"
|
||||
msgstr "Inštitut za slovenski jezik Frana Ramovša ZRC SAZU"
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:6 en_US.ARM64.Release.Property-2.idtx:6
|
||||
#: en_US.Win32.Debug.Property-2.idtx:6 en_US.Win32.Release.Property-2.idtx:6
|
||||
#: en_US.x64.Debug.Property-2.idtx:6 en_US.x64.Release.Property-2.idtx:6
|
||||
msgid "+386 1 470 6170"
|
||||
msgstr "01 470 6170"
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:7 en_US.ARM64.Release.Property-2.idtx:7
|
||||
#: en_US.Win32.Debug.Property-2.idtx:7 en_US.Win32.Release.Property-2.idtx:7
|
||||
#: en_US.x64.Debug.Property-2.idtx:7 en_US.x64.Release.Property-2.idtx:7
|
||||
msgid "http://zrcola.zrc-sazu.si/en/contact/"
|
||||
msgstr "http://zrcola.zrc-sazu.si/contact/"
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:8 en_US.ARM64.Release.Property-2.idtx:8
|
||||
#: en_US.Win32.Debug.Property-2.idtx:8 en_US.Win32.Release.Property-2.idtx:8
|
||||
#: en_US.x64.Debug.Property-2.idtx:8 en_US.x64.Release.Property-2.idtx:8
|
||||
msgid "http://zrcola.zrc-sazu.si/en/info/instructions/"
|
||||
msgstr "http://zrcola.zrc-sazu.si/info/instructions/"
|
||||
|
||||
#: en_US.ARM64.Debug.Property-2.idtx:9 en_US.ARM64.Release.Property-2.idtx:9
|
||||
#: en_US.Win32.Debug.Property-2.idtx:9 en_US.Win32.Release.Property-2.idtx:9
|
||||
#: en_US.x64.Debug.Property-2.idtx:9 en_US.x64.Release.Property-2.idtx:9
|
||||
msgid "http://zrcola.zrc-sazu.si/en/install/"
|
||||
msgstr "http://zrcola.zrc-sazu.si/install/"
|
||||
|
||||
#: en_US.ARM64.Debug.Shortcut-2.idtx:4 en_US.ARM64.Release.Shortcut-2.idtx:4
|
||||
#: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4
|
||||
#: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4
|
||||
msgid "ZRCOLA~1|ZRCola Keyboard Shortcuts"
|
||||
msgstr "ZRCOLA~1|ZRColine bližnjice na tipkovnici"
|
||||
|
||||
#: en_US.ARM64.Debug.Shortcut-2.idtx:4 en_US.ARM64.Release.Shortcut-2.idtx:4
|
||||
#: en_US.Win32.Debug.Shortcut-2.idtx:4 en_US.Win32.Release.Shortcut-2.idtx:4
|
||||
#: en_US.x64.Debug.Shortcut-2.idtx:4 en_US.x64.Release.Shortcut-2.idtx:4
|
||||
msgid "ZRCola Keyboard Shortcuts"
|
||||
|
||||
BIN
MakefileLang.mak
BIN
MakefileLang.mak
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
MakefilePlat.mak
BIN
MakefilePlat.mak
Binary file not shown.
Binary file not shown.
35
README.md
35
README.md
@@ -6,7 +6,7 @@ A Microsoft Windows application for composing texts using a wide range of Slavic
|
||||
http://zrcola.zrc-sazu.si/en/
|
||||
|
||||
## Binaries for Download
|
||||
https://prenos.amebis.si/ZRCola/
|
||||
https://www.amebis.si/prenos/ZRCola/
|
||||
|
||||
## Building
|
||||
|
||||
@@ -20,7 +20,7 @@ https://prenos.amebis.si/ZRCola/
|
||||
### wxWidgets
|
||||
ZRCola is using wxWidgets static libraries. You have to compile static libraries yourself.
|
||||
|
||||
#### Compiling wxWidgets Win32 static libraries
|
||||
#### Compiling wxWidgets x86 static libraries
|
||||
1. Start _x86 Native Tools Command Prompt for VS 2017_
|
||||
2. Change working folder to `build\msw`
|
||||
3. Run: `nmake /f makefile.vc /ls RUNTIME_LIBS=static SHARED=0 COMPILER_VERSION=141`
|
||||
@@ -33,28 +33,17 @@ ZRCola is using wxWidgets static libraries. You have to compile static libraries
|
||||
4. Run: `nmake /f makefile.vc /ls RUNTIME_LIBS=static SHARED=0 COMPILER_VERSION=141 TARGET_CPU=X64 BUILD=release`
|
||||
|
||||
#### Specifying wxWidgets path
|
||||
ZRCola compilation references wxWidgets libraries using `WXWIN` environment variable. Please set it to wxWidgets folder (e.g. `C:\SDK\wxWidgets`).
|
||||
ZRCola compilation references wxWidgets libraries using `WXWIN` environment variable. Please set it to wxWidgets folder (i.e. `C:\SDK\wxWidgets`).
|
||||
|
||||
### Digital Signing of Build Outputs
|
||||
In order to have the build process digitally sign output files, one should setup either:
|
||||
In order to have the build process digitally sign output files, one should provide the following:
|
||||
|
||||
- Local signing:
|
||||
1. A signing certificate installed in the current user's certificate store.
|
||||
2. The following variables in the environment:
|
||||
- `ManifestCertificateThumbprint` - set the value to certificate's SHA1 thumbprint (hexadecimal, without spaces, e.g. `f61b973226c502a732d24f41aa85e192b009e7c0`).
|
||||
- `ManifestTimestampRFC3161Url` - set the value to URL used to perform RFC3161 timestamp signature (e.g. `http://time.certum.pl`). In order to perform timestamp signing successfully, the computer running the build should be online and able to access this URL.
|
||||
1. A signing certificate installed in the current user's certificate store.
|
||||
2. The following variables in the environment:
|
||||
- `ManifestCertificateThumbprint` - set the value to certificate's SHA1 thumbprint (hexadecimal, without spaces, i.e. `bc0d8da45f9eeefcbe4e334e1fc262804df88d7e`).
|
||||
- `ManifestTimestampUrl` - set the value to URL used to perform timestamp signature (i.e. `http://timestamp.verisign.com/scripts/timstamp.dll`). In order to perform timestamp signing successfully, the computer running the build should be online and able to access this URL.
|
||||
|
||||
- Microsoft Trusted Signing:
|
||||
1. Install [Trusted Signing dlib package](https://www.nuget.org/packages/Microsoft.Trusted.Signing.Client):
|
||||
```cmd
|
||||
nuget install Microsoft.Trusted.Signing.Client -Version 1.0.53 -x
|
||||
```
|
||||
2. Provide a [`manifest.json`](https://learn.microsoft.com/en-us/azure/trusted-signing/how-to-signing-integrations#create-a-json-file) file and place it at `%APPDATA%\Microsoft.Trusted.Signing.Client.json`:
|
||||
```cmd
|
||||
notepad "%APPDATA%\Microsoft.Trusted.Signing.Client.json"
|
||||
```
|
||||
|
||||
Please note that only Release builds are configured for signing. Debug configurations do not sign the resulting DLL and EXE files in order to speed up the building process and reduce signing volume.
|
||||
Please note that only Release builds are configured for timestamp signing. Debug configurations do not attempt to timestamp sign the resulting DLL and EXE files in order to speed up the building process and enable offline building.
|
||||
|
||||
### Building
|
||||
Use Microsoft NMAKE to build the project. The resulting files can be found in output subfolder. Open _x64 Native Tools Command Prompt for VS 2017_ for building.
|
||||
@@ -65,11 +54,7 @@ Use Microsoft NMAKE to build the project. The resulting files can be found in ou
|
||||
- `nmake Register` Build a debug version of project, install fonts (reboot required), and Start Menu shortcuts. For development purposes only!
|
||||
- `nmake Unregister` Remove Start Menu shortcuts, and fonts. For development purposes only!
|
||||
|
||||
The `/ls` flag can be appended to the commands above to reduce NMAKE's verbosity. You can combine multiple targets (e.g. nmake Unregister Clean). Please, see NMAKE reference for further reading.
|
||||
|
||||
## Building and installing ZRCola webservice
|
||||
|
||||
ZRCola is also available as a Linux web-service. See [ZRColaWS/README.md](ZRColaWS/README.md) for instructions.
|
||||
The `/ls` flag can be appended to the commands above to reduce NMAKE's verbosity. You can combine multiple targets (i.e. nmake Unregister Clean). Please, see NMAKE reference for further reading.
|
||||
|
||||
## Translating ZRCola
|
||||
Instructions how to translate ZRCola to your language can be found [here](LOCALIZATION.md).
|
||||
|
||||
2
Updater
2
Updater
Submodule Updater updated: f8c5385216...6fbcede83b
80
ZRCola.sln
80
ZRCola.sln
@@ -1,13 +1,13 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29728.190
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28010.2016
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZRCola", "ZRCola\ZRCola.vcxproj", "{CD9E4170-92DD-440E-980C-D15F62032249}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{6D85AD6A-69D6-40EB-BF0C-7495479DDCE5}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxExtend", "lib\wxExtend\build\wxExtendLib.vcxproj", "{D3E29951-D9F5-486D-A167-20AE8E90B1FA}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxExtend", "lib\wxExtend\build\wxExtendLib-15.0.vcxproj", "{D3E29951-D9F5-486D-A167-20AE8E90B1FA}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CFEBC17E-C840-4507-BDE6-1EF5B52DDCC5}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
@@ -18,78 +18,106 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libZRCola", "lib\libZRCola\
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libZRColaUI", "lib\libZRColaUI\build\libZRColaUI.vcxproj", "{C0A84BD2-3870-4CD6-B281-0AB322E3C579}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stdex", "lib\stdex\build\stdex-15.0.vcxproj", "{518777CC-0A59-4415-A12A-82751ED75343}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Updater", "Updater\Updater\build\Updater.vcxproj", "{990D8CF9-4457-4DC0-AA18-4968EF434741}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinStd", "lib\WinStd\build\WinStd-15.0.vcxproj", "{47399D91-7EB9-41DE-B521-514BA5DB0C43}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|ARM64 = Release|ARM64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Debug|x64.Build.0 = Debug|x64
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Debug|x86.Build.0 = Debug|Win32
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Release|Win32.Build.0 = Release|Win32
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Release|x64.ActiveCfg = Release|x64
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Release|x64.Build.0 = Release|x64
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Release|x86.ActiveCfg = Release|Win32
|
||||
{CD9E4170-92DD-440E-980C-D15F62032249}.Release|x86.Build.0 = Release|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Debug|x64.Build.0 = Debug|x64
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Debug|x86.Build.0 = Debug|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Release|Win32.Build.0 = Release|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Release|x64.ActiveCfg = Release|x64
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Release|x64.Build.0 = Release|x64
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Release|x86.ActiveCfg = Release|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Release|x86.Build.0 = Release|Win32
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Debug|x64.Build.0 = Debug|x64
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Debug|x86.Build.0 = Debug|Win32
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Release|Win32.Build.0 = Release|Win32
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Release|x64.ActiveCfg = Release|x64
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Release|x64.Build.0 = Release|x64
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Release|x86.ActiveCfg = Release|Win32
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Release|x86.Build.0 = Release|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Debug|x64.Build.0 = Debug|x64
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Debug|x86.Build.0 = Debug|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Release|Win32.Build.0 = Release|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Release|x64.ActiveCfg = Release|x64
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Release|x64.Build.0 = Release|x64
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Release|x86.ActiveCfg = Release|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Release|x86.Build.0 = Release|Win32
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Debug|x64.Build.0 = Debug|x64
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Debug|x86.Build.0 = Debug|Win32
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Release|x64.ActiveCfg = Release|x64
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Release|x64.Build.0 = Release|x64
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Release|x86.ActiveCfg = Release|Win32
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Release|x86.Build.0 = Release|Win32
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Debug|x64.Build.0 = Debug|x64
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Debug|x86.Build.0 = Debug|Win32
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Release|Win32.Build.0 = Release|Win32
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Release|x64.ActiveCfg = Release|x64
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Release|x64.Build.0 = Release|x64
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Release|x86.ActiveCfg = Release|Win32
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741}.Release|x86.Build.0 = Release|Win32
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|x64.Build.0 = Debug|x64
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|x86.Build.0 = Debug|Win32
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|x64.ActiveCfg = Release|x64
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|x64.Build.0 = Release|x64
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|x86.ActiveCfg = Release|Win32
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -98,7 +126,9 @@ Global
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA} = {6D85AD6A-69D6-40EB-BF0C-7495479DDCE5}
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8} = {6D85AD6A-69D6-40EB-BF0C-7495479DDCE5}
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579} = {6D85AD6A-69D6-40EB-BF0C-7495479DDCE5}
|
||||
{518777CC-0A59-4415-A12A-82751ED75343} = {6D85AD6A-69D6-40EB-BF0C-7495479DDCE5}
|
||||
{990D8CF9-4457-4DC0-AA18-4968EF434741} = {6D85AD6A-69D6-40EB-BF0C-7495479DDCE5}
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43} = {6D85AD6A-69D6-40EB-BF0C-7495479DDCE5}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {EECB5329-0607-4D77-8BC0-48BD8C08BEF9}
|
||||
|
||||
Binary file not shown.
20
ZRCola/ZRCola.props
Normal file
20
ZRCola/ZRCola.props
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<OutDir>..\output\$(Platform).$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\lib\wxExtend\include;..\Updater\Updater\include;..\lib\stdex\include;..\lib\WinStd\include;..\lib\libZRCola\include;..\lib\libZRColaUI\include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Manifest>
|
||||
<EnableDpiAwareness>true</EnableDpiAwareness>
|
||||
</Manifest>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\Updater\Updater\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
</Project>
|
||||
BIN
ZRCola/ZRCola.rc
BIN
ZRCola/ZRCola.rc
Binary file not shown.
@@ -29,47 +29,98 @@
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{CD9E4170-92DD-440E-980C-D15F62032249}</ProjectGuid>
|
||||
<RootNamespace>ZRCola</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)'=='Debug'">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)'=='Release'">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Platform)'=='ARM64'">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\include\$(Platform).props" />
|
||||
<Import Project="..\include\$(Configuration).props" />
|
||||
<Import Project="ZRCola.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\include\$(Platform).props" />
|
||||
<Import Project="..\include\$(Configuration).props" />
|
||||
<Import Project="ZRCola.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\include\$(Platform).props" />
|
||||
<Import Project="..\include\$(Configuration).props" />
|
||||
<Import Project="ZRCola.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\include\$(Platform).props" />
|
||||
<Import Project="..\include\$(Configuration).props" />
|
||||
<Import Project="ZRCola.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\include\$(Platform).props" />
|
||||
<Import Project="..\include\$(Configuration).props" />
|
||||
<Import Project="ZRCola.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\include\$(Platform).props" />
|
||||
<Import Project="..\include\$(Configuration).props" />
|
||||
<Import Project="ZRCola.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<OutDir>..\output\$(Platform).$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\lib\wxExtend\include;..\Updater\Updater\include;..\lib\stdex\include;..\lib\WinStd\include;..\lib\libZRCola\include;..\lib\libZRColaUI\include</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Manifest>
|
||||
<EnableDpiAwareness>true</EnableDpiAwareness>
|
||||
</Manifest>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\Updater\Updater\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="zrcolaabout.cpp" />
|
||||
<ClCompile Include="zrcolaapp.cpp" />
|
||||
@@ -86,7 +137,7 @@
|
||||
<ClCompile Include="zrcolaupdater.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="zrcolaabout.h" />
|
||||
<ClInclude Include="zrcolaapp.h" />
|
||||
<ClInclude Include="zrcolachrcatpnl.h" />
|
||||
@@ -108,7 +159,10 @@
|
||||
<ProjectReference Include="..\lib\libZRCola\build\libZRCola.vcxproj">
|
||||
<Project>{3c61929e-7289-4101-8d0a-da22d6e1aea8}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\lib\wxExtend\build\wxExtendLib.vcxproj">
|
||||
<ProjectReference Include="..\lib\WinStd\build\WinStd-15.0.vcxproj">
|
||||
<Project>{47399d91-7eb9-41de-b521-514ba5db0c43}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\lib\wxExtend\build\wxExtendLib-15.0.vcxproj">
|
||||
<Project>{D3E29951-D9F5-486D-A167-20AE8E90B1FA}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Updater\Updater\build\Updater.vcxproj">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="pch.cpp">
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="zrcolaapp.cpp">
|
||||
@@ -63,7 +63,7 @@
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pch.h">
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="zrcolaapp.h">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,6 +0,0 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
15231
ZRCola/res/ZRCola.fbp
15231
ZRCola/res/ZRCola.fbp
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 51 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,12 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
||||
// C++ code generated with wxFormBuilder (version Aug 8 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
#ifndef __ZRCOLAGUI_H__
|
||||
#define __ZRCOLAGUI_H__
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
@@ -54,23 +55,20 @@ class wxZRColaComposerPanel;
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaFrameBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaFrameBase : public wxFrame
|
||||
class wxZRColaFrameBase : public wxFrame
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
wxID_CHARACTER_SELECTOR = 6000,
|
||||
wxID_CHARACTER_SELECTOR = 1000,
|
||||
wxID_SEND_DESTINATION,
|
||||
wxID_COPY_DESTINATION_AND_RETURN,
|
||||
wxID_SEND_SOURCE,
|
||||
wxID_COPY_SOURCE_AND_RETURN,
|
||||
wxID_SEND_ABORT,
|
||||
wxID_COMPOSITION_NONE,
|
||||
wxID_COMPOSITION_ZRCOLA,
|
||||
wxID_COMPOSITION_UNICODE,
|
||||
wxID_WARN_PUA,
|
||||
wxID_COMPOSITION_MENU,
|
||||
wxID_SETTINGS,
|
||||
wxID_TOOLBAR_EDIT,
|
||||
wxID_TOOLBAR_TRANSLATE,
|
||||
@@ -79,63 +77,59 @@ class wxZRColaFrameBase : public wxFrame
|
||||
wxID_HELP_SHORTCUTS,
|
||||
wxID_HELP_REQCHAR,
|
||||
wxID_HELP_UPDATE,
|
||||
wxID_COMPOSITION_TOOLBAR
|
||||
};
|
||||
|
||||
|
||||
wxMenuBar* m_menubar;
|
||||
wxMenu* m_menuProgram;
|
||||
wxMenu* m_menuEdit;
|
||||
wxMenuItem* m_menuItemCompositionNone;
|
||||
wxMenuItem* m_menuItemCompositionZRCola;
|
||||
wxMenuItem* m_menuItemCompositionUnicode;
|
||||
wxMenuItem* m_menuItemComposition;
|
||||
wxMenu* m_menuTranslationSeq;
|
||||
wxMenuItem* m_menuItemWarnPUA;
|
||||
wxMenu* m_menuView;
|
||||
wxMenu* m_menuHelp;
|
||||
wxAuiToolBar* m_toolbarEdit;
|
||||
wxAuiToolBarItem* m_toolEditCut;
|
||||
wxAuiToolBarItem* m_toolEditCopy;
|
||||
wxAuiToolBarItem* m_toolEditPaste;
|
||||
wxAuiToolBarItem* m_toolEditCut;
|
||||
wxAuiToolBarItem* m_toolEditCopy;
|
||||
wxAuiToolBarItem* m_toolEditPaste;
|
||||
wxAuiToolBar* m_toolbarTranslate;
|
||||
wxAuiToolBarItem* m_toolCharSelect;
|
||||
wxAuiToolBarItem* m_toolSendDestination;
|
||||
wxAuiToolBarItem* m_toolSendSource;
|
||||
wxChoice* m_toolComposition;
|
||||
wxAuiToolBarItem* m_toolCharSelect;
|
||||
wxAuiToolBarItem* m_toolSendDestination;
|
||||
wxAuiToolBarItem* m_toolSendSource;
|
||||
wxAuiToolBarItem* m_toolComposition;
|
||||
wxChoice* m_toolTranslationSeq;
|
||||
wxAuiToolBarItem* m_toolWarnPUA;
|
||||
wxZRColaCharacterCatalogPanel* m_panelChrCat;
|
||||
wxStatusBar* m_statusBar;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
|
||||
virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); }
|
||||
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
|
||||
virtual void OnCompositionChoice( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnTranslationSeqChoice( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
wxZRColaComposerPanel* m_panel;
|
||||
|
||||
wxZRColaFrameBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 640,480 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("ZRCola") );
|
||||
|
||||
wxZRColaFrameBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,400 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("ZRCola") );
|
||||
wxAuiManager m_mgr;
|
||||
|
||||
|
||||
~wxZRColaFrameBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaComposerPanelBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaComposerPanelBase : public wxPanel
|
||||
class wxZRColaComposerPanelBase : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
wxID_TIMER_SAVE = 6000,
|
||||
wxID_TIMER_SAVE = 1000
|
||||
};
|
||||
|
||||
|
||||
wxSplitterWindow* m_splitterSource;
|
||||
wxPanel* m_panelSourceEdit;
|
||||
wxPanel* m_panelSourceHex;
|
||||
@@ -145,8 +139,8 @@ class wxZRColaComposerPanelBase : public wxPanel
|
||||
wxPanel* m_panelDestinationHex;
|
||||
wxTextCtrl* m_destinationHex;
|
||||
wxTimer m_timerSave;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnSourcePaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnSourceText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSourceHexPaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
@@ -154,72 +148,70 @@ class wxZRColaComposerPanelBase : public wxPanel
|
||||
virtual void OnDestinationText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnDestinationHexPaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnSaveTimer( wxTimerEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
wxTextCtrl* m_source;
|
||||
wxTextCtrl* m_destination;
|
||||
|
||||
wxZRColaComposerPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaComposerPanel") );
|
||||
|
||||
|
||||
wxZRColaComposerPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaComposerPanel") );
|
||||
~wxZRColaComposerPanelBase();
|
||||
|
||||
|
||||
void m_splitterSourceOnIdle( wxIdleEvent& )
|
||||
{
|
||||
m_splitterSource->SetSashPosition( -5 );
|
||||
m_splitterSource->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterSourceOnIdle ), NULL, this );
|
||||
}
|
||||
|
||||
|
||||
void m_splitterDestinationOnIdle( wxIdleEvent& )
|
||||
{
|
||||
m_splitterDestination->SetSashPosition( -5 );
|
||||
m_splitterDestination->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterDestinationOnIdle ), NULL, this );
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaCharacterCatalogPanelBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaCharacterCatalogPanelBase : public wxPanel
|
||||
class wxZRColaCharacterCatalogPanelBase : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxChoice* m_choice;
|
||||
wxZRColaCharGrid* m_grid;
|
||||
wxCheckBox* m_show_all;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnChoice( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnGridClick( wxGridEvent& event ) { event.Skip(); }
|
||||
virtual void OnGridKeyDown( wxKeyEvent& event ) { event.Skip(); }
|
||||
virtual void OnShowAll( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaCharacterCatalogPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaCharacterCatalog") );
|
||||
|
||||
|
||||
wxZRColaCharacterCatalogPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaCharacterCatalog") );
|
||||
~wxZRColaCharacterCatalogPanelBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaCharSelectBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaCharSelectBase : public wxDialog
|
||||
class wxZRColaCharSelectBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxSearchCtrl* m_search;
|
||||
wxHyperlinkCtrl* m_search_more;
|
||||
wxPanel* m_search_panel;
|
||||
wxCheckListBox* m_blocks;
|
||||
wxHyperlinkCtrl* m_blocksAll;
|
||||
wxHyperlinkCtrl* m_blocksNone;
|
||||
wxHyperlinkCtrl* m_blocksInvert;
|
||||
wxCheckListBox* m_categories;
|
||||
wxHyperlinkCtrl* m_categoriesAll;
|
||||
wxHyperlinkCtrl* m_categoriesNone;
|
||||
wxHyperlinkCtrl* m_categoriesInvert;
|
||||
wxZRColaCharGrid* m_gridResults;
|
||||
wxZRColaCharGrid* m_gridRecent;
|
||||
wxStaticText* m_labelUnicode;
|
||||
@@ -228,20 +220,22 @@ class wxZRColaCharSelectBase : public wxDialog
|
||||
wxGrid* m_gridPreview;
|
||||
wxTextCtrl* m_description;
|
||||
wxTextCtrl* m_tags;
|
||||
wxTextCtrl* m_block;
|
||||
wxTextCtrl* m_category;
|
||||
wxHyperlinkCtrl* m_navigateBack;
|
||||
wxHyperlinkCtrl* m_navigateForward;
|
||||
wxZRColaCharGrid* m_gridRelated;
|
||||
wxButton* m_buttonInsert;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
|
||||
virtual void OnSearchText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSearchMore( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnBlocksToggle( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnBlocksAll( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnBlocksNone( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnBlocksInvert( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnCategoriesToggle( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCategoriesAll( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnCategoriesNone( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnCategoriesInvert( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnResultCellDClick( wxGridEvent& event ) { event.Skip(); }
|
||||
virtual void OnResultSelectCell( wxGridEvent& event ) { event.Skip(); }
|
||||
virtual void OnResultsKeyDown( wxKeyEvent& event ) { event.Skip(); }
|
||||
@@ -253,25 +247,23 @@ class wxZRColaCharSelectBase : public wxDialog
|
||||
virtual void OnNavigateBack( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnNavigateForward( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnRelatedSelectCell( wxGridEvent& event ) { event.Skip(); }
|
||||
virtual void OnInsert( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnInsertUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Character Search"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharSelect") );
|
||||
|
||||
|
||||
wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Character Search"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharSelect") );
|
||||
~wxZRColaCharSelectBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaSettingsBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaSettingsBase : public wxDialog
|
||||
class wxZRColaSettingsBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxListbook* m_listbook;
|
||||
wxPanel* m_panelLanguage;
|
||||
@@ -286,29 +278,28 @@ class wxZRColaSettingsBase : public wxDialog
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsApply;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
|
||||
virtual void OnLanguageUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnApplyButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaSettingsBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaSettings") );
|
||||
|
||||
|
||||
wxZRColaSettingsBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaSettings") );
|
||||
~wxZRColaSettingsBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaAboutBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaAboutBase : public wxDialog
|
||||
class wxZRColaAboutBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticBitmap* m_bitmapIcon;
|
||||
wxStaticText* m_staticTextZRCola;
|
||||
@@ -320,48 +311,46 @@ class wxZRColaAboutBase : public wxDialog
|
||||
wxTextCtrl* m_declaration;
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaAboutBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaAbout") );
|
||||
|
||||
|
||||
wxZRColaAboutBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaAbout") );
|
||||
~wxZRColaAboutBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaUpdaterBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaUpdaterBase : public wxDialog
|
||||
class wxZRColaUpdaterBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxTextCtrl* m_log;
|
||||
wxButton* m_buttonUpdate;
|
||||
wxButton* m_buttonClose;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdate( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnClose( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaUpdaterBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Product Update"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaUpdater") );
|
||||
|
||||
|
||||
wxZRColaUpdaterBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Product Update"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaUpdater") );
|
||||
~wxZRColaUpdaterBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaCharRequestBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaCharRequestBase : public wxDialog
|
||||
class wxZRColaCharRequestBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_characterLbl;
|
||||
wxTextCtrl* m_character;
|
||||
@@ -372,26 +361,25 @@ class wxZRColaCharRequestBase : public wxDialog
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaCharRequestBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Request a New Character"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharRequest") );
|
||||
|
||||
|
||||
wxZRColaCharRequestBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Request a New Character"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharRequest") );
|
||||
~wxZRColaCharRequestBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaTranslationSeqBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaTranslationSeqBase : public wxDialog
|
||||
class wxZRColaTranslationSeqBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_transLbl;
|
||||
wxStaticText* m_availableLbl;
|
||||
@@ -405,8 +393,8 @@ class wxZRColaTranslationSeqBase : public wxDialog
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnAvailableChar( wxKeyEvent& event ) { event.Skip(); }
|
||||
@@ -418,13 +406,13 @@ class wxZRColaTranslationSeqBase : public wxDialog
|
||||
virtual void OnSelectedUp( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSelectedDown( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaTranslationSeqBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Custom Translation Sequence"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaTranslationSeq") );
|
||||
|
||||
|
||||
wxZRColaTranslationSeqBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Custom Translation Sequence"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaTranslationSeq") );
|
||||
~wxZRColaTranslationSeqBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif //__ZRCOLAGUI_H__
|
||||
|
||||
20
ZRCola/stdafx.cpp
Normal file
20
ZRCola/stdafx.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
@@ -1,56 +1,66 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../include/version.h"
|
||||
#include "zrcolaabout.h"
|
||||
#include "zrcolaapp.h"
|
||||
#include "zrcolachrcatpnl.h"
|
||||
#include "zrcolachrgrid.h"
|
||||
#include "zrcolachrreq.h"
|
||||
#include "zrcolacomppnl.h"
|
||||
#include "zrcolafrm.h"
|
||||
#include "zrcolakeyhndlr.h"
|
||||
#include "zrcolasettings.h"
|
||||
#include "zrcolatranseq.h"
|
||||
#include "zrcolaupdater.h"
|
||||
|
||||
#include <Updater/chkthread.h>
|
||||
|
||||
#include <wxex/common.h>
|
||||
#include <wxex/icon.h>
|
||||
#include <wxex/url.h>
|
||||
#include <wxex/persist/auimanager.h>
|
||||
#include <wxex/persist/toplevel.h>
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/dcclient.h>
|
||||
#include <wx/ffile.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/persist.h>
|
||||
#include <wx/persist/toplevel.h>
|
||||
#include <wx/socket.h>
|
||||
#include <wx/tokenzr.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/valtext.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
#include <WinStd/MSI.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <zrcola/idrec.h>
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include <Msi.h>
|
||||
#include <ShObjIdl.h>
|
||||
#include <ShlGuid.h>
|
||||
#endif
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../include/version.h"
|
||||
#include "zrcolaabout.h"
|
||||
#include "zrcolaapp.h"
|
||||
#include "zrcolachrcatpnl.h"
|
||||
#include "zrcolachrgrid.h"
|
||||
#include "zrcolachrreq.h"
|
||||
#include "zrcolacomppnl.h"
|
||||
#include "zrcolafrm.h"
|
||||
#include "zrcolakeyhndlr.h"
|
||||
#include "zrcolasettings.h"
|
||||
#include "zrcolatranseq.h"
|
||||
#include "zrcolaupdater.h"
|
||||
|
||||
#include <Updater/chkthread.h>
|
||||
|
||||
#include <wxex/common.h>
|
||||
#include <wxex/url.h>
|
||||
#include <wxex/persist/auimanager.h>
|
||||
#include <wxex/persist/toplevel.h>
|
||||
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/dcclient.h>
|
||||
#include <wx/ffile.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/persist.h>
|
||||
#include <wx/persist/toplevel.h>
|
||||
#include <wx/socket.h>
|
||||
#include <wx/tokenzr.h>
|
||||
#include <wx/utils.h>
|
||||
#include <wx/valtext.h>
|
||||
|
||||
#include <WinStd/MSI.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <stdex/idrec.h>
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
#include <Msi.h>
|
||||
#include <ShObjIdl.h>
|
||||
#include <ShlGuid.h>
|
||||
#endif
|
||||
@@ -1,9 +1,23 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
///
|
||||
@@ -11,11 +25,7 @@ class wxZRColaAbout;
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wxex/common.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include "zrcolagui.h"
|
||||
#pragma warning(pop)
|
||||
|
||||
|
||||
///
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "stdafx.h"
|
||||
#if defined(__WXMSW__)
|
||||
#pragma comment(lib, "msi.lib")
|
||||
#endif
|
||||
@@ -13,13 +27,11 @@
|
||||
// ZRColaApp
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma warning(suppress: 28251) // wxWidgets implement WinMain without code analysis annotations.
|
||||
wxIMPLEMENT_APP(ZRColaApp);
|
||||
|
||||
|
||||
ZRColaApp::ZRColaApp() :
|
||||
m_mainWnd(NULL),
|
||||
#pragma warning(suppress: 26812) // wxLanguage is unscoped
|
||||
m_lang_ui(wxLANGUAGE_DEFAULT),
|
||||
wxApp()
|
||||
{
|
||||
@@ -82,7 +94,7 @@ bool ZRColaApp::OnInit()
|
||||
ZRCola::recordid_t id;
|
||||
if (!stdex::idrec::read_id(dat, id, size)) break;
|
||||
|
||||
if (id == ZRCola::translation_rec::id()) {
|
||||
if (id == ZRCola::translation_rec::id) {
|
||||
dat >> ZRCola::translation_rec(m_t_db);
|
||||
if (dat.good()) {
|
||||
has_translation_data = true;
|
||||
@@ -90,66 +102,60 @@ bool ZRColaApp::OnInit()
|
||||
wxFAIL_MSG(wxT("Error reading translation data from ZRCola.zrcdb."));
|
||||
m_t_db.clear();
|
||||
}
|
||||
} else if (id == ZRCola::transet_rec::id()) {
|
||||
} else if (id == ZRCola::transet_rec::id) {
|
||||
dat >> ZRCola::transet_rec(m_ts_db);
|
||||
if (!dat.good()) {
|
||||
wxFAIL_MSG(wxT("Error reading translation set data from ZRCola.zrcdb."));
|
||||
m_ts_db.clear();
|
||||
}
|
||||
} else if (id == ZRCola::transeq_rec::id()) {
|
||||
} else if (id == ZRCola::transeq_rec::id) {
|
||||
dat >> ZRCola::transeq_rec(m_tsq_db);
|
||||
if (!dat.good()) {
|
||||
wxFAIL_MSG(wxT("Error reading translation sequence data from ZRCola.zrcdb."));
|
||||
m_tsq_db.clear();
|
||||
}
|
||||
} else if (id == ZRCola::langchar_rec::id()) {
|
||||
} else if (id == ZRCola::langchar_rec::id) {
|
||||
dat >> ZRCola::langchar_rec(m_lc_db);
|
||||
if (!dat.good()) {
|
||||
wxFAIL_MSG(wxT("Error reading language character data from ZRCola.zrcdb."));
|
||||
m_lc_db.clear();
|
||||
}
|
||||
} else if (id == ZRCola::language_rec::id()) {
|
||||
} else if (id == ZRCola::language_rec::id) {
|
||||
dat >> ZRCola::language_rec(m_lang_db);
|
||||
if (!dat.good()) {
|
||||
wxFAIL_MSG(wxT("Error reading language character data from ZRCola.zrcdb."));
|
||||
m_lang_db.clear();
|
||||
}
|
||||
} else if (id == ZRCola::keyseq_rec::id()) {
|
||||
} else if (id == ZRCola::keyseq_rec::id) {
|
||||
dat >> ZRCola::keyseq_rec(m_ks_db);
|
||||
if (!dat.good()) {
|
||||
wxFAIL_MSG(wxT("Error reading key sequences data from ZRCola.zrcdb."));
|
||||
m_ks_db.clear();
|
||||
}
|
||||
} else if (id == ZRCola::character_rec::id()) {
|
||||
} else if (id == ZRCola::character_rec::id) {
|
||||
dat >> ZRCola::character_rec(m_chr_db);
|
||||
if (!dat.good()) {
|
||||
wxFAIL_MSG(wxT("Error reading character data from ZRCola.zrcdb."));
|
||||
m_chr_db.clear();
|
||||
}
|
||||
} else if (id == ZRCola::chrblk_rec::id()) {
|
||||
dat >> ZRCola::chrblk_rec(m_cb_db);
|
||||
} else if (id == ZRCola::chrcat_rec::id) {
|
||||
dat >> ZRCola::chrcat_rec(m_cc_db);
|
||||
if (!dat.good()) {
|
||||
wxFAIL_MSG(wxT("Error reading character block data from ZRCola.zrcdb."));
|
||||
m_cb_db.clear();
|
||||
wxFAIL_MSG(wxT("Error reading character category data from ZRCola.zrcdb."));
|
||||
m_cc_db.clear();
|
||||
}
|
||||
} else if (id == ZRCola::chrtag_rec::id()) {
|
||||
} else if (id == ZRCola::chrtag_rec::id) {
|
||||
dat >> ZRCola::chrtag_rec(m_ct_db);
|
||||
if (!dat.good()) {
|
||||
wxFAIL_MSG(wxT("Error reading character tag data from ZRCola.zrcdb."));
|
||||
m_ct_db.clear();
|
||||
}
|
||||
} else if (id == ZRCola::tagname_rec::id()) {
|
||||
} else if (id == ZRCola::tagname_rec::id) {
|
||||
dat >> ZRCola::tagname_rec(m_tn_db);
|
||||
if (!dat.good()) {
|
||||
wxFAIL_MSG(wxT("Error reading tag name data from ZRCola.zrcdb."));
|
||||
m_tn_db.clear();
|
||||
}
|
||||
} else if (id == ZRCola::highlight_rec::id()) {
|
||||
dat >> ZRCola::highlight_rec(m_h_db);
|
||||
if (!dat.good()) {
|
||||
wxFAIL_MSG(wxT("Error reading highlight data from ZRCola.zrcdb."));
|
||||
m_h_db.clear();
|
||||
}
|
||||
} else
|
||||
stdex::idrec::ignore<ZRCola::recordsize_t, ZRCOLA_RECORD_ALIGN>(dat);
|
||||
}
|
||||
@@ -159,14 +165,12 @@ bool ZRColaApp::OnInit()
|
||||
}
|
||||
} else
|
||||
wxFAIL_MSG(wxT("ZRCola.zrcdb is not a valid ZRCola database."));
|
||||
} else
|
||||
wxFAIL_MSG(wxT("ZRCola.zrcdb not found or cannot be opened."));
|
||||
}
|
||||
|
||||
// Initialize sockets. Otherwise Updater thread will not work.
|
||||
wxSocketBase::Initialize();
|
||||
|
||||
m_mainWnd = new wxZRColaFrame();
|
||||
m_mainWnd->m_panel->RestoreFromStateFile();
|
||||
m_mainWnd->Show();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
///
|
||||
@@ -13,15 +27,10 @@ class ZRColaApp;
|
||||
|
||||
#include "zrcolafrm.h"
|
||||
#include <WinStd/Win.h>
|
||||
#include <wxex/common.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include <wx/app.h>
|
||||
#include <wx/config.h>
|
||||
#include <wx/intl.h>
|
||||
#pragma warning(pop)
|
||||
#include <zrcola/character.h>
|
||||
#include <zrcola/highlight.h>
|
||||
#include <zrcola/language.h>
|
||||
#include <zrcola/translate.h>
|
||||
#include <zrcola/tag.h>
|
||||
@@ -70,10 +79,9 @@ public:
|
||||
ZRCola::language_db m_lang_db; ///< Language database
|
||||
ZRCola::keyseq_db m_ks_db; ///< Key sequence database
|
||||
ZRCola::character_db m_chr_db; ///< Character database
|
||||
ZRCola::chrblk_db m_cb_db; ///< Character block database
|
||||
ZRCola::chrcat_db m_cc_db; ///< Characted category database
|
||||
ZRCola::chrtag_db m_ct_db; ///< Character tag database
|
||||
ZRCola::tagname_db m_tn_db; ///< Tag name database
|
||||
ZRCola::highlight_db m_h_db; ///< Highlight database
|
||||
|
||||
wxZRColaFrame *m_mainWnd; ///< Main window
|
||||
|
||||
@@ -82,7 +90,7 @@ public:
|
||||
|
||||
protected:
|
||||
#ifdef __WXMSW__
|
||||
winstd::event m_running; ///< Global Win32 event to determine if another instance of ZRCola is already running
|
||||
winstd::win_handle<NULL> m_running; ///< Global Win32 event to determine if another instance of ZRCola is already running
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -15,9 +29,7 @@ BEGIN_EVENT_TABLE(wxZRColaCharacterCatalogPanel, wxZRColaCharacterCatalogPanelBa
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
wxZRColaCharacterCatalogPanel::wxZRColaCharacterCatalogPanel(wxWindow* parent) :
|
||||
m_cg_id(0),
|
||||
wxZRColaCharacterCatalogPanelBase(parent)
|
||||
wxZRColaCharacterCatalogPanel::wxZRColaCharacterCatalogPanel(wxWindow* parent) : wxZRColaCharacterCatalogPanelBase(parent)
|
||||
{
|
||||
std::fstream dat((LPCTSTR)dynamic_cast<ZRColaApp*>(wxTheApp)->GetDatabaseFilePath(), std::ios_base::in | std::ios_base::binary);
|
||||
if (dat.good()) {
|
||||
@@ -38,8 +50,7 @@ wxZRColaCharacterCatalogPanel::wxZRColaCharacterCatalogPanel(wxWindow* parent) :
|
||||
}
|
||||
} else
|
||||
wxFAIL_MSG(wxT("ZRCola.zrcdb is not a valid ZRCola database."));
|
||||
} else
|
||||
wxFAIL_MSG(wxT("ZRCola.zrcdb not found or cannot be opened."));
|
||||
}
|
||||
|
||||
if (!m_cg_db.idxRank.empty()) {
|
||||
// Populate character group list.
|
||||
@@ -48,7 +59,7 @@ wxZRColaCharacterCatalogPanel::wxZRColaCharacterCatalogPanel(wxWindow* parent) :
|
||||
wxString
|
||||
label(cg.name(), cg.name_len()),
|
||||
label_tran2(wxGetTranslation(label, wxT("ZRCola-zrcdb")));
|
||||
m_choice->Insert(label_tran2, (unsigned int)i);
|
||||
m_choice->Insert(label_tran2, i);
|
||||
}
|
||||
m_cg_id = m_cg_db.idxRank[0].grp;
|
||||
m_choice->Select(0);
|
||||
@@ -148,11 +159,11 @@ void wxZRColaCharacterCatalogPanel::Update()
|
||||
wxArrayShort(reinterpret_cast<const short*>(cg.chrshow()), reinterpret_cast<const short*>(cg.chrshow_end())));
|
||||
} else {
|
||||
// Select frequently used characters only.
|
||||
const auto *src = cg.chrlst();
|
||||
const uint16_t *shown = cg.chrshow();
|
||||
const wchar_t *src = cg.chrlst();
|
||||
const unsigned __int16 *shown = cg.chrshow();
|
||||
wxArrayString chars;
|
||||
for (size_t i = 0, i_end = cg.chrlst_len(), j = 0; i < i_end; j++) {
|
||||
for (uint16_t k = 0, mask = shown[j]; k < 16 && i < i_end; k++, mask >>= 1) {
|
||||
for (unsigned __int16 k = 0, mask = shown[j]; k < 16 && i < i_end; k++, mask >>= 1) {
|
||||
size_t len = wcsnlen(src + i, i_end - i);
|
||||
if (mask & 1)
|
||||
chars.Add(wxString(src + i, len));
|
||||
@@ -204,7 +215,7 @@ bool wxPersistentZRColaCharacterCatalogPanel::Restore()
|
||||
if (cg.grp == cg_id) {
|
||||
if (wnd->m_cg_id != cg.grp) {
|
||||
wnd->m_cg_id = cg.grp;
|
||||
wnd->m_choice->Select((int)i);
|
||||
wnd->m_choice->Select(i);
|
||||
update = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
///
|
||||
@@ -11,16 +25,9 @@ class wxZRColaCharacterCatalogPanel;
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wxex/common.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include "zrcolagui.h"
|
||||
#pragma warning(pop)
|
||||
#include <zrcolaui/chargroup.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include <wx/persist/window.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
|
||||
///
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -110,7 +124,7 @@ wxString wxZRColaCharGrid::GetToolTipText(int idx)
|
||||
const auto &chr = m_chars[idx];
|
||||
|
||||
// See if this character has a key sequence registered.
|
||||
std::unique_ptr<ZRCola::keyseq_db::keyseq> ks((ZRCola::keyseq_db::keyseq*)new char[sizeof(ZRCola::keyseq_db::keyseq) + sizeof(ZRCola::char_t)*chr.length()]);
|
||||
std::unique_ptr<ZRCola::keyseq_db::keyseq> ks((ZRCola::keyseq_db::keyseq*)new char[sizeof(ZRCola::keyseq_db::keyseq) + sizeof(wchar_t)*chr.length()]);
|
||||
ks->ZRCola::keyseq_db::keyseq::keyseq(NULL, 0, chr.data(), chr.length());
|
||||
ZRCola::keyseq_db::indexKey::size_type start;
|
||||
if (app->m_ks_db.idxChr.find(*ks, start)) {
|
||||
@@ -142,13 +156,13 @@ void wxZRColaCharGrid::OnSize(wxSizeEvent& event)
|
||||
row_height = FromDIP(wxZRColaCharacterGridRowHeight),
|
||||
width = size.GetWidth() - m_rowLabelWidth - m_extraWidth,
|
||||
cols = std::max<int>(width / col_width, 1),
|
||||
rows = std::max<int>((int)((char_count + cols - 1) / cols), 1);
|
||||
rows = std::max<int>((char_count + cols - 1) / cols, 1);
|
||||
|
||||
if (m_colLabelHeight + rows*row_height + m_extraHeight > size.GetHeight()) {
|
||||
// Vertical scrollbar will be shown. Adjust the width and recalculate layout to avoid horizontal scrollbar.
|
||||
width = std::max<int>(width - wxSystemSettings::GetMetric(wxSYS_VSCROLL_X, this), 0);
|
||||
cols = std::max<int>(width / col_width, 1);
|
||||
rows = std::max<int>((int)((char_count + cols - 1) / cols), 1);
|
||||
rows = std::max<int>((char_count + cols - 1) / cols, 1);
|
||||
}
|
||||
|
||||
BeginBatch();
|
||||
@@ -228,7 +242,7 @@ void wxZRColaCharGrid::OnMotion(wxMouseEvent& event)
|
||||
if (col == wxNOT_FOUND || row == wxNOT_FOUND )
|
||||
return;
|
||||
|
||||
size_t toolTipIdx = (size_t)row*m_numCols + col;
|
||||
size_t toolTipIdx = row*m_numCols + col;
|
||||
if (toolTipIdx >= m_chars.GetCount()) {
|
||||
// Index out of range.
|
||||
m_toolTipIdx = (size_t)-1;
|
||||
@@ -240,7 +254,7 @@ void wxZRColaCharGrid::OnMotion(wxMouseEvent& event)
|
||||
wxWindow *gridWnd = GetGridWindow();
|
||||
if (gridWnd->GetToolTip()) {
|
||||
// The tooltip is already shown. Update it immediately.
|
||||
gridWnd->SetToolTip(GetToolTipText((int)m_toolTipIdx));
|
||||
gridWnd->SetToolTip(GetToolTipText(m_toolTipIdx));
|
||||
} else {
|
||||
// This must be our initial entry. Schedule tooltip display after 1s.
|
||||
m_timerToolTip.Start(1000, true);
|
||||
@@ -256,5 +270,5 @@ void wxZRColaCharGrid::OnTooltipTimer(wxTimerEvent& event)
|
||||
if (m_toolTipIdx >= m_chars.GetCount())
|
||||
return;
|
||||
|
||||
GetGridWindow()->SetToolTip(GetToolTipText((int)m_toolTipIdx));
|
||||
GetGridWindow()->SetToolTip(GetToolTipText(m_toolTipIdx));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
///
|
||||
@@ -11,11 +25,7 @@ class wxZRColaCharGrid;
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wxex/common.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include <wx/grid.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
|
||||
///
|
||||
@@ -86,7 +96,7 @@ public:
|
||||
if (i >= n)
|
||||
return wxGridCellCoords(-1, -1);
|
||||
else if (m_chars[i] == c)
|
||||
return wxGridCellCoords((int)(i / m_numCols), i % m_numCols);
|
||||
return wxGridCellCoords(i / m_numCols, i % m_numCols);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
///
|
||||
@@ -12,11 +26,7 @@ class wxPersistentZRColaCharRequest;
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wxex/common.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include "zrcolagui.h"
|
||||
#pragma warning(pop)
|
||||
#include "zrcolakeyhndlr.h"
|
||||
#include <wxex/persist/toplevel.h>
|
||||
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@@ -13,7 +27,7 @@
|
||||
wxIMPLEMENT_DYNAMIC_CLASS(wxZRColaUTF16CharValidator, wxValidator);
|
||||
|
||||
|
||||
wxZRColaUTF16CharValidator::wxZRColaUTF16CharValidator(ZRCola::char_t *val) :
|
||||
wxZRColaUTF16CharValidator::wxZRColaUTF16CharValidator(wchar_t *val) :
|
||||
m_val(val),
|
||||
wxValidator()
|
||||
{
|
||||
@@ -58,11 +72,11 @@ bool wxZRColaUTF16CharValidator::TransferFromWindow()
|
||||
}
|
||||
|
||||
|
||||
bool wxZRColaUTF16CharValidator::Parse(const wxString &val_in, size_t i_start, size_t i_end, wxTextCtrl *ctrl, wxWindow *parent, ZRCola::char_t *val_out)
|
||||
bool wxZRColaUTF16CharValidator::Parse(const wxString &val_in, size_t i_start, size_t i_end, wxTextCtrl *ctrl, wxWindow *parent, wchar_t *val_out)
|
||||
{
|
||||
const wxStringCharType *buf = val_in;
|
||||
|
||||
ZRCola::char_t chr = 0;
|
||||
wchar_t chr = 0;
|
||||
for (size_t i = i_start;;) {
|
||||
if (i >= i_end) {
|
||||
// End of Unicode found.
|
||||
@@ -71,7 +85,7 @@ bool wxZRColaUTF16CharValidator::Parse(const wxString &val_in, size_t i_start, s
|
||||
} else if (i >= i_start + 4) {
|
||||
// Maximum characters exceeded.
|
||||
ctrl->SetFocus();
|
||||
ctrl->SetSelection((int)i, (int)i_end);
|
||||
ctrl->SetSelection(i, i_end);
|
||||
wxMessageBox(_("Too many digits in Unicode."), _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
|
||||
return false;
|
||||
} else if (_T('0') <= buf[i] && buf[i] <= _T('9')) {
|
||||
@@ -89,7 +103,7 @@ bool wxZRColaUTF16CharValidator::Parse(const wxString &val_in, size_t i_start, s
|
||||
} else {
|
||||
// Invalid character found.
|
||||
ctrl->SetFocus();
|
||||
ctrl->SetSelection((long)i, (long)(i + 1));
|
||||
ctrl->SetSelection(i, i + 1);
|
||||
wxMessageBox(wxString::Format(_("Invalid character in Unicode found: %c"), buf[i]), _("Validation conflict"), wxOK | wxICON_EXCLAMATION, parent);
|
||||
return false;
|
||||
}
|
||||
@@ -156,7 +170,7 @@ bool wxZRColaUnicodeDumpValidator::Parse(const wxString &val_in, size_t i_start,
|
||||
wxString str;
|
||||
for (size_t i = i_start;;) {
|
||||
const wxStringCharType *buf_next;
|
||||
ZRCola::char_t chr;
|
||||
wchar_t chr;
|
||||
if ((buf_next = wmemchr(buf + i, L'+', i_end - i)) != NULL) {
|
||||
// Unicode dump separator found.
|
||||
if (!wxZRColaUTF16CharValidator::Parse(val_in, i, buf_next - buf, ctrl, parent, &chr))
|
||||
@@ -188,7 +202,6 @@ wxZRColaCharSelect::wxZRColaCharSelect(wxWindow* parent) :
|
||||
wxZRColaCharSelectBase(parent)
|
||||
{
|
||||
// Set tag lookup locale.
|
||||
#pragma warning(suppress: 26812) // wxLanguage is unscoped
|
||||
wxLanguage language = dynamic_cast<ZRColaApp*>(wxTheApp)->m_lang_ui;
|
||||
if (wxLANGUAGE_DEFAULT == language ||
|
||||
wxLANGUAGE_ENGLISH <= language && language <= wxLANGUAGE_ENGLISH_ZIMBABWE) m_locale = MAKELCID(MAKELANGID(LANG_ENGLISH , SUBLANG_DEFAULT), SORT_DEFAULT);
|
||||
@@ -202,13 +215,13 @@ wxZRColaCharSelect::wxZRColaCharSelect(wxWindow* parent) :
|
||||
|
||||
m_unicode->SetValidator(wxZRColaUnicodeDumpValidator(&m_char));
|
||||
|
||||
// Fill blocks.
|
||||
// Fill categories.
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
for (size_t i = 0, n = app->m_cb_db.idxFirst.size(); i < n; i++) {
|
||||
const auto &cb = app->m_cb_db.idxFirst[i];
|
||||
int idx = m_blocks->Insert(wxGetTranslation(wxString(cb.name(), cb.name_len()), wxT("ZRCola-zrcdb")), (unsigned int)i);
|
||||
m_blocks->Check(idx);
|
||||
m_cbOrder.insert(std::make_pair(cb.id, idx));
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++) {
|
||||
const auto &cc = app->m_cc_db.idxRank[i];
|
||||
int idx = m_categories->Insert(wxGetTranslation(wxString(cc.name(), cc.name_len()), wxT("ZRCola-zrcdb")), i);
|
||||
m_categories->Check(idx);
|
||||
m_ccOrder.insert(std::make_pair(cc.cat, idx));
|
||||
}
|
||||
|
||||
ResetResults();
|
||||
@@ -223,10 +236,8 @@ wxZRColaCharSelect::wxZRColaCharSelect(wxWindow* parent) :
|
||||
|
||||
wxZRColaCharSelect::~wxZRColaCharSelect()
|
||||
{
|
||||
if (m_searchThread) {
|
||||
#pragma warning(suppress: 26812) // wxThreadError is unscoped.
|
||||
if (m_searchThread)
|
||||
m_searchThread->Delete();
|
||||
}
|
||||
|
||||
Disconnect(wxID_ANY, wxEVT_SEARCH_COMPLETE, wxThreadEventHandler(wxZRColaCharSelect::OnSearchComplete), NULL, this);
|
||||
}
|
||||
@@ -242,7 +253,7 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event)
|
||||
|
||||
m_gridPreview->SetCellValue(0, 0, m_char);
|
||||
|
||||
std::unique_ptr<ZRCola::character_db::character> ch((ZRCola::character_db::character*)new char[sizeof(ZRCola::character_db::character) + sizeof(ZRCola::char_t)*m_char.length()]);
|
||||
std::unique_ptr<ZRCola::character_db::character> ch((ZRCola::character_db::character*)new char[sizeof(ZRCola::character_db::character) + sizeof(wchar_t)*m_char.length()]);
|
||||
ch->ZRCola::character_db::character::character(m_char.data(), m_char.length());
|
||||
ZRCola::character_db::indexChr::size_type ch_start;
|
||||
if (app->m_chr_db.idxChr.find(*ch, ch_start)) {
|
||||
@@ -251,7 +262,7 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event)
|
||||
m_description->SetValue(wxString(chr.desc(), chr.desc_len()));
|
||||
{
|
||||
// See if this character has a key sequence registered.
|
||||
std::unique_ptr<ZRCola::keyseq_db::keyseq> ks((ZRCola::keyseq_db::keyseq*)new char[sizeof(ZRCola::keyseq_db::keyseq) + sizeof(ZRCola::char_t)*m_char.length()]);
|
||||
std::unique_ptr<ZRCola::keyseq_db::keyseq> ks((ZRCola::keyseq_db::keyseq*)new char[sizeof(ZRCola::keyseq_db::keyseq) + sizeof(wchar_t)*m_char.length()]);
|
||||
ks->ZRCola::keyseq_db::keyseq::keyseq(NULL, 0, m_char.data(), m_char.length());
|
||||
ZRCola::keyseq_db::indexKey::size_type ks_start;
|
||||
if (app->m_ks_db.idxChr.find(*ks, ks_start)) {
|
||||
@@ -265,26 +276,26 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event)
|
||||
m_shortcut->SetValue(wxEmptyString);
|
||||
}
|
||||
{
|
||||
// Update character block.
|
||||
ZRCola::chrblk_db::indexChrId::size_type cb_start;
|
||||
if (app->m_cb_db.idxChrId.find(ZRCola::chrblk_db::chrblk(chr.blk), cb_start)) {
|
||||
const auto &blk = app->m_cb_db.idxChrId[cb_start];
|
||||
m_block->SetValue(wxGetTranslation(wxString(blk.name(), blk.name_len()), wxT("ZRCola-zrcdb")));
|
||||
// Update character category.
|
||||
ZRCola::chrcat_db::indexChrCat::size_type cc_start;
|
||||
if (app->m_cc_db.idxChrCat.find(ZRCola::chrcat_db::chrcat(chr.cat), cc_start)) {
|
||||
const auto &cat = app->m_cc_db.idxChrCat[cc_start];
|
||||
m_category->SetValue(wxGetTranslation(wxString(cat.name(), cat.name_len()), wxT("ZRCola-zrcdb")));
|
||||
} else
|
||||
m_block->SetValue(wxEmptyString);
|
||||
m_category->SetValue(wxEmptyString);
|
||||
}
|
||||
// Update related characters.
|
||||
m_gridRelated->SetCharacters(wxString(chr.rel(), chr.rel_end()));
|
||||
} else {
|
||||
m_description->SetValue(wxEmptyString);
|
||||
m_shortcut->SetValue(wxEmptyString);
|
||||
m_block->SetValue(wxEmptyString);
|
||||
m_category->SetValue(wxEmptyString);
|
||||
m_gridRelated->ClearGrid();
|
||||
}
|
||||
|
||||
// Find character tags.
|
||||
std::list<std::wstring> tag_names;
|
||||
std::unique_ptr<ZRCola::chrtag_db::chrtag> ct((ZRCola::chrtag_db::chrtag*)new char[sizeof(ZRCola::chrtag_db::chrtag) + sizeof(ZRCola::char_t)*m_char.length()]);
|
||||
std::unique_ptr<ZRCola::chrtag_db::chrtag> ct((ZRCola::chrtag_db::chrtag*)new char[sizeof(ZRCola::chrtag_db::chrtag) + sizeof(wchar_t)*m_char.length()]);
|
||||
ct->ZRCola::chrtag_db::chrtag::chrtag(m_char.data(), m_char.length());
|
||||
ZRCola::chrtag_db::indexChr::size_type ct_start, ct_end;
|
||||
if (app->m_ct_db.idxChr.find(*ct, ct_start, ct_end)) {
|
||||
@@ -301,7 +312,7 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event)
|
||||
// Add name to the list.
|
||||
tag_names.push_back(std::wstring(tn.name(), tn.name_end()));
|
||||
break;
|
||||
} else if (ZRCola::tagname_db::tagname::CompareName(m_locale, name->data(), (uint16_t)name->length(), tn.name(), tn.name_len()) == 0)
|
||||
} else if (ZRCola::tagname_db::tagname::CompareName(m_locale, name->data(), (unsigned __int16)name->length(), tn.name(), tn.name_len()) == 0)
|
||||
// Name is already on the list.
|
||||
break;
|
||||
}
|
||||
@@ -340,11 +351,11 @@ void wxZRColaCharSelect::OnIdle(wxIdleEvent& event)
|
||||
|
||||
m_searchThread->m_search.assign(val.c_str(), val.Length());
|
||||
|
||||
// Select blocks.
|
||||
for (size_t i = 0, n = app->m_cb_db.idxFirst.size(); i < n; i++) {
|
||||
const auto &cb = app->m_cb_db.idxFirst[i];
|
||||
if (m_blocks->IsChecked((unsigned int)i))
|
||||
m_searchThread->m_blks.insert(cb.id);
|
||||
// Select categories.
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++) {
|
||||
const auto &cc = app->m_cc_db.idxRank[i];
|
||||
if (m_categories->IsChecked(i))
|
||||
m_searchThread->m_cats.insert(cc.cat);
|
||||
}
|
||||
|
||||
if (m_searchThread->Run() != wxTHREAD_NO_ERROR) {
|
||||
@@ -384,43 +395,43 @@ void wxZRColaCharSelect::OnSearchMore(wxHyperlinkEvent& event)
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaCharSelect::OnBlocksAll(wxHyperlinkEvent& event)
|
||||
void wxZRColaCharSelect::OnCategoriesAll(wxHyperlinkEvent& event)
|
||||
{
|
||||
event.StopPropagation();
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
for (size_t i = 0, n = app->m_cb_db.idxFirst.size(); i < n; i++)
|
||||
m_blocks->Check((unsigned int)i, true);
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++)
|
||||
m_categories->Check(i, true);
|
||||
|
||||
m_searchChanged = true;
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaCharSelect::OnBlocksNone(wxHyperlinkEvent& event)
|
||||
void wxZRColaCharSelect::OnCategoriesNone(wxHyperlinkEvent& event)
|
||||
{
|
||||
event.StopPropagation();
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
for (size_t i = 0, n = app->m_cb_db.idxFirst.size(); i < n; i++)
|
||||
m_blocks->Check((unsigned int)i, false);
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++)
|
||||
m_categories->Check(i, false);
|
||||
|
||||
m_searchChanged = true;
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaCharSelect::OnBlocksInvert(wxHyperlinkEvent& event)
|
||||
void wxZRColaCharSelect::OnCategoriesInvert(wxHyperlinkEvent& event)
|
||||
{
|
||||
event.StopPropagation();
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
for (size_t i = 0, n = app->m_cb_db.idxFirst.size(); i < n; i++)
|
||||
m_blocks->Check((unsigned int)i, !m_blocks->IsChecked((unsigned int)i));
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++)
|
||||
m_categories->Check(i, !m_categories->IsChecked(i));
|
||||
|
||||
m_searchChanged = true;
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaCharSelect::OnBlocksToggle(wxCommandEvent& event)
|
||||
void wxZRColaCharSelect::OnCategoriesToggle(wxCommandEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
@@ -466,7 +477,7 @@ void wxZRColaCharSelect::OnResultCellDClick(wxGridEvent& event)
|
||||
if (!val.IsEmpty()) {
|
||||
NavigateTo(val);
|
||||
wxCommandEvent e(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
|
||||
m_buttonInsert->GetEventHandler()->ProcessEvent(e);
|
||||
m_sdbSizerButtonsOK->GetEventHandler()->ProcessEvent(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -480,7 +491,7 @@ void wxZRColaCharSelect::OnResultsKeyDown(wxKeyEvent& event)
|
||||
if (!val.IsEmpty()) {
|
||||
NavigateTo(val);
|
||||
wxCommandEvent e(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
|
||||
m_buttonInsert->GetEventHandler()->ProcessEvent(e);
|
||||
m_sdbSizerButtonsOK->GetEventHandler()->ProcessEvent(e);
|
||||
|
||||
event.StopPropagation();
|
||||
return;
|
||||
@@ -509,7 +520,7 @@ void wxZRColaCharSelect::OnRecentCellDClick(wxGridEvent& event)
|
||||
if (!val.IsEmpty()) {
|
||||
NavigateTo(val);
|
||||
wxCommandEvent e(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
|
||||
m_buttonInsert->GetEventHandler()->ProcessEvent(e);
|
||||
m_sdbSizerButtonsOK->GetEventHandler()->ProcessEvent(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -523,7 +534,7 @@ void wxZRColaCharSelect::OnRecentKeyDown(wxKeyEvent& event)
|
||||
if (!val.IsEmpty()) {
|
||||
NavigateTo(val);
|
||||
wxCommandEvent e(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
|
||||
m_buttonInsert->GetEventHandler()->ProcessEvent(e);
|
||||
m_sdbSizerButtonsOK->GetEventHandler()->ProcessEvent(e);
|
||||
|
||||
event.StopPropagation();
|
||||
return;
|
||||
@@ -585,13 +596,7 @@ void wxZRColaCharSelect::OnRelatedSelectCell(wxGridEvent& event)
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaCharSelect::OnInsertUpdateUI(wxUpdateUIEvent& event)
|
||||
{
|
||||
event.Enable(!m_char.empty());
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaCharSelect::OnInsert(wxCommandEvent& event)
|
||||
void wxZRColaCharSelect::OnOKButtonClick(wxCommandEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
@@ -605,14 +610,6 @@ void wxZRColaCharSelect::OnInsert(wxCommandEvent& event)
|
||||
val.Add(c);
|
||||
}
|
||||
m_gridRecent->SetCharacters(val);
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
if (app->m_mainWnd) {
|
||||
app->m_mainWnd->m_panel->m_source->WriteText(m_char);
|
||||
app->m_mainWnd->m_panel->m_source->SetFocus();
|
||||
}
|
||||
|
||||
Show(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -625,8 +622,8 @@ void wxZRColaCharSelect::ResetResults()
|
||||
val.reserve(n);
|
||||
for (i = 0; i < n; i++) {
|
||||
const auto &chr = app->m_chr_db.idxChr[i];
|
||||
auto idx = m_cbOrder.find(chr.blk);
|
||||
if (idx == m_cbOrder.end() || m_blocks->IsChecked(idx->second))
|
||||
auto idx = m_ccOrder.find(chr.cat);
|
||||
if (idx == m_ccOrder.end() || m_categories->IsChecked(idx->second))
|
||||
val.Add(wxString(chr.chr(), chr.chr_len()));
|
||||
}
|
||||
m_gridResults->SetCharacters(val);
|
||||
@@ -718,15 +715,15 @@ wxThread::ExitCode wxZRColaCharSelect::SearchThread::Entry()
|
||||
|
||||
{
|
||||
// Search by tags: Get tags with given names. Then, get characters of found tags.
|
||||
std::map<ZRCola::tagid_t, uint16_t> hits_tag;
|
||||
std::map<ZRCola::tagid_t, unsigned __int16> hits_tag;
|
||||
if (!app->m_tn_db.Search(m_search.c_str(), m_parent->m_locale, hits_tag, TestDestroyS, this)) return (wxThread::ExitCode)1;
|
||||
if (!app->m_ct_db.Search(hits_tag, app->m_chr_db, m_blks, hits, TestDestroyS, this)) return (wxThread::ExitCode)1;
|
||||
if (!app->m_ct_db.Search(hits_tag, app->m_chr_db, m_cats, hits, TestDestroyS, this)) return (wxThread::ExitCode)1;
|
||||
}
|
||||
|
||||
{
|
||||
// Search by description and merge results.
|
||||
std::map<std::wstring, ZRCola::charrank_t> hits_sub;
|
||||
if (!app->m_chr_db.Search(m_search.c_str(), m_blks, hits, hits_sub, TestDestroyS, this)) return (wxThread::ExitCode)1;
|
||||
if (!app->m_chr_db.Search(m_search.c_str(), m_cats, hits, hits_sub, TestDestroyS, this)) return (wxThread::ExitCode)1;
|
||||
for (auto i = hits_sub.cbegin(), i_end = hits_sub.cend(); i != i_end; ++i) {
|
||||
if (TestDestroy()) return (wxThread::ExitCode)1;
|
||||
auto idx = hits.find(i->first);
|
||||
@@ -766,14 +763,14 @@ wxThread::ExitCode wxZRColaCharSelect::SearchThread::Entry()
|
||||
|
||||
int __cdecl wxZRColaCharSelect::SearchThread::CompareHits(const void *a, const void *b)
|
||||
{
|
||||
const std::pair<ZRCola::charrank_t, ZRCola::char_t> *_a = (const std::pair<ZRCola::charrank_t, ZRCola::char_t>*)a;
|
||||
const std::pair<ZRCola::charrank_t, ZRCola::char_t> *_b = (const std::pair<ZRCola::charrank_t, ZRCola::char_t>*)b;
|
||||
const std::pair<ZRCola::charrank_t, wchar_t> *_a = (const std::pair<ZRCola::charrank_t, wchar_t>*)a;
|
||||
const std::pair<ZRCola::charrank_t, wchar_t> *_b = (const std::pair<ZRCola::charrank_t, wchar_t>*)b;
|
||||
|
||||
if (_a->first > _b->first) return -1;
|
||||
if (_a->first < _b->first) return 1;
|
||||
if (_a->first > _b->first) return -1;
|
||||
else if (_a->first < _b->first) return 1;
|
||||
|
||||
if (_a->second < _b->second) return -1;
|
||||
if (_a->second > _b->second) return 1;
|
||||
if (_a->second < _b->second) return -1;
|
||||
else if (_a->second > _b->second) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -820,9 +817,11 @@ void wxPersistentZRColaCharSelect::Save() const
|
||||
SaveValue(wxT("recentChars" ), str ); // Save in legacy format for backward compatibility.
|
||||
SaveValue(wxT("recentChars2"), str2); // Save in native format
|
||||
|
||||
for (size_t i = 0, n = app->m_cb_db.idxFirst.size(); i < n; i++) {
|
||||
const auto &cb = app->m_cb_db.idxFirst[i];
|
||||
SaveValue(wxString::Format(wxT("block%u"), cb.id), wnd->m_blocks->IsChecked((unsigned int)i));
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++) {
|
||||
const auto &cc = app->m_cc_db.idxRank[i];
|
||||
wxString name(wxT("category"));
|
||||
name.Append(cc.cat.data, _countof(cc.cat.data));
|
||||
SaveValue(name, wnd->m_categories->IsChecked(i));
|
||||
}
|
||||
|
||||
SaveValue(wxT("searchPanel"), wnd->m_search_panel->IsShown());
|
||||
@@ -841,7 +840,7 @@ bool wxPersistentZRColaCharSelect::Restore()
|
||||
for (wxStringTokenizer tok(str, wxT("|")); tok.HasMoreTokens(); ) {
|
||||
wxString chr;
|
||||
for (wxStringTokenizer tok_chr(tok.GetNextToken(), wxT("+")); tok_chr.HasMoreTokens(); )
|
||||
chr += (ZRCola::char_t)_tcstoul(tok_chr.GetNextToken().c_str(), NULL, 16);
|
||||
chr += (wchar_t)_tcstoul(tok_chr.GetNextToken().c_str(), NULL, 16);
|
||||
val.Add(chr);
|
||||
}
|
||||
wnd->m_gridRecent->SetCharacters(val);
|
||||
@@ -853,11 +852,13 @@ bool wxPersistentZRColaCharSelect::Restore()
|
||||
wnd->m_gridRecent->SetCharacters(val);
|
||||
}
|
||||
|
||||
for (size_t i = 0, n = app->m_cb_db.idxFirst.size(); i < n; i++) {
|
||||
const auto &cb = app->m_cb_db.idxFirst[i];
|
||||
for (size_t i = 0, n = app->m_cc_db.idxRank.size(); i < n; i++) {
|
||||
const auto &cc = app->m_cc_db.idxRank[i];
|
||||
wxString name(wxT("category"));
|
||||
name.Append(cc.cat.data, _countof(cc.cat.data));
|
||||
bool val;
|
||||
if (RestoreValue(wxString::Format(wxT("block%u"), cb.id), &val))
|
||||
wnd->m_blocks->Check((unsigned int)i, val);
|
||||
if (RestoreValue(name, &val))
|
||||
wnd->m_categories->Check(i, val);
|
||||
}
|
||||
|
||||
bool search_panel;
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
///
|
||||
@@ -12,19 +26,12 @@ class wxPersistentZRColaCharSelect;
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wxex/common.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include "zrcolagui.h"
|
||||
#pragma warning(pop)
|
||||
#include <zrcola/character.h>
|
||||
#include <wxex/persist/toplevel.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include <wx/validate.h>
|
||||
#include <wx/event.h>
|
||||
#include <wx/thread.h>
|
||||
#pragma warning(pop)
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <string>
|
||||
@@ -40,7 +47,7 @@ public:
|
||||
///
|
||||
/// Construct the validator with a value to store data
|
||||
///
|
||||
wxZRColaUTF16CharValidator(ZRCola::char_t *val = NULL);
|
||||
wxZRColaUTF16CharValidator(wchar_t *val = NULL);
|
||||
|
||||
///
|
||||
/// Copies this validator
|
||||
@@ -140,10 +147,10 @@ protected:
|
||||
virtual void OnIdle(wxIdleEvent& event);
|
||||
virtual void OnSearchText(wxCommandEvent& event);
|
||||
virtual void OnSearchMore(wxHyperlinkEvent& event);
|
||||
virtual void OnBlocksAll(wxHyperlinkEvent& event);
|
||||
virtual void OnBlocksNone(wxHyperlinkEvent& event);
|
||||
virtual void OnBlocksInvert(wxHyperlinkEvent& event);
|
||||
virtual void OnBlocksToggle(wxCommandEvent& event);
|
||||
virtual void OnCategoriesAll(wxHyperlinkEvent& event);
|
||||
virtual void OnCategoriesNone(wxHyperlinkEvent& event);
|
||||
virtual void OnCategoriesInvert(wxHyperlinkEvent& event);
|
||||
virtual void OnCategoriesToggle(wxCommandEvent& event);
|
||||
void OnSearchComplete(wxThreadEvent& event);
|
||||
virtual void OnResultSelectCell(wxGridEvent& event);
|
||||
virtual void OnResultCellDClick(wxGridEvent& event);
|
||||
@@ -156,8 +163,7 @@ protected:
|
||||
virtual void OnUnicodeText(wxCommandEvent& event);
|
||||
virtual void OnPreviewKeyDown(wxKeyEvent& event);
|
||||
virtual void OnRelatedSelectCell(wxGridEvent& event);
|
||||
virtual void OnInsertUpdateUI(wxUpdateUIEvent& event);
|
||||
virtual void OnInsert(wxCommandEvent& event);
|
||||
virtual void OnOKButtonClick(wxCommandEvent& event);
|
||||
|
||||
void ResetResults();
|
||||
void NavigateBy(int offset);
|
||||
@@ -168,8 +174,8 @@ public:
|
||||
|
||||
protected:
|
||||
LCID m_locale; ///< Locale for tag lookup
|
||||
bool m_searchChanged; ///< Did Search field or block selection change?
|
||||
std::map<ZRCola::chrblkid_t, int> m_cbOrder; ///< Character block order
|
||||
bool m_searchChanged; ///< Did Search field or category selection change?
|
||||
std::map<ZRCola::chrcatid_t, int> m_ccOrder; ///< Character category order
|
||||
bool m_unicodeChanged; ///< Did Unicode field change?
|
||||
|
||||
|
||||
@@ -188,7 +194,7 @@ protected:
|
||||
|
||||
public:
|
||||
std::wstring m_search; ///< Search phrase
|
||||
std::set<ZRCola::chrblkid_t> m_blks; ///< Search blocks
|
||||
std::set<ZRCola::chrcatid_t> m_cats; ///< Search categories
|
||||
std::vector<std::pair<ZRCola::charrank_t, std::wstring> > m_hits; ///< Search results
|
||||
|
||||
protected:
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -13,53 +27,29 @@
|
||||
wxZRColaComposerPanel::wxZRColaComposerPanel(wxWindow* parent) :
|
||||
m_sourceChanged(false),
|
||||
m_destinationChanged(false),
|
||||
m_sourceRestyled(false),
|
||||
m_destinationRestyled(false),
|
||||
m_styleNormal(*wxBLACK, *wxWHITE, wxFont(20, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxT("ZRCola"))),
|
||||
m_stylePUA(*wxBLUE, *wxWHITE, wxFont(20, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxT("ZRCola"))),
|
||||
m_styleZRColaUnicodeComposedIssues(*wxRED, *wxWHITE, wxFont(20, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxT("ZRCola"))),
|
||||
m_selSource(0, 0),
|
||||
m_selDestination(0, 0),
|
||||
wxZRColaComposerPanelBase(parent)
|
||||
{
|
||||
// RichEdit control has no inner margins by default.
|
||||
m_source->SetMargins(FromDIP(wxPoint(5, 2)));
|
||||
m_destination->SetMargins(FromDIP(wxPoint(5, 2)));
|
||||
|
||||
m_source->PushEventHandler(&m_keyhandler);
|
||||
}
|
||||
|
||||
|
||||
wxZRColaComposerPanel::~wxZRColaComposerPanel()
|
||||
{
|
||||
m_source->PopEventHandler();
|
||||
|
||||
// This is a controlled exit. Purge saved state.
|
||||
wxString fileName(GetStateFileName());
|
||||
if (wxFileExists(fileName))
|
||||
wxRemoveFile(fileName);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaComposerPanel::RestoreFromStateFile()
|
||||
{
|
||||
// Restore the previously saved state (if exists).
|
||||
wxString fileName(GetStateFileName());
|
||||
if (wxFileExists(fileName)) {
|
||||
wxFFile file(fileName, wxT("rb"));
|
||||
if (file.IsOpened()) {
|
||||
// Load source text.
|
||||
uint64_t n;
|
||||
unsigned __int64 n;
|
||||
file.Read(&n, sizeof(n));
|
||||
if (!file.Error()) {
|
||||
wxString source;
|
||||
file.Read(wxStringBuffer(source, (size_t)n), sizeof(wchar_t)*(size_t)n);
|
||||
file.Read(wxStringBuffer(source, n), sizeof(wchar_t)*n);
|
||||
if (!file.Error()) {
|
||||
// Load destination text.
|
||||
file.Read(&n, sizeof(n));
|
||||
if (!file.Error()) {
|
||||
wxString destination;
|
||||
file.Read(wxStringBuffer(destination, (size_t)n), sizeof(wchar_t)*(size_t)n);
|
||||
file.Read(wxStringBuffer(destination, n), sizeof(wchar_t)*n);
|
||||
if (!file.Error()) {
|
||||
// Restore state.
|
||||
m_source->SetValue(source);
|
||||
@@ -80,6 +70,17 @@ void wxZRColaComposerPanel::RestoreFromStateFile()
|
||||
}
|
||||
|
||||
|
||||
wxZRColaComposerPanel::~wxZRColaComposerPanel()
|
||||
{
|
||||
m_source->PopEventHandler();
|
||||
|
||||
// This is a controlled exit. Purge saved state.
|
||||
wxString fileName(GetStateFileName());
|
||||
if (wxFileExists(fileName))
|
||||
wxRemoveFile(fileName);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaComposerPanel::SynchronizePanels()
|
||||
{
|
||||
if (m_sourceChanged) {
|
||||
@@ -87,22 +88,20 @@ void wxZRColaComposerPanel::SynchronizePanels()
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
|
||||
wxString src = m_source->GetValue();
|
||||
size_t len = src.Length();
|
||||
wxString src;
|
||||
size_t len = GetValue(m_source, src);
|
||||
std::wstring dst(src.data(), len), dst2;
|
||||
ZRCola::mapping_vector map;
|
||||
|
||||
m_mapping.clear();
|
||||
|
||||
if (app->m_mainWnd->m_composition) {
|
||||
// ZRCola decompose first, then re-compose.
|
||||
app->m_t_db.TranslateInv(app->m_mainWnd->m_composition_id, dst.data(), dst.size(), dst2, &map);
|
||||
// ZRCola Decomposed => ZRCola Composed should decompose first.
|
||||
app->m_t_db.TranslateInv(ZRCOLA_TRANSEQID_DEFAULT, dst.data(), dst.size(), dst2, &map);
|
||||
m_mapping.push_back(std::move(map));
|
||||
map.clear();
|
||||
|
||||
app->m_t_db.Translate(app->m_mainWnd->m_composition_id, dst2.data(), dst2.size(), dst, &map);
|
||||
app->m_t_db.Translate(ZRCOLA_TRANSEQID_DEFAULT, dst2.data(), dst2.size(), dst, &map);
|
||||
m_mapping.push_back(std::move(map));
|
||||
map.clear();
|
||||
}
|
||||
|
||||
// Other translations
|
||||
@@ -111,9 +110,7 @@ void wxZRColaComposerPanel::SynchronizePanels()
|
||||
for (auto s = sets_begin; s != sets_end; ++s) {
|
||||
app->m_t_db.Translate(*s, dst.data(), dst.size(), dst2, &map);
|
||||
m_mapping.push_back(std::move(map));
|
||||
map.clear();
|
||||
dst = std::move(dst2);
|
||||
dst2.clear();
|
||||
}
|
||||
|
||||
m_source->GetSelection(&m_selSource.first, &m_selSource.second);
|
||||
@@ -124,8 +121,8 @@ void wxZRColaComposerPanel::SynchronizePanels()
|
||||
// Update destination text, and its HEX dump.
|
||||
m_destination->SetValue(dst);
|
||||
m_destination->SetSelection(
|
||||
m_selDestination.first = (long)MapToDestination(m_selSource.first ),
|
||||
m_selDestination.second = (long)MapToDestination(m_selSource.second));
|
||||
m_selDestination.first = MapToDestination(m_selSource.first ),
|
||||
m_selDestination.second = MapToDestination(m_selSource.second));
|
||||
SetHexValue(m_destinationHex, m_selDestinationHex, m_mappingDestinationHex, dst.data(), dst.length(), m_selDestination.first, m_selDestination.second);
|
||||
|
||||
// Schedule state save after 3s.
|
||||
@@ -135,8 +132,8 @@ void wxZRColaComposerPanel::SynchronizePanels()
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
|
||||
wxString src = m_destination->GetValue();
|
||||
size_t len = src.Length();
|
||||
wxString src;
|
||||
size_t len = GetValue(m_destination, src);
|
||||
std::wstring dst(src.data(), len), dst2;
|
||||
ZRCola::mapping_vector map;
|
||||
|
||||
@@ -148,24 +145,14 @@ void wxZRColaComposerPanel::SynchronizePanels()
|
||||
for (auto s = sets_end; (s--) != sets_begin;) {
|
||||
app->m_t_db.TranslateInv(*s, dst.data(), dst.size(), dst2, &map);
|
||||
dst = std::move(dst2);
|
||||
dst2.clear();
|
||||
|
||||
for (auto& m : map)
|
||||
m.invert();
|
||||
map.invert();
|
||||
m_mapping.push_back(std::move(map));
|
||||
map.clear();
|
||||
}
|
||||
|
||||
if (app->m_mainWnd->m_composition) {
|
||||
// ZRCola decompose.
|
||||
app->m_t_db.TranslateInv(app->m_mainWnd->m_composition_id, dst.data(), dst.size(), &app->m_lc_db, app->m_mainWnd->m_settings->m_lang, dst2, &map);
|
||||
dst = std::move(dst2);
|
||||
dst2.clear();
|
||||
|
||||
for (auto& m : map)
|
||||
m.invert();
|
||||
m_mapping.push_back(std::move(map));
|
||||
map.clear();
|
||||
// ZRCola Decomposed => ZRCola Composed
|
||||
app->m_t_db.TranslateInv(ZRCOLA_TRANSEQID_DEFAULT, dst.data(), dst.size(), &app->m_lc_db, app->m_mainWnd->m_settings->m_lang, dst2, &map);
|
||||
}
|
||||
|
||||
m_destination->GetSelection(&m_selDestination.first, &m_selDestination.second);
|
||||
@@ -176,8 +163,8 @@ void wxZRColaComposerPanel::SynchronizePanels()
|
||||
// Update source text, and its HEX dump.
|
||||
m_source->SetValue(dst);
|
||||
m_source->SetSelection(
|
||||
m_selSource.first = (long)MapToSource(m_selDestination.first ),
|
||||
m_selSource.second = (long)MapToSource(m_selDestination.second));
|
||||
m_selSource.first = MapToSource(m_selDestination.first ),
|
||||
m_selSource.second = MapToSource(m_selDestination.second));
|
||||
SetHexValue(m_sourceHex, m_selSourceHex, m_mappingSourceHex, dst.data(), dst.length(), m_selSource.first, m_selSource.second);
|
||||
|
||||
// Schedule state save after 3s.
|
||||
@@ -189,13 +176,11 @@ void wxZRColaComposerPanel::SynchronizePanels()
|
||||
}
|
||||
|
||||
|
||||
|
||||
void wxZRColaComposerPanel::OnSourcePaint(wxPaintEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
if (m_sourceRestyled)
|
||||
return;
|
||||
|
||||
long from, to;
|
||||
m_source->GetSelection(&from, &to);
|
||||
|
||||
@@ -205,16 +190,16 @@ void wxZRColaComposerPanel::OnSourcePaint(wxPaintEvent& event)
|
||||
m_selSource.second = to;
|
||||
|
||||
m_sourceHex->SetSelection(
|
||||
m_selSourceHex.first = (long)stdex::src2dst<size_t>(m_mappingSourceHex, from),
|
||||
m_selSourceHex.second = (long)stdex::src2dst<size_t>(m_mappingSourceHex, to ));
|
||||
m_selSourceHex.first = m_mappingSourceHex.to_dst(from),
|
||||
m_selSourceHex.second = m_mappingSourceHex.to_dst(to ));
|
||||
|
||||
m_destination->SetSelection(
|
||||
m_selDestination.first = (long)MapToDestination(from),
|
||||
m_selDestination.second = (long)MapToDestination(to ));
|
||||
m_selDestination.first = MapToDestination(from),
|
||||
m_selDestination.second = MapToDestination(to ));
|
||||
|
||||
m_destinationHex->SetSelection(
|
||||
m_selDestinationHex.first = (long)stdex::src2dst<size_t>(m_mappingDestinationHex, m_selDestination.first ),
|
||||
m_selDestinationHex.second = (long)stdex::src2dst<size_t>(m_mappingDestinationHex, m_selDestination.second));
|
||||
m_selDestinationHex.first = m_mappingDestinationHex.to_dst(m_selDestination.first ),
|
||||
m_selDestinationHex.second = m_mappingDestinationHex.to_dst(m_selDestination.second));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,16 +217,16 @@ void wxZRColaComposerPanel::OnSourceHexPaint(wxPaintEvent& event)
|
||||
m_selSourceHex.second = to;
|
||||
|
||||
m_source->SetSelection(
|
||||
m_selSource.first = (long)stdex::dst2src<size_t>(m_mappingSourceHex, from),
|
||||
m_selSource.second = (long)stdex::dst2src<size_t>(m_mappingSourceHex, to ));
|
||||
m_selSource.first = m_mappingSourceHex.to_src(from),
|
||||
m_selSource.second = m_mappingSourceHex.to_src(to ));
|
||||
|
||||
m_destination->SetSelection(
|
||||
m_selDestination.first = (long)MapToDestination(m_selSource.first ),
|
||||
m_selDestination.second = (long)MapToDestination(m_selSource.second));
|
||||
m_selDestination.first = MapToDestination(m_selSource.first ),
|
||||
m_selDestination.second = MapToDestination(m_selSource.second));
|
||||
|
||||
m_destinationHex->SetSelection(
|
||||
m_selDestinationHex.first = (long)stdex::src2dst<size_t>(m_mappingDestinationHex, m_selDestination.first ),
|
||||
m_selDestinationHex.second = (long)stdex::src2dst<size_t>(m_mappingDestinationHex, m_selDestination.second));
|
||||
m_selDestinationHex.first = m_mappingDestinationHex.to_dst(m_selDestination.first ),
|
||||
m_selDestinationHex.second = m_mappingDestinationHex.to_dst(m_selDestination.second));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,15 +235,8 @@ void wxZRColaComposerPanel::OnSourceText(wxCommandEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
if (m_sourceRestyled)
|
||||
return;
|
||||
|
||||
// Set the flag the source text changed to trigger idle-time translation.
|
||||
m_sourceChanged = true;
|
||||
|
||||
m_sourceRestyled = true;
|
||||
m_source->SetStyle(0, GetWindowTextLength(m_source->GetHWND()), m_styleNormal);
|
||||
m_sourceRestyled = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -266,9 +244,6 @@ void wxZRColaComposerPanel::OnDestinationPaint(wxPaintEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
if (m_destinationRestyled)
|
||||
return;
|
||||
|
||||
long from, to;
|
||||
m_destination->GetSelection(&from, &to);
|
||||
|
||||
@@ -278,16 +253,16 @@ void wxZRColaComposerPanel::OnDestinationPaint(wxPaintEvent& event)
|
||||
m_selDestination.second = to;
|
||||
|
||||
m_destinationHex->SetSelection(
|
||||
m_selDestinationHex.first = (long)stdex::src2dst<size_t>(m_mappingDestinationHex, from),
|
||||
m_selDestinationHex.second = (long)stdex::src2dst<size_t>(m_mappingDestinationHex, to ));
|
||||
m_selDestinationHex.first = m_mappingDestinationHex.to_dst(from),
|
||||
m_selDestinationHex.second = m_mappingDestinationHex.to_dst(to ));
|
||||
|
||||
m_source->SetSelection(
|
||||
m_selSource.first = (long)MapToSource(from),
|
||||
m_selSource.second = (long)MapToSource(to ));
|
||||
m_selSource.first = MapToSource(from),
|
||||
m_selSource.second = MapToSource(to ));
|
||||
|
||||
m_sourceHex->SetSelection(
|
||||
m_selSourceHex.first = (long)stdex::src2dst<size_t>(m_mappingSourceHex, m_selSource.first ),
|
||||
m_selSourceHex.second = (long)stdex::src2dst<size_t>(m_mappingSourceHex, m_selSource.second));
|
||||
m_selSourceHex.first = m_mappingSourceHex.to_dst(m_selSource.first ),
|
||||
m_selSourceHex.second = m_mappingSourceHex.to_dst(m_selSource.second));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,16 +280,16 @@ void wxZRColaComposerPanel::OnDestinationHexPaint(wxPaintEvent& event)
|
||||
m_selDestinationHex.second = to;
|
||||
|
||||
m_destination->SetSelection(
|
||||
m_selDestination.first = (long)stdex::dst2src<size_t>(m_mappingDestinationHex, from),
|
||||
m_selDestination.second = (long)stdex::dst2src<size_t>(m_mappingDestinationHex, to ));
|
||||
m_selDestination.first = m_mappingDestinationHex.to_src(from),
|
||||
m_selDestination.second = m_mappingDestinationHex.to_src(to ));
|
||||
|
||||
m_source->SetSelection(
|
||||
m_selSource.first = (long)MapToSource(m_selDestination.first ),
|
||||
m_selSource.second = (long)MapToSource(m_selDestination.second));
|
||||
m_selSource.first = MapToSource(m_selDestination.first ),
|
||||
m_selSource.second = MapToSource(m_selDestination.second));
|
||||
|
||||
m_sourceHex->SetSelection(
|
||||
m_selSourceHex.first = (long)stdex::src2dst<size_t>(m_mappingSourceHex, m_selSource.first ),
|
||||
m_selSourceHex.second = (long)stdex::src2dst<size_t>(m_mappingSourceHex, m_selSource.second));
|
||||
m_selSourceHex.first = m_mappingSourceHex.to_dst(m_selSource.first ),
|
||||
m_selSourceHex.second = m_mappingSourceHex.to_dst(m_selSource.second));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,34 +298,8 @@ void wxZRColaComposerPanel::OnDestinationText(wxCommandEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
if (m_destinationRestyled)
|
||||
return;
|
||||
|
||||
// Set the flag the destination text changed to trigger idle-time inverse translation.
|
||||
m_destinationChanged = true;
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
m_destinationRestyled = true;
|
||||
wxString src = m_destination->GetValue();
|
||||
app->m_h_db.Highlight(src, src.Length(), [this, app, src](ZRCola::hlghtsetid_t set, size_t start, size_t end) {
|
||||
switch (set) {
|
||||
case ZRCOLA_HLGHTSETID_ZRCOLA_UNICODE_COMPOSED_ISSUES:
|
||||
m_destination->SetStyle((long)start, (long)end, m_styleZRColaUnicodeComposedIssues);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (app->m_mainWnd->m_warnPUA) {
|
||||
for (size_t i = start, j; i < end;) {
|
||||
bool pua_i = ZRCola::ispua(src[i]);
|
||||
for (j = i + 1; j < end && pua_i == ZRCola::ispua(src[j]); j++);
|
||||
m_destination->SetStyle((long)i, (long)j, pua_i ? m_stylePUA : m_styleNormal);
|
||||
i = j;
|
||||
}
|
||||
} else
|
||||
m_destination->SetStyle((long)start, (long)end, m_styleNormal);
|
||||
}
|
||||
});
|
||||
m_destinationRestyled = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -359,21 +308,18 @@ void wxZRColaComposerPanel::OnSaveTimer(wxTimerEvent& event)
|
||||
wxString fileName(GetStateFileName());
|
||||
wxFFile file(fileName, wxT("wb"));
|
||||
if (file.IsOpened()) {
|
||||
{
|
||||
// Save source text.
|
||||
wxString text = m_source->GetValue();
|
||||
size_t len = text.Length();
|
||||
file.Write(&len, sizeof(len));
|
||||
file.Write((const wchar_t*)text, sizeof(wchar_t)*len);
|
||||
}
|
||||
wxString text;
|
||||
size_t len;
|
||||
|
||||
{
|
||||
// Save destination text.
|
||||
wxString text = m_destination->GetValue();
|
||||
size_t len = text.Length();
|
||||
file.Write(&len, sizeof(len));
|
||||
file.Write((const wchar_t*)text, sizeof(wchar_t)*len);
|
||||
}
|
||||
// Save source text.
|
||||
len = GetValue(m_source, text);
|
||||
file.Write(&len, sizeof(len));
|
||||
file.Write((const wchar_t*)text, sizeof(wchar_t)*len);
|
||||
|
||||
// Save destination text.
|
||||
len = GetValue(m_destination, text);
|
||||
file.Write(&len, sizeof(len));
|
||||
file.Write((const wchar_t*)text, sizeof(wchar_t)*len);
|
||||
}
|
||||
|
||||
event.Skip();
|
||||
@@ -398,6 +344,31 @@ wxString wxZRColaComposerPanel::GetStateFileName()
|
||||
}
|
||||
|
||||
|
||||
size_t wxZRColaComposerPanel::GetValue(wxTextCtrl *wnd, wxString &text)
|
||||
{
|
||||
#ifdef __WINDOWS__
|
||||
// Use Windows GetWindowText() function to avoid line ending conversion incompletely imposed by wxWidgets.
|
||||
WXHWND hWnd = wnd->GetHWND();
|
||||
size_t len = ::GetWindowTextLengthW(hWnd);
|
||||
if (len < 0x100) {
|
||||
WCHAR buf[0x100];
|
||||
::GetWindowTextW(hWnd, buf, len + 1);
|
||||
text.assign(buf, len);
|
||||
} else {
|
||||
LPWSTR buf = new WCHAR[len + 1];
|
||||
::GetWindowTextW(hWnd, buf, len + 1);
|
||||
text.assign(buf, len);
|
||||
delete [] buf;
|
||||
}
|
||||
|
||||
return len;
|
||||
#else
|
||||
text = wnd->GetValue();
|
||||
return text.Length();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaComposerPanel::SetHexValue(wxTextCtrl *wnd, std::pair<long, long> &range, ZRCola::mapping_vector &mapping, const wchar_t *src, size_t len, long from, long to)
|
||||
{
|
||||
wxString hex;
|
||||
@@ -406,8 +377,8 @@ void wxZRColaComposerPanel::SetHexValue(wxTextCtrl *wnd, std::pair<long, long> &
|
||||
mapping.clear();
|
||||
for (size_t i = 0; i < len && src[i]; i++) {
|
||||
wchar_t c = src[i];
|
||||
if (c == L'\n') {
|
||||
hex += L"\r\n";
|
||||
if (c == L'\n' || c == '\r') {
|
||||
hex += c;
|
||||
first = true;
|
||||
} else {
|
||||
hex += wxString::Format(first ? wxT("%04X") : wxT(" %04X"), src[i]);
|
||||
@@ -418,8 +389,8 @@ void wxZRColaComposerPanel::SetHexValue(wxTextCtrl *wnd, std::pair<long, long> &
|
||||
|
||||
wnd->SetValue(hex);
|
||||
wnd->SetSelection(
|
||||
range.first = (long)stdex::src2dst<size_t>(mapping, from),
|
||||
range.second = (long)stdex::src2dst<size_t>(mapping, to ));
|
||||
range.first = mapping.to_dst(from),
|
||||
range.second = mapping.to_dst(to ));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
///
|
||||
@@ -11,17 +25,10 @@ class wxZRColaComposerPanel;
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wxex/common.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include "zrcolagui.h"
|
||||
#pragma warning(pop)
|
||||
#include "zrcolakeyhndlr.h"
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include <wx/persist/window.h>
|
||||
#include <wx/timer.h>
|
||||
#pragma warning(pop)
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@@ -35,7 +42,6 @@ public:
|
||||
wxZRColaComposerPanel(wxWindow* parent);
|
||||
virtual ~wxZRColaComposerPanel();
|
||||
|
||||
void RestoreFromStateFile();
|
||||
void SynchronizePanels();
|
||||
|
||||
friend class wxPersistentZRColaComposerPanel; // Allow saving/restoring window state.
|
||||
@@ -53,18 +59,12 @@ protected:
|
||||
inline void GetTranslationSeq(_Out_ const ZRCola::transetid_t *&sets_begin, _Out_ const ZRCola::transetid_t *&sets_end) const;
|
||||
|
||||
static wxString GetStateFileName();
|
||||
static size_t GetValue(wxTextCtrl *wnd, wxString &text);
|
||||
static void SetHexValue(wxTextCtrl *wnd, std::pair<long, long> &range, ZRCola::mapping_vector &mapping, const wchar_t *src, size_t len, long from, long to);
|
||||
|
||||
protected:
|
||||
bool m_sourceChanged; ///< Boolean flag to mark source text "dirty" to trigger translation
|
||||
bool m_destinationChanged; ///< Boolean flag to mark destination text "dirty" to trigger inverse translation
|
||||
volatile bool
|
||||
m_sourceRestyled, ///< Boolean flag to mark source text is being restyled
|
||||
m_destinationRestyled; ///< Boolean flag to mark destination text is being restyled
|
||||
wxTextAttr
|
||||
m_styleNormal, ///< Normal text style
|
||||
m_stylePUA, ///< PUA character text style
|
||||
m_styleZRColaUnicodeComposedIssues; ///< ZRCola Unicode Composed issues character text style
|
||||
std::vector<ZRCola::mapping_vector> m_mapping; ///< Character index mapping vector between source and normalized text
|
||||
std::pair<long, long>
|
||||
m_selSource, ///< Character index of selected text in source text control
|
||||
@@ -97,7 +97,7 @@ protected:
|
||||
inline size_t wxZRColaComposerPanel::MapToDestination(_In_ size_t src) const
|
||||
{
|
||||
for (auto m = m_mapping.cbegin(), m_end = m_mapping.cend(); m != m_end; ++m)
|
||||
src = stdex::src2dst(*m, src);
|
||||
src = m->to_dst(src);
|
||||
|
||||
return src;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ inline size_t wxZRColaComposerPanel::MapToDestination(_In_ size_t src) const
|
||||
inline size_t wxZRColaComposerPanel::MapToSource(_In_ size_t dst) const
|
||||
{
|
||||
for (auto m = m_mapping.crbegin(), m_end = m_mapping.crend(); m != m_end; ++m)
|
||||
dst = stdex::dst2src(*m, dst);
|
||||
dst = m->to_src(dst);
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -18,7 +32,6 @@ wxBEGIN_EVENT_TABLE(wxZRColaFrame, wxZRColaFrameBase)
|
||||
EVT_UPDATE_UI (wxID_SELECTALL , wxZRColaFrame::OnForwardEventUpdate )
|
||||
EVT_MENU (wxID_SELECTALL , wxZRColaFrame::OnForwardEvent )
|
||||
|
||||
EVT_UPDATE_UI (wxID_CHARACTER_SELECTOR , wxZRColaFrame::OnInsertCharacterUpdate )
|
||||
EVT_MENU (wxID_CHARACTER_SELECTOR , wxZRColaFrame::OnInsertCharacter )
|
||||
|
||||
EVT_UPDATE_UI_RANGE(wxID_SEND_DESTINATION , wxID_SEND_ABORT , wxZRColaFrame::OnSendUpdate )
|
||||
@@ -28,10 +41,8 @@ wxBEGIN_EVENT_TABLE(wxZRColaFrame, wxZRColaFrameBase)
|
||||
EVT_MENU (wxID_SEND_SOURCE , wxZRColaFrame::OnSendSource )
|
||||
EVT_MENU (wxID_SEND_ABORT , wxZRColaFrame::OnSendAbort )
|
||||
|
||||
EVT_MENU (wxID_COMPOSITION_NONE , wxZRColaFrame::OnCompositionNone )
|
||||
EVT_MENU (wxID_COMPOSITION_ZRCOLA , wxZRColaFrame::OnCompositionZRCola )
|
||||
EVT_MENU (wxID_COMPOSITION_UNICODE , wxZRColaFrame::OnCompositionUnicode )
|
||||
EVT_MENU (wxID_WARN_PUA , wxZRColaFrame::OnWarnPUA )
|
||||
EVT_MENU (wxID_COMPOSITION_MENU , wxZRColaFrame::OnCompositionMenu )
|
||||
EVT_MENU (wxID_COMPOSITION_TOOLBAR , wxZRColaFrame::OnCompositionToolbar )
|
||||
EVT_MENU_RANGE (wxID_TRANSLATION_SEQ_DEFAULT, wxID_TRANSLATION_SEQ_END, wxZRColaFrame::OnTranslationSeqMenu )
|
||||
|
||||
EVT_MENU (wxID_SETTINGS , wxZRColaFrame::OnSettings )
|
||||
@@ -63,12 +74,18 @@ wxZRColaFrame::wxZRColaFrame() :
|
||||
m_settings(NULL),
|
||||
m_chrReq(NULL),
|
||||
m_composition(true),
|
||||
m_composition_id(ZRCOLA_TRANSETID_DEFAULT),
|
||||
m_warnPUA(false),
|
||||
m_transeq_id(ZRCOLA_TRANSEQID_DEFAULT),
|
||||
m_transeq(NULL),
|
||||
wxZRColaFrameBase(NULL)
|
||||
{
|
||||
{
|
||||
// wxFrameBuilder 3.5 does not support wxAUI_TB_HORIZONTAL flag. Add it manually.
|
||||
wxAuiPaneInfo &paneInfo = m_mgr.GetPane(m_toolbarTranslate);
|
||||
paneInfo.LeftDockable(false);
|
||||
paneInfo.RightDockable(false);
|
||||
m_toolbarTranslate->SetWindowStyleFlag(m_toolbarTranslate->GetWindowStyleFlag() | wxAUI_TB_HORIZONTAL);
|
||||
}
|
||||
|
||||
// Populate list of translation sequences.
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
m_toolTranslationSeq->Clear();
|
||||
@@ -83,11 +100,11 @@ wxZRColaFrame::wxZRColaFrame() :
|
||||
wxString
|
||||
name(ts.name(), ts.name_len()),
|
||||
name_tran(wxGetTranslation(name, wxT("ZRCola-zrcdb")));
|
||||
m_menuTranslationSeq->AppendRadioItem((int)(wxID_TRANSLATION_SEQ_START + i), name_tran);
|
||||
m_menuTranslationSeq->AppendRadioItem(wxID_TRANSLATION_SEQ_START + i, name_tran);
|
||||
m_toolTranslationSeq->Append(name_tran, reinterpret_cast<void*>(ts.seq));
|
||||
} else {
|
||||
wxString name_tran(_("Custom Translation..."));
|
||||
m_menuTranslationSeq->AppendRadioItem((int)(wxID_TRANSLATION_SEQ_START + i), name_tran);
|
||||
m_menuTranslationSeq->AppendRadioItem(wxID_TRANSLATION_SEQ_START + i, name_tran);
|
||||
m_toolTranslationSeq->Append(name_tran, reinterpret_cast<void*>(ZRCOLA_TRANSEQID_CUSTOM));
|
||||
break;
|
||||
}
|
||||
@@ -136,14 +153,13 @@ wxZRColaFrame::wxZRColaFrame() :
|
||||
// Register notification sink for language detection.
|
||||
m_ulRefCount = 1;
|
||||
m_tfSource = NULL;
|
||||
m_dwCookie = MAXDWORD;
|
||||
ITfInputProcessorProfiles *pProfiles;
|
||||
HRESULT hr = CoCreateInstance(CLSID_TF_InputProcessorProfiles, NULL, CLSCTX_INPROC_SERVER, IID_ITfInputProcessorProfiles, (LPVOID*)&pProfiles);
|
||||
if(SUCCEEDED(hr)) {
|
||||
hr = pProfiles->QueryInterface(IID_ITfSource, (LPVOID*)&m_tfSource);
|
||||
if(SUCCEEDED(hr)) {
|
||||
hr = m_tfSource->AdviseSink(IID_ITfLanguageProfileNotifySink, (ITfLanguageProfileNotifySink*)this, &m_dwCookie);
|
||||
if (FAILED(hr) || m_dwCookie == MAXDWORD) {
|
||||
if (FAILED(hr) || m_dwCookie == -1) {
|
||||
m_tfSource->Release();
|
||||
m_tfSource = NULL;
|
||||
}
|
||||
@@ -169,23 +185,12 @@ wxZRColaFrame::wxZRColaFrame() :
|
||||
persist_mgr.RegisterAndRestore(this, new wxPersistentZRColaFrame(this));
|
||||
|
||||
// Update (de)composition selection.
|
||||
if (m_composition && m_composition_id == ZRCOLA_TRANSETID_DEFAULT) {
|
||||
m_menuItemCompositionZRCola->Check(true);
|
||||
m_toolComposition->Select(1);
|
||||
} else if (m_composition && m_composition_id == ZRCOLA_TRANSETID_UNICODE) {
|
||||
m_menuItemCompositionUnicode->Check(true);
|
||||
m_toolComposition->Select(2);
|
||||
if (m_composition) {
|
||||
m_menuItemComposition->Check(true);
|
||||
m_toolComposition->SetState(m_toolComposition->GetState() | wxAUI_BUTTON_STATE_CHECKED);
|
||||
} else {
|
||||
m_menuItemCompositionNone->Check(true);
|
||||
m_toolComposition->Select(0);
|
||||
}
|
||||
|
||||
if (m_warnPUA) {
|
||||
m_menuItemWarnPUA->Check(true);
|
||||
m_toolWarnPUA->SetState(m_toolWarnPUA->GetState() | wxAUI_BUTTON_STATE_CHECKED);
|
||||
} else {
|
||||
m_menuItemWarnPUA->Check(false);
|
||||
m_toolWarnPUA->SetState(m_toolWarnPUA->GetState() & ~wxAUI_BUTTON_STATE_CHECKED);
|
||||
m_menuItemComposition->Check(false);
|
||||
m_toolComposition->SetState(m_toolComposition->GetState() & ~wxAUI_BUTTON_STATE_CHECKED);
|
||||
}
|
||||
|
||||
// Update translation sequence selection.
|
||||
@@ -264,15 +269,12 @@ void wxZRColaFrame::OnForwardEvent(wxCommandEvent& event)
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnInsertCharacterUpdate(wxUpdateUIEvent& event)
|
||||
{
|
||||
event.Check(m_chrSelect->IsVisible());
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnInsertCharacter(wxCommandEvent& event)
|
||||
{
|
||||
m_chrSelect->Show(!m_chrSelect->IsVisible());
|
||||
if (m_chrSelect->ShowModal() == wxID_OK && !m_chrSelect->m_char.empty()) {
|
||||
m_panel->m_source->WriteText(m_chrSelect->m_char);
|
||||
m_panel->m_source->SetFocus();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -322,6 +324,7 @@ void wxZRColaFrame::OnSendAbort(wxCommandEvent& event)
|
||||
{
|
||||
if (m_hWndSource) {
|
||||
// Return focus to the source window.
|
||||
::SetWindowPos(m_hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
||||
if (m_wasIconised) Iconize();
|
||||
::SetActiveWindow(m_hWndSource);
|
||||
::SetForegroundWindow(m_hWndSource);
|
||||
@@ -336,53 +339,28 @@ void wxZRColaFrame::OnSendAbort(wxCommandEvent& event)
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnCompositionNone(wxCommandEvent& event)
|
||||
void wxZRColaFrame::OnCompositionMenu(wxCommandEvent& event)
|
||||
{
|
||||
DoSetComposition(false, ZRCOLA_TRANSETID_DEFAULT);
|
||||
m_composition = m_menuItemComposition->IsChecked();
|
||||
m_toolComposition->SetState((m_toolComposition->GetState() & ~wxAUI_BUTTON_STATE_CHECKED) | (m_composition ? wxAUI_BUTTON_STATE_CHECKED : 0));
|
||||
m_toolbarTranslate->Refresh();
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnCompositionZRCola(wxCommandEvent& event)
|
||||
{
|
||||
DoSetComposition(true, ZRCOLA_TRANSETID_DEFAULT);
|
||||
m_toolbarTranslate->Refresh();
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnCompositionUnicode(wxCommandEvent& event)
|
||||
{
|
||||
DoSetComposition(true, ZRCOLA_TRANSETID_UNICODE);
|
||||
m_toolbarTranslate->Refresh();
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnCompositionChoice(wxCommandEvent& event)
|
||||
{
|
||||
switch (event.GetSelection()) {
|
||||
case 0: DoSetComposition(false, ZRCOLA_TRANSETID_DEFAULT); break;
|
||||
case 1: DoSetComposition(true, ZRCOLA_TRANSETID_DEFAULT); break;
|
||||
case 2: DoSetComposition(true, ZRCOLA_TRANSETID_UNICODE); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnWarnPUA(wxCommandEvent& event)
|
||||
{
|
||||
m_warnPUA = !m_warnPUA;
|
||||
m_menuItemWarnPUA->Check(m_warnPUA);
|
||||
m_toolWarnPUA->SetState((m_toolWarnPUA->GetState() & ~wxAUI_BUTTON_STATE_CHECKED) | (m_warnPUA ? wxAUI_BUTTON_STATE_CHECKED : 0));
|
||||
m_toolbarTranslate->Refresh();
|
||||
|
||||
// Notify destination text something changed and should re-paint.
|
||||
// Notify source text something changed and should re-translate.
|
||||
wxCommandEvent event2(wxEVT_COMMAND_TEXT_UPDATED);
|
||||
m_panel->m_destination->ProcessWindowEvent(event2);
|
||||
m_panel->m_source->ProcessWindowEvent(event2);
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::OnCompositionToolbar(wxCommandEvent& event)
|
||||
{
|
||||
m_composition = (m_toolComposition->GetState() & wxAUI_BUTTON_STATE_CHECKED) ? true : false;
|
||||
m_menuItemComposition->Check(m_composition);
|
||||
|
||||
// Notify source text something changed and should re-translate.
|
||||
wxCommandEvent event2(wxEVT_COMMAND_TEXT_UPDATED);
|
||||
m_panel->m_source->ProcessWindowEvent(event2);
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
@@ -512,7 +490,6 @@ void wxZRColaFrame::OnHelpShortcuts(wxCommandEvent& event)
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// Search and try to launch installed PDF.
|
||||
#pragma warning(suppress: 26812) // INSTALLSTATE is unscoped.
|
||||
INSTALLSTATE pdf_is = ::MsiGetComponentPath(_T(PRODUCT_VERSION_GUID), _T("{68AC2C38-10E2-41A3-B92C-844C03FFDF6A}"), pdf_path);
|
||||
if ((pdf_is == INSTALLSTATE_LOCAL || pdf_is == INSTALLSTATE_SOURCE) &&
|
||||
wxFileExists(pdf_path) &&
|
||||
@@ -614,10 +591,10 @@ void wxZRColaFrame::DoSend(const wxString& str)
|
||||
{
|
||||
// Prepare the INPUT table.
|
||||
wxString::size_type n = str.length();
|
||||
wxString::const_iterator i_str = str.begin();
|
||||
auto i_str = str.begin();
|
||||
std::vector<INPUT> input;
|
||||
input.reserve(n*2);
|
||||
for (std::vector<INPUT>::size_type i = 0; i < n; i++, ++i_str) {
|
||||
for (std::vector<INPUT>::size_type i = 0; i < n; i++, i_str++) {
|
||||
wxString::char_type c = *i_str;
|
||||
|
||||
// Add key down event.
|
||||
@@ -632,11 +609,12 @@ void wxZRColaFrame::DoSend(const wxString& str)
|
||||
}
|
||||
|
||||
// Return focus to the source window and send the input.
|
||||
::SetWindowPos(m_hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
||||
if (m_wasIconised) Iconize();
|
||||
::SetActiveWindow(m_hWndSource);
|
||||
::SetForegroundWindow(m_hWndSource);
|
||||
::Sleep(200);
|
||||
::SendInput((UINT)input.size(), input.data(), sizeof(INPUT));
|
||||
::SendInput(input.size(), input.data(), sizeof(INPUT));
|
||||
m_hWndSource = NULL;
|
||||
|
||||
// Select all input in source and destination to prepare for the overwrite next time.
|
||||
@@ -653,6 +631,7 @@ void wxZRColaFrame::DoCopyAndReturn(const wxString& str)
|
||||
}
|
||||
|
||||
// Return focus to the source window.
|
||||
::SetWindowPos(m_hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
||||
if (m_wasIconised) Iconize();
|
||||
::SetActiveWindow(m_hWndSource);
|
||||
::SetForegroundWindow(m_hWndSource);
|
||||
@@ -664,30 +643,6 @@ void wxZRColaFrame::DoCopyAndReturn(const wxString& str)
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::DoSetComposition(bool enable, ZRCola::transetid_t transet_id)
|
||||
{
|
||||
if (enable && transet_id == ZRCOLA_TRANSETID_DEFAULT) {
|
||||
m_composition = true;
|
||||
m_composition_id = ZRCOLA_TRANSETID_DEFAULT;
|
||||
m_menuItemCompositionZRCola->Check(true);
|
||||
m_toolComposition->Select(1);
|
||||
} else if (enable && transet_id == ZRCOLA_TRANSETID_UNICODE) {
|
||||
m_composition = true;
|
||||
m_composition_id = ZRCOLA_TRANSETID_UNICODE;
|
||||
m_menuItemCompositionUnicode->Check(true);
|
||||
m_toolComposition->Select(2);
|
||||
} else {
|
||||
m_composition = false;
|
||||
m_menuItemCompositionNone->Check(true);
|
||||
m_toolComposition->Select(0);
|
||||
}
|
||||
|
||||
// Notify source text something changed and should re-translate.
|
||||
wxCommandEvent event2(wxEVT_COMMAND_TEXT_UPDATED);
|
||||
m_panel->m_source->ProcessWindowEvent(event2);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaFrame::DoSetTranslationSeq(int idx, ZRCola::transeqid_t transeq_id)
|
||||
{
|
||||
if (transeq_id == ZRCOLA_TRANSEQID_CUSTOM) {
|
||||
@@ -745,6 +700,7 @@ WXLRESULT wxZRColaFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM
|
||||
Show(true);
|
||||
Iconize(false);
|
||||
Raise();
|
||||
::SetWindowPos(m_hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
||||
::SetActiveWindow(m_hWnd);
|
||||
//} else if (wxAppBarIsDocked(m_state)) {
|
||||
// // ZRCola window is currently docked.
|
||||
@@ -788,8 +744,6 @@ void wxPersistentZRColaFrame::Save() const
|
||||
auto wnd = static_cast<const wxZRColaFrame*>(GetWindow()); // dynamic_cast is not reliable as we are typically called late in the wxTopLevelWindowMSW destructor.
|
||||
|
||||
SaveValue(wxT("composition"), wnd->m_composition);
|
||||
SaveValue(wxT("compositionId"), static_cast<int>(wnd->m_composition_id));
|
||||
SaveValue(wxT("warnPUA"), wnd->m_warnPUA);
|
||||
SaveValue(wxT("transeqId"), static_cast<int>(wnd->m_transeq_id));
|
||||
|
||||
wxPersistentZRColaComposerPanel(wnd->m_panel).Save();
|
||||
@@ -806,19 +760,13 @@ bool wxPersistentZRColaFrame::Restore()
|
||||
|
||||
int num;
|
||||
if (RestoreValue(wxT("transeqId"), &num))
|
||||
wnd->m_transeq_id = (ZRCola::transeqid_t)num;
|
||||
wnd->m_transeq_id = num;
|
||||
|
||||
bool b;
|
||||
if (RestoreValue(wxT("composition"), &b))
|
||||
wnd->m_composition = b;
|
||||
else
|
||||
wnd->m_composition = wnd->m_transeq_id == ZRCOLA_TRANSEQID_DEFAULT;
|
||||
if (RestoreValue(wxT("compositionId"), &num))
|
||||
wnd->m_composition_id = (ZRCola::transetid_t)num;
|
||||
if (RestoreValue(wxT("warnPUA"), &b))
|
||||
wnd->m_warnPUA = b;
|
||||
else
|
||||
wnd->m_warnPUA = false;
|
||||
|
||||
int guiLevel;
|
||||
return RestoreValue(wxT("guiLevel"), &guiLevel) && guiLevel == s_guiLevel ? wxPersistentTLWEx::Restore() : true;
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
///
|
||||
@@ -12,11 +26,7 @@ class wxPersistentZRColaFrame;
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wxex/common.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include "zrcolagui.h"
|
||||
#pragma warning(pop)
|
||||
#include "zrcolachrslct.h"
|
||||
#include "zrcolachrreq.h"
|
||||
#include "zrcolasettings.h"
|
||||
@@ -24,10 +34,7 @@ class wxPersistentZRColaFrame;
|
||||
#include <zrcola/language.h>
|
||||
#include <zrcola/translate.h>
|
||||
#include <wxex/persist/toplevel.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include <wx/taskbar.h>
|
||||
#pragma warning(pop)
|
||||
#if defined(__WXMSW__)
|
||||
#include <msctf.h>
|
||||
#endif
|
||||
@@ -68,7 +75,6 @@ protected:
|
||||
void OnExit(wxCommandEvent& event);
|
||||
void OnForwardEventUpdate(wxUpdateUIEvent& event);
|
||||
void OnForwardEvent(wxCommandEvent& event);
|
||||
void OnInsertCharacterUpdate(wxUpdateUIEvent& event);
|
||||
void OnInsertCharacter(wxCommandEvent& event);
|
||||
void OnSendUpdate(wxUpdateUIEvent& event);
|
||||
void OnSendDestination(wxCommandEvent& event);
|
||||
@@ -76,11 +82,8 @@ protected:
|
||||
void OnSendSource(wxCommandEvent& event);
|
||||
void OnCopySourceAndReturn(wxCommandEvent& event);
|
||||
void OnSendAbort(wxCommandEvent& event);
|
||||
void OnCompositionNone(wxCommandEvent& event);
|
||||
void OnCompositionZRCola(wxCommandEvent& event);
|
||||
void OnCompositionUnicode(wxCommandEvent& event);
|
||||
virtual void OnCompositionChoice(wxCommandEvent& event);
|
||||
void OnWarnPUA(wxCommandEvent& event);
|
||||
void OnCompositionMenu(wxCommandEvent& event);
|
||||
void OnCompositionToolbar(wxCommandEvent& event);
|
||||
void OnSettings(wxCommandEvent& event);
|
||||
virtual void OnIdle(wxIdleEvent& event);
|
||||
void OnTaskbarIconClick(wxTaskBarIconEvent& event);
|
||||
@@ -120,7 +123,6 @@ protected:
|
||||
private:
|
||||
void DoSend(const wxString& str);
|
||||
void DoCopyAndReturn(const wxString& str);
|
||||
void DoSetComposition(bool enable, ZRCola::transetid_t transet_id);
|
||||
void DoSetTranslationSeq(int idx, ZRCola::transeqid_t transeq_id);
|
||||
|
||||
protected:
|
||||
@@ -132,17 +134,15 @@ protected:
|
||||
static const int s_guiLevel; ///< Persisted placements/sizing are considered incompatible between different GUI levels
|
||||
|
||||
protected:
|
||||
WXHWND m_hWndSource; ///< Handle of the active window, when the ZRCola hotkey was pressed
|
||||
bool m_wasIconised; ///< Was the ZRCola window iconized, when the ZRCola hotkey was pressed
|
||||
wxTaskBarIcon *m_taskBarIcon; ///< Taskbar icon
|
||||
wxZRColaCharSelect *m_chrSelect; ///< Character selection dialog
|
||||
wxZRColaCharRequest *m_chrReq; ///< Request a New Character dialog
|
||||
wxZRColaSettings *m_settings; ///< Configuration dialog
|
||||
bool m_composition; ///< Is (de)composition enabled?
|
||||
ZRCola::transetid_t m_composition_id; ///< Which (de)composition is enabled
|
||||
bool m_warnPUA; ///< Mark Private-Use-Area characters in destination text
|
||||
ZRCola::transeqid_t m_transeq_id; ///< Translation sequence ID
|
||||
wxZRColaTranslationSeq *m_transeq; ///< Custom translation sequence dialog
|
||||
WXHWND m_hWndSource; ///< Handle of the active window, when the ZRCola hotkey was pressed
|
||||
bool m_wasIconised; ///< Was the ZRCola window iconized, when the ZRCola hotkey was pressed
|
||||
wxTaskBarIcon *m_taskBarIcon; ///< Taskbar icon
|
||||
wxZRColaCharSelect *m_chrSelect; ///< Character selection dialog
|
||||
wxZRColaCharRequest *m_chrReq; ///< Request a New Character dialog
|
||||
wxZRColaSettings *m_settings; ///< Configuration dialog
|
||||
bool m_composition; ///< Is (de)composition enabled?
|
||||
ZRCola::transeqid_t m_transeq_id; ///< Translation sequence ID
|
||||
wxZRColaTranslationSeq *m_transeq; ///< Custom translation sequence dialog
|
||||
};
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,12 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
||||
// C++ code generated with wxFormBuilder (version Aug 8 2018)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
#ifndef __ZRCOLAGUI_H__
|
||||
#define __ZRCOLAGUI_H__
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
@@ -54,23 +55,20 @@ class wxZRColaComposerPanel;
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaFrameBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaFrameBase : public wxFrame
|
||||
class wxZRColaFrameBase : public wxFrame
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
wxID_CHARACTER_SELECTOR = 6000,
|
||||
wxID_CHARACTER_SELECTOR = 1000,
|
||||
wxID_SEND_DESTINATION,
|
||||
wxID_COPY_DESTINATION_AND_RETURN,
|
||||
wxID_SEND_SOURCE,
|
||||
wxID_COPY_SOURCE_AND_RETURN,
|
||||
wxID_SEND_ABORT,
|
||||
wxID_COMPOSITION_NONE,
|
||||
wxID_COMPOSITION_ZRCOLA,
|
||||
wxID_COMPOSITION_UNICODE,
|
||||
wxID_WARN_PUA,
|
||||
wxID_COMPOSITION_MENU,
|
||||
wxID_SETTINGS,
|
||||
wxID_TOOLBAR_EDIT,
|
||||
wxID_TOOLBAR_TRANSLATE,
|
||||
@@ -79,63 +77,59 @@ class wxZRColaFrameBase : public wxFrame
|
||||
wxID_HELP_SHORTCUTS,
|
||||
wxID_HELP_REQCHAR,
|
||||
wxID_HELP_UPDATE,
|
||||
wxID_COMPOSITION_TOOLBAR
|
||||
};
|
||||
|
||||
|
||||
wxMenuBar* m_menubar;
|
||||
wxMenu* m_menuProgram;
|
||||
wxMenu* m_menuEdit;
|
||||
wxMenuItem* m_menuItemCompositionNone;
|
||||
wxMenuItem* m_menuItemCompositionZRCola;
|
||||
wxMenuItem* m_menuItemCompositionUnicode;
|
||||
wxMenuItem* m_menuItemComposition;
|
||||
wxMenu* m_menuTranslationSeq;
|
||||
wxMenuItem* m_menuItemWarnPUA;
|
||||
wxMenu* m_menuView;
|
||||
wxMenu* m_menuHelp;
|
||||
wxAuiToolBar* m_toolbarEdit;
|
||||
wxAuiToolBarItem* m_toolEditCut;
|
||||
wxAuiToolBarItem* m_toolEditCopy;
|
||||
wxAuiToolBarItem* m_toolEditPaste;
|
||||
wxAuiToolBarItem* m_toolEditCut;
|
||||
wxAuiToolBarItem* m_toolEditCopy;
|
||||
wxAuiToolBarItem* m_toolEditPaste;
|
||||
wxAuiToolBar* m_toolbarTranslate;
|
||||
wxAuiToolBarItem* m_toolCharSelect;
|
||||
wxAuiToolBarItem* m_toolSendDestination;
|
||||
wxAuiToolBarItem* m_toolSendSource;
|
||||
wxChoice* m_toolComposition;
|
||||
wxAuiToolBarItem* m_toolCharSelect;
|
||||
wxAuiToolBarItem* m_toolSendDestination;
|
||||
wxAuiToolBarItem* m_toolSendSource;
|
||||
wxAuiToolBarItem* m_toolComposition;
|
||||
wxChoice* m_toolTranslationSeq;
|
||||
wxAuiToolBarItem* m_toolWarnPUA;
|
||||
wxZRColaCharacterCatalogPanel* m_panelChrCat;
|
||||
wxStatusBar* m_statusBar;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
|
||||
virtual void OnIconize( wxIconizeEvent& event ) { event.Skip(); }
|
||||
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
|
||||
virtual void OnCompositionChoice( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnTranslationSeqChoice( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
wxZRColaComposerPanel* m_panel;
|
||||
|
||||
|
||||
wxZRColaFrameBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("ZRCola"), const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL, const wxString& name = wxT("ZRCola") );
|
||||
wxAuiManager m_mgr;
|
||||
|
||||
|
||||
~wxZRColaFrameBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaComposerPanelBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaComposerPanelBase : public wxPanel
|
||||
class wxZRColaComposerPanelBase : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
wxID_TIMER_SAVE = 6000,
|
||||
wxID_TIMER_SAVE = 1000
|
||||
};
|
||||
|
||||
|
||||
wxSplitterWindow* m_splitterSource;
|
||||
wxPanel* m_panelSourceEdit;
|
||||
wxPanel* m_panelSourceHex;
|
||||
@@ -145,8 +139,8 @@ class wxZRColaComposerPanelBase : public wxPanel
|
||||
wxPanel* m_panelDestinationHex;
|
||||
wxTextCtrl* m_destinationHex;
|
||||
wxTimer m_timerSave;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnSourcePaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnSourceText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSourceHexPaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
@@ -154,72 +148,70 @@ class wxZRColaComposerPanelBase : public wxPanel
|
||||
virtual void OnDestinationText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnDestinationHexPaint( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnSaveTimer( wxTimerEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
wxTextCtrl* m_source;
|
||||
wxTextCtrl* m_destination;
|
||||
|
||||
wxZRColaComposerPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaComposerPanel") );
|
||||
|
||||
|
||||
wxZRColaComposerPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaComposerPanel") );
|
||||
~wxZRColaComposerPanelBase();
|
||||
|
||||
|
||||
void m_splitterSourceOnIdle( wxIdleEvent& )
|
||||
{
|
||||
m_splitterSource->SetSashPosition( FromDIP(-5) );
|
||||
m_splitterSource->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterSourceOnIdle ), NULL, this );
|
||||
}
|
||||
|
||||
|
||||
void m_splitterDestinationOnIdle( wxIdleEvent& )
|
||||
{
|
||||
m_splitterDestination->SetSashPosition( FromDIP(-5) );
|
||||
m_splitterDestination->Disconnect( wxEVT_IDLE, wxIdleEventHandler( wxZRColaComposerPanelBase::m_splitterDestinationOnIdle ), NULL, this );
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaCharacterCatalogPanelBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaCharacterCatalogPanelBase : public wxPanel
|
||||
class wxZRColaCharacterCatalogPanelBase : public wxPanel
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxChoice* m_choice;
|
||||
wxZRColaCharGrid* m_grid;
|
||||
wxCheckBox* m_show_all;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnChoice( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnGridClick( wxGridEvent& event ) { event.Skip(); }
|
||||
virtual void OnGridKeyDown( wxKeyEvent& event ) { event.Skip(); }
|
||||
virtual void OnShowAll( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaCharacterCatalogPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaCharacterCatalog") );
|
||||
|
||||
|
||||
wxZRColaCharacterCatalogPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = wxT("ZRColaCharacterCatalog") );
|
||||
~wxZRColaCharacterCatalogPanelBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaCharSelectBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaCharSelectBase : public wxDialog
|
||||
class wxZRColaCharSelectBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxSearchCtrl* m_search;
|
||||
wxHyperlinkCtrl* m_search_more;
|
||||
wxPanel* m_search_panel;
|
||||
wxCheckListBox* m_blocks;
|
||||
wxHyperlinkCtrl* m_blocksAll;
|
||||
wxHyperlinkCtrl* m_blocksNone;
|
||||
wxHyperlinkCtrl* m_blocksInvert;
|
||||
wxCheckListBox* m_categories;
|
||||
wxHyperlinkCtrl* m_categoriesAll;
|
||||
wxHyperlinkCtrl* m_categoriesNone;
|
||||
wxHyperlinkCtrl* m_categoriesInvert;
|
||||
wxZRColaCharGrid* m_gridResults;
|
||||
wxZRColaCharGrid* m_gridRecent;
|
||||
wxStaticText* m_labelUnicode;
|
||||
@@ -228,20 +220,22 @@ class wxZRColaCharSelectBase : public wxDialog
|
||||
wxGrid* m_gridPreview;
|
||||
wxTextCtrl* m_description;
|
||||
wxTextCtrl* m_tags;
|
||||
wxTextCtrl* m_block;
|
||||
wxTextCtrl* m_category;
|
||||
wxHyperlinkCtrl* m_navigateBack;
|
||||
wxHyperlinkCtrl* m_navigateForward;
|
||||
wxZRColaCharGrid* m_gridRelated;
|
||||
wxButton* m_buttonInsert;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
|
||||
virtual void OnSearchText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSearchMore( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnBlocksToggle( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnBlocksAll( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnBlocksNone( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnBlocksInvert( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnCategoriesToggle( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCategoriesAll( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnCategoriesNone( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnCategoriesInvert( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnResultCellDClick( wxGridEvent& event ) { event.Skip(); }
|
||||
virtual void OnResultSelectCell( wxGridEvent& event ) { event.Skip(); }
|
||||
virtual void OnResultsKeyDown( wxKeyEvent& event ) { event.Skip(); }
|
||||
@@ -253,25 +247,23 @@ class wxZRColaCharSelectBase : public wxDialog
|
||||
virtual void OnNavigateBack( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnNavigateForward( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void OnRelatedSelectCell( wxGridEvent& event ) { event.Skip(); }
|
||||
virtual void OnInsert( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnInsertUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Character Search"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharSelect") );
|
||||
|
||||
|
||||
wxZRColaCharSelectBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Character Search"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharSelect") );
|
||||
~wxZRColaCharSelectBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaSettingsBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaSettingsBase : public wxDialog
|
||||
class wxZRColaSettingsBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxListbook* m_listbook;
|
||||
wxPanel* m_panelLanguage;
|
||||
@@ -286,29 +278,28 @@ class wxZRColaSettingsBase : public wxDialog
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsApply;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
|
||||
virtual void OnLanguageUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnApplyButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaSettingsBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaSettings") );
|
||||
|
||||
|
||||
wxZRColaSettingsBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaSettings") );
|
||||
~wxZRColaSettingsBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaAboutBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaAboutBase : public wxDialog
|
||||
class wxZRColaAboutBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticBitmap* m_bitmapIcon;
|
||||
wxStaticText* m_staticTextZRCola;
|
||||
@@ -320,48 +311,46 @@ class wxZRColaAboutBase : public wxDialog
|
||||
wxTextCtrl* m_declaration;
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaAboutBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaAbout") );
|
||||
|
||||
|
||||
wxZRColaAboutBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About ZRCola"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaAbout") );
|
||||
~wxZRColaAboutBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaUpdaterBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaUpdaterBase : public wxDialog
|
||||
class wxZRColaUpdaterBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxTextCtrl* m_log;
|
||||
wxButton* m_buttonUpdate;
|
||||
wxButton* m_buttonClose;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdate( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnClose( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaUpdaterBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Product Update"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaUpdater") );
|
||||
|
||||
|
||||
wxZRColaUpdaterBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Product Update"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaUpdater") );
|
||||
~wxZRColaUpdaterBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaCharRequestBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaCharRequestBase : public wxDialog
|
||||
class wxZRColaCharRequestBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_characterLbl;
|
||||
wxTextCtrl* m_character;
|
||||
@@ -372,26 +361,25 @@ class wxZRColaCharRequestBase : public wxDialog
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaCharRequestBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Request a New Character"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharRequest") );
|
||||
|
||||
|
||||
wxZRColaCharRequestBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Request a New Character"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaCharRequest") );
|
||||
~wxZRColaCharRequestBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class wxZRColaTranslationSeqBase
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
class wxZRColaTranslationSeqBase : public wxDialog
|
||||
class wxZRColaTranslationSeqBase : public wxDialog
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_transLbl;
|
||||
wxStaticText* m_availableLbl;
|
||||
@@ -405,8 +393,8 @@ class wxZRColaTranslationSeqBase : public wxDialog
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
wxButton* m_sdbSizerButtonsCancel;
|
||||
|
||||
// Virtual event handlers, override them in your derived class
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnAvailableChar( wxKeyEvent& event ) { event.Skip(); }
|
||||
@@ -418,13 +406,13 @@ class wxZRColaTranslationSeqBase : public wxDialog
|
||||
virtual void OnSelectedUp( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSelectedDown( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
wxZRColaTranslationSeqBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Custom Translation Sequence"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaTranslationSeq") );
|
||||
|
||||
|
||||
wxZRColaTranslationSeqBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Custom Translation Sequence"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxT("ZRColaTranslationSeq") );
|
||||
~wxZRColaTranslationSeqBase();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif //__ZRCOLAGUI_H__
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -33,7 +47,7 @@ bool wxZRColaKeyHandler::ProcessEvent(wxEvent& event)
|
||||
if (!chr) {
|
||||
int key = e.GetKeyCode();
|
||||
if (WXK_NUMPAD0 <= key && key <= WXK_NUMPAD9)
|
||||
chr = '0' + (wxChar)(key - WXK_NUMPAD0);
|
||||
chr = '0' + (key - WXK_NUMPAD0);
|
||||
}
|
||||
wxFrame *pFrame = wxDynamicCast(dynamic_cast<ZRColaApp*>(wxTheApp)->m_mainWnd, wxFrame);
|
||||
if (('0' <= chr && chr <= '9' || 'A' <= chr && chr <= 'F') && m_insert_seq.size() < 4) {
|
||||
@@ -67,14 +81,14 @@ bool wxZRColaKeyHandler::ProcessEvent(wxEvent& event)
|
||||
{
|
||||
// Parse key event and save it at the end of the key sequence.
|
||||
ZRCola::keyseq_db::keyseq::key_t key;
|
||||
key.key = (wchar_t)e.GetRawKeyCode();
|
||||
key.key = e.GetRawKeyCode();
|
||||
#if defined(__WXMSW__)
|
||||
// Translate from local keyboard to scan code.
|
||||
key.key = static_cast<wchar_t>(::MapVirtualKey(key.key, MAPVK_VK_TO_VSC) & 0xffff);
|
||||
key.key = ::MapVirtualKey(key.key, MAPVK_VK_TO_VSC);
|
||||
|
||||
// Translate from scan code to U.S. Keyboard.
|
||||
static const HKL s_hkl = ::LoadKeyboardLayout(_T("00000409"), 0);
|
||||
key.key = static_cast<wchar_t>(::MapVirtualKeyEx(key.key, MAPVK_VSC_TO_VK, s_hkl) & 0xffff);
|
||||
key.key = ::MapVirtualKeyEx(key.key, MAPVK_VSC_TO_VK, s_hkl);
|
||||
#endif
|
||||
key.modifiers =
|
||||
(e.ShiftDown() ? ZRCola::keyseq_db::keyseq::SHIFT : 0) |
|
||||
@@ -133,7 +147,7 @@ bool wxZRColaKeyHandler::ProcessEvent(wxEvent& event)
|
||||
if (count) {
|
||||
// Zero terminate sequence and parse the Unicode value.
|
||||
m_insert_seq.push_back(0);
|
||||
wchar_t chr = (wchar_t)strtoul(m_insert_seq.data(), NULL, 16);
|
||||
wchar_t chr = strtoul(m_insert_seq.data(), NULL, 16);
|
||||
|
||||
if (chr) {
|
||||
wxObject *obj = event.GetEventObject();
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
///
|
||||
@@ -13,11 +27,7 @@ class wxZRColaKeyHandler;
|
||||
|
||||
#include <zrcolaui/keyboard.h>
|
||||
|
||||
#include <wxex/common.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include <wx/event.h>
|
||||
#pragma warning(pop)
|
||||
#include <vector>
|
||||
|
||||
|
||||
|
||||
@@ -1,171 +1,186 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// wxZRColaSettings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxZRColaSettings::wxZRColaSettings(wxWindow* parent) :
|
||||
m_lang_auto(true),
|
||||
wxZRColaSettingsBase(parent)
|
||||
{
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
m_languages->Clear();
|
||||
for (size_t i = 0, n = app->m_lang_db.idxLang.size(); i < n; i++) {
|
||||
const auto &lang = app->m_lang_db.idxLang[i];
|
||||
wxString
|
||||
label(lang.name(), lang.name_len()),
|
||||
label_tran(wxGetTranslation(label, wxT("ZRCola-zrcdb")));
|
||||
m_languages->Insert(label_tran, (unsigned int)i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaSettings::OnInitDialog(wxInitDialogEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
// Set state of auto-start according to Startup folder shortcut presence.
|
||||
#if defined(__WXMSW__)
|
||||
wxString linkName(wxExpandEnvVars("%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\ZRCola.lnk"));
|
||||
m_autoStart->SetValue(wxFileExists(linkName));
|
||||
#else
|
||||
m_autoStart->SetValue(false);
|
||||
m_panelAutoStart->Enable(false);
|
||||
#endif
|
||||
|
||||
m_languages->Enable(!m_lang_auto);
|
||||
(m_lang_auto ? m_langAuto : m_langManual)->SetValue(true);
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
ZRCola::language_db::indexLang::size_type start;
|
||||
m_languages->Select(app->m_lang_db.idxLang.find(ZRCola::language_db::language(m_lang), start) ? (int)start : -1);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaSettings::OnLanguageUpdate(wxUpdateUIEvent& event)
|
||||
{
|
||||
m_languages->Enable(m_langManual->GetValue());
|
||||
|
||||
wxZRColaSettingsBase::OnLanguageUpdate(event);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaSettings::OnApplyButtonClick(wxCommandEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
wxString linkName(wxExpandEnvVars("%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\ZRCola.lnk"));
|
||||
if (m_autoStart->IsChecked()) {
|
||||
// Create the shortcut.
|
||||
IShellLink *sl;
|
||||
HRESULT hr = ::CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID*)&sl);
|
||||
if (SUCCEEDED(hr)) {
|
||||
// Setup ZRCola shortcut.
|
||||
sl->SetPath(wxTheApp->argv[0]);
|
||||
sl->SetDescription(_("Start ZRCola automatically on logon"));
|
||||
sl->SetShowCmd(SW_SHOWMINNOACTIVE);
|
||||
|
||||
// Query IShellLink for the IPersistFile interface, used for saving the
|
||||
// shortcut in persistent storage.
|
||||
IPersistFile *pf;
|
||||
hr = sl->QueryInterface(IID_IPersistFile, (LPVOID*)&pf);
|
||||
if (SUCCEEDED(hr)) {
|
||||
// Save the link by calling IPersistFile::Save.
|
||||
hr = pf->Save(linkName, TRUE);
|
||||
pf->Release();
|
||||
}
|
||||
|
||||
sl->Release();
|
||||
}
|
||||
} else if (wxFileExists(linkName)) {
|
||||
// The shortcut already exists. Remove it.
|
||||
wxRemoveFile(linkName);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (m_langAuto->GetValue()) {
|
||||
m_lang_auto = true;
|
||||
#if defined(__WXMSW__)
|
||||
// Set update keyboard language.
|
||||
HKL hkl = ::GetKeyboardLayout(0);
|
||||
ZRCola::LangConvert(LOWORD(hkl), m_lang);
|
||||
#endif
|
||||
} else {
|
||||
m_lang_auto = false;
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
const auto &lang = app->m_lang_db.idxLang[m_languages->GetSelection()];
|
||||
|
||||
if (m_lang != lang.lang) {
|
||||
m_lang = lang.lang;
|
||||
|
||||
// Notify destination text something changed and should re-inverse translate.
|
||||
wxCommandEvent event2(wxEVT_COMMAND_TEXT_UPDATED);
|
||||
app->m_mainWnd->m_panel->m_destination->ProcessWindowEvent(event2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaSettings::OnOKButtonClick(wxCommandEvent& event)
|
||||
{
|
||||
wxZRColaSettings::OnApplyButtonClick(event);
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// wxPersistentZRColaSettings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const int wxPersistentZRColaSettings::s_guiLevel = 1;
|
||||
|
||||
|
||||
wxPersistentZRColaSettings::wxPersistentZRColaSettings(wxZRColaSettings *wnd) : wxPersistentTLWEx(wnd)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void wxPersistentZRColaSettings::Save() const
|
||||
{
|
||||
SaveValue(wxT("guiLevel"), s_guiLevel);
|
||||
wxPersistentTLWEx::Save();
|
||||
|
||||
auto wnd = static_cast<const wxZRColaSettings*>(GetWindow()); // dynamic_cast is not reliable as we are typically called late in the wxTopLevelWindowMSW destructor.
|
||||
|
||||
SaveValue(wxT("langAuto"), wnd->m_lang_auto);
|
||||
SaveValue(wxT("lang" ), wxString::FromAscii(wnd->m_lang.data, _countof(wnd->m_lang.data)));
|
||||
}
|
||||
|
||||
|
||||
bool wxPersistentZRColaSettings::Restore()
|
||||
{
|
||||
auto wnd = dynamic_cast<wxZRColaSettings*>(GetWindow());
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
wxString lang;
|
||||
|
||||
// Restore automatic language detection setting first.
|
||||
RestoreValue(wxT("langAuto"), &(wnd->m_lang_auto));
|
||||
if (wnd->m_lang_auto) {
|
||||
#if defined(__WXMSW__)
|
||||
// Set keyboard language.
|
||||
HKL hkl = ::GetKeyboardLayout(0);
|
||||
ZRCola::LangConvert(LOWORD(hkl), wnd->m_lang);
|
||||
#endif
|
||||
} else if (RestoreValue(wxT("lang"), &lang) && lang.Length() == 3) {
|
||||
// The language was read from configuration.
|
||||
wnd->m_lang = lang.c_str();
|
||||
} else if (!app->m_lang_db.idxLang.empty()) {
|
||||
wnd->m_lang = app->m_lang_db.idxLang[0].lang;
|
||||
} else
|
||||
wnd->m_lang = ZRCola::langid_t();
|
||||
|
||||
int guiLevel;
|
||||
return RestoreValue(wxT("guiLevel"), &guiLevel) && guiLevel == s_guiLevel ? wxPersistentTLWEx::Restore() : true;
|
||||
}
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// wxZRColaSettings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxZRColaSettings::wxZRColaSettings(wxWindow* parent) :
|
||||
m_lang_auto(true),
|
||||
m_lang(ZRCola::langid_t::blank),
|
||||
wxZRColaSettingsBase(parent)
|
||||
{
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
m_languages->Clear();
|
||||
for (size_t i = 0, n = app->m_lang_db.idxLang.size(); i < n; i++) {
|
||||
const auto &lang = app->m_lang_db.idxLang[i];
|
||||
wxString
|
||||
label(lang.name(), lang.name_len()),
|
||||
label_tran(wxGetTranslation(label, wxT("ZRCola-zrcdb")));
|
||||
m_languages->Insert(label_tran, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaSettings::OnInitDialog(wxInitDialogEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
// Set state of auto-start according to Startup folder shortcut presence.
|
||||
#if defined(__WXMSW__)
|
||||
wxString linkName(wxExpandEnvVars("%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\ZRCola.lnk"));
|
||||
m_autoStart->SetValue(wxFileExists(linkName));
|
||||
#else
|
||||
m_autoStart->SetValue(false);
|
||||
m_panelAutoStart->Enable(false);
|
||||
#endif
|
||||
|
||||
m_languages->Enable(!m_lang_auto);
|
||||
(m_lang_auto ? m_langAuto : m_langManual)->SetValue(true);
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
ZRCola::language_db::indexLang::size_type start;
|
||||
m_languages->Select(app->m_lang_db.idxLang.find(ZRCola::language_db::language(m_lang), start) ? start : -1);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaSettings::OnLanguageUpdate(wxUpdateUIEvent& event)
|
||||
{
|
||||
m_languages->Enable(m_langManual->GetValue());
|
||||
|
||||
wxZRColaSettingsBase::OnLanguageUpdate(event);
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaSettings::OnApplyButtonClick(wxCommandEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
wxString linkName(wxExpandEnvVars("%APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\ZRCola.lnk"));
|
||||
if (m_autoStart->IsChecked()) {
|
||||
// Create the shortcut.
|
||||
IShellLink *sl;
|
||||
HRESULT hr = ::CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID*)&sl);
|
||||
if (SUCCEEDED(hr)) {
|
||||
// Setup ZRCola shortcut.
|
||||
sl->SetPath(wxTheApp->argv[0]);
|
||||
sl->SetDescription(_("Start ZRCola automatically on logon"));
|
||||
sl->SetShowCmd(SW_SHOWMINNOACTIVE);
|
||||
|
||||
// Query IShellLink for the IPersistFile interface, used for saving the
|
||||
// shortcut in persistent storage.
|
||||
IPersistFile *pf;
|
||||
hr = sl->QueryInterface(IID_IPersistFile, (LPVOID*)&pf);
|
||||
if (SUCCEEDED(hr)) {
|
||||
// Save the link by calling IPersistFile::Save.
|
||||
hr = pf->Save(linkName, TRUE);
|
||||
pf->Release();
|
||||
}
|
||||
|
||||
sl->Release();
|
||||
}
|
||||
} else if (wxFileExists(linkName)) {
|
||||
// The shortcut already exists. Remove it.
|
||||
wxRemoveFile(linkName);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (m_langAuto->GetValue()) {
|
||||
m_lang_auto = true;
|
||||
#if defined(__WXMSW__)
|
||||
// Set update keyboard language.
|
||||
HKL hkl = ::GetKeyboardLayout(0);
|
||||
ZRCola::LangConvert(LOWORD(hkl), m_lang);
|
||||
#endif
|
||||
} else {
|
||||
m_lang_auto = false;
|
||||
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
const auto &lang = app->m_lang_db.idxLang[m_languages->GetSelection()];
|
||||
|
||||
if (m_lang != lang.lang) {
|
||||
m_lang = lang.lang;
|
||||
|
||||
// Notify destination text something changed and should re-inverse translate.
|
||||
wxCommandEvent event2(wxEVT_COMMAND_TEXT_UPDATED);
|
||||
app->m_mainWnd->m_panel->m_destination->ProcessWindowEvent(event2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wxZRColaSettings::OnOKButtonClick(wxCommandEvent& event)
|
||||
{
|
||||
wxZRColaSettings::OnApplyButtonClick(event);
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// wxPersistentZRColaSettings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const int wxPersistentZRColaSettings::s_guiLevel = 1;
|
||||
|
||||
|
||||
wxPersistentZRColaSettings::wxPersistentZRColaSettings(wxZRColaSettings *wnd) : wxPersistentTLWEx(wnd)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void wxPersistentZRColaSettings::Save() const
|
||||
{
|
||||
SaveValue(wxT("guiLevel"), s_guiLevel);
|
||||
wxPersistentTLWEx::Save();
|
||||
|
||||
auto wnd = static_cast<const wxZRColaSettings*>(GetWindow()); // dynamic_cast is not reliable as we are typically called late in the wxTopLevelWindowMSW destructor.
|
||||
|
||||
SaveValue(wxT("langAuto"), wnd->m_lang_auto);
|
||||
SaveValue(wxT("lang" ), wxString::FromAscii(wnd->m_lang.data, _countof(wnd->m_lang.data)));
|
||||
}
|
||||
|
||||
|
||||
bool wxPersistentZRColaSettings::Restore()
|
||||
{
|
||||
auto wnd = dynamic_cast<wxZRColaSettings*>(GetWindow());
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
wxString lang;
|
||||
|
||||
// Restore automatic language detection setting first.
|
||||
RestoreValue(wxT("langAuto"), &(wnd->m_lang_auto));
|
||||
if (wnd->m_lang_auto) {
|
||||
#if defined(__WXMSW__)
|
||||
// Set keyboard language.
|
||||
HKL hkl = ::GetKeyboardLayout(0);
|
||||
ZRCola::LangConvert(LOWORD(hkl), wnd->m_lang);
|
||||
#endif
|
||||
} else if (RestoreValue(wxT("lang"), &lang) && lang.Length() == 3) {
|
||||
// The language was read from configuration.
|
||||
wnd->m_lang = lang.c_str();
|
||||
} else if (!app->m_lang_db.idxLang.empty()) {
|
||||
wnd->m_lang = app->m_lang_db.idxLang[0].lang;
|
||||
} else
|
||||
wnd->m_lang = ZRCola::langid_t::blank;
|
||||
|
||||
int guiLevel;
|
||||
return RestoreValue(wxT("guiLevel"), &guiLevel) && guiLevel == s_guiLevel ? wxPersistentTLWEx::Restore() : true;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
///
|
||||
@@ -12,11 +26,7 @@ class wxPersistentZRColaSettings;
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wxex/common.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include "zrcolagui.h"
|
||||
#pragma warning(pop)
|
||||
#include <wxex/persist/toplevel.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -226,7 +240,7 @@ bool wxPersistentZRColaTranslationSeq::Restore()
|
||||
if (RestoreValue(wxT("transeq"), &str)) {
|
||||
std::vector<ZRCola::transetid_t> transet;
|
||||
for (wxStringTokenizer tok(str, wxT("|")); tok.HasMoreTokens(); ) {
|
||||
ZRCola::transetid_t val = (ZRCola::transetid_t)_tcstoul(tok.GetNextToken().c_str(), NULL, 10);
|
||||
unsigned long val = _tcstoul(tok.GetNextToken().c_str(), NULL, 10);
|
||||
for (size_t i = 0, n = app->m_ts_db.idxTranSet.size(); i < n; i++) {
|
||||
const ZRCola::transet_db::transet &cg = app->m_ts_db.idxTranSet[i];
|
||||
if (cg.set == val) {
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
///
|
||||
@@ -12,11 +26,7 @@ class wxPersistentZRColaTranslationSeq;
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wxex/common.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include "zrcolagui.h"
|
||||
#pragma warning(pop)
|
||||
#include <zrcola/translate.h>
|
||||
#include <wxex/persist/toplevel.h>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -27,7 +41,6 @@ wxZRColaUpdater::wxZRColaUpdater(wxWindow* parent) :
|
||||
|
||||
// Prepare Updater.
|
||||
auto app = dynamic_cast<ZRColaApp*>(wxTheApp);
|
||||
#pragma warning(suppress: 26812) // wxLanguage is unscoped.
|
||||
m_updater = new wxUpdCheckThread(app->m_lang_ui == wxLANGUAGE_DEFAULT ? wxT("en_US") : wxLocale::GetLanguageCanonicalName(app->m_lang_ui), this);
|
||||
//if (m_updater->Run() != wxTHREAD_NO_ERROR) {
|
||||
// wxFAIL_MSG(wxT("Can't create the thread!"));
|
||||
@@ -67,7 +80,7 @@ wxZRColaUpdater::~wxZRColaUpdater()
|
||||
void wxZRColaUpdater::OnIdle(wxIdleEvent& event)
|
||||
{
|
||||
if (!m_finished) {
|
||||
m_buttonUpdate->Enable(m_updater->CheckForUpdate() == wxUpdCheckThread::wxResult::UpdateAvailable);
|
||||
m_buttonUpdate->Enable(m_updater->CheckForUpdate() == wxUpdCheckThread::wxUpdUpdateAvailable);
|
||||
m_finished = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
///
|
||||
@@ -11,16 +25,11 @@ class wxZRColaUpdater;
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wxex/common.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include "zrcolagui.h"
|
||||
#pragma warning(pop)
|
||||
|
||||
#include <Updater/chkthread.h>
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
|
||||
#include <wx/log.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
|
||||
///
|
||||
|
||||
18
ZRColaCompile/ZRColaCompile.props
Normal file
18
ZRColaCompile/ZRColaCompile.props
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<OutDir>..\output\$(Platform).$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\lib\wxExtend\include;..\lib\WinStd\include;..\lib\stdex\include;..\lib\libZRCola\include;..\lib\libZRColaUI\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
</Project>
|
||||
Binary file not shown.
@@ -13,51 +13,51 @@
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{87A3ADEC-1BE4-42E4-92B8-B742F3D21BC4}</ProjectGuid>
|
||||
<RootNamespace>ZRColaCompile</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)'=='Debug'">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)'=='Release'">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\include\$(Platform).props" />
|
||||
<Import Project="..\include\$(Configuration).props" />
|
||||
<Import Project="ZRColaCompile.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\include\$(Platform).props" />
|
||||
<Import Project="..\include\$(Configuration).props" />
|
||||
<Import Project="ZRColaCompile.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<OutDir>..\output\$(Platform).$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\lib\wxExtend\include;..\lib\WinStd\include;..\lib\stdex\include;..\lib\libZRCola\include;..\lib\libZRColaUI\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dbsource.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="parse.cpp" />
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="dbsource.h" />
|
||||
<ClInclude Include="parse.h" />
|
||||
<ClInclude Include="pch.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\lib\libZRColaUI\build\libZRColaUI.vcxproj">
|
||||
@@ -66,7 +66,10 @@
|
||||
<ProjectReference Include="..\lib\libZRCola\build\libZRCola.vcxproj">
|
||||
<Project>{3c61929e-7289-4101-8d0a-da22d6e1aea8}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\lib\wxExtend\build\wxExtendLib.vcxproj">
|
||||
<ProjectReference Include="..\lib\WinStd\build\WinStd-15.0.vcxproj">
|
||||
<Project>{47399d91-7eb9-41de-b521-514ba5db0c43}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\lib\wxExtend\build\wxExtendLib-15.0.vcxproj">
|
||||
<Project>{D3E29951-D9F5-486D-A167-20AE8E90B1FA}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="pch.cpp">
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
@@ -33,7 +33,7 @@
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pch.h">
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="dbsource.h">
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: ZRColaCompile\n"
|
||||
"POT-Creation-Date: 2022-02-17 13:30+0100\n"
|
||||
"POT-Creation-Date: 2018-09-19 09:00+0200\n"
|
||||
"PO-Revision-Date: 2016-04-13 18:11+0200\n"
|
||||
"Last-Translator: Simon Rozman <simon.rozman@amebis.si>\n"
|
||||
"Language-Team: Amebis, d. o. o., Kamnik <info@amebis.si>\n"
|
||||
@@ -10,25 +10,25 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.4.2\n"
|
||||
"X-Generator: Poedit 2.1.1\n"
|
||||
"X-Poedit-Basepath: ..\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
"X-Poedit-KeywordsList: _\n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
|
||||
#: main.cpp:239
|
||||
#: main.cpp:251
|
||||
msgid "Show this help message"
|
||||
msgstr ""
|
||||
|
||||
#: main.cpp:240
|
||||
msgid "<Input file>"
|
||||
#: main.cpp:252
|
||||
msgid "<input file>"
|
||||
msgstr ""
|
||||
|
||||
#: main.cpp:241
|
||||
msgid "<Output file>"
|
||||
#: main.cpp:253
|
||||
msgid "<output file>"
|
||||
msgstr ""
|
||||
|
||||
#: main.cpp:242
|
||||
msgid "Output POT catalog"
|
||||
#: main.cpp:254
|
||||
msgid "<output POT catalog>"
|
||||
msgstr ""
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace stdex;
|
||||
@@ -16,30 +30,28 @@ using namespace winstd;
|
||||
class com_translation
|
||||
{
|
||||
public:
|
||||
short rank_src; ///< Source sequence rank
|
||||
short rank_dst; ///< Destination character rank
|
||||
int rank_src; ///< Source sequence rank
|
||||
int rank_dst; ///< Destination character rank
|
||||
string norm; ///< Normalization footprint
|
||||
|
||||
inline com_translation() :
|
||||
rank_src(0),
|
||||
rank_dst(0)
|
||||
inline com_translation()
|
||||
{
|
||||
}
|
||||
|
||||
inline com_translation(short _rank_src, short _rank_dst) :
|
||||
inline com_translation(int _rank_src, int _rank_dst) :
|
||||
rank_src(_rank_src),
|
||||
rank_dst(_rank_dst)
|
||||
{
|
||||
}
|
||||
|
||||
inline com_translation(short _rank_src, short _rank_dst, const char *_norm) :
|
||||
inline com_translation(int _rank_src, int _rank_dst, const char *_norm) :
|
||||
rank_src(_rank_src),
|
||||
rank_dst(_rank_dst),
|
||||
norm (_norm )
|
||||
{
|
||||
}
|
||||
|
||||
inline com_translation(short _rank_src, short _rank_dst, string &&_norm) :
|
||||
inline com_translation(int _rank_src, int _rank_dst, string &&_norm) :
|
||||
rank_src( _rank_src ),
|
||||
rank_dst( _rank_dst ),
|
||||
norm (std::move(_norm ))
|
||||
@@ -53,7 +65,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
inline com_translation(com_translation &&other) noexcept :
|
||||
inline com_translation(com_translation &&other) :
|
||||
rank_src( other.rank_src ),
|
||||
rank_dst( other.rank_dst ),
|
||||
norm (std::move(other.norm ))
|
||||
@@ -70,7 +82,7 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline com_translation& operator=(com_translation &&other) noexcept
|
||||
inline com_translation& operator=(com_translation &&other)
|
||||
{
|
||||
if (this != std::addressof(other)) {
|
||||
rank_src = other.rank_src ;
|
||||
@@ -201,8 +213,8 @@ static inline set<ZRCola::DBSource::charseq> permutate_and_translate_inv(_In_ co
|
||||
|
||||
// Secondary permutation inverse translate.
|
||||
auto res_perm = translate_inv(db_trans, db_np, str_perm.c_str(), path);
|
||||
for (auto r = res_perm.cbegin(), r_end = res_perm.cend(); r != r_end; ++r)
|
||||
res.insert(ZRCola::DBSource::charseq(r->rank + 1, r->str));
|
||||
for (auto r = res_perm.begin(), r_end = res_perm.end(); r != r_end; ++r)
|
||||
res.insert(ZRCola::DBSource::charseq(r->rank + 1, std::move(r->str)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,10 +248,10 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
// Parse command line.
|
||||
static const wxCmdLineEntryDesc cmdLineDesc[] =
|
||||
{
|
||||
{ wxCMD_LINE_SWITCH, "h" , "help" , _("Show this help message"), wxCMD_LINE_VAL_NONE , wxCMD_LINE_OPTION_HELP },
|
||||
{ wxCMD_LINE_PARAM , NULL, NULL , _("<Input file>" ), wxCMD_LINE_VAL_STRING, wxCMD_LINE_OPTION_MANDATORY },
|
||||
{ wxCMD_LINE_PARAM , NULL, NULL , _("<Output file>" ), wxCMD_LINE_VAL_STRING, wxCMD_LINE_OPTION_MANDATORY },
|
||||
{ wxCMD_LINE_OPTION, NULL, "pot-cat", _("Output POT catalog" ), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL },
|
||||
{ wxCMD_LINE_SWITCH, "h" , "help", _("Show this help message"), wxCMD_LINE_VAL_NONE , wxCMD_LINE_OPTION_HELP },
|
||||
{ wxCMD_LINE_PARAM , NULL, NULL , _("<input file>" ), wxCMD_LINE_VAL_STRING, wxCMD_LINE_OPTION_MANDATORY },
|
||||
{ wxCMD_LINE_PARAM , NULL, NULL , _("<output file>" ), wxCMD_LINE_VAL_STRING, wxCMD_LINE_OPTION_MANDATORY },
|
||||
{ wxCMD_LINE_PARAM , NULL, NULL , _("<output POT catalog>" ), wxCMD_LINE_VAL_STRING, wxCMD_LINE_OPTION },
|
||||
|
||||
{ wxCMD_LINE_NONE }
|
||||
};
|
||||
@@ -282,15 +294,13 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
bool has_errors = false;
|
||||
|
||||
// Set of strings to translate.
|
||||
wxString filenamePot;
|
||||
bool build_pot = parser.Found("pot-cat", &filenamePot);
|
||||
bool build_pot = parser.GetParamCount() > 2;
|
||||
set<wstring> pot;
|
||||
|
||||
// Open file ID.
|
||||
streamoff dst_start = idrec::open<ZRCola::recordid_t, ZRCola::recordsize_t>(dst, ZRCOLA_DB_ID);
|
||||
|
||||
ZRCola::translation_db db_trans;
|
||||
ZRCola::transet_db db_transset;
|
||||
normperm_db db_np;
|
||||
|
||||
{
|
||||
@@ -361,47 +371,34 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
assert(!res.empty());
|
||||
|
||||
// Add translation to temporary database.
|
||||
for (auto r = res.cbegin(), r_end = res.cend(); r != r_end; ++r) {
|
||||
for (auto r = res.begin(), r_end = res.end(); r != r_end; ++r) {
|
||||
translation_db::mapped_type::mapped_type ct(d1->second.rank_src + r->rank, d1->second.rank_dst);
|
||||
auto hit = t2->second.find(r->str);
|
||||
if (hit != t2->second.end()) {
|
||||
hit->second.rank_src = std::min<short>(hit->second.rank_src, ct.rank_src);
|
||||
hit->second.rank_dst = std::max<short>(hit->second.rank_dst, ct.rank_dst);
|
||||
hit->second.rank_src = std::min<int>(hit->second.rank_src, ct.rank_src);
|
||||
hit->second.rank_dst = std::max<int>(hit->second.rank_dst, ct.rank_dst);
|
||||
} else
|
||||
t2->second.insert(pair<translation_db::mapped_type::key_type, translation_db::mapped_type::mapped_type>(r->str, std::move(ct)));
|
||||
t2->second.insert(pair<translation_db::mapped_type::key_type, translation_db::mapped_type::mapped_type>(std::move(r->str), std::move(ct)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Preallocate memory.
|
||||
db_trans.idxSrc.reserve(count*2);
|
||||
db_trans.idxDst.reserve(count*2);
|
||||
db_trans.data .reserve(count*2*8);
|
||||
db_trans.idxSrc.reserve(count);
|
||||
db_trans.idxDst.reserve(count);
|
||||
db_trans.data .reserve(count*5);
|
||||
|
||||
// Parse translations and build index and data.
|
||||
ZRCola::DBSource::translation trans;
|
||||
trans.set = 0;
|
||||
for (auto t = db_temp2.cbegin(), t_end = db_temp2.cend(); t != t_end; ++t) {
|
||||
// Add translation to index and data.
|
||||
trans.dst.str = t->first;
|
||||
trans.dst.str = std::move(t->first);
|
||||
for (auto d = t->second.cbegin(), d_end = t->second.cend(); d != d_end; ++d) {
|
||||
trans.set = (short)ZRCOLA_TRANSETID_DEFAULT;
|
||||
trans.dst.rank = d->second.rank_dst;
|
||||
trans.src.rank = d->second.rank_src;
|
||||
trans.src.str = d->first;
|
||||
trans.src.str = std::move(d->first);
|
||||
db_trans << trans;
|
||||
|
||||
// If destination contains no PUA characters, add it to the ZRCola » Unicode transliteration too.
|
||||
bool has_pua = false;
|
||||
for (auto ch = trans.dst.str.cbegin(), ch_end = trans.dst.str.cend(); ch != ch_end; ++ch)
|
||||
if (ZRCola::ispua(*ch)) {
|
||||
has_pua = true;
|
||||
break;
|
||||
}
|
||||
if (!has_pua) {
|
||||
trans.set = (short)ZRCOLA_TRANSETID_UNICODE;
|
||||
trans.dst.rank += 50;
|
||||
db_trans << trans;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -414,73 +411,35 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
com_obj<ADORecordset> rs_tran;
|
||||
if (src.SelectTranslations(static_cast<short>(ZRCOLA_TRANSETID_UNICODE), rs_tran)) {
|
||||
size_t count = src.GetRecordsetCount(rs_tran);
|
||||
if (count < 0xffffffff) { // 4G check (-1 is reserved for error condition)
|
||||
// Preallocate memory.
|
||||
db_trans.idxSrc.reserve(db_trans.idxSrc.size() + count);
|
||||
db_trans.idxDst.reserve(db_trans.idxDst.size() + count);
|
||||
db_trans.data .reserve(db_trans.data.size() + count*8);
|
||||
|
||||
// Parse translations and build temporary database.
|
||||
ZRCola::DBSource::translation trans;
|
||||
trans.set = (short)ZRCOLA_TRANSETID_UNICODE;
|
||||
for (; !ZRCola::DBSource::IsEOF(rs_tran); rs_tran->MoveNext()) {
|
||||
// Read translation from the database.
|
||||
if (src.GetTranslation(rs_tran, trans)) {
|
||||
// Add translation to index and data.
|
||||
db_trans << trans;
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0004: Error getting Unicode translation count from database or too many translations.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0003: Error getting Unicode translations from database. Please make sure the file is ZRCola.zrc compatible.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Get translation sets.
|
||||
com_obj<ADORecordset> rs;
|
||||
if (src.SelectTranlationSets(rs)) {
|
||||
size_t count = src.GetRecordsetCount(rs);
|
||||
if (count < 0xffffffff) { // 4G check (-1 is reserved for error condition)
|
||||
ZRCola::transet_db db;
|
||||
|
||||
// Preallocate memory.
|
||||
db_transset.idxTranSet.reserve((count+1));
|
||||
db_transset.data .reserve((count+1)*4);
|
||||
db.idxTranSet.reserve((count+1));
|
||||
db.data .reserve((count+1)*4);
|
||||
|
||||
// Parse translation sets and build index and data.
|
||||
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
|
||||
// Read translation set from the database.
|
||||
ZRCola::DBSource::transet ts;
|
||||
if (src.GetTranslationSet(rs, ts)) {
|
||||
if (ts.set <= (short)ZRCOLA_TRANSETID_DEFAULT || (short)ZRCOLA_TRANSETID_UNICODE <= ts.set)
|
||||
continue;
|
||||
|
||||
if (build_pot) {
|
||||
pot.insert(ts.src);
|
||||
pot.insert(ts.dst);
|
||||
}
|
||||
|
||||
// Add translation set to index and data.
|
||||
db_transset << ts;
|
||||
db << ts;
|
||||
|
||||
// Get translations.
|
||||
com_obj<ADORecordset> rs_tran;
|
||||
if (src.SelectTranslations(ts.set, rs_tran)) {
|
||||
count = src.GetRecordsetCount(rs_tran);
|
||||
if (count < 0xffffffff) { // 4G check (-1 is reserved for error condition)
|
||||
// Preallocate memory.
|
||||
db_trans.idxSrc.reserve(db_trans.idxSrc.size() + count);
|
||||
db_trans.idxDst.reserve(db_trans.idxDst.size() + count);
|
||||
db_trans.data .reserve(db_trans.data.size() + count*8);
|
||||
|
||||
if (src.GetRecordsetCount(rs_tran) < 0xffffffff) { // 4G check (-1 is reserved for error condition)
|
||||
// Parse translations and build temporary database.
|
||||
ZRCola::DBSource::translation trans;
|
||||
trans.set = ts.set;
|
||||
@@ -503,6 +462,12 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Sort indices.
|
||||
db.idxTranSet.sort();
|
||||
|
||||
// Write translation sets to file.
|
||||
dst << ZRCola::transet_rec(db);
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0009: Error getting translation set count from database or too many translation sets.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
@@ -513,13 +478,11 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
// Write translation sets to file.
|
||||
db_transset.idxTranSet.sort();
|
||||
dst << ZRCola::transet_rec(db_transset);
|
||||
|
||||
// Write translations to file.
|
||||
// Sort indices.
|
||||
db_trans.idxSrc.sort();
|
||||
db_trans.idxDst.sort();
|
||||
|
||||
// Write translations to file.
|
||||
dst << ZRCola::translation_rec(db_trans);
|
||||
|
||||
{
|
||||
@@ -549,9 +512,11 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Write translation sequences to file.
|
||||
// Sort indices.
|
||||
db.idxTranSeq.sort();
|
||||
db.idxRank .sort();
|
||||
|
||||
// Write translation sequences to file.
|
||||
dst << ZRCola::transeq_rec(db);
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0025: Error getting translation sequence count from database or too many translation sequences.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
@@ -646,8 +611,10 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Write languages to file.
|
||||
// Sort indices.
|
||||
db.idxLang.sort();
|
||||
|
||||
// Write languages to file.
|
||||
dst << ZRCola::language_rec(db);
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0009: Error getting language count from database or too many languages.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
@@ -685,11 +652,13 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Write language characters to file.
|
||||
// Sort indices.
|
||||
db.idxChr .sort();
|
||||
#ifdef ZRCOLA_LANGCHAR_LANG_IDX
|
||||
db.idxLang.sort();
|
||||
#endif
|
||||
|
||||
// Write language characters to file.
|
||||
dst << ZRCola::langchar_rec(db);
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0011: Error getting language characters count from database or too many langchars.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
@@ -732,8 +701,10 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Write character groups to file.
|
||||
// Sort indices.
|
||||
db.idxRank.sort();
|
||||
|
||||
// Write character groups to file.
|
||||
dst << ZRCola::chrgrp_rec(db);
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0015: Error getting character group count from database or too many character groups.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
@@ -745,6 +716,8 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
set<ZRCola::chrcatid_t> categories_used;
|
||||
|
||||
{
|
||||
// Get characters.
|
||||
com_obj<ADORecordset> rs;
|
||||
@@ -752,34 +725,10 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
size_t count = src.GetRecordsetCount(rs);
|
||||
if (count < 0xffffffff) { // 4G check (-1 is reserved for error condition)
|
||||
ZRCola::DBSource::character_desc_idx idxChrDsc, idxChrDscSub;
|
||||
|
||||
ZRCola::DBSource::character_bank chrs;
|
||||
|
||||
// Phase 1: Get character blocks.
|
||||
com_obj<ADORecordset> rs2;
|
||||
if (src.SelectCharacterBlocks(rs2)) {
|
||||
size_t count2 = src.GetRecordsetCount(rs2);
|
||||
if (count2 < 0xffffffff) { // 4G check (-1 is reserved for error condition)
|
||||
// Parse character blocks and build index and data.
|
||||
for (; !ZRCola::DBSource::IsEOF(rs2); rs2->MoveNext()) {
|
||||
// Read character block from the database.
|
||||
ZRCola::DBSource::chrblk cb;
|
||||
if (src.GetCharacterBlock(rs2, cb))
|
||||
chrs.idxChrBlk[cb.first] = std::move(cb.second);
|
||||
else
|
||||
has_errors = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0029: Error getting character block count from database or too many character blocks.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0028: Error getting character blocks from database. Please make sure the file is ZRCola.zrc compatible.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Phase 2: Parse characters and build indexes.
|
||||
// Phase 1: Parse characters and build indexes.
|
||||
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
|
||||
// Read character from the database.
|
||||
ZRCola::DBSource::character chr;
|
||||
@@ -789,63 +738,37 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Phase 3: Build related character lists.
|
||||
// Phase 2: Build related character lists.
|
||||
chrs.build_related();
|
||||
|
||||
{
|
||||
ZRCola::character_db db;
|
||||
ZRCola::character_db db;
|
||||
|
||||
// Preallocate memory.
|
||||
db.idxChr.reserve(count);
|
||||
db.data.reserve(count * 4);
|
||||
// Preallocate memory.
|
||||
db.idxChr.reserve(count);
|
||||
db.data .reserve(count*4);
|
||||
|
||||
// Phase 4: Parse characters and build index and data.
|
||||
for (auto chr = chrs.cbegin(), chr_end = chrs.cend(); chr != chr_end; ++chr) {
|
||||
// Add character to index and data.
|
||||
db << *chr;
|
||||
// Phase 3: Parse characters and build index and data.
|
||||
for (auto chr = chrs.cbegin(), chr_end = chrs.cend(); chr != chr_end; ++chr) {
|
||||
// Add character to index and data.
|
||||
db << *chr;
|
||||
|
||||
// Add description (and keywords) to index.
|
||||
idxChrDsc.add_keywords(chr->second.terms, chr->first, 0);
|
||||
idxChrDscSub.add_keywords(chr->second.terms, chr->first, 3);
|
||||
}
|
||||
// Add description (and keywords) to index.
|
||||
idxChrDsc .add_keywords(chr->second.terms, chr->first, 0);
|
||||
idxChrDscSub.add_keywords(chr->second.terms, chr->first, 3);
|
||||
|
||||
// Write characters to file.
|
||||
db.idxChr.sort();
|
||||
idxChrDsc.save(db.idxDsc);
|
||||
idxChrDscSub.save(db.idxDscSub);
|
||||
dst << ZRCola::character_rec(db);
|
||||
// Mark category used.
|
||||
categories_used.insert(chr->second.cat);
|
||||
}
|
||||
|
||||
{
|
||||
ZRCola::chrblk_db db;
|
||||
// Sort indices.
|
||||
db.idxChr.sort();
|
||||
|
||||
// Preallocate memory.
|
||||
db.idxChrId.reserve(chrs.idxChrBlk.size());
|
||||
db.idxFirst.reserve(chrs.idxChrBlk.size());
|
||||
db.idxRank.reserve(chrs.idxChrBlk.size());
|
||||
db.data.reserve(chrs.idxChrBlk.size() * 16);
|
||||
// Save text indices.
|
||||
idxChrDsc .save(db.idxDsc );
|
||||
idxChrDscSub.save(db.idxDscSub);
|
||||
|
||||
// Phase 5: Parse character blocks and build index and data.
|
||||
for (auto& cb : chrs.idxChrBlk)
|
||||
{
|
||||
if (!cb.second.used) {
|
||||
// Skip unused character blocks.
|
||||
continue;
|
||||
}
|
||||
|
||||
if (build_pot)
|
||||
pot.insert(cb.second.name);
|
||||
|
||||
// Add character block to index and data.
|
||||
db << cb;
|
||||
}
|
||||
|
||||
// Write character blocks to file.
|
||||
db.idxChrId.sort();
|
||||
db.idxFirst.sort();
|
||||
db.idxRank.sort();
|
||||
dst << ZRCola::chrblk_rec(db);
|
||||
}
|
||||
// Write characters to file.
|
||||
dst << ZRCola::character_rec(db);
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0017: Error getting character count from database or too many characters.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
@@ -856,6 +779,54 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Get character categories.
|
||||
com_obj<ADORecordset> rs;
|
||||
if (src.SelectCharacterCategories(rs)) {
|
||||
size_t count = src.GetRecordsetCount(rs);
|
||||
if (count < 0xffffffff) { // 4G check (-1 is reserved for error condition)
|
||||
ZRCola::DBSource::chrcat cc;
|
||||
ZRCola::chrcat_db db;
|
||||
|
||||
// Preallocate memory.
|
||||
db.idxChrCat.reserve(count);
|
||||
db.idxRank .reserve(count);
|
||||
db.data .reserve(count*4);
|
||||
|
||||
// Parse character categories and build index and data.
|
||||
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
|
||||
// Read character category from the database.
|
||||
if (src.GetCharacterCategory(rs, cc)) {
|
||||
if (build_pot)
|
||||
pot.insert(cc.name);
|
||||
|
||||
if (categories_used.find(cc.cat) == categories_used.end()) {
|
||||
// Skip empty character categories.
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add character category to index and data.
|
||||
db << cc;
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Sort indices.
|
||||
db.idxChrCat.sort();
|
||||
db.idxRank .sort();
|
||||
|
||||
// Write character categories to file.
|
||||
dst << ZRCola::chrcat_rec(db);
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0019: Error getting character category count from database or too many character categories.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0018: Error getting character categories from database. Please make sure the file is ZRCola.zrc compatible.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Get characters tags.
|
||||
com_obj<ADORecordset> rs;
|
||||
@@ -880,9 +851,11 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Write characters tags to file.
|
||||
// Sort indices.
|
||||
db.idxChr.sort();
|
||||
db.idxTag.sort();
|
||||
|
||||
// Write characters tags to file.
|
||||
dst << ZRCola::chrtag_rec(db);
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0021: Error getting characters tags count from database or too many character tags.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
@@ -918,9 +891,11 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Write tags to file.
|
||||
// Sort indices.
|
||||
db.idxName.sort();
|
||||
db.idxTag .sort();
|
||||
|
||||
// Write tags to file.
|
||||
dst << ZRCola::tagname_rec(db);
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0023: Error getting tag name count from database or too many tags.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
@@ -932,43 +907,6 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Get highlights.
|
||||
com_obj<ADORecordset> rs;
|
||||
if (src.SelectHighlights((short)ZRCOLA_HLGHTSETID_ZRCOLA_UNICODE_COMPOSED_ISSUES, rs)) {
|
||||
size_t count = src.GetRecordsetCount(rs);
|
||||
if (count < 0xffffffff) { // 4G check (-1 is reserved for error condition)
|
||||
ZRCola::DBSource::highlight h;
|
||||
ZRCola::highlight_db db;
|
||||
|
||||
// Preallocate memory.
|
||||
db.idxChr.reserve(count);
|
||||
db.data .reserve(count*5);
|
||||
|
||||
// Parse highlights and build index and data.
|
||||
h.set = (short)ZRCOLA_HLGHTSETID_ZRCOLA_UNICODE_COMPOSED_ISSUES;
|
||||
for (; !ZRCola::DBSource::IsEOF(rs); rs->MoveNext()) {
|
||||
// Read tag name from the database.
|
||||
if (src.GetHighlight(rs, h)) {
|
||||
// Add highlight to index and data.
|
||||
db << h;
|
||||
} else
|
||||
has_errors = true;
|
||||
}
|
||||
|
||||
// Write highlights to file.
|
||||
db.idxChr.sort();
|
||||
dst << ZRCola::highlight_rec(db);
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0027: Error getting highlight count from database or too many tags.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
} else {
|
||||
_ftprintf(stderr, wxT("%s: error ZCC0026: Error getting highlights from database. Please make sure the file is ZRCola.zrc compatible.\n"), (LPCTSTR)filenameIn.c_str());
|
||||
has_errors = true;
|
||||
}
|
||||
}
|
||||
|
||||
idrec::close<ZRCola::recordid_t, ZRCola::recordsize_t, ZRCOLA_RECORD_ALIGN>(dst, dst_start);
|
||||
|
||||
if (dst.fail()) {
|
||||
@@ -977,6 +915,7 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
}
|
||||
|
||||
if (!has_errors && build_pot) {
|
||||
const wxString& filenamePot = parser.GetParam(2);
|
||||
fstream dst_pot((LPCTSTR)filenamePot, ios_base::out | ios_base::trunc);
|
||||
if (dst_pot.good()) {
|
||||
dst_pot << "msgid \"\"" << endl
|
||||
@@ -988,10 +927,10 @@ int _tmain(int argc, _TCHAR *argv[])
|
||||
<< "\"Content-Transfer-Encoding: 8bit\\n\"" << endl
|
||||
<< "\"X-Generator: ZRColaCompile\\n\"" << endl;
|
||||
|
||||
charset_encoder<wchar_t, char> conv(stdex::wchar_t_charset, charset_id::utf8);
|
||||
wstring_convert<codecvt_utf8<wchar_t>> conv;
|
||||
for (auto p = pot.cbegin(); p != pot.cend(); ++p) {
|
||||
// Convert UTF-16 to UTF-8 and escape.
|
||||
string t(conv.convert(*p)), u;
|
||||
string t(conv.to_bytes(*p)), u;
|
||||
for (size_t i = 0, n = t.size(); i < n; i++) {
|
||||
char c = t[i];
|
||||
switch (c) {
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2018-2022 Amebis
|
||||
/*
|
||||
Copyright 2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace stdex;
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2018-2022 Amebis
|
||||
/*
|
||||
Copyright 2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../include/version.h"
|
||||
#include "dbsource.h"
|
||||
#include "parse.h"
|
||||
|
||||
#include <wxex/common.h>
|
||||
#include <wxex/comutils.h>
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: WXWIDGETS_CODE_ANALYSIS_WARNINGS)
|
||||
#include <wx/app.h>
|
||||
#include <wx/cmdline.h>
|
||||
#include <wx/config.h>
|
||||
#include <wx/intl.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
#include <zrcola/idrec.h>
|
||||
|
||||
#include <WinStd/Common.h>
|
||||
|
||||
#include <initguid.h> // GUID helper to prevent LNK2001 errors (unresolved external symbol IID_IADO...)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4091)
|
||||
#include <adoint.h>
|
||||
#include <adoid.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
#include <process.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <codecvt>
|
||||
#include <cwctype>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
20
ZRColaCompile/stdafx.cpp
Normal file
20
ZRColaCompile/stdafx.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
56
ZRColaCompile/stdafx.h
Normal file
56
ZRColaCompile/stdafx.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../include/version.h"
|
||||
#include "dbsource.h"
|
||||
#include "parse.h"
|
||||
|
||||
#include <wx/app.h>
|
||||
#include <wx/cmdline.h>
|
||||
#include <wx/config.h>
|
||||
#include <wx/intl.h>
|
||||
|
||||
#include <wxex/common.h>
|
||||
#include <wxex/comutils.h>
|
||||
|
||||
#include <stdex/idrec.h>
|
||||
|
||||
#include <WinStd/Common.h>
|
||||
|
||||
#include <initguid.h> // GUID helper to prevent LNK2001 errors (unresolved external symbol IID_IADO...)
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4091)
|
||||
#include <adoint.h>
|
||||
#include <adoid.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
#include <process.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <codecvt>
|
||||
#include <cwctype>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
46
ZRColaInstall/ZRColaInstall.props
Normal file
46
ZRColaInstall/ZRColaInstall.props
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="..\include\$(Platform).props" />
|
||||
<Import Project="..\include\$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<OutDir>..\output\$(Platform).$(Configuration)\</OutDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<CompileAsManaged>false</CompileAsManaged>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<SmallerTypeCheck>false</SmallerTypeCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ZRColaInstall.rc" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Binary file not shown.
@@ -1,74 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<Language Condition="'$(Language)'==''">En</Language>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{5BD95B95-38B0-4C7D-9471-F99CA1203DF4}</ProjectGuid>
|
||||
<RootNamespace>ZRColaInstall$(Language)</RootNamespace>
|
||||
<ProjectName>ZRColaInstall$(Language)</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)'=='Debug'">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)'=='Release'">
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\include\$(Platform).props" />
|
||||
<Import Project="..\include\$(Configuration).props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<IntDir>temp\$(ProjectName).$(Platform).$(Configuration)\</IntDir>
|
||||
<OutDir>..\output\$(Platform).$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>ZRCOLA_INSTALL_LANG="$(Language)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="pch.cpp">
|
||||
<PrecompiledHeader>Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pch.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ZRColaInstall.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets" />
|
||||
</Project>
|
||||
59
ZRColaInstall/ZRColaInstallDe.vcxproj
Normal file
59
ZRColaInstall/ZRColaInstallDe.vcxproj
Normal file
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{620D6AC0-C8FF-4185-B820-DB1503ACB95C}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>ZRColaInstallDe</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="ZRColaInstall.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="ZRColaInstall.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>ZRCOLA_INSTALL_LANG="De";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>ZRCOLA_INSTALL_LANG="De";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -15,7 +15,7 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="pch.cpp">
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
@@ -23,7 +23,7 @@
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="pch.h">
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
59
ZRColaInstall/ZRColaInstallEn.vcxproj
Normal file
59
ZRColaInstall/ZRColaInstallEn.vcxproj
Normal file
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{5BD95B95-38B0-4C7D-9471-F99CA1203DF4}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>ZRColaInstallEn</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="ZRColaInstall.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="ZRColaInstall.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>ZRCOLA_INSTALL_LANG="En";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>ZRCOLA_INSTALL_LANG="En";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
35
ZRColaInstall/ZRColaInstallEn.vcxproj.filters
Normal file
35
ZRColaInstall/ZRColaInstallEn.vcxproj.filters
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ZRColaInstall.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
59
ZRColaInstall/ZRColaInstallRu.vcxproj
Normal file
59
ZRColaInstall/ZRColaInstallRu.vcxproj
Normal file
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{2551B561-5E5B-497E-AE01-11519F91EF19}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>ZRColaInstallRu</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="ZRColaInstall.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="ZRColaInstall.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>ZRCOLA_INSTALL_LANG="Ru";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>ZRCOLA_INSTALL_LANG="Ru";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
35
ZRColaInstall/ZRColaInstallRu.vcxproj.filters
Normal file
35
ZRColaInstall/ZRColaInstallRu.vcxproj.filters
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ZRColaInstall.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
59
ZRColaInstall/ZRColaInstallSl.vcxproj
Normal file
59
ZRColaInstall/ZRColaInstallSl.vcxproj
Normal file
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{0C2C89C2-C96B-41B6-AA99-7E7741E20F3A}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>ZRColaInstallSl</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="ZRColaInstall.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="ZRColaInstall.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>ZRCOLA_INSTALL_LANG="Sl";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>ZRCOLA_INSTALL_LANG="Sl";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
35
ZRColaInstall/ZRColaInstallSl.vcxproj.filters
Normal file
35
ZRColaInstall/ZRColaInstallSl.vcxproj.filters
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ZRColaInstall.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,62 +1,64 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
///
|
||||
/// Main function
|
||||
///
|
||||
int CALLBACK WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nCmdShow)
|
||||
extern "C" void WinMainCRTStartup()
|
||||
{
|
||||
UNREFERENCED_PARAMETER(hInstance);
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
UNREFERENCED_PARAMETER(nCmdShow);
|
||||
// Load "KERNEL32.DLL".
|
||||
HMODULE hKernel32 = LoadLibrary(TEXT("KERNEL32.DLL"));
|
||||
if (!hKernel32)
|
||||
ExitProcess(1);
|
||||
|
||||
TCHAR szArchProc[MAX_PATH];
|
||||
if (!GetEnvironmentVariable(TEXT("PROCESSOR_ARCHITECTURE"), szArchProc, _countof(szArchProc)))
|
||||
szArchProc[0] = 0;
|
||||
szArchProc[_countof(szArchProc) - 1] = 0;
|
||||
// Get IsWow64Process() address.
|
||||
BOOL (WINAPI *_IsWow64Process)(__in HANDLE hProcess, __out PBOOL Wow64Process) = (BOOL(WINAPI*)(__in HANDLE, __out PBOOL))::GetProcAddress(hKernel32, "IsWow64Process");
|
||||
|
||||
TCHAR szArchWin[MAX_PATH];
|
||||
if (!GetEnvironmentVariable(TEXT("PROCESSOR_ARCHITEW6432"), szArchWin, _countof(szArchWin)))
|
||||
szArchWin[0] = 0;
|
||||
szArchWin[_countof(szArchWin) - 1] = 0;
|
||||
|
||||
// If PROCESSOR_ARCHITEW6432 is defined, this is a Windows-on-Windows
|
||||
// guest of some kind. szArchWin is the host's architecture and szArchProc
|
||||
// is the current process' architecture.
|
||||
|
||||
// If PROCESSOR_ARCHITEW6432 is not defined, then PROCESSOR_ARCHITECTURE
|
||||
// is both the process and OS architecture.
|
||||
if (szArchWin[0] == 0)
|
||||
memcpy_s(szArchWin, sizeof(szArchWin), szArchProc, sizeof(szArchProc));
|
||||
|
||||
// If PROCESSOR_ARCHITECTURE is not defined, then either we're running on
|
||||
// Windows 9x or something is messing with the environment. Make the
|
||||
// Windows 9x assumption.
|
||||
if (szArchProc[0] == 0) {
|
||||
memcpy_s(szArchProc, sizeof(szArchProc), TEXT("x86"), sizeof(TEXT("x86")));
|
||||
memcpy_s(szArchWin , sizeof(szArchWin ), TEXT("x86"), sizeof(TEXT("x86")));
|
||||
BOOL bIs64Bit;
|
||||
#ifndef _WIN64
|
||||
// Determine if this is a 32-bit process under Windows-over-Windows64.
|
||||
if (_IsWow64Process) {
|
||||
// See what IsWow64Process() says.
|
||||
if (!_IsWow64Process(::GetCurrentProcess(), &bIs64Bit)) {
|
||||
// IsWow64Process() returned an error. Assume not 64-bit Windows.
|
||||
bIs64Bit = FALSE;
|
||||
}
|
||||
} else {
|
||||
// This platform does not have IsWow64Process(). Therefore, this is definitely not 64-bit Windows.
|
||||
bIs64Bit = FALSE;
|
||||
}
|
||||
#else
|
||||
// This is a running 64-bit process. The Windows must be 64 bit then.
|
||||
bIs64Bit = TRUE;
|
||||
#endif
|
||||
|
||||
LPCTSTR pszPlatSuffix;
|
||||
if (_tcsicmp(szArchWin, TEXT("amd64")) == 0)
|
||||
pszPlatSuffix = TEXT("-amd64");
|
||||
else if (_tcsicmp(szArchWin, TEXT("arm64")) == 0)
|
||||
pszPlatSuffix = TEXT("-arm64");
|
||||
else
|
||||
pszPlatSuffix = TEXT("-x86");
|
||||
FreeLibrary(hKernel32);
|
||||
|
||||
// Get temporary folder path.
|
||||
static const LPTSTR pszTempFolderDefault = TEXT("");
|
||||
LPTSTR pszTempFolder;
|
||||
DWORD dwLength;
|
||||
if ((dwLength = GetEnvironmentVariable(TEXT("TEMP"), NULL, 0)) != 0 &&
|
||||
(pszTempFolder = (LPTSTR)LocalAlloc(LMEM_FIXED, (dwLength + 2)*sizeof(TCHAR))) != NULL) // +1 for trailing backslash when missing, +1 for zero terminator
|
||||
(pszTempFolder = (LPTSTR)LocalAlloc(LMEM_FIXED, (dwLength + 1)*sizeof(TCHAR))) != NULL) // +1 is for trailing backslash when missing!
|
||||
{
|
||||
dwLength = ::GetEnvironmentVariable(TEXT("TEMP"), pszTempFolder, dwLength);
|
||||
|
||||
@@ -72,12 +74,12 @@ int CALLBACK WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
|
||||
LPTSTR pszParams;
|
||||
DWORD_PTR aArgs[] = {
|
||||
(DWORD_PTR)TEXT(ZRCOLA_INSTALL_LANG),
|
||||
(DWORD_PTR)pszPlatSuffix,
|
||||
(DWORD_PTR)(bIs64Bit ? TEXT("64") : TEXT("32")),
|
||||
(DWORD_PTR)pszTempFolder,
|
||||
};
|
||||
FormatMessage(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_ARGUMENT_ARRAY | FORMAT_MESSAGE_FROM_STRING,
|
||||
TEXT("/i \"https://prenos.amebis.si/ZRCola/_latest/ZRCola%1%2.msi\" /l* \"%3ZRCola%1%2.log\""),
|
||||
TEXT("/i \"http://www.amebis.si/prenos/ZRCola/_latest/ZRCola%1%2.msi\" /l* \"%3ZRCola%1%2.log\""),
|
||||
0,
|
||||
0,
|
||||
(LPTSTR)&pszParams,
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
*/
|
||||
|
||||
#include "pch.h"
|
||||
@@ -1,9 +0,0 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2015-2022 Amebis
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Windows.h>
|
||||
#include <tchar.h>
|
||||
20
ZRColaInstall/stdafx.cpp
Normal file
20
ZRColaInstall/stdafx.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "stdafx.h"
|
||||
22
ZRColaInstall/stdafx.h
Normal file
22
ZRColaInstall/stdafx.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
Copyright 2015-2018 Amebis
|
||||
|
||||
This file is part of ZRCola.
|
||||
|
||||
ZRCola 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ZRCola 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 ZRCola. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Windows.h>
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29728.190
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28010.2016
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{A7D28E0C-BB96-444D-AAB0-F22A6483FE5F}"
|
||||
EndProject
|
||||
@@ -14,38 +14,70 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZRColaCompile", "ZRColaCompile\ZRColaCompile.vcxproj", "{87A3ADEC-1BE4-42E4-92B8-B742F3D21BC4}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxExtend", "lib\wxExtend\build\wxExtendLib.vcxproj", "{D3E29951-D9F5-486D-A167-20AE8E90B1FA}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wxExtend", "lib\wxExtend\build\wxExtendLib-15.0.vcxproj", "{D3E29951-D9F5-486D-A167-20AE8E90B1FA}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stdex", "lib\stdex\build\stdex-15.0.vcxproj", "{518777CC-0A59-4415-A12A-82751ED75343}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libZRColaUI", "lib\libZRColaUI\build\libZRColaUI.vcxproj", "{C0A84BD2-3870-4CD6-B281-0AB322E3C579}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZRColaInstall", "ZRColaInstall\ZRColaInstall.vcxproj", "{5BD95B95-38B0-4C7D-9471-F99CA1203DF4}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ZRColaInstall", "ZRColaInstall", "{7F5D45A3-B3D2-4B1D-B258-9B83395786E6}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZRColaInstallSl", "ZRColaInstall\ZRColaInstallSl.vcxproj", "{0C2C89C2-C96B-41B6-AA99-7E7741E20F3A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZRColaInstallDe", "ZRColaInstall\ZRColaInstallDe.vcxproj", "{620D6AC0-C8FF-4185-B820-DB1503ACB95C}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZRColaInstallEn", "ZRColaInstall\ZRColaInstallEn.vcxproj", "{5BD95B95-38B0-4C7D-9471-F99CA1203DF4}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZRColaInstallRu", "ZRColaInstall\ZRColaInstallRu.vcxproj", "{2551B561-5E5B-497E-AE01-11519F91EF19}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinStd", "lib\WinStd\build\WinStd-15.0.vcxproj", "{47399D91-7EB9-41DE-B521-514BA5DB0C43}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Release|Win32.Build.0 = Release|Win32
|
||||
{87A3ADEC-1BE4-42E4-92B8-B742F3D21BC4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{87A3ADEC-1BE4-42E4-92B8-B742F3D21BC4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{87A3ADEC-1BE4-42E4-92B8-B742F3D21BC4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{87A3ADEC-1BE4-42E4-92B8-B742F3D21BC4}.Release|Win32.Build.0 = Release|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Release|Win32.Build.0 = Release|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Release|Win32.Build.0 = Release|Win32
|
||||
{5BD95B95-38B0-4C7D-9471-F99CA1203DF4}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{5BD95B95-38B0-4C7D-9471-F99CA1203DF4}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5BD95B95-38B0-4C7D-9471-F99CA1203DF4}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5BD95B95-38B0-4C7D-9471-F99CA1203DF4}.Release|Win32.Build.0 = Release|Win32
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Debug|x86.Build.0 = Debug|Win32
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Release|x86.ActiveCfg = Release|Win32
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8}.Release|x86.Build.0 = Release|Win32
|
||||
{87A3ADEC-1BE4-42E4-92B8-B742F3D21BC4}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{87A3ADEC-1BE4-42E4-92B8-B742F3D21BC4}.Debug|x86.Build.0 = Debug|Win32
|
||||
{87A3ADEC-1BE4-42E4-92B8-B742F3D21BC4}.Release|x86.ActiveCfg = Release|Win32
|
||||
{87A3ADEC-1BE4-42E4-92B8-B742F3D21BC4}.Release|x86.Build.0 = Release|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Debug|x86.Build.0 = Debug|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Release|x86.ActiveCfg = Release|Win32
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA}.Release|x86.Build.0 = Release|Win32
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Debug|x86.Build.0 = Debug|Win32
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Release|x86.ActiveCfg = Release|Win32
|
||||
{518777CC-0A59-4415-A12A-82751ED75343}.Release|x86.Build.0 = Release|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Debug|x86.Build.0 = Debug|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Release|x86.ActiveCfg = Release|Win32
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579}.Release|x86.Build.0 = Release|Win32
|
||||
{0C2C89C2-C96B-41B6-AA99-7E7741E20F3A}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{0C2C89C2-C96B-41B6-AA99-7E7741E20F3A}.Debug|x86.Build.0 = Debug|Win32
|
||||
{0C2C89C2-C96B-41B6-AA99-7E7741E20F3A}.Release|x86.ActiveCfg = Release|Win32
|
||||
{0C2C89C2-C96B-41B6-AA99-7E7741E20F3A}.Release|x86.Build.0 = Release|Win32
|
||||
{620D6AC0-C8FF-4185-B820-DB1503ACB95C}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{620D6AC0-C8FF-4185-B820-DB1503ACB95C}.Debug|x86.Build.0 = Debug|Win32
|
||||
{620D6AC0-C8FF-4185-B820-DB1503ACB95C}.Release|x86.ActiveCfg = Release|Win32
|
||||
{620D6AC0-C8FF-4185-B820-DB1503ACB95C}.Release|x86.Build.0 = Release|Win32
|
||||
{5BD95B95-38B0-4C7D-9471-F99CA1203DF4}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{5BD95B95-38B0-4C7D-9471-F99CA1203DF4}.Debug|x86.Build.0 = Debug|Win32
|
||||
{5BD95B95-38B0-4C7D-9471-F99CA1203DF4}.Release|x86.ActiveCfg = Release|Win32
|
||||
{5BD95B95-38B0-4C7D-9471-F99CA1203DF4}.Release|x86.Build.0 = Release|Win32
|
||||
{2551B561-5E5B-497E-AE01-11519F91EF19}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{2551B561-5E5B-497E-AE01-11519F91EF19}.Debug|x86.Build.0 = Debug|Win32
|
||||
{2551B561-5E5B-497E-AE01-11519F91EF19}.Release|x86.ActiveCfg = Release|Win32
|
||||
{2551B561-5E5B-497E-AE01-11519F91EF19}.Release|x86.Build.0 = Release|Win32
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|x86.Build.0 = Debug|Win32
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|x86.ActiveCfg = Release|Win32
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -53,7 +85,13 @@ Global
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{3C61929E-7289-4101-8D0A-DA22D6E1AEA8} = {A7D28E0C-BB96-444D-AAB0-F22A6483FE5F}
|
||||
{D3E29951-D9F5-486D-A167-20AE8E90B1FA} = {A7D28E0C-BB96-444D-AAB0-F22A6483FE5F}
|
||||
{518777CC-0A59-4415-A12A-82751ED75343} = {A7D28E0C-BB96-444D-AAB0-F22A6483FE5F}
|
||||
{C0A84BD2-3870-4CD6-B281-0AB322E3C579} = {A7D28E0C-BB96-444D-AAB0-F22A6483FE5F}
|
||||
{0C2C89C2-C96B-41B6-AA99-7E7741E20F3A} = {7F5D45A3-B3D2-4B1D-B258-9B83395786E6}
|
||||
{620D6AC0-C8FF-4185-B820-DB1503ACB95C} = {7F5D45A3-B3D2-4B1D-B258-9B83395786E6}
|
||||
{5BD95B95-38B0-4C7D-9471-F99CA1203DF4} = {7F5D45A3-B3D2-4B1D-B258-9B83395786E6}
|
||||
{2551B561-5E5B-497E-AE01-11519F91EF19} = {7F5D45A3-B3D2-4B1D-B258-9B83395786E6}
|
||||
{47399D91-7EB9-41DE-B521-514BA5DB0C43} = {A7D28E0C-BB96-444D-AAB0-F22A6483FE5F}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {22B0355E-423C-4ACC-81F8-DAD72A8BEC0E}
|
||||
|
||||
3
ZRColaWS/.gitignore
vendored
3
ZRColaWS/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
/*.d
|
||||
/*.o
|
||||
/zrcolaws
|
||||
@@ -1,91 +0,0 @@
|
||||
CPPFLAGS := $(CPPFLAGS) -I../lib/libZRCola/include -I../lib/stdex/include -I../lib/oatpp-swagger/src -I../lib/oatpp/src
|
||||
LDFLAGS := $(LDFLAGS) -L../lib/libZRCola/lib -L../lib/oatpp-swagger/build/src -L../lib/oatpp/build/src
|
||||
LDLIBS := $(LDLIBS) -lZRCola -loatpp-swagger -loatpp -lstdc++
|
||||
SRCS := zrcolaws.cpp
|
||||
|
||||
include ../include/props.mak
|
||||
|
||||
.PHONY: all
|
||||
all: zrcolaws
|
||||
|
||||
zrcolaws: \
|
||||
../lib/oatpp/build/src/liboatpp.a \
|
||||
../lib/oatpp-swagger/build/src/liboatpp-swagger.a \
|
||||
../lib/libZRCola/lib/libZRCola.a \
|
||||
$(OBJS)
|
||||
$(CC) $(LDFLAGS) $(OBJS) -o $@ $(LDLIBS)
|
||||
|
||||
../lib/oatpp/build/src/liboatpp.a: ../lib/oatpp/build/Makefile
|
||||
$(MAKE) $(MFLAGS) -C ../lib/oatpp/build
|
||||
|
||||
../lib/oatpp/build/Makefile: ../lib/oatpp/CMakeLists.txt
|
||||
cmake -D OATPP_INSTALL=OFF -D OATPP_BUILD_TESTS=OFF -D OATPP_LINK_TEST_LIBRARY=OFF -S ../lib/oatpp -B ../lib/oatpp/build
|
||||
|
||||
../lib/oatpp-swagger/build/src/liboatpp-swagger.a: ../lib/oatpp-swagger/build/Makefile
|
||||
$(MAKE) $(MFLAGS) -C ../lib/oatpp-swagger/build
|
||||
|
||||
../lib/oatpp-swagger/build/Makefile: ../lib/oatpp-swagger/CMakeLists.txt
|
||||
cmake -D OATPP_INSTALL=OFF -D OATPP_BUILD_TESTS=OFF -D OATPP_MODULES_LOCATION=CUSTOM -D OATPP_DIR_SRC=${CURDIR}/../lib/oatpp/src -D OATPP_DIR_LIB=${CURDIR}/../lib/oatpp/build/src -S ../lib/oatpp-swagger -B ../lib/oatpp-swagger/build
|
||||
|
||||
../lib/libZRCola/lib/libZRCola.a:
|
||||
$(MAKE) $(MFLAGS) -C ../lib/libZRCola/build
|
||||
|
||||
.PHONY: install
|
||||
install: zrcolaws ../output/data/ZRCola.zrcdb
|
||||
install -d $(PREFIX)/bin/
|
||||
install -m 755 zrcolaws $(PREFIX)/bin/
|
||||
install -d $(PREFIX)/share/zrcola/
|
||||
install -m 644 ../output/data/ZRCola.zrcdb $(PREFIX)/share/zrcola/
|
||||
install -d $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/favicon-16x16.png $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/favicon-32x32.png $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/index.html $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/oauth2-redirect.html $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-bundle.js $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-bundle.js.map $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-es-bundle-core.js $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-es-bundle-core.js.map $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-es-bundle.js $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-es-bundle.js.map $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-standalone-preset.js $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/swagger-ui-standalone-preset.js.map $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/swagger-ui.css $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/swagger-ui.css.map $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/swagger-ui.js $(PREFIX)/share/zrcola/res/
|
||||
install -m 644 ../lib/oatpp-swagger/res/swagger-ui.js.map $(PREFIX)/share/zrcola/res/
|
||||
install -d $(PREFIX)/etc/sysconfig/
|
||||
{ echo '#!/bin/sh'; \
|
||||
echo ''; \
|
||||
echo '# Interface to listen on. Default: localhost'; \
|
||||
echo '#HOST=0.0.0.0'; \
|
||||
echo ''; \
|
||||
echo '# Port to listen on. Default: 54591'; \
|
||||
echo '#PORT=54591'; \
|
||||
echo ''; \
|
||||
echo '# Additional zrcolaws command line options'; \
|
||||
echo '#OPTIONS=-4'; \
|
||||
} > $(PREFIX)/etc/sysconfig/zrcolaws
|
||||
install -d $(PREFIX)/lib/systemd/system/
|
||||
{ echo '[Unit]'; \
|
||||
echo 'Description=ZRCola Web Service'; \
|
||||
echo 'After=network.target'; \
|
||||
echo ''; \
|
||||
echo '[Service]'; \
|
||||
echo 'Environment="HOST=localhost" "PORT=54591"'; \
|
||||
echo 'EnvironmentFile=-$(PREFIX)/etc/sysconfig/zrcolaws'; \
|
||||
echo 'DynamicUser=yes'; \
|
||||
echo 'ExecStart=/usr/local/bin/zrcolaws --host $$HOST --port $$PORT $$OPTIONS'; \
|
||||
echo 'Type=exec'; \
|
||||
echo 'Restart=always'; \
|
||||
echo ''; \
|
||||
echo '[Install]'; \
|
||||
echo 'WantedBy=multi-user.target'; \
|
||||
echo 'RequiredBy=network.target'; \
|
||||
} > $(PREFIX)/lib/systemd/system/zrcolaws.service
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-rm -r *.{d,o} zrcolaws
|
||||
|
||||
include ../include/targets.mak
|
||||
-include $(DEPS)
|
||||
@@ -1,23 +0,0 @@
|
||||
# ZRCola Web Service
|
||||
|
||||
## Building and Installation
|
||||
|
||||
1. Install prerequisites: `sudo dnf install git cmake gcc gcc-c++ make libatomic`
|
||||
|
||||
2. Clone this Git repository: `git clone --recursive https://git.amebis.si/Amebis/ZRCola.git`
|
||||
|
||||
3. Build ZRColaWS: `make -C ZRCola/ZRColaWS`
|
||||
|
||||
4. Install ZRColaWS: `sudo make -C ZRCola/ZRColaWS install`
|
||||
|
||||
5. Configure ZRColaWS by editing _/usr/local/etc/sysconfig/zrcolaws_
|
||||
|
||||
6. Start ZRColaWS: `sudo systemctl start zrcolaws.service`
|
||||
|
||||
7. Configure ZRColaWS for auto-start: `sudo systemctl enable zrcolaws.service`
|
||||
|
||||
8. Remember to open webservice port in firewall, should the service require external access.
|
||||
|
||||
## Usage
|
||||
|
||||
Web service API documentation is available at _http://host:port/swagger/ui_.
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2022 Amebis
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../include/version.h"
|
||||
#include "controller.hpp"
|
||||
#include <oatpp-swagger/Model.hpp>
|
||||
#include <oatpp-swagger/Resources.hpp>
|
||||
#include <oatpp/core/base/CommandLineArguments.hpp>
|
||||
#include <oatpp/core/macro/component.hpp>
|
||||
#include <oatpp/network/Server.hpp>
|
||||
#include <oatpp/network/tcp/server/ConnectionProvider.hpp>
|
||||
#include <oatpp/parser/json/mapping/ObjectMapper.hpp>
|
||||
#include <oatpp/web/server/HttpConnectionHandler.hpp>
|
||||
|
||||
class AppComponent
|
||||
{
|
||||
protected:
|
||||
oatpp::network::Address m_address;
|
||||
|
||||
public:
|
||||
AppComponent(const oatpp::network::Address& address) : m_address(address) {}
|
||||
|
||||
OATPP_CREATE_COMPONENT(std::shared_ptr<oatpp::network::ServerConnectionProvider>, serverConnectionProvider)([this] {
|
||||
return oatpp::network::tcp::server::ConnectionProvider::createShared({m_address.host, m_address.port, m_address.family});
|
||||
}());
|
||||
|
||||
OATPP_CREATE_COMPONENT(std::shared_ptr<oatpp::web::server::HttpRouter>, httpRouter)([] {
|
||||
return oatpp::web::server::HttpRouter::createShared();
|
||||
}());
|
||||
|
||||
OATPP_CREATE_COMPONENT(std::shared_ptr<oatpp::network::ConnectionHandler>, serverConnectionHandler)([] {
|
||||
OATPP_COMPONENT(std::shared_ptr<oatpp::web::server::HttpRouter>, router);
|
||||
return oatpp::web::server::HttpConnectionHandler::createShared(router);
|
||||
}());
|
||||
|
||||
OATPP_CREATE_COMPONENT(std::shared_ptr<oatpp::data::mapping::ObjectMapper>, apiObjectMapper)([] {
|
||||
auto serializerConfig = oatpp::parser::json::mapping::Serializer::Config::createShared();
|
||||
serializerConfig->escapeFlags &= ~oatpp::parser::json::Utils::FLAG_ESCAPE_UTF8CHAR;
|
||||
return oatpp::parser::json::mapping::ObjectMapper::createShared(
|
||||
serializerConfig,
|
||||
oatpp::parser::json::mapping::Deserializer::Config::createShared());
|
||||
}());
|
||||
|
||||
OATPP_CREATE_COMPONENT(std::shared_ptr<oatpp::network::Server>, server)([] {
|
||||
OATPP_COMPONENT(std::shared_ptr<oatpp::network::ServerConnectionProvider>, connectionProvider);
|
||||
OATPP_COMPONENT(std::shared_ptr<oatpp::network::ConnectionHandler>, connectionHandler);
|
||||
return oatpp::network::Server::createShared(connectionProvider, connectionHandler);
|
||||
}());
|
||||
|
||||
OATPP_CREATE_COMPONENT(std::shared_ptr<oatpp::swagger::DocumentInfo>, swaggerDocumentInfo)([] {
|
||||
oatpp::swagger::DocumentInfo::Builder builder;
|
||||
builder
|
||||
.setTitle("ZRCola Web Service")
|
||||
.setDescription(
|
||||
"ZRCola is an input system designed mainly, although not exclusively, for linguistic use. "
|
||||
"It allows the user to combine basic letters with any diacritic marks and insert the resulting complex characters into the texts with ease.")
|
||||
.setVersion(PRODUCT_VERSION_STR)
|
||||
.setContactName("ZRCola")
|
||||
.setContactUrl("https://zrcola.zrc-sazu.si/en/")
|
||||
|
||||
.setLicenseName("GNU General Public License, Version 3")
|
||||
.setLicenseUrl("https://www.gnu.org/licenses/gpl-3.0.en.html");
|
||||
return builder.build();
|
||||
}());
|
||||
|
||||
OATPP_CREATE_COMPONENT(std::shared_ptr<oatpp::swagger::Resources>, swaggerResources)([] {
|
||||
return oatpp::swagger::Resources::loadResources(PREFIX "/share/zrcola/res");
|
||||
}());
|
||||
};
|
||||
@@ -1,243 +0,0 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2022 Amebis
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../include/version.h"
|
||||
#include "dto.hpp"
|
||||
#include "iconverter.hpp"
|
||||
#include "zrcolaws.hpp"
|
||||
#include <zrcola/translate.h>
|
||||
#include <oatpp/core/macro/codegen.hpp>
|
||||
#include <oatpp/core/macro/component.hpp>
|
||||
#include <oatpp/web/server/api/ApiController.hpp>
|
||||
|
||||
#include OATPP_CODEGEN_BEGIN(ApiController)
|
||||
|
||||
class Controller : public oatpp::web::server::api::ApiController
|
||||
{
|
||||
public:
|
||||
Controller(const std::shared_ptr<oatpp::data::mapping::ObjectMapper>& defaultObjectMapper, const oatpp::String &routerPrefix = nullptr) :
|
||||
oatpp::web::server::api::ApiController(defaultObjectMapper, routerPrefix)
|
||||
{}
|
||||
|
||||
ADD_CORS(getAbout)
|
||||
ENDPOINT_INFO(getAbout) {
|
||||
info->summary = "Returns service information";
|
||||
info->addResponse<Object<dto::About>>(Status::CODE_200, "application/json");
|
||||
}
|
||||
ENDPOINT("GET", "/about", getAbout)
|
||||
{
|
||||
auto dto = dto::About::createShared();
|
||||
dto->vendor = PRODUCT_CFG_VENDOR;
|
||||
dto->application = PRODUCT_CFG_APPLICATION;
|
||||
dto->version = PRODUCT_VERSION_STR;
|
||||
return createDtoResponse(Status::CODE_200, dto);
|
||||
}
|
||||
|
||||
ADD_CORS(getTranset)
|
||||
ENDPOINT_INFO(getTranset) {
|
||||
info->summary = "Lists supported translation sets";
|
||||
info->description = "Each translation set describes a set of replacements that are performed to translate text from one script or encoding to another. ";
|
||||
info->addResponse<oatpp::Vector<oatpp::Object<dto::TranSet>>>(Status::CODE_200, "application/json");
|
||||
}
|
||||
ENDPOINT("GET", "/transet", getTranset)
|
||||
{
|
||||
try {
|
||||
utf16toutf8 c;
|
||||
auto result = oatpp::Vector<oatpp::Object<dto::TranSet>>::createShared();
|
||||
auto dto = dto::TranSet::createShared();
|
||||
dto->set = ZRCOLA_TRANSETID_DEFAULT;
|
||||
dto->src = "ZRCola Decomposed";
|
||||
dto->dst = "ZRCola Composed";
|
||||
result->push_back(dto);
|
||||
for (size_t i = 0, n = ts_db.idxTranSet.size(); i < n; i++) {
|
||||
const auto &ts = ts_db.idxTranSet[i];
|
||||
dto = dto::TranSet::createShared();
|
||||
dto->set = ts.set;
|
||||
dto->src = c.convert(ts.src(), ts.src_len());
|
||||
dto->dst = c.convert(ts.dst(), ts.dst_len());
|
||||
result->push_back(dto);
|
||||
}
|
||||
dto = dto::TranSet::createShared();
|
||||
dto->set = ZRCOLA_TRANSETID_UNICODE;
|
||||
dto->src = "ZRCola Decomposed";
|
||||
dto->dst = "Unicode";
|
||||
result->push_back(dto);
|
||||
return createDtoResponse(Status::CODE_200, result);
|
||||
} catch (std::exception &ex) {
|
||||
OATPP_LOGE(__FUNCTION__, "%s: %s", typeid(ex).name(), ex.what());
|
||||
return ResponseFactory::createResponse(Status::CODE_500, ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
ADD_CORS(getLanguage)
|
||||
ENDPOINT_INFO(getLanguage) {
|
||||
info->summary = "Lists supported languages";
|
||||
info->description = "Each language describes a set of special characters that are specific to that language (e.g. č, š, ž in Slovenian, or ä, ö, ü in German).";
|
||||
info->addResponse<oatpp::Vector<oatpp::Object<dto::Language>>>(Status::CODE_200, "application/json");
|
||||
}
|
||||
ENDPOINT("GET", "/language", getLanguage)
|
||||
{
|
||||
try {
|
||||
utf16toutf8 c;
|
||||
auto result = oatpp::Vector<oatpp::Object<dto::Language>>::createShared();
|
||||
for (size_t i = 0, n = lang_db.idxLang.size(); i < n; i++) {
|
||||
const auto &lang = lang_db.idxLang[i];
|
||||
auto dto = dto::Language::createShared();
|
||||
dto->lang = std::string(&lang.lang.data[0], strnlen(lang.lang.data, std::size(lang.lang.data)));
|
||||
dto->name = c.convert(lang.name(), lang.name_len());
|
||||
result->push_back(dto);
|
||||
}
|
||||
return createDtoResponse(Status::CODE_200, result);
|
||||
} catch (std::exception &ex) {
|
||||
OATPP_LOGE(__FUNCTION__, "%s: %s", typeid(ex).name(), ex.what());
|
||||
return ResponseFactory::createResponse(Status::CODE_500, ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
ADD_CORS(postTranslate)
|
||||
ENDPOINT_INFO(postTranslate) {
|
||||
info->summary = "Translate text";
|
||||
info->description =
|
||||
"Performs any number of supported translations (see /transet) on a given input text in a sequence. "
|
||||
"Together with the output text, it also returns character index mapping between input and output texts.";
|
||||
auto transet = oatpp::Vector<UInt16>::createShared();
|
||||
transet->push_back(ZRCOLA_TRANSETID_DEFAULT);
|
||||
auto dto = dto::TranslateIn::createShared();
|
||||
dto->transet = transet;
|
||||
dto->text = "To je test.";
|
||||
info->addConsumes<Object<dto::TranslateIn>>("application/json")
|
||||
.addExample("Perform ZRCola composition", dto);
|
||||
info->addResponse<Object<dto::TranslateOut>>(Status::CODE_200, "application/json");
|
||||
}
|
||||
ENDPOINT("POST", "/translate", postTranslate, BODY_DTO(Object<dto::TranslateIn>, input))
|
||||
{
|
||||
try {
|
||||
utf8toutf16 cIn;
|
||||
std::u16string dst, dst2;
|
||||
if (input->text)
|
||||
dst = cIn.convert(*input->text);
|
||||
size_t src_len = dst.size();
|
||||
std::vector<ZRCola::mapping_vector> mapping;
|
||||
if (input->transet) {
|
||||
ZRCola::mapping_vector map;
|
||||
const auto ts_end = input->transet->cend();
|
||||
for (auto ts = input->transet->cbegin(); ts != ts_end; ++ts) {
|
||||
switch (*ts) {
|
||||
case ZRCOLA_TRANSETID_DEFAULT:
|
||||
case ZRCOLA_TRANSETID_UNICODE:
|
||||
// Decompose first, then re-compose.
|
||||
t_db.TranslateInv(*ts, dst.data(), dst.size(), dst2, &map);
|
||||
mapping.push_back(std::move(map));
|
||||
map.clear();
|
||||
t_db.Translate(*ts, dst2.data(), dst2.size(), dst, &map);
|
||||
mapping.push_back(std::move(map));
|
||||
map.clear();
|
||||
break;
|
||||
|
||||
default:
|
||||
t_db.Translate(*ts, dst.data(), dst.size(), dst2, &map);
|
||||
mapping.push_back(std::move(map));
|
||||
map.clear();
|
||||
dst = std::move(dst2);
|
||||
dst2.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
utf16toutf8 cOut;
|
||||
auto dto = dto::TranslateOut::createShared();
|
||||
dto->text = cOut.convert(dst);
|
||||
auto map = oatpp::Vector<oatpp::UInt32>::createShared();
|
||||
auto m_end = mapping.cend();
|
||||
for (size_t i = 0; i < src_len; ++i) {
|
||||
auto j = i;
|
||||
for (auto m = mapping.cbegin(); m != m_end; ++m)
|
||||
j = m->to_dst(j);
|
||||
map->push_back(j);
|
||||
}
|
||||
dto->map = map;
|
||||
return createDtoResponse(Status::CODE_200, dto);
|
||||
} catch (std::exception &ex) {
|
||||
OATPP_LOGE(__FUNCTION__, "%s: %s", typeid(ex).name(), ex.what());
|
||||
return ResponseFactory::createResponse(Status::CODE_500, ex.what());
|
||||
}
|
||||
}
|
||||
|
||||
ADD_CORS(postTranslateInv)
|
||||
ENDPOINT_INFO(postTranslateInv) {
|
||||
info->summary = "Inverse translate text";
|
||||
info->description =
|
||||
"Performs any number of supported translations (see /transet) on a given input text in a sequence in reverse. "
|
||||
"Together with the output text, it also returns character index mapping between input and output texts.";
|
||||
auto transet = oatpp::Vector<UInt16>::createShared();
|
||||
transet->push_back(ZRCOLA_TRANSETID_DEFAULT);
|
||||
auto dto = dto::TranslateIn::createShared();
|
||||
dto->transet = transet;
|
||||
dto->text = "T ťᵉⓢṭ.";
|
||||
dto->lang = "slv";
|
||||
info->addConsumes<Object<dto::TranslateIn>>("application/json")
|
||||
.addExample("Perform ZRCola decomposition", dto);
|
||||
info->addResponse<Object<dto::TranslateOut>>(Status::CODE_200, "application/json");
|
||||
}
|
||||
ENDPOINT("POST", "/translateInv", postTranslateInv, BODY_DTO(Object<dto::TranslateIn>, input))
|
||||
{
|
||||
try {
|
||||
utf8toutf16 cIn;
|
||||
std::u16string dst, dst2;
|
||||
ZRCola::langid_t lang;
|
||||
if (input->text)
|
||||
dst = cIn.convert(*input->text);
|
||||
lang = input->lang->c_str();
|
||||
size_t src_len = dst.size();
|
||||
std::vector<ZRCola::mapping_vector> mapping;
|
||||
if (input->transet) {
|
||||
ZRCola::mapping_vector map;
|
||||
const auto ts_begin = input->transet->cbegin();
|
||||
for (auto ts = input->transet->cend(); (ts--) != ts_begin; ) {
|
||||
switch (*ts) {
|
||||
case ZRCOLA_TRANSETID_DEFAULT:
|
||||
case ZRCOLA_TRANSETID_UNICODE:
|
||||
t_db.TranslateInv(*ts, dst.data(), dst.size(), &lc_db, lang, dst2, &map);
|
||||
dst = std::move(dst2);
|
||||
dst2.clear();
|
||||
map.invert();
|
||||
mapping.push_back(std::move(map));
|
||||
map.clear();
|
||||
break;
|
||||
|
||||
default:
|
||||
t_db.TranslateInv(*ts, dst.data(), dst.size(), dst2, &map);
|
||||
dst = std::move(dst2);
|
||||
dst2.clear();
|
||||
map.invert();
|
||||
mapping.push_back(std::move(map));
|
||||
map.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
utf16toutf8 cOut;
|
||||
auto dto = dto::TranslateOut::createShared();
|
||||
dto->text = cOut.convert(dst);
|
||||
auto map = oatpp::Vector<oatpp::UInt32>::createShared();
|
||||
auto m_end = mapping.crend();
|
||||
for (size_t i = 0; i < src_len; ++i) {
|
||||
auto j = i;
|
||||
for (auto m = mapping.crbegin(); m != m_end; ++m)
|
||||
j = m->to_src(j);
|
||||
map->push_back(j);
|
||||
}
|
||||
dto->map = map;
|
||||
return createDtoResponse(Status::CODE_200, dto);
|
||||
} catch (std::exception &ex) {
|
||||
OATPP_LOGE(__FUNCTION__, "%s: %s", typeid(ex).name(), ex.what());
|
||||
return ResponseFactory::createResponse(Status::CODE_500, ex.what());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#include OATPP_CODEGEN_END(ApiController)
|
||||
@@ -1,90 +0,0 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2022 Amebis
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <oatpp/core/data/mapping/type/Object.hpp>
|
||||
#include <oatpp/core/macro/codegen.hpp>
|
||||
#include <oatpp/core/Types.hpp>
|
||||
|
||||
#include OATPP_CODEGEN_BEGIN(DTO)
|
||||
|
||||
namespace dto {
|
||||
|
||||
class About : public oatpp::DTO
|
||||
{
|
||||
DTO_INIT(About, DTO)
|
||||
|
||||
DTO_FIELD_INFO(vendor) { info->description = "Application vendor"; }
|
||||
DTO_FIELD(String, vendor);
|
||||
|
||||
DTO_FIELD_INFO(application) { info->description = "Application name"; }
|
||||
DTO_FIELD(String, application);
|
||||
|
||||
DTO_FIELD_INFO(version) { info->description = "Application version"; }
|
||||
DTO_FIELD(String, version);
|
||||
};
|
||||
|
||||
class TranSet : public oatpp::DTO
|
||||
{
|
||||
DTO_INIT(TranSet, DTO)
|
||||
|
||||
DTO_FIELD_INFO(set) { info->description = "Translation set ID"; }
|
||||
DTO_FIELD(UInt16, set);
|
||||
|
||||
DTO_FIELD_INFO(src) { info->description = "Input transcript name in English"; }
|
||||
DTO_FIELD(String, src);
|
||||
|
||||
DTO_FIELD_INFO(dst) { info->description = "Output transcript name in English"; }
|
||||
DTO_FIELD(String, dst);
|
||||
};
|
||||
|
||||
class Language : public oatpp::DTO
|
||||
{
|
||||
DTO_INIT(Language, DTO)
|
||||
|
||||
DTO_FIELD_INFO(lang) { info->description = "Language ID"; }
|
||||
DTO_FIELD(String, lang);
|
||||
|
||||
DTO_FIELD_INFO(name) { info->description = "Language name in English"; }
|
||||
DTO_FIELD(String, name);
|
||||
};
|
||||
|
||||
class TranslateIn : public oatpp::DTO
|
||||
{
|
||||
DTO_INIT(TranslateIn, DTO)
|
||||
|
||||
DTO_FIELD_INFO(transet) {
|
||||
info->description = "Array of one or multiple translation set IDs to perform translation on the text. When inverse translating, the translation sets are read in reverse order listed in this array. Use /transet to get IDs of all supported translation sets.";
|
||||
info->required = true;
|
||||
}
|
||||
DTO_FIELD(Vector<UInt16>, transet);
|
||||
|
||||
DTO_FIELD_INFO(text) {
|
||||
info->description = "Text to be translated";
|
||||
info->required = true;
|
||||
}
|
||||
DTO_FIELD(String, text);
|
||||
|
||||
DTO_FIELD_INFO(lang) {
|
||||
info->description = "Language ID of the text to be translated. This is used on inverse translating to skip decomposing language-specific common characters (e.g. č, š, ž in Slovenian, or ä, ö, ü in German). Use /language to get IDs of all supported languages.";
|
||||
}
|
||||
DTO_FIELD(String, lang) = "slv";
|
||||
};
|
||||
|
||||
class TranslateOut : public oatpp::DTO
|
||||
{
|
||||
DTO_INIT(TranslateOut, DTO)
|
||||
|
||||
DTO_FIELD_INFO(text) { info->description = "Translated text"; }
|
||||
DTO_FIELD(String, text);
|
||||
|
||||
DTO_FIELD_INFO(map) { info->description = "Character index mapping between input and translated text. The map[i] value represents the index of the beginning of a character (in translated text) that translated from the character (in the input text) beginning at index i. All input indexes are measured in characters after input string is translated to UTF-16, and all output indexes are measured in characters before output string is translated from UTF-16."; }
|
||||
DTO_FIELD(Vector<UInt32>, map);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#include OATPP_CODEGEN_END(DTO)
|
||||
@@ -1,75 +0,0 @@
|
||||
/*
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
Copyright © 2022 Amebis
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdex/compat.hpp>
|
||||
#include <iconv.h>
|
||||
#include <cstring>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
inline static std::runtime_error errno_error(_In_z_ const char *file, _In_ int line, _In_z_ const char *func)
|
||||
{
|
||||
int _errno = errno;
|
||||
return std::runtime_error(
|
||||
std::string(file) + ":" + std::to_string(line) +
|
||||
std::string(func) + " error " + std::to_string(_errno) + ": " +
|
||||
std::strerror(_errno));
|
||||
}
|
||||
|
||||
template <typename T_from, typename T_to>
|
||||
class iconverter
|
||||
{
|
||||
public:
|
||||
iconverter(_In_z_ const char* from, _In_z_ const char* to)
|
||||
{
|
||||
m_handle = iconv_open(to, from);
|
||||
if (m_handle == (iconv_t)-1)
|
||||
throw errno_error(__FILE__, __LINE__, __FUNCTION__);
|
||||
}
|
||||
|
||||
~iconverter()
|
||||
{
|
||||
iconv_close(m_handle);
|
||||
}
|
||||
|
||||
std::basic_string<T_to> convert(_In_z_count_(count) const T_from* input, _In_ size_t count) const
|
||||
{
|
||||
T_to buf[0x100];
|
||||
std::basic_string<T_to> result;
|
||||
size_t inSize = sizeof(T_from) * count;
|
||||
do {
|
||||
T_to* output = &buf[0];
|
||||
size_t outSize = sizeof(buf);
|
||||
errno = 0;
|
||||
iconv(m_handle, (char**)&input, &inSize, (char**)&output, &outSize);
|
||||
if (errno)
|
||||
throw errno_error(__FILE__, __LINE__, __FUNCTION__);
|
||||
result.insert(result.end(), buf, (T_to*)((char*)buf + sizeof(buf) - outSize));
|
||||
} while (inSize);
|
||||
return result;
|
||||
}
|
||||
|
||||
std::basic_string<T_to> convert(_In_ const std::basic_string<T_from>& input)
|
||||
{
|
||||
return convert(input.c_str(), input.length());
|
||||
}
|
||||
|
||||
protected:
|
||||
iconv_t m_handle;
|
||||
};
|
||||
|
||||
class utf16toutf8 : public iconverter<char16_t, char>
|
||||
{
|
||||
public:
|
||||
utf16toutf8() : iconverter("UTF-16LE", "UTF-8") {}
|
||||
};
|
||||
|
||||
class utf8toutf16 : public iconverter<char, char16_t>
|
||||
{
|
||||
public:
|
||||
utf8toutf16() : iconverter("UTF-8", "UTF-16LE") {}
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user