[gimp/gimp-2-10] Installer: set compatibility options to run Python plugins in high-DPI-aware mode
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] Installer: set compatibility options to run Python plugins in high-DPI-aware mode
- Date: Mon, 21 May 2018 11:03:38 +0000 (UTC)
commit f74d1330aa656f2b8fa3102ad2948d610b871666
Author: Jernej Simončič <jernej|s-gitstuff eternallybored org>
Date: Sun May 20 22:45:25 2018 +0200
Installer: set compatibility options to run Python plugins in high-DPI-aware mode
(cherry picked from commit fd59ecf2c584dc0600a10c66038aab50aa02287b)
build/windows/installer/gimp3264.iss | 35 ++++++++++++++++++++++++---------
1 files changed, 25 insertions(+), 10 deletions(-)
---
diff --git a/build/windows/installer/gimp3264.iss b/build/windows/installer/gimp3264.iss
index 3e08a3b..012929b 100755
--- a/build/windows/installer/gimp3264.iss
+++ b/build/windows/installer/gimp3264.iss
@@ -582,15 +582,15 @@ begin
end;
-procedure PrepareGimpPath();
-var DefaultEnv,Env: String;
+procedure PrepareGimpEnvironment();
+var EnvFile,Env: String;
begin
StatusLabel(CustomMessage('SettingUpEnvironment'),'');
//set PATH to be used by plug-ins
- DefaultEnv := ExpandConstant('{app}\lib\gimp\2.0\environ\default.env');
- DebugMsg('PrepareGimpPath','Setting environment in ' + DefaultEnv);
+ EnvFile := ExpandConstant('{app}\lib\gimp\2.0\environ\default.env');
+ DebugMsg('PrepareGimpEnvironment','Setting environment in ' + EnvFile);
Env := #10'PATH=${gimp_installation_dir}\bin';
@@ -610,14 +610,29 @@ begin
end;
if IsComponentSelected('py') then
- Env := Env + 'PYTHONPATH=${gimp_installation_dir}\lib\gimp\2.0\python' + #10;
+ Env := Env +
'PYTHONPATH=${gimp_installation_dir}\lib\gimp\2.0\python;${gimp_plug_in_dir}\plug-ins\python-console' + #10;
- DebugMsg('PrepareGimpPath','Appending ' + Env);
+ DebugMsg('PrepareGimpEnvironment','Appending ' + Env);
- if not SaveStringToUTF8File(DefaultEnv,Env,True) then
+ if not SaveStringToUTF8File(EnvFile,Env,True) then
begin
- DebugMsg('PrepareGimpPath','Problem appending');
-
SuppressibleMsgBox(FmtMessage(CustomMessage('ErrorChangingEnviron'),[DefaultEnv]),mbInformation,mb_ok,IDOK);
+ DebugMsg('PrepareGimpEnvironment','Problem appending');
+
SuppressibleMsgBox(FmtMessage(CustomMessage('ErrorChangingEnviron'),[EnvFile]),mbInformation,mb_ok,IDOK);
+ end;
+
+ //workaround for high-DPI awareness of Python plug-ins
+ if IsComponentSelected('gimp32on64\py') or IsComponentSelected('py') then
+ begin
+ EnvFile := ExpandConstant('{app}\lib\gimp\2.0\environ\pygimp.env');
+ DebugMsg('PrepareGimpEnvironment','Setting environment in ' + EnvFile);
+
+ Env := '__COMPAT_LAYER=HIGHDPIAWARE' + #10
+
+ if not SaveStringToUTF8File(EnvFile,Env,True) then
+ begin
+ DebugMsg('PrepareGimpEnvironment','Problem appending');
+
SuppressibleMsgBox(FmtMessage(CustomMessage('ErrorChangingEnviron'),[EnvFile]),mbInformation,mb_ok,IDOK);
+ end;
end;
end;
@@ -1530,7 +1545,7 @@ begin
begin
Associations_Create();
PreparePyGimp();
- PrepareGimpPath();
+ PrepareGimpEnvironment();
//PrepareGimpRC();
end;
end;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]