Commit 95b1ba85b1235791d5934370c4ea2d033436e240

Authored by Perry Werneck
1 parent caf9e5db

Trying to fix windows customized build.

Showing 2 changed files with 41 additions and 63 deletions   Show diff stats
pw3270.cbp
... ... @@ -32,17 +32,6 @@
32 32 <Add option="-s" />
33 33 </Linker>
34 34 </Target>
35   - <Target title="oxt">
36   - <Option output=".bin/Debug/pw3270" prefix_auto="1" extension_auto="1" />
37   - <Option object_output=".obj/Debug/" />
38   - <Option type="1" />
39   - <Option compiler="gcc" />
40   - <Option use_console_runner="0" />
41   - <Compiler>
42   - <Add option="-g" />
43   - <Add option="-DDEBUG=1" />
44   - </Compiler>
45   - </Target>
46 35 </Build>
47 36 <Compiler>
48 37 <Add option="-Wall" />
... ... @@ -84,18 +73,9 @@
84 73 <Unit filename="src/include/pw3270/trace.h" />
85 74 <Unit filename="src/include/pw3270cpp.h" />
86 75 <Unit filename="src/include/rules.mak.in" />
87   - <Unit filename="src/java/Makefile.in">
88   - <Option target="Debug" />
89   - <Option target="Release" />
90   - </Unit>
91   - <Unit filename="src/java/jni3270.h">
92   - <Option target="Debug" />
93   - <Option target="Release" />
94   - </Unit>
95   - <Unit filename="src/java/private.h">
96   - <Option target="Debug" />
97   - <Option target="Release" />
98   - </Unit>
  76 + <Unit filename="src/java/Makefile.in" />
  77 + <Unit filename="src/java/jni3270.h" />
  78 + <Unit filename="src/java/private.h" />
99 79 <Unit filename="src/lib3270/3270ds.h" />
100 80 <Unit filename="src/lib3270/Makefile.in" />
101 81 <Unit filename="src/lib3270/ansic.h" />
... ...
src/pw3270/main.c
... ... @@ -232,6 +232,7 @@ static gboolean startup(GtkWidget *toplevel)
232 232 int main(int argc, char *argv[])
233 233 {
234 234 const gchar * pluginpath = NULL;
  235 +
235 236 #ifdef DEFAULT_SESSION_NAME
236 237 const gchar * session_name = G_STRINGIFY(DEFAULT_SESSION_NAME);
237 238 #else
... ... @@ -252,8 +253,43 @@ int main(int argc, char *argv[])
252 253 setlocale( LC_ALL, "" );
253 254 #endif
254 255  
255   - bind_textdomain_codeset(PACKAGE_NAME, "UTF-8");
256   - textdomain(PACKAGE_NAME);
  256 + // Get DATADIR
  257 +#if defined( _WIN32 )
  258 + {
  259 + g_autofree gchar * appdir = g_win32_get_package_installation_directory_of_module(NULL);
  260 + g_autofree gchar * locdir = g_build_filename(appdir,"locale",NULL);
  261 +
  262 + trace("appdir=\"%s\"",appdir);
  263 + trace("locdir=\"%s\"",locdir);
  264 +
  265 + g_chdir(appdir);
  266 +
  267 + bind_textdomain_codeset(PACKAGE_NAME, "UTF-8");
  268 + textdomain(PACKAGE_NAME);
  269 +
  270 + bindtextdomain( PACKAGE_NAME, locdir );
  271 +
  272 + }
  273 +#elif defined(HAVE_GTKMAC)
  274 + {
  275 + GtkMacBundle * macbundle = gtk_mac_bundle_get_default();
  276 +
  277 + g_chdir(gtk_mac_bundle_get_datadir(macbundle));
  278 +
  279 + bind_textdomain_codeset(PACKAGE_NAME, "UTF-8");
  280 + textdomain(PACKAGE_NAME);
  281 +
  282 + bindtextdomain(PACKAGE_NAME,gtk_mac_bundle_get_localedir(macbundle));
  283 +
  284 + osxapp = GTK_OSX_APPLICATION(g_object_new(GTK_TYPE_OSX_APPLICATION,NULL));
  285 +
  286 + }
  287 +#else
  288 + {
  289 + bind_textdomain_codeset(PACKAGE_NAME, "UTF-8");
  290 + textdomain(PACKAGE_NAME);
  291 + }
  292 +#endif
257 293  
258 294 // Process command-line options
259 295 {
... ... @@ -325,44 +361,6 @@ int main(int argc, char *argv[])
325 361 // Init GTK
326 362 gtk_init(&argc, &argv);
327 363  
328   - // Get DATADIR
329   -#if defined( WIN32 )
330   - {
331   - gchar * appdir = g_win32_get_package_installation_directory_of_module(NULL);
332   - gchar * locdir = g_build_filename(appdir,"locale",NULL);
333   -
334   - g_chdir(appdir);
335   - bindtextdomain( PACKAGE_NAME, locdir );
336   -
337   - g_free(locdir);
338   - g_free(appdir);
339   -
340   - }
341   -#elif defined(HAVE_GTKMAC)
342   - {
343   - GtkMacBundle * macbundle = gtk_mac_bundle_get_default();
344   -
345   - g_chdir(gtk_mac_bundle_get_datadir(macbundle));
346   - bindtextdomain(PACKAGE_NAME,gtk_mac_bundle_get_localedir(macbundle));
347   -
348   - osxapp = GTK_OSX_APPLICATION(g_object_new(GTK_TYPE_OSX_APPLICATION,NULL));
349   -
350   - }
351   -#elif defined( DATAROOTDIR )
352   - {
353   - gchar * appdir = g_build_filename(DATAROOTDIR,PACKAGE_NAME,NULL);
354   - gchar * locdir = g_build_filename(DATAROOTDIR,"locale",NULL);
355   -
356   - g_chdir(appdir);
357   - bindtextdomain( PACKAGE_NAME, locdir);
358   -
359   - g_free(locdir);
360   - g_free(appdir);
361   -
362   - }
363   -#endif // DATAROOTDIR
364   -
365   -
366 364 #if defined( HAVE_SYSLOG )
367 365 if(log_to_syslog)
368 366 {
... ...