Commit Graph
81 Commits
Author SHA1 Message Date
Michał Janiszewski 17bc485fb5 Breakpad for windows
This enables breakpad Windows support **only**.

The scope of this was limited to allow for inclusion into 0.0.4 release.
Breakpad for now is a Windows-only functionality, as this platform has
largest audience and is the only one that has no system-provided stack
tracing utility.

Upon crash, breakpad will try to create a dump and save current game,
present user with some vital information, then open explorer on the
created files for user convenience, asking him/her to create a new
issue with OpenRCT2 on Github.
2016-04-09 18:57:14 +02:00
Michał Janiszewski 331f9fe03b Secure memory accesses, initialise variables 2016-04-01 09:38:40 +02:00
Michał Janiszewski 7eeb59b1aa Update Linux file dialogs 2016-03-31 20:41:51 +01:00
IntelOrca 3fdf0d4bf6 re-introduce appending of extension to filename 2016-03-31 20:41:49 +01:00
IntelOrca d865e4d453 pass better data in struct to file dialog function 2016-03-31 20:41:47 +01:00
IntelOrca c8015cab92 fix #3010: extension not added on native save file dialog 2016-03-01 21:46:00 +00:00
YJSoft cee035c9cb fix windows xp font loading problem
no need to cat because Fonts path must start with `C:\`
2016-03-02 00:32:28 +09:00
Ted John 703e9c3153 Merge pull request #2839 from anyc/develop
Linux: use zenity or kdialog to show user dialogs
2016-02-13 12:15:41 +00:00
Alexander Overvoorde 05c1aabc39 Move fallback name logic out of platform_get_username 2016-02-12 00:31:23 +01:00
Alexander Overvoorde 65f25f8340 Get fallback player name from language files 2016-02-10 22:46:25 +01:00
Alexander Overvoorde a5b47a8481 Change lmcons.h include capitalization (breaks mingw) 2016-02-10 22:33:39 +01:00
Alexander Overvoorde 75b072d266 Change default player name to use the OS username if available (resolves #2761) 2016-02-10 21:49:41 +01:00
anyc ffafd07c90 use enum to specify file dialog type 2016-01-29 19:03:09 +01:00
Michał Janiszewski 3bf1e0e06d Rename safe_strncpy to safe_strcpy 2016-01-18 20:49:52 +01:00
IntelOrca cdee534eb1 use SDL2's platform defines to normalise platform guards 2016-01-14 20:12:43 +00:00
Marijn van der Werf 0825b9bf62 Share currency detection across platforms 2016-01-13 21:38:10 +01:00
IntelOrca e9d222fdd3 new-argparse: finish new argparse integration and clean up 2016-01-10 22:50:31 +00:00
IntelOrca 9d98147b75 new-argparse: implement argument and option parsing 2016-01-10 22:50:29 +00:00
IntelOrca 5796cf3053 use native line endings for config.ini and themes, closes #2678 2016-01-09 22:43:12 +00:00
IntelOrca 3b4928c041 fix windows file enumerate pattern matching 2016-01-04 18:29:18 +00:00
IntelOrca 99e0d999b2 add timestamp to highscores.dat 2016-01-03 01:48:52 +00:00
Michał Janiszewski 6a5fc90cd4 Fix CMakeLists for MinGW cross-compilation
This makes sure that shared library built with MinGW toolchain is linked
statically to *all* its dependencies, including libc, libstdc++, libsdl2
and all the others. This allows producing of working `openrct2.dll` by
cross-compiling.

I hit a bug with libcrypto, a dependency of libssl, which in turn is a
dependency of curl, which creates a `DllMain` entrypoint for static lib
too, but since we don't do anything in ours, this should be safe.

I have only had chance to try it out when cross-compiling, ideally it
should be tested under Cygwin/MSYS too, but it is too bothersome to
setup for me.
2015-12-28 01:17:28 +01:00
Michał Janiszewski 184b375dcb Fix XP compatibility after #2546
8bdec9f68 (#2546) introduced call to SHGetKnownFolderPath which is only
available on Vista and later operating systems, but eda733165 restored
previous hard-coded functionality for MinGW. Use the same for XP
support.

According to
https://tedwvc.wordpress.com/2014/01/01/how-to-target-xp-with-vc2012-or-vc2013-and-continue-to-use-the-windows-8-x-sdk/
it should work.
2015-12-27 20:34:04 +01:00
Aaron van Geffen eda733165e Added a hack for MINGW compatibility. 2015-12-26 01:00:34 +09:00
Aaron van Geffen 8bdec9f68e Experimental: use SHGetKnownFolderPath to get font path on Windows. 2015-12-25 02:17:45 +09:00
Aaron van Geffen dd604afc89 Use FontConfig to find suitable TrueType fonts on Linux and OS X. Fixes #2537. 2015-12-25 01:53:52 +09:00
Michał Janiszewski ea6fa2c82a Let user specify the data dir as cmdline option.
This adds --openrct-data-dir=<str> option to command line letting user
select where he wants OpenRCT2-specific data to be. By default the
search locations are:
* <exePath>/data (on all platforms)
* /var/lib/openrct2 (on Linux)
* /usr/share/openrct2 (on Linux)
2015-12-19 00:06:41 +01:00
Ted John e77537b27f Merge pull request #2396 from janisozaur/osx-path
Set path properly for OS X
2015-12-05 14:21:41 +00:00
Michał Janiszewski d1b6d175c7 Make each platform set its own exe path 2015-12-01 21:38:35 +01:00
Gymnasiast d9fae6735b Change fallback measurement system to metric. 2015-11-19 19:53:20 +01:00
IntelOrca 70ef8d6777 add unicode support for windows command line arguments and resolve relative paths to absolute 2015-11-05 21:36:24 +00:00
IntelOrca e177be305b allow user data path to be specified by command line, closes #2182
Also changed default path under linux to be ~/.config/OpenRCT2.
2015-11-03 22:20:35 +00:00
Michał Janiszewski 45b3d8362d Provide strndup implementation for platforms missing it 2015-10-30 19:14:05 +01:00
Michał Janiszewski 9284930d7e Add safe_strncpy function
safe_strncpy is similar to strncpy, but makes sure buffer is
null-terminated. Update most of project to use this updated function to
prevent illegal memory accesses.
2015-10-30 16:01:00 +01:00
Alexander Overvoorde 609dad157a Optimise Steam overlay check 2015-10-04 22:31:28 +02:00
Alexander Overvoorde 51377fc960 Add setting for Steam overlay pausing and add extra check 2015-10-03 23:10:56 +02:00
zsilencer ffee5229b5 fix directories in linux 2015-10-02 14:48:10 -06:00
zsilencer 5793ded423 mouse drag in linux 2015-10-02 09:51:34 -06:00
Michał Janiszewski 89846a088a platform time functions 2015-09-29 23:35:15 +02:00
Michał Janiszewski 42691726fc workaround for mingw bug
For some reason mingw or sdl has trouble providing proper HWND, which
in turn prevents opening up a window for selecting file to save when
trying to convert save game to scenario.

Fixes #1486.
2015-09-12 23:46:40 +02:00
Gymnasiast 6bd003c67f Fix more warnings 2015-09-11 15:13:54 +02:00
Gymnasiast 959b492330 Add Simplified Chinese and Finnish as selectable languages 2015-08-09 21:29:42 +02:00
IntelOrca 36aacdf455 fix freeing of stack memory 2015-08-05 02:22:17 +01:00
IntelOrca be4ee45d66 convert more platform functions over to utf8 and close #1713 2015-08-04 21:41:45 +01:00
IntelOrca d228d13918 implement utf8, part 23 (bug fixes) 2015-08-01 16:40:15 +01:00
IntelOrca 4f91a9f2d0 implement utf8, part 17 2015-08-01 10:20:59 +01:00
Thomas 4b0c84ed20 Change stat usage to GetFileAttributesEx 2015-06-25 19:46:48 +02:00
Miso Zmiric (Mike Squinter) 80d524f78e platform_file_exists now also checks for path not found errors
use GetLastError after the GetFileAttributes
2015-06-24 22:30:39 +01:00
Robert Jordan a3a993dabd Title Sequence editor 2015-06-24 12:25:54 -04:00
Miso Zmiric (Mike Squinter) 21a15d0247 use platform_file_exists 2015-06-24 17:16:22 +01:00