Commit 65c9d6208800f1a4e97b428e85289b9ab7556fa8
Committed by
GitHub
Exists in
master
and in
1 other branch
Merge pull request #4 from andrebreves/develop
Updating MACOS code.
Showing
4 changed files
with
37 additions
and
3 deletions
Show diff stats
README.md
| @@ -75,3 +75,31 @@ Compiling for Windows (With MSYS2) | @@ -75,3 +75,31 @@ Compiling for Windows (With MSYS2) | ||
| 75 | * make all | 75 | * make all |
| 76 | 76 | ||
| 77 | 77 | ||
| 78 | +Building for macOS (using homebrew) | ||
| 79 | +=================================== | ||
| 80 | + | ||
| 81 | +1. Build and install [lib3270](../../../lib3270) | ||
| 82 | + | ||
| 83 | +2. Install additional dependencies | ||
| 84 | + | ||
| 85 | + ```shell | ||
| 86 | + $ brew install gtk+3 | ||
| 87 | + ``` | ||
| 88 | + | ||
| 89 | +3. Configure, build and install | ||
| 90 | + | ||
| 91 | + ```shell | ||
| 92 | + $ ./autogen.sh --prefix="$(brew --cellar)/libv3270/5.3" | ||
| 93 | + $ make all && make install | ||
| 94 | + $ brew link libv3270 | ||
| 95 | + ``` | ||
| 96 | + | ||
| 97 | +Uninstalling | ||
| 98 | +------------ | ||
| 99 | + | ||
| 100 | +1. To uninstall | ||
| 101 | + | ||
| 102 | + ```shell | ||
| 103 | + $ brew unlink libv3270 | ||
| 104 | + $ rm -fr "$(brew --cellar)/libv3270" | ||
| 105 | + ``` |
configure.ac
| @@ -110,7 +110,7 @@ case "$host" in | @@ -110,7 +110,7 @@ case "$host" in | ||
| 110 | 110 | ||
| 111 | INSTALL_PACKAGES="linux-lib ${INSTALL_PACKAGES}" | 111 | INSTALL_PACKAGES="linux-lib ${INSTALL_PACKAGES}" |
| 112 | 112 | ||
| 113 | - app_cv_static='yes' | 113 | + app_cv_static='no' |
| 114 | ;; | 114 | ;; |
| 115 | 115 | ||
| 116 | *) | 116 | *) |
src/dialogs/print/settings.c
| @@ -79,7 +79,11 @@ static void V3270PrintSettings_init(V3270PrintSettings *widget) | @@ -79,7 +79,11 @@ static void V3270PrintSettings_init(V3270PrintSettings *widget) | ||
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | size_t f; | 81 | size_t f; |
| 82 | - widget->font = v3270_font_selection_new("monospace"); | 82 | + #ifdef __APPLE__ |
| 83 | + widget->font = v3270_font_selection_new("Courier New"); | ||
| 84 | + #else | ||
| 85 | + widget->font = v3270_font_selection_new("monospace"); | ||
| 86 | + #endif | ||
| 83 | widget->color = v3270_color_scheme_new(); | 87 | widget->color = v3270_color_scheme_new(); |
| 84 | widget->selected = gtk_check_button_new_with_label( _("Print selection box") ); | 88 | widget->selected = gtk_check_button_new_with_label( _("Print selection box") ); |
| 85 | 89 |
src/terminal/font/properties.c
| @@ -45,8 +45,10 @@ static const gchar * invalid_font_messages[] = { | @@ -45,8 +45,10 @@ static const gchar * invalid_font_messages[] = { | ||
| 45 | 45 | ||
| 46 | const gchar * v3270_get_default_font_name() | 46 | const gchar * v3270_get_default_font_name() |
| 47 | { | 47 | { |
| 48 | -#ifdef _WIN32 | 48 | +#if defined(_WIN32) |
| 49 | return "Lucida Console"; | 49 | return "Lucida Console"; |
| 50 | +#elif defined(__APPLE__) | ||
| 51 | + return "Courier New"; | ||
| 50 | #else | 52 | #else |
| 51 | return "monospace"; | 53 | return "monospace"; |
| 52 | #endif // _WIN32 | 54 | #endif // _WIN32 |