Author: hbelusca
Date: Wed Feb 1 03:51:40 2017
New Revision: 73658
URL: http://svn.reactos.org/svn/reactos?rev=73658&view=rev
Log:
[WELCOME]: Addendum to r73656: The application title is also customizable!
Change also the name of some helper functions.
Modified:
trunk/reactos/base/setup/welcome/welcome.c
Modified: trunk/reactos/base/setup/welcome/welcome.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/welcome/welcome…
==============================================================================
--- trunk/reactos/base/setup/welcome/welcome.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/welcome/welcome.c [iso-8859-1] Wed Feb 1 03:51:40 2017
@@ -197,7 +197,7 @@
}
static BOOL
-LoadTopicsFromINI(LCID Locale, LPTSTR lpResPath)
+LoadLocalizedResourcesFromINI(LCID Locale, LPTSTR lpResPath)
{
DWORD dwRet;
DWORD dwSize;
@@ -236,6 +236,8 @@
return FALSE; // TODO: For localized resource, see the general function.
/* Try to load the default localized strings */
+ GetPrivateProfileString(TEXT("Defaults"), TEXT("AppTitle"), TEXT("ReactOS Welcome") /* default */,
+ szAppTitle, ARRAYSIZE(szAppTitle), szIniPath);
if (!GetPrivateProfileString(TEXT("Defaults"), TEXT("DefaultTopicTitle"), NULL /* default */,
szDefaultTitle, ARRAYSIZE(szDefaultTitle), szIniPath))
{
@@ -325,7 +327,7 @@
}
static BOOL
-LoadTopics(LPTSTR lpResPath)
+LoadLocalizedResources(LPTSTR lpResPath)
{
#define MAX_NUMBER_INTERNAL_TOPICS 3
@@ -339,13 +341,15 @@
* First, try to load the default internal (localized) strings.
* They can be redefined by the localized INI files.
*/
+ if (!LoadString(hInstance, IDS_APPTITLE, szAppTitle, ARRAYSIZE(szAppTitle)))
+ StringCchCopy(szAppTitle, ARRAYSIZE(szAppTitle), TEXT("ReactOS Welcome"));
if (!LoadString(hInstance, IDS_DEFAULTTOPICTITLE, szDefaultTitle, ARRAYSIZE(szDefaultTitle)))
*szDefaultTitle = 0;
if (!LoadString(hInstance, IDS_DEFAULTTOPICDESC, szDefaultDesc, ARRAYSIZE(szDefaultDesc)))
*szDefaultDesc = 0;
- /* Try to load the topics from INI file */
- if (*lpResPath && LoadTopicsFromINI(LOCALE_USER_DEFAULT, lpResPath))
+ /* Try to load the resources from INI file */
+ if (*lpResPath && LoadLocalizedResourcesFromINI(LOCALE_USER_DEFAULT, lpResPath))
return TRUE;
/* We failed, fall back to internal (localized) resource */
@@ -381,7 +385,7 @@
}
static VOID
-FreeTopics(VOID)
+FreeResources(VOID)
{
if (!pTopics)
return;
@@ -421,8 +425,8 @@
/* Verify that the file exists, otherwise use the default configuration */
if (GetFileAttributes(szIniPath) == INVALID_FILE_ATTRIBUTES)
{
- /* Use the default configuration and retrieve the default topics */
- return LoadTopics(TEXT(""));
+ /* Use the default configuration and retrieve the default resources */
+ return LoadLocalizedResources(TEXT(""));
}
/* Load the settings from the INI configuration file */
@@ -435,9 +439,9 @@
*szResPath = 0;
}
- /* Set the current directory to the one of this application, and retrieve the topics */
+ /* Set the current directory to the one of this application, and retrieve the resources */
SetCurrentDirectory(szAppPath);
- return LoadTopics(szResPath);
+ return LoadLocalizedResources(szResPath);
}
#if 0
@@ -556,10 +560,7 @@
rcRightPanel.left = rcLeftPanel.right;
rcRightPanel.right = ulInnerWidth - 1;
- if (!LoadString(hInstance, IDS_APPTITLE, szAppTitle, ARRAYSIZE(szAppTitle)))
- StringCchCopy(szAppTitle, ARRAYSIZE(szAppTitle), TEXT("ReactOS Welcome"));
-
- /* Load the configuration and the topics */
+ /* Load the configuration and the resources */
LoadConfiguration();
/* Create main window */
@@ -592,7 +593,7 @@
}
/* Cleanup */
- FreeTopics();
+ FreeResources();
return msg.wParam;
}
Author: hbelusca
Date: Wed Feb 1 02:20:46 2017
New Revision: 73655
URL: http://svn.reactos.org/svn/reactos?rev=73655&view=rev
Log:
Port commit r73654 "Fix the dependencies for the hybridcd".
Modified:
branches/ReactOS-0.4.4-FOSDEM2017/reactos/ (props changed)
branches/ReactOS-0.4.4-FOSDEM2017/reactos/sdk/cmake/CMakeMacros.cmake
Propchange: branches/ReactOS-0.4.4-FOSDEM2017/reactos/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 1 02:20:46 2017
@@ -23,4 +23,4 @@
/branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859
/branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567
/branches/wlan-bringup:54809-54998
-/trunk/reactos:73522-73601,73606-73608,73610-73611,73613,73616-73618,73620-73623,73633-73636,73642-73643
+/trunk/reactos:73522-73601,73606-73608,73610-73611,73613,73616-73618,73620-73623,73633-73636,73642-73643,73654
Modified: branches/ReactOS-0.4.4-FOSDEM2017/reactos/sdk/cmake/CMakeMacros.cmake
URL: http://svn.reactos.org/svn/reactos/branches/ReactOS-0.4.4-FOSDEM2017/reacto…
==============================================================================
--- branches/ReactOS-0.4.4-FOSDEM2017/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] (original)
+++ branches/ReactOS-0.4.4-FOSDEM2017/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] Wed Feb 1 02:20:46 2017
@@ -290,49 +290,49 @@
message(FATAL_ERROR "You must provide a cd name (or \"all\" for all of them) to install the file on!")
endif()
- #get file if we need to
+ # get file if we need to
if(NOT _CD_FILE)
get_target_property(_CD_FILE ${_CD_TARGET} LOCATION_${CMAKE_BUILD_TYPE})
endif()
- #do we add it to all CDs?
+ # do we add it to all CDs?
list(FIND _CD_FOR all __cd)
if(NOT __cd EQUAL -1)
list(REMOVE_AT _CD_FOR __cd)
list(INSERT _CD_FOR __cd "bootcd;livecd;regtest")
endif()
- #do we add it to bootcd?
+ # do we add it to bootcd?
list(FIND _CD_FOR bootcd __cd)
if(NOT __cd EQUAL -1)
- #whether or not we should put it in reactos.cab or directly on cd
+ # whether or not we should put it in reactos.cab or directly on cd
if(_CD_NO_CAB)
- #directly on cd
+ # directly on cd
foreach(item ${_CD_FILE})
if(_CD_NAME_ON_CD)
- #rename it in the cd tree
+ # rename it in the cd tree
set(__file ${_CD_NAME_ON_CD})
else()
get_filename_component(__file ${item} NAME)
endif()
set_property(GLOBAL APPEND PROPERTY BOOTCD_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}")
- #add it also into the hybridcd if not specified otherwise
+ # add it also into the hybridcd if not specified otherwise
if(NOT _CD_NOT_IN_HYBRIDCD)
set_property(GLOBAL APPEND PROPERTY HYBRIDCD_FILE_LIST "setup/${_CD_DESTINATION}/${__file}=${item}")
endif()
endforeach()
+ # manage dependency
if(_CD_TARGET)
- #manage dependency
add_dependencies(bootcd ${_CD_TARGET} registry_inf)
endif()
else()
- #add it in reactos.cab
+ # add it in reactos.cab
dir_to_num(${_CD_DESTINATION} _num)
file(RELATIVE_PATH __relative_file ${REACTOS_SOURCE_DIR} ${_CD_FILE})
file(APPEND ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff.dyn "\"${__relative_file}\" ${_num}\n")
unset(__relative_file)
+ # manage dependency - target level
if(_CD_TARGET)
- #manage dependency - target level
add_dependencies(reactos_cab_inf ${_CD_TARGET})
endif()
# manage dependency - file level
@@ -340,34 +340,38 @@
endif()
endif() #end bootcd
- #do we add it to livecd?
+ # do we add it to livecd?
list(FIND _CD_FOR livecd __cd)
if(NOT __cd EQUAL -1)
- #manage dependency
+ # manage dependency
if(_CD_TARGET)
add_dependencies(livecd ${_CD_TARGET} registry_inf)
endif()
foreach(item ${_CD_FILE})
if(_CD_NAME_ON_CD)
- #rename it in the cd tree
+ # rename it in the cd tree
set(__file ${_CD_NAME_ON_CD})
else()
get_filename_component(__file ${item} NAME)
endif()
set_property(GLOBAL APPEND PROPERTY LIVECD_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}")
- #add it also into the hybridcd if not specified otherwise
+ # add it also into the hybridcd if not specified otherwise
if(NOT _CD_NOT_IN_HYBRIDCD)
set_property(GLOBAL APPEND PROPERTY HYBRIDCD_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}")
endif()
endforeach()
endif() #end livecd
- #do we need also to add it to hybridcd?
+ # do we need also to add it to hybridcd?
list(FIND _CD_FOR hybridcd __cd)
if(NOT __cd EQUAL -1)
+ # manage dependency
+ if(_CD_TARGET)
+ add_dependencies(hybridcd ${_CD_TARGET})
+ endif()
foreach(item ${_CD_FILE})
if(_CD_NAME_ON_CD)
- #rename it in the cd tree
+ # rename it in the cd tree
set(__file ${_CD_NAME_ON_CD})
else()
get_filename_component(__file ${item} NAME)
@@ -376,23 +380,23 @@
endforeach()
endif() #end hybridcd
- #do we add it to regtest?
+ # do we add it to regtest?
list(FIND _CD_FOR regtest __cd)
if(NOT __cd EQUAL -1)
- #whether or not we should put it in reactos.cab or directly on cd
+ # whether or not we should put it in reactos.cab or directly on cd
if(_CD_NO_CAB)
- #directly on cd
+ # directly on cd
foreach(item ${_CD_FILE})
if(_CD_NAME_ON_CD)
- #rename it in the cd tree
+ # rename it in the cd tree
set(__file ${_CD_NAME_ON_CD})
else()
get_filename_component(__file ${item} NAME)
endif()
set_property(GLOBAL APPEND PROPERTY BOOTCDREGTEST_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}")
endforeach()
+ # manage dependency
if(_CD_TARGET)
- #manage dependency
add_dependencies(bootcdregtest ${_CD_TARGET} registry_inf)
endif()
else()
Author: hbelusca
Date: Wed Feb 1 02:18:30 2017
New Revision: 73654
URL: http://svn.reactos.org/svn/reactos?rev=73654&view=rev
Log:
[CMAKE]: Fix the dependencies for the hybridcd.
Modified:
trunk/reactos/sdk/cmake/CMakeMacros.cmake
Modified: trunk/reactos/sdk/cmake/CMakeMacros.cmake
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/cmake/CMakeMacros.cmak…
==============================================================================
--- trunk/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] (original)
+++ trunk/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] Wed Feb 1 02:18:30 2017
@@ -290,49 +290,49 @@
message(FATAL_ERROR "You must provide a cd name (or \"all\" for all of them) to install the file on!")
endif()
- #get file if we need to
+ # get file if we need to
if(NOT _CD_FILE)
get_target_property(_CD_FILE ${_CD_TARGET} LOCATION_${CMAKE_BUILD_TYPE})
endif()
- #do we add it to all CDs?
+ # do we add it to all CDs?
list(FIND _CD_FOR all __cd)
if(NOT __cd EQUAL -1)
list(REMOVE_AT _CD_FOR __cd)
list(INSERT _CD_FOR __cd "bootcd;livecd;regtest")
endif()
- #do we add it to bootcd?
+ # do we add it to bootcd?
list(FIND _CD_FOR bootcd __cd)
if(NOT __cd EQUAL -1)
- #whether or not we should put it in reactos.cab or directly on cd
+ # whether or not we should put it in reactos.cab or directly on cd
if(_CD_NO_CAB)
- #directly on cd
+ # directly on cd
foreach(item ${_CD_FILE})
if(_CD_NAME_ON_CD)
- #rename it in the cd tree
+ # rename it in the cd tree
set(__file ${_CD_NAME_ON_CD})
else()
get_filename_component(__file ${item} NAME)
endif()
set_property(GLOBAL APPEND PROPERTY BOOTCD_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}")
- #add it also into the hybridcd if not specified otherwise
+ # add it also into the hybridcd if not specified otherwise
if(NOT _CD_NOT_IN_HYBRIDCD)
set_property(GLOBAL APPEND PROPERTY HYBRIDCD_FILE_LIST "bootcd/${_CD_DESTINATION}/${__file}=${item}")
endif()
endforeach()
+ # manage dependency
if(_CD_TARGET)
- #manage dependency
add_dependencies(bootcd ${_CD_TARGET} registry_inf)
endif()
else()
- #add it in reactos.cab
+ # add it in reactos.cab
dir_to_num(${_CD_DESTINATION} _num)
file(RELATIVE_PATH __relative_file ${REACTOS_SOURCE_DIR} ${_CD_FILE})
file(APPEND ${REACTOS_BINARY_DIR}/boot/bootdata/packages/reactos.dff.dyn "\"${__relative_file}\" ${_num}\n")
unset(__relative_file)
+ # manage dependency - target level
if(_CD_TARGET)
- #manage dependency - target level
add_dependencies(reactos_cab_inf ${_CD_TARGET})
endif()
# manage dependency - file level
@@ -340,34 +340,38 @@
endif()
endif() #end bootcd
- #do we add it to livecd?
+ # do we add it to livecd?
list(FIND _CD_FOR livecd __cd)
if(NOT __cd EQUAL -1)
- #manage dependency
+ # manage dependency
if(_CD_TARGET)
add_dependencies(livecd ${_CD_TARGET} registry_inf)
endif()
foreach(item ${_CD_FILE})
if(_CD_NAME_ON_CD)
- #rename it in the cd tree
+ # rename it in the cd tree
set(__file ${_CD_NAME_ON_CD})
else()
get_filename_component(__file ${item} NAME)
endif()
set_property(GLOBAL APPEND PROPERTY LIVECD_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}")
- #add it also into the hybridcd if not specified otherwise
+ # add it also into the hybridcd if not specified otherwise
if(NOT _CD_NOT_IN_HYBRIDCD)
set_property(GLOBAL APPEND PROPERTY HYBRIDCD_FILE_LIST "livecd/${_CD_DESTINATION}/${__file}=${item}")
endif()
endforeach()
endif() #end livecd
- #do we need also to add it to hybridcd?
+ # do we need also to add it to hybridcd?
list(FIND _CD_FOR hybridcd __cd)
if(NOT __cd EQUAL -1)
+ # manage dependency
+ if(_CD_TARGET)
+ add_dependencies(hybridcd ${_CD_TARGET})
+ endif()
foreach(item ${_CD_FILE})
if(_CD_NAME_ON_CD)
- #rename it in the cd tree
+ # rename it in the cd tree
set(__file ${_CD_NAME_ON_CD})
else()
get_filename_component(__file ${item} NAME)
@@ -376,23 +380,23 @@
endforeach()
endif() #end hybridcd
- #do we add it to regtest?
+ # do we add it to regtest?
list(FIND _CD_FOR regtest __cd)
if(NOT __cd EQUAL -1)
- #whether or not we should put it in reactos.cab or directly on cd
+ # whether or not we should put it in reactos.cab or directly on cd
if(_CD_NO_CAB)
- #directly on cd
+ # directly on cd
foreach(item ${_CD_FILE})
if(_CD_NAME_ON_CD)
- #rename it in the cd tree
+ # rename it in the cd tree
set(__file ${_CD_NAME_ON_CD})
else()
get_filename_component(__file ${item} NAME)
endif()
set_property(GLOBAL APPEND PROPERTY BOOTCDREGTEST_FILE_LIST "${_CD_DESTINATION}/${__file}=${item}")
endforeach()
+ # manage dependency
if(_CD_TARGET)
- #manage dependency
add_dependencies(bootcdregtest ${_CD_TARGET} registry_inf)
endif()
else()