From b1d839a3dd7a3c6ec752062290e2949e93a3b34e Mon Sep 17 00:00:00 2001 From: ferdinym Date: Mon, 2 Nov 2020 14:57:02 +0100 Subject: [PATCH] neovars: error-messages on missing unicode-support revised --- windows/neo-vars/src/initialize.ahk | 6 ++---- windows/neo-vars/tools/build-configure.ahk | 13 +++++++++++-- windows/neo-vars/tools/build-make.ahk | 13 ++++++++++--- windows/neo-vars/tools/compose-update.ahk | 12 ++++++++++-- 4 files changed, 33 insertions(+), 11 deletions(-) diff --git a/windows/neo-vars/src/initialize.ahk b/windows/neo-vars/src/initialize.ahk index 4f2c1417..8223d871 100644 --- a/windows/neo-vars/src/initialize.ahk +++ b/windows/neo-vars/src/initialize.ahk @@ -11,14 +11,12 @@ OnExit, exitprogram if (not A_IsUnicode) { MsgBox, 52, Fehlende Unicode-Unterstützung!, (LTrim - Das Skript benötigt die Unicode-Version von AutoHotkey, - wird aber von ANSI-AutoHotkey ausgeführt. + Das Skript benötigt die Unicode-Version von AutoHotkey + (AutoHotkey_L), wird aber von ANSI-AutoHotkey ausgeführt. Trotzdem fortfahren?`n ) IfMsgBox, No ExitApp - IfMsgBox, Yes - Suspend } ; Sync lock states diff --git a/windows/neo-vars/tools/build-configure.ahk b/windows/neo-vars/tools/build-configure.ahk index cbbb3e27..97813af1 100644 --- a/windows/neo-vars/tools/build-configure.ahk +++ b/windows/neo-vars/tools/build-configure.ahk @@ -3,6 +3,8 @@ ; Usage: ; When included in another script, the function "build_configure" is provided. ; When running as a standalone script, build_configuration is run with defaults. +; +; Requires AutoHotkey_L (Unicode-Version of AutoHotkey). #Include %A_LineFile%\..\script\logwindow.ahk #Include %A_LineFile%\..\script\util.ahk @@ -65,7 +67,6 @@ build_configure(srcDir:="", binDir:="", configDir:="", iniFile:="", buildInclude logError("Configuration file not found at '" . iniFile . "'") logFinal() } - logEntry("Read user-defined configuration...") for key, value in userConfigDefaults { IniRead, valueNew, %iniFile%, Global, %key% , %value% @@ -187,8 +188,16 @@ build_configure(srcDir:="", binDir:="", configDir:="", iniFile:="", buildInclude if (A_LineFile == A_ScriptFullPath) { - ; Run with defaults logInit("Build-configuration") + + ; Make sure AHK runs in Unicode version + if (not A_IsUnicode) + { + logError("Unicode support missing! Restart this script with the Unicode-version of AutoHotkey, e.g. through AutoHotkeyU32.exe or AutoHotkeyU64.exe.") + logFinal() + } + + ; Run with defaults build_configure(srcDir, binDir, iniFile, buildIncludeFile) logEntry("Build-configuration completed.") logFinal() diff --git a/windows/neo-vars/tools/build-make.ahk b/windows/neo-vars/tools/build-make.ahk index c98d786f..d8eed812 100644 --- a/windows/neo-vars/tools/build-make.ahk +++ b/windows/neo-vars/tools/build-make.ahk @@ -1,7 +1,7 @@ ; Build executable from sources ; ; Usage: -; Run as standalone script with AutoHotkey.exe. +; Run as standalone script in AutoHotkey_L (Unicode-Version). ; ; Compiles the neovars source-scripts in "..\src" into an executable ; by invoking the Ahk2Exe AutoHotkey compiler. @@ -10,14 +10,21 @@ ; created if it does not yet exist, and all existing revision-specific ; binaries will be removed from it unless a custom buildName is configured. -logInit("Build") - SetWorkingDir %A_ScriptDir% #Include %A_ScriptDir%\ #Include build-configure.ahk #Include script/logwindow.ahk #Include script/util.ahk +logInit("Build") + +; Make sure AHK runs in Unicode version +if (not A_IsUnicode) +{ + logError("Unicode support missing! Restart this script with the Unicode-version of AutoHotkey, e.g. through AutoHotkeyU32.exe or AutoHotkeyU64.exe.") + logFinal() +} + ; Paths srcDir := A_ScriptDir . "\..\src" resDir := A_ScriptDir . "\..\res" diff --git a/windows/neo-vars/tools/compose-update.ahk b/windows/neo-vars/tools/compose-update.ahk index 31375046..d2f331c5 100644 --- a/windows/neo-vars/tools/compose-update.ahk +++ b/windows/neo-vars/tools/compose-update.ahk @@ -1,7 +1,7 @@ ; Generate script with compose-definitions from XCompose files ; ; Usage: -; Run as standalone script with AutoHotkey.exe. +; Run as standalone script in AutoHotkey_L (Unicode-Version). ; ; Generates the AHK-source-script which sets up the available compose- ; sequences in the neovars driver. @@ -23,7 +23,6 @@ SetBatchLines, 100ms FileEncoding, UTF-8 -logInit("Compose-update") SetWorkingDir %A_ScriptDir% #Include %A_ScriptDir%\ #Include script/logwindow.ahk @@ -32,6 +31,15 @@ SetWorkingDir %A_ScriptDir% #include ../src/compose.ahk ; simulate neovars makeCompose process to find errors #include ../src/util.ahk +logInit("Compose-update") + +; Make sure AHK runs in Unicode version +if (not A_IsUnicode) +{ + logError("Unicode support missing! Restart this script with the Unicode-version of AutoHotkey, e.g. through AutoHotkeyU32.exe or AutoHotkeyU64.exe.") + logFinal() +} + ; Paths srcDir := A_ScriptDir . "\..\src" binDir := A_ScriptDir . "\..\bin"