{"push_id":1116995373,"size":9,"distinct_size":9,"ref":"refs/heads/master","head":"c0bc2c5002c6bddf6a2e175388a0b433225f5d6e","before":"1e2f1996335120c9d707d1b15f2fe2f56521d30b","commits":[{"sha":"840375cd16a085808f8e314cb4032a12f2119326","author":{"email":"b4701ebf9366004900e8211cdb469ccf92f5074c@whitequark.org","name":"whitequark"},"message":"Implement a resource system.\n\nCurrently, icons, fonts, etc are converted to C structures at compile\ntime and are hardcoded to the binary. This presents several problems:\n\n  * Cross-compilation is complicated. Right now, it is necessary\n    to be able to run executables for the target platform; this\n    happens to work with wine-binfmt installed, but is rather ugly.\n\n  * Icons can only have one resolution. On OS X, modern software is\n    expected to take advantage of high-DPI (\"Retina\") screens and\n    use so-called @2x assets when ran in high-DPI mode.\n\n  * Localization is complicated. Win32 and OS X provide built-in\n    support for loading the resource appropriate for the user's\n    locale.\n\n  * Embedding strings can only be done as raw strings, using C++'s\n    R\"(...)\" literals. This precludes embedding sizable strings,\n    e.g. JavaScript libraries as used in Three.js export, and makes\n    git history less useful. Not embedding the libraries means we\n    have to rely on external CDNs, which requires an Internet\n    connection and adds a glaring point of failure.\n\n  * Linux distribution guidelines are violated. All architecture-\n    independent data, especially large data such as fonts, is\n    expected to be in /usr/share, not in the binary.\n\n  * Customization is impossible without recompilation. Minor\n    modifications like adding a few missing vector font characters\n    or adjusting localization require a complete development\n    environment, which is unreasonable to expect from users of\n    a mechanical CAD.\n\nAs such, this commit adds a resource system that bundles (and\nsometimes builds) resources with the executable. Where they go is\nplatform-dependent:\n\n  * on Win32: into resources of the executable, which allows us to\n    keep distributing one file;\n  * on OS X: into the app bundle;\n  * on other *nix: into /usr/share/solvespace/ or ../res/ (relative\n    to the executable path), the latter allowing us to run freshly\n    built executables without installation.\n\nIt also subsides the platform-specific resources that are in src/.\n\nThe resource system is not yet used for anything; this will be added\nin later commits.","distinct":true,"url":"https://api.github.com/repos/whitequark/solvespace/commits/840375cd16a085808f8e314cb4032a12f2119326"},{"sha":"713103b97f9e66990d19d4cfcf25d59afc9cb319","author":{"email":"b4701ebf9366004900e8211cdb469ccf92f5074c@whitequark.org","name":"whitequark"},"message":"Win32: move resources to res/.","distinct":true,"url":"https://api.github.com/repos/whitequark/solvespace/commits/713103b97f9e66990d19d4cfcf25d59afc9cb319"},{"sha":"c3a562c86618ddc5871ef4dc43c2d59a25f863af","author":{"email":"b4701ebf9366004900e8211cdb469ccf92f5074c@whitequark.org","name":"whitequark"},"message":"freedesktop: move resources to res/.","distinct":true,"url":"https://api.github.com/repos/whitequark/solvespace/commits/c3a562c86618ddc5871ef4dc43c2d59a25f863af"},{"sha":"fd35e2430f29c7497ce1708fbb4d19ef32da2b1c","author":{"email":"b4701ebf9366004900e8211cdb469ccf92f5074c@whitequark.org","name":"whitequark"},"message":"OS X: move resources to res/.","distinct":true,"url":"https://api.github.com/repos/whitequark/solvespace/commits/fd35e2430f29c7497ce1708fbb4d19ef32da2b1c"},{"sha":"7ed881ed4306ecbd290df3014b6ef7e06f8fb7d2","author":{"email":"b4701ebf9366004900e8211cdb469ccf92f5074c@whitequark.org","name":"whitequark"},"message":"Move all platform-specific code to src/platform/.\n\nWithout resources, it makes no sense anymore to keep these in\nseparate subdirectories: unixutil* is shared between Cocoa\nand GTK ports, and gloffscreen* should be shared between all ports\n(but it's still platform-specific).","distinct":true,"url":"https://api.github.com/repos/whitequark/solvespace/commits/7ed881ed4306ecbd290df3014b6ef7e06f8fb7d2"},{"sha":"28454829588070512108a140c58d247aa15a5114","author":{"email":"b4701ebf9366004900e8211cdb469ccf92f5074c@whitequark.org","name":"whitequark"},"message":"Move icons to res/icons/; remove png2c.\n\nThis commit integrates icons in the resource system so that they\ncan be loaded (or reloaded, without restarting) in @2x mode, which\nwill be added in a future commit. png2c is no longer necessary.\n\npng2c used to perform the following transformation:\n  if(r + g + b < 11) r = g = b = 11;\n\nThis is now achieved by switching the icons to RGBA mode and adding\nalpha channel with the following imagemagick invocation, which is\nequivalent to the transformation above:\n  for i in *.png; do\n    convert -fuzz 4% -channel rgba -matte \\\n            -fill \"rgba(255,255,255,0)\" -opaque black \\\n            $i $i\n  done\n\nThe Debian package solvespace now includes /usr/share/solvespace;\nthis should be split out into solvespace-data later.","distinct":true,"url":"https://api.github.com/repos/whitequark/solvespace/commits/28454829588070512108a140c58d247aa15a5114"},{"sha":"5e59281fb7a46487ceb913f4e3361c1888d33036","author":{"email":"b4701ebf9366004900e8211cdb469ccf92f5074c@whitequark.org","name":"whitequark"},"message":"Move bitmap font to res/fonts/; remove unifont2c.\n\nThis commit integrates the bitmap font in the resource system, so\nthat cross-compilation would be easier.\n\nThe font handling code was carefully written to do glyph parsing\nlazily; in practice this means that after this commit, startup\nis less than 25ms slower, most of it spent in inflate().\n\nThis should also result in faster rendering, since there is no\nrampant plane switching anymore; instead, all characters that are\nactually used are stashed into same one texture.","distinct":true,"url":"https://api.github.com/repos/whitequark/solvespace/commits/5e59281fb7a46487ceb913f4e3361c1888d33036"},{"sha":"dfbfea28f70640ee35e9e8893c6f50b06bdd9446","author":{"email":"b4701ebf9366004900e8211cdb469ccf92f5074c@whitequark.org","name":"whitequark"},"message":"Move vector font to res/fonts/; remove lff2c.\n\nThis commit integrates the vector font in the resource system, so\nthat cross-compilation would be easier and a custom font could be\nused without recompilation.\n\nThe font handling code was carefully written to lazily load glyphs;\nas possible; in practice this means that startup is less than 15ms\nslower after this commit, most of it spent in inflate().\n\nThis also reduces executable size and makes compilation of\nglhelper.cpp much faster.","distinct":true,"url":"https://api.github.com/repos/whitequark/solvespace/commits/dfbfea28f70640ee35e9e8893c6f50b06bdd9446"},{"sha":"c0bc2c5002c6bddf6a2e175388a0b433225f5d6e","author":{"email":"b4701ebf9366004900e8211cdb469ccf92f5074c@whitequark.org","name":"whitequark"},"message":"Properly fix workplane name overlapping workplane border.\n\nA previous attempt to fix this was done in 0128b8679. However, it was\nnot rigorous. The added offset was dependent on font size and it\nintroduced an error into edit control positioning. Further, it is\nirrelevant to non-workplanes.\n\nAfter this commit, the workplane drawing code adds a fixed offset\ninstead. Also, the \"tab\" is enlarged to not overlap with #XY etc.","distinct":true,"url":"https://api.github.com/repos/whitequark/solvespace/commits/c0bc2c5002c6bddf6a2e175388a0b433225f5d6e"}]}