MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001688VCMIOtherpublic2014-02-08 12:432022-04-12 11:19
ReporterIvan 
Assigned ToSXX 
PrioritynormalSeveritymajorReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSWindowsOS Version
Product Version 
Target VersionFixed in Version0.99 
Summary0001688: On Windows vcmi must store user-specific data under C:\Users directory
DescriptionAs in summary, all data that can be changed by user (saves, config files, some temporary files) should be stored in user-specific directory (IIRC this is C:\Users\<user name>\...)

This is already works as intended on other OS's, to make this work on Win somebody must implement appropriate methods in lib/VCMIDirs.h/cpp

Creating this report mostly because we've got some bugs that require this feature to be implemented first.
TagsNo tags attached.
Attached Files

- Relationships
related to 0001685closedIvan If we use mod to change config/settings.json, all option changes are saved to that file 
related to 0001310closedIvan Linux XDG support for savegames 
related to 0001733closedIvan Launcher changing resolution option doesn't work. 

-  Notes
(0004539)
Tow (developer)
2014-02-27 20:50
edited on: 2014-02-27 20:51

I've done quick'n'dirty implementation for this in r3783.

The thing I'm concerned about is that this uses non-UTF (local system encoding) strings, while generally everything should be UTF8. [Otherwise, having strings with different encoding in the project will sooner or later cause trouble.]

However, Windows doesn't use UTF8 and standard library objects like ifstream apparently require paths to be in the non-UTF encoding.
The fix for this is:
a) set global locale to utf8
b) imbue boost::filesystem::path with that locale
c) replace all std::ofstream with boost::filesystem::ofstream (same for ifstream)
d) put globally the following pragma, so MSVC compiler knows that files are utf8
#pragma execution_character_set("utf-8")

Ugh… Not before release.

(0006786)
SXX (administrator)
2016-09-30 16:05

Pretty sure that even if we had any issues remaining they were solved by this PR:
https://github.com/vcmi/vcmi/pull/180 [^]

- Issue History
Date Modified Username Field Change
2014-02-08 12:43 Ivan New Issue
2014-02-08 12:43 Ivan Status new => assigned
2014-02-08 12:43 Ivan Assigned To => Tow
2014-02-08 12:44 Ivan Relationship added related to 0001685
2014-02-08 12:44 Ivan Relationship added related to 0001310
2014-02-27 13:58 Ivan Relationship added related to 0001733
2014-02-27 20:50 Tow Note Added: 0004539
2014-02-27 20:51 Tow Note Edited: 0004539 View Revisions
2016-09-30 16:05 SXX Note Added: 0006786
2016-09-30 16:05 SXX Status assigned => resolved
2016-09-30 16:05 SXX Fixed in Version => 0.99
2016-09-30 16:05 SXX Resolution open => fixed
2016-09-30 16:05 SXX Assigned To Tow => SXX
2022-04-12 11:19 Povelitel Status resolved => closed

Site | Forums | Wiki | Slack | GitHub


Copyright © 2000 - 2024 MantisBT Team
Hosting provided by DigitalOcean