Commit Graph

15 Commits (f3b232238c2178b2e8bc6c823a55a82a3d232a78)

Author SHA1 Message Date
EvilSpirit 3af4e1c5b0 Define NOMINMAX for Windows builds.
Without #define NOMINMAX, <windows.h> defines min and max as macros,
which shadows the definitions from <algorithm> and makes them
unusable with multiple arguments.
2016-01-27 09:09:18 +00:00
whitequark 97a9b4743e Make sure only *W functions from Win32 API are called.
After this commit, SolveSpace always uses UTF-8 strings internally
(represented as char* and std::string) on every OS, for everything:
UI labels, paths and user input. OS X always uses UTF-8; on Windows,
strings are converted at boundary; and on Linux/BSD/etc SolveSpace
refuses to start unless the current locale is UTF-8. This will
negatively affect literally no one.

This commit does not bring forth any user-visible improvement yet;
in order to correctly handle Unicode in filenames, it is still
necessary to change the fopen calls to _wfopen on Windows.
2016-01-13 06:45:16 +00:00
whitequark 02c30e6f87 Rewrite ttf2c to use GNU Unifont and merge with pngchar2c.pl.
After this change, SolveSpace does not contain nonfree assets.
Additionally, Perl is not required for the build.

Note that in the US, case law suggests that copyright does
not apply to bitmap fonts:
  http://www.renpy.org/wiki/renpy/misc/Bitmap_Fonts_and_Copyright

Nevertheless, it was prudent to replace the asset with something
that is unambiguously free.
2015-12-29 11:15:50 +08:00
whitequark f76f76ff60 Rewrite png2c.pl in C++.
This allows us to always generate icons during build,
and in the future remove a Perl dependency.
2015-12-29 11:15:50 +08:00
whitequark 7c3c20161b Allow building on FreeBSD. 2015-12-28 21:37:07 +08:00
whitequark 063dfc4f98 Require cmake 3.1.0 and C++11.
We plan to use C++11 features in the future. Moreover, recent gtkmm
has a hard requirement on C++11.
2015-12-28 21:37:06 +08:00
whitequark 1b6cd0d632 Make in-tree zlib more robust. 2015-12-28 21:37:06 +08:00
whitequark 0159a87a8a Add support for cross-compiling from Linux.
As a side effect, zlib and libpng are now git submodules,
based on their respective official git repositories.
This is necessary, because MinGW has a different ABI and
it cannot use the prebuilt binaries built by MSVC.

The submodules are also used for Windows, for several reasons:
  * to allow 64-bit builds;
  * to allow using newer MSVC, which doesn't like the prebuilt
    libraries;
  * to keep the libraries updated.
2015-07-10 15:59:12 +03:00
whitequark 46db5378dc Add Travis CI and Appveyor CI configurations. 2015-07-10 15:59:12 +03:00
whitequark d0c0a7ae5a Remove FLTK port.
It provides no value over the native GTK and Cocoa ports.
2015-07-10 15:59:12 +03:00
whitequark 95ab80d0ee Implement OS X port. 2015-07-10 15:59:12 +03:00
whitequark 0807c2fdfe Add a native Debian package. 2015-07-10 15:59:12 +03:00
whitequark e27c6b56c3 Implement offscreen rendering using GL framebuffer objects.
Apparently pbuffers are also a deprecated and unportable
way of offscreen rendering. They're not supported by
Chromium OpenGL implementation, which is what 3D-accelerated
VirtualBox uses.

This would also help a future OS X port.
2015-07-10 15:59:12 +03:00
whitequark 2c39f259db Add a GTK2/3 port.
In principle, GTK3 is the way forward, and GTK2 is officially
deprecated, though still maintained. In practice however, GTK3
is often unbearably buggy; e.g. on my system, combo boxes
don't ever roll up in GTK3 windows. So I have added support
for both.

This required a few minor changes to the core, namely:
  * GTK wants to know beforehand whether a menu item is a check
    menu item or a regular one.
  * GTK doesn't give us an easy way to execute something after
    any event is processed, so an explicit idle timer is added.
    This is a no-op on Win32.
  * A few function signatures were const'ed, since GTK expects
    immutable strings when converting to Glib::ustring.
2015-07-10 15:59:12 +03:00
whitequark 5db5f1e152 Add a CMake buildsystem.
Additionally, update build tools so that no stdio redirection
is necessary.
2015-07-10 15:59:11 +03:00