Commit Graph

23 Commits

Author SHA1 Message Date
David Sungaila 920e39fb34
Windows: add app manifest to enable PerMonitorV2 2024-02-10 14:08:16 +01:00
James103 1d8dc111f1
Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
Matthias Moninger 62b0a5edfe
Build with link time code generation only on the develop branch 2023-03-26 16:50:18 +02:00
James103 73738bbdc8
Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
Silent db6af4b362
Ensure argv on Windows is nullptr-terminated (#18331) 2022-10-14 09:31:55 +02:00
73 b9e677945d
Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Michael Steenbeek db900b12db
Create enum for codepages (#17181) 2022-05-10 12:55:39 +02:00
Michał Janiszewski 3bc5c6c563 Introduce MSVC ARM64 platform 2022-05-07 23:48:27 +02:00
Matt 30376085cf Include missing headers 2020-08-05 16:29:29 +02:00
Ted John 0e788918e2 Fix build for latest VS2019 2020-07-10 18:44:26 +01:00
frutiemax cb4eba701f
Part of #11159: Remove malloc and free in openrct2-win.cpp (#12075) 2020-07-02 12:00:49 -03:00
Tulio Leao 6f984a0a77
Use named casts on openrct2-win (#11138) 2020-04-18 12:13:50 +02:00
Ted John a8b5304786
Remove exe / com wrapper around openrct2.dll for Windows (#10727)
We get repeated reports of people saying the game is incorrectly reported as a virus. It is becoming more inconvenient for players and even myself, because when we attempt to download a build, it is immediately deleted by scanners (including the default for Windows: Windows Defender).

One scanner is not too much of an issue, but the game is flagged by almost half of available scanners as reported by VirusTotal.

So why is it being flagged?

Windows has a very annoying concept, the subsystem for a binary. The console subsystem allows stdin / stdout as you would expect, just like posix. Unfortunately if a user runs a console subsystem binary from the desktop or explorer, the game will be opened under conhost and thus you get a console showing alongside the game window. This is not a good user experience for most players. To resolve this, you can use the windows subsystem, but this will detach stdin and stdout immediately on launch. There are hacks that can be done in code to allocate a new console but I found this to not work very well with stdin or other terminal emulators.

My solution to the problem was to have two binaries: openrct2.exe and openrct2.com. Both are executable but openrct2.exe is windows subsystem, openrct2.com is console subsystem. The desktop shortcut opens openrct2.exe with no console window showing. Typing openrct2 on the command line will execute openrct2.com (as .com has higher PATH precedence than .exe by default) with working stdin and stdout. In order to reduce the size, I have the entire game inside openrct2.dll and then supply two tiny wrapper EXEs that simply route main(...) into the DLL.

These wrapper EXEs are the problem, they are very small and do nothing but call into a DLL, this must match virus signatures too closely and their size probably reduces the data available for the scanner to analyse.

So as I can not find any other way of achieving my goal of a cli and gui version of OpenRCT2, this changes the build to publish openrct2 as a single executable (rather than a DLL + wrapper EXE), and then duplicate the entire ~10MB exe again and flip the subsystem flag. The installer and zip size won't be affected as this extra size will be completely compressed out, but when unpacked will lead to an extra ~10MB on disc. But I think it is a fair compromise.

VirusTotal now reports all artefacts as safe, for now anyway.
2020-02-18 11:35:27 +00:00
Aaron van Geffen 2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
clang-format c57bbca827 clang-format root 2018-07-23 16:00:14 +02:00
Hielke Morsink 0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Ted John b3c17b215f Use single output folder for msbuild obj files
This requires unique named source files within a project.
2018-06-01 09:37:49 +02:00
Hielke Morsink 30063984e6
Delete unused function arguments or mark them so (#7426)
This aims to make future refactoring easier. The arguments are removed where possible, but kept and marked with C++17's [[maybe_unused]] where they could not be removed (e.g. when they are used as a callback, rather than called directly).

I've skipped the rides/<category>/* and peep/* source files, because the rides source files are mostly generated and have a ton of unused variables, and the peep source files are being refactored.
I've also skipped most of window/* source files, because most of the functions are used as callbacks and will be bulk-renamed at some point.
2018-04-20 13:56:37 +02:00
Michał Janiszewski 79d76759bb Fix #5516: Update copyrights for 2017
Not all files were necessarily _changed_, but all were touched, see
https://github.com/OpenRCT2/OpenRCT2/pull/4932
2017-06-01 21:55:10 +02:00
Ted John 1b21a308cd Fix debugging by using unique named PDBs 2017-01-10 17:29:04 +00:00
Ted John 7d6ea1f5cd Create DLL for openrct2 with win as a wrapper 2017-01-10 17:29:03 +00:00
Ted John 73b21b5880 Convert openrct2 to static library 2017-01-10 17:29:02 +00:00
Ted John 67c0ed8a2f Add new windows project 2017-01-10 17:29:02 +00:00