Compare View

switch
from
...
to
 
Commits (7)
src/main/windows/tools.c
... ... @@ -35,8 +35,9 @@
35 35 return path;
36 36 }
37 37  
38   - g_free(path);
39 38 g_message("Cant find path for '%s'",path);
  39 + g_free(path);
  40 +
40 41 return NULL;
41 42  
42 43 }
... ...
src/objects/application/application.c
... ... @@ -278,9 +278,27 @@ static void pw3270Application_init(pw3270Application *app) {
278 278 g_settings_bind(app->settings, "ui-style", app, "ui-style", G_SETTINGS_BIND_DEFAULT);
279 279 }
280 280  
  281 + // Load plugin from default paths.
281 282 {
282   - lib3270_autoptr(char) plugin_path = lib3270_build_data_filename("plugins",NULL);
283   - pw3270_load_plugins_from_path(app, plugin_path);
  283 + const char *paths[] = {
  284 + "plugins",
  285 + G_STRINGIFY(PRODUCT_NAME) "-plugins",
  286 + "lib\\plugins",
  287 + "lib\\" G_STRINGIFY(PRODUCT_NAME) "-plugins",
  288 + };
  289 + size_t ix;
  290 +
  291 + g_autofree gchar * install = g_win32_get_package_installation_directory_of_module(NULL);
  292 +
  293 + for(ix = 0; ix < G_N_ELEMENTS(paths);ix++) {
  294 + g_autofree gchar * path = g_build_filename(install,paths[ix],NULL);
  295 + g_message("Checking '%s' for plugin files",path);
  296 + if(g_file_test(path,G_FILE_TEST_IS_DIR)) {
  297 + pw3270_load_plugins_from_path(app, path);
  298 + break;
  299 + }
  300 + }
  301 +
284 302 }
285 303  
286 304 #elif defined(__APPLE__)
... ...
src/objects/application/plugins.c
... ... @@ -65,6 +65,10 @@ void pw3270_load_plugins_from_path(pw3270Application *app, const char *path) {
65 65  
66 66 }
67 67  
  68 + } else {
  69 +
  70 + g_warning("Can't load plugins from %s: %s",path,"Invalid path");
  71 +
68 72 }
69 73  
70 74 }
... ...
src/objects/settings/gsettings.c
... ... @@ -100,13 +100,13 @@
100 100 schema_id,
101 101 TRUE);
102 102  
103   - g_message("Loading '%s'",names[ix]);
  103 +// g_message("Loading '%s'",names[ix]);
104 104 settings = g_settings_new_full(schema, NULL, NULL);
105 105  
106 106 g_settings_schema_source_unref(source);
107 107  
108 108 if(settings) {
109   - g_message("Got gsettings from %s",names[ix]);
  109 +// g_message("Got gsettings from %s",names[ix]);
110 110 return settings;
111 111 }
112 112  
... ... @@ -157,7 +157,7 @@
157 157  
158 158 GSettings * pw3270_application_settings_new() {
159 159 return settings_new(G_STRINGIFY(PRODUCT_ID));
160   - }
  160 + }
161 161  
162 162 GSettings * pw3270_application_window_settings_new() {
163 163 return settings_new(G_STRINGIFY(PRODUCT_ID) ".window");
... ...
win/ci-build.sh
... ... @@ -40,7 +40,7 @@ cd $(dirname $(dirname $(readlink -f ${0})))
40 40 # Install pre-reqs
41 41 #
42 42 echo "Installing pre-reqs..."
43   -pacman -U --noconfirm *.pkg.tar.zst || die "pacman failure"
  43 +pacman -U --noconfirm *.pkg.tar.zst || die "pre-reqs failure"
44 44  
45 45 #
46 46 # Build
... ...
win/pw3270.nsi.in
... ... @@ -222,6 +222,7 @@ SubSection &quot;@PRODUCT_NAME@&quot; SecMain
222 222 Section "Remote control" IPCPlugin
223 223  
224 224 ${DisableX64FSRedirection}
  225 +
225 226 CreateDirectory "$INSTDIR\lib\@PRODUCT_NAME@-plugins"
226 227 file "/oname=$INSTDIR\lib\@PRODUCT_NAME@-plugins\ipcserver.dll" "lib\@PRODUCT_NAME@-plugins\ipcserver.dll"
227 228  
... ...