Enrico Forestieri wrote:
> On Wed, Jul 14, 2010 at 10:05:49AM +0200, Peter Kümmel wrote:
>> Jürgen Spitzmüller wrote:
>>> Peter Kümmel wrote:
>>>>>> Just discovered another issue. The user directory suffix for the 1.6
>>>>>> series has always been "16" (directory called lyx16), while CMake sets
>>>>>> it to "1.6" (directory called LyX1.6). There should be an option to
>>>>>> change this otherwise user preferences will not be preserved.
>>>>>
>>>>> This should be fixed before the release, if it's not too hard.
>>>> Here it shows under 'About LyX' '~/AppData/Roaming/LyX' is the the
>>>> relevant path?
>>> I guess so. If it's labelled "user directory" in that dialog.
>>>
>>> Jürgen
>>>
>> Here a patch. OK to commit?
>
> I don't think so. This would break building with autotools.
> PACKAGE is used all over the place in the lyx sources, so adapt
> cmake to it, please.
Do you build with autotools on Windows? It's a windows only patch.
>
>> Index: src/support/Package.cpp
>> ===================================================================
>> --- src/support/Package.cpp (Revision 34893)
>> +++ src/support/Package.cpp (Arbeitskopie)
>> @@ -594,7 +594,7 @@
>> (void)home_dir; // Silence warning about unused variable.
>>
>> os::GetFolderPath win32_folder_path;
>> - return FileName(addPath(win32_folder_path(os::GetFolderPath::APPDATA),
>> PACKAGE));
>> + return FileName(addPath(win32_folder_path(os::GetFolderPath::APPDATA),
>> LYX_USERDIR_NAME));
>>
>> #elif defined (USE_MACOSX_PACKAGING)
>> (void)home_dir; // Silence warning about unused variable.
>> Index: development/cmake/config.h.cmake
>> ===================================================================
>> --- development/cmake/config.h.cmake (Revision 34893)
>> +++ development/cmake/config.h.cmake (Arbeitskopie)
>> @@ -31,6 +31,7 @@
>> #cmakedefine VERSION_INFO "${VERSION_INFO}"
>> #cmakedefine LYX_DIR_VER "${LYX_DIR_VER}"
>> #cmakedefine LYX_USERDIR_VER "${LYX_USERDIR_VER}"
>> +#cmakedefine LYX_USERDIR_NAME "${LYX_USERDIR_NAME}"
>>
>> #define PROGRAM_SUFFIX "${PROGRAM_SUFFIX}"
>> #define LYX_ABS_INSTALLED_DATADIR "${LYX_ABS_INSTALLED_DATADIR}"
>> Index: development/cmake/CMakeLists.txt
>> ===================================================================
>> --- development/cmake/CMakeLists.txt (Revision 34893)
>> +++ development/cmake/CMakeLists.txt (Arbeitskopie)
>> @@ -112,6 +112,7 @@
>> set(LYX_MINOR_VERSION ${CMAKE_MATCH_2})
>> set(LYX_DIR_VER "LYX_DIR_${CMAKE_MATCH_1}${CMAKE_MATCH_2}x")
>> set(LYX_USERDIR_VER "LYX_USERDIR_${CMAKE_MATCH_1}${CMAKE_MATCH_2}x")
>> + set(LYX_USERDIR_NAME "LyX${CMAKE_MATCH_1}${CMAKE_MATCH_2}")
>> set(LYX_INSTALL_SUFFIX "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}")
>> endif()
>> endif()
>> @@ -285,7 +286,7 @@
>>
>> message(STATUS "")
>> foreach(_v PACKAGE PACKAGE_VERSION
>> - PROGRAM_SUFFIX LYX_DATE LYX_DIR_VER LYX_USERDIR_VER
>> + PROGRAM_SUFFIX LYX_DATE LYX_DIR_VER LYX_USERDIR_VER LYX_USERDIR_NAME
>> LYX_ABS_TOP_SRCDIR
>> LYX_ABS_INSTALLED_DATADIR LYX_ABS_INSTALLED_LOCALEDIR
>> LYX_INSTALL_SUFFIX)
>> if(NOT DEFINED ${_v})
>
>