Commit 9ab3dcba028a5cd09ee929aeddddf060b4941556
1 parent
1a4c06ca
Exists in
master
and in
2 other branches
Fixing windows version.
Showing
3 changed files
with
65 additions
and
35 deletions
Show diff stats
src/objects/application/application.c
| ... | ... | @@ -539,30 +539,68 @@ GSettings * pw3270_application_settings_new() { |
| 539 | 539 | |
| 540 | 540 | GSettings *settings = NULL; |
| 541 | 541 | |
| 542 | -#ifdef DEBUG | |
| 543 | - GError * error = NULL; | |
| 544 | - GSettingsSchemaSource * source = | |
| 545 | - g_settings_schema_source_new_from_directory( | |
| 546 | - ".", | |
| 547 | - NULL, | |
| 548 | - TRUE, | |
| 549 | - &error | |
| 550 | - ); | |
| 542 | +#if defined(DEBUG) | |
| 543 | + { | |
| 544 | + GError * error = NULL; | |
| 545 | + GSettingsSchemaSource * source = | |
| 546 | + g_settings_schema_source_new_from_directory( | |
| 547 | + ".", | |
| 548 | + NULL, | |
| 549 | + TRUE, | |
| 550 | + &error | |
| 551 | + ); | |
| 552 | + | |
| 553 | + g_assert_no_error(error); | |
| 554 | + | |
| 555 | + GSettingsSchema * schema = | |
| 556 | + g_settings_schema_source_lookup( | |
| 557 | + source, | |
| 558 | + "br.com.bb." G_STRINGIFY(PRODUCT_NAME), | |
| 559 | + TRUE); | |
| 551 | 560 | |
| 552 | - g_assert_no_error(error); | |
| 561 | + debug("schema %s=%p","br.com.bb." PACKAGE_NAME,schema); | |
| 562 | + | |
| 563 | + settings = g_settings_new_full(schema, NULL, NULL); | |
| 564 | + | |
| 565 | + g_settings_schema_source_unref(source); | |
| 566 | + } | |
| 567 | +#elif defined(_WIN32) | |
| 568 | + { | |
| 569 | + lib3270_autoptr(char) filename = lib3270_build_filename("gschemas.compiled",NULL); | |
| 553 | 570 | |
| 554 | - GSettingsSchema * schema = | |
| 555 | - g_settings_schema_source_lookup( | |
| 556 | - source, | |
| 557 | - "br.com.bb." G_STRINGIFY(PRODUCT_NAME), | |
| 558 | - TRUE); | |
| 571 | + if(g_file_test(filename,G_FILE_TEST_IS_REGULAR)) { | |
| 559 | 572 | |
| 560 | - debug("schema %s=%p","br.com.bb." PACKAGE_NAME,schema); | |
| 573 | + GError * error = NULL; | |
| 574 | + g_autofree gchar *dirname = g_path_get_dirname(filename); | |
| 561 | 575 | |
| 562 | - settings = g_settings_new_full(schema, NULL, NULL); | |
| 576 | + GSettingsSchemaSource * source = | |
| 577 | + g_settings_schema_source_new_from_directory( | |
| 578 | + dirname, | |
| 579 | + NULL, | |
| 580 | + TRUE, | |
| 581 | + &error | |
| 582 | + ); | |
| 563 | 583 | |
| 564 | - g_settings_schema_source_unref(source); | |
| 584 | + g_assert_no_error(error); | |
| 565 | 585 | |
| 586 | + GSettingsSchema * schema = | |
| 587 | + g_settings_schema_source_lookup( | |
| 588 | + source, | |
| 589 | + "br.com.bb." G_STRINGIFY(PRODUCT_NAME), | |
| 590 | + TRUE); | |
| 591 | + | |
| 592 | + debug("schema %s=%p","br.com.bb." PACKAGE_NAME,schema); | |
| 593 | + | |
| 594 | + settings = g_settings_new_full(schema, NULL, NULL); | |
| 595 | + | |
| 596 | + g_settings_schema_source_unref(source); | |
| 597 | + | |
| 598 | + } else { | |
| 599 | + | |
| 600 | + settings = g_settings_new("br.com.bb." G_STRINGIFY(PRODUCT_NAME)); | |
| 601 | + | |
| 602 | + } | |
| 603 | + } | |
| 566 | 604 | #else |
| 567 | 605 | |
| 568 | 606 | settings = g_settings_new("br.com.bb." G_STRINGIFY(PRODUCT_NAME)); | ... | ... |
win/pack.sh
| ... | ... | @@ -541,29 +541,21 @@ makeRuntime() |
| 541 | 541 | echo -e "\e]2;Building runtime for ${ARCH}\a" |
| 542 | 542 | echo "Building runtime for ${ARCH}" |
| 543 | 543 | |
| 544 | - rm -fr ${WORKDIR}/build/${ARCH}/runtime | |
| 545 | - mkdir -p ${WORKDIR}/build/${ARCH}/runtime | |
| 546 | - mkdir -p ${WORKDIR}/build/${ARCH}/runtime//share/glib-2.0/schemas | |
| 547 | - | |
| 548 | - cp \ | |
| 549 | - ${WORKDIR}/build/${ARCH}/share/glib-2.0/schemas/*.gschema.xml \ | |
| 550 | - ${WORKDIR}/build/${ARCH}/runtime/share/glib-2.0/schemas | |
| 551 | - | |
| 552 | - if [ "$?" != "0" ]; then | |
| 553 | - failed "Error on schema copy" | |
| 554 | - fi | |
| 555 | - | |
| 544 | + mkdir -p "${WORKDIR}/build/${ARCH}/runtime" | |
| 545 | + | |
| 556 | 546 | for SCRIPT in ${WORKDIR}/build/${ARCH}/*-makeruntime.sh |
| 557 | 547 | do |
| 558 | 548 | chmod +x ${SCRIPT} |
| 559 | 549 | |
| 560 | 550 | cd ${WORKDIR}/build/${ARCH} |
| 561 | - ${SCRIPT} --output-dir="${WORKDIR}/build/${ARCH}/runtime" --bindir="${WORKDIR}/build/${ARCH}" | |
| 551 | + ${SCRIPT} \ | |
| 552 | + --output-dir="${WORKDIR}/build/${ARCH}/runtime" \ | |
| 553 | + --bindir="${WORKDIR}/build/${ARCH}" | |
| 562 | 554 | if [ "$?" != "0" ]; then |
| 563 | 555 | failed "Error on ${SCRIPT}" |
| 564 | 556 | fi |
| 565 | 557 | done |
| 566 | - | |
| 558 | + | |
| 567 | 559 | done |
| 568 | 560 | |
| 569 | 561 | } | ... | ... |
win/pw3270.nsi.in
| ... | ... | @@ -103,8 +103,8 @@ SubSection "@PRODUCT_NAME@" SecMain |
| 103 | 103 | # Binary files |
| 104 | 104 | file "/oname=$INSTDIR\@PRODUCT_NAME@.exe" "bin\@PRODUCT_NAME@.exe" |
| 105 | 105 | file "/oname=$INSTDIR\@PRODUCT_NAME@.ico" "bin\@PRODUCT_NAME@.ico" |
| 106 | - file "/oname=$INSTDIR\lib@LIBRARY_NAME@.dll" "bin\lib@LIBRARY_NAME@.dll" | |
| 107 | - file "/oname=$INSTDIR\libv3270.dll" "bin\libv3270.dll" | |
| 106 | + file "/oname=$INSTDIR\lib@LIBRARY_NAME@.dll" "bin\lib@LIBRARY_NAME@.dll" | |
| 107 | + file "/oname=$INSTDIR\libv3270.dll" "bin\libv3270.dll" | |
| 108 | 108 | |
| 109 | 109 | # Register file association |
| 110 | 110 | |
| ... | ... | @@ -122,7 +122,7 @@ SubSection "@PRODUCT_NAME@" SecMain |
| 122 | 122 | # Schema |
| 123 | 123 | CreateDirectory "$INSTDIR\schemas" |
| 124 | 124 | file "/oname=$INSTDIR\schemas\@PRODUCT_NAME@-application.gschema.xml" "share\glib-2.0\schemas\pw3270-application.gschema.xml" |
| 125 | - file "/oname=$INSTDIR\schemas\@PRODUCT_NAME@-window.gschema.xml" "share\glib-2.0\schemas\pw3270-window.gschema.xml" | |
| 125 | + file "/oname=$INSTDIR\schemas\@PRODUCT_NAME@-window.gmasma.xml" "share\glib-2.0\schemas\pw3270-window.gschema.xml" | |
| 126 | 126 | |
| 127 | 127 | # Configuration files |
| 128 | 128 | file "/oname=$INSTDIR\colors.conf" "share\@PRODUCT_NAME@\colors.conf" | ... | ... |