Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 385748 Details for
Bug 279781
games-strategy/fheroes2: new package request
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fheroes2-3182-copy-configs.patch
fheroes2-3182-copy-configs.patch (text/plain), 1.35 KB, created by
M8R-u38wij
on 2014-09-29 17:07:42 UTC
(
hide
)
Description:
fheroes2-3182-copy-configs.patch
Filename:
MIME Type:
Creator:
M8R-u38wij
Created:
2014-09-29 17:07:42 UTC
Size:
1.35 KB
patch
obsolete
>diff --git a/src/fheroes2/game/fheroes2.cpp b/src/fheroes2/game/fheroes2.cpp >index 3dfecbf..866b6b1 100644 >--- a/src/fheroes2/game/fheroes2.cpp >+++ b/src/fheroes2/game/fheroes2.cpp >@@ -23,6 +23,9 @@ > #include <iostream> > #include <string> > #include <cstdlib> >+#ifdef CONFIGURE_FHEROES2_DATA >+#include <fstream> //needed for copying config files >+#endif > > #include "engine.h" > #include "system.h" >@@ -290,6 +293,22 @@ void InitHomeDir(void) > > if(System::IsDirectory(home_files, true) && ! System::IsDirectory(home_files_save)) > System::MakeDirectory(home_files_save); >+#ifdef CONFIGURE_FHEROES2_DATA >+ const std::string home_cfg = System::ConcatePath(home, "fheroes2.cfg"); >+ const std::string home_key = System::ConcatePath(home, "fheroes2.key"); >+ const std::string system_cfg = System::ConcatePath(CONFIGURE_FHEROES2_DATA, "fheroes2.cfg"); >+ const std::string system_key = System::ConcatePath(CONFIGURE_FHEROES2_DATA, "fheroes2.key"); >+ if(! System::IsFile(home_cfg)) { >+ std::ifstream src(system_cfg.c_str(), std::ios::binary); >+ std::ofstream dst(home_cfg.c_str(), std::ios::binary); >+ dst << src.rdbuf(); >+ } >+ if(! System::IsFile(home_key)) { >+ std::ifstream src(system_key.c_str(), std::ios::binary); >+ std::ofstream dst(home_key.c_str(), std::ios::binary); >+ dst << src.rdbuf(); >+ } >+#endif // CONFIGURE_FHEROES2_DATA > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 279781
:
200359
|
385744
|
385746
| 385748