From: Brian S. <xue...@us...> - 2008-02-13 21:08:24
|
Update of /cvsroot/popfile/windows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18166 Modified Files: Tag: b0_22_2 dbicapture.nsi ioDTL.ini Log Message: Replaced the hard-coded strings in the InstallOptions INI file with language strings (only "English" is supported at present) Index: ioDTL.ini =================================================================== RCS file: /cvsroot/popfile/windows/Attic/ioDTL.ini,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** ioDTL.ini 13 Feb 2008 21:04:33 -0000 1.1.2.1 --- ioDTL.ini 13 Feb 2008 21:08:21 -0000 1.1.2.2 *************** *** 1,4 **** #------------------------------------------------------------------- ! # ioDTL.ini #------------------------------------------------------------------- --- 1,26 ---- #------------------------------------------------------------------- ! # ! # ioDTL.ini --- This file is used by "dbicapture.nsi", the NSIS script ! # used to create the POPFile DBI Trace Capture utility. ! # This file defines the layout of the page used to select ! # the level of detail required (the "trace level"). ! # ! # Copyright (c) 2008 John Graham-Cumming ! # ! # This file is part of a utility for use with POPFile ! # ! # POPFile is free software; you can redistribute it and/or modify it ! # under the terms of version 2 of the GNU General Public License as ! # published by the Free Software Foundation. ! # ! # POPFile is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY; without even the implied warranty of ! # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! # GNU General Public License for more details. ! # ! # You should have received a copy of the GNU General Public License ! # along with POPFile; if not, write to the Free Software ! # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! # #------------------------------------------------------------------- *************** *** 8,12 **** [Field 1] Type=GroupBox ! Text=DBI Trace Level Selection Left=0 Right=300 --- 30,34 ---- [Field 1] Type=GroupBox ! Text= Left=0 Right=300 *************** *** 16,20 **** [Field 2] Type=RadioButton ! Text=Trace Level 0 (trace disabled) Left=5 Right=298 --- 38,42 ---- [Field 2] Type=RadioButton ! Text= Left=5 Right=298 *************** *** 26,30 **** [Field 3] Type=RadioButton ! Text=Trace Level 1 (default, Trace DBI method calls returning with results or errors) Left=5 Right=298 --- 48,52 ---- [Field 3] Type=RadioButton ! Text= Left=5 Right=298 *************** *** 35,39 **** [Field 4] Type=RadioButton ! Text=Trace Level 2 (Trace method entry with parameters and returning with results) Left=5 Right=298 --- 57,61 ---- [Field 4] Type=RadioButton ! Text= Left=5 Right=298 *************** *** 44,48 **** [Field 5] Type=RadioButton ! Text=Trace Level 3 (As level 2, adding some high-level information from the driver and some internal information from the DBI) Left=5 Right=298 --- 66,70 ---- [Field 5] Type=RadioButton ! Text= Left=5 Right=298 *************** *** 53,57 **** [Field 6] Type=RadioButton ! Text=Trace Level 4 (As level 3, adding more detailed information from the driver) Left=5 Right=298 --- 75,79 ---- [Field 6] Type=RadioButton ! Text= Left=5 Right=298 *************** *** 62,66 **** [Field 7] Type=Label ! Text=Trace level 1 is best for a simple overview of what's happening. Trace level 2 is a good choice for general purpose tracing. Levels 3 and above are best reserved for investigating a specific problem, when you need to see "inside" the driver and DBI. Left=5 Right=298 --- 84,88 ---- [Field 7] Type=Label ! Text= Left=5 Right=298 *************** *** 69,73 **** Flags=Group - #-------------------- # End of ioDTL.ini --- 91,94 ---- Index: dbicapture.nsi =================================================================== RCS file: /cvsroot/popfile/windows/Attic/dbicapture.nsi,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** dbicapture.nsi 13 Feb 2008 21:06:19 -0000 1.1.2.2 --- dbicapture.nsi 13 Feb 2008 21:08:21 -0000 1.1.2.3 *************** *** 67,70 **** --- 67,72 ---- #-------------------------------------------------------------------------- + SetCompressor /solid lzma + ;-------------------------------------------------------------------------- ; Symbols used to avoid confusion over where the line breaks occur. *************** *** 84,88 **** ;-------------------------------------------------------------------------- ! !define C_VERSION "0.0.2" !define C_OUTFILE "dbicapture.exe" --- 86,90 ---- ;-------------------------------------------------------------------------- ! !define C_VERSION "0.0.3" !define C_OUTFILE "dbicapture.exe" *************** *** 194,197 **** --- 196,207 ---- !define MUI_FINISHPAGE_NOAUTOCLOSE + ;---------------------------------------------------------------- + ; Customize MUI - General Custom Function + ;---------------------------------------------------------------- + + ; Use a custom '.onGUIInit' function to add language-specific texts to custom page INI file + + !define MUI_CUSTOMFUNCTION_GUIINIT "PFIGUIInit" + #-------------------------------------------------------------------------- # Define the Page order for the utility *************** *** 237,243 **** !macro PFI_DBICAP_TEXT NAME VALUE ! LangString ${NAME} ${LANG_ENGLISH} "${VALUE}" !macroend !insertmacro PFI_DBICAP_TEXT "PFI_LANG_DBICAP_SELECT_HDR" "Select the DBI_TRACE level" !insertmacro PFI_DBICAP_TEXT "PFI_LANG_DBICAP_SELECT_SUBHDR" "Enable or disable tracing of POPFile's database activity" --- 247,267 ---- !macro PFI_DBICAP_TEXT NAME VALUE ! LangString ${NAME} ${LANG_ENGLISH} `${VALUE}` !macroend + ; Strings used in the custom page used to select the trace level (this page may be suppressed) + + !insertmacro PFI_DBICAP_TEXT "PFI_LANG_SELECT_IO_BOX_HDR" "DBI Trace Level Selection" + + !insertmacro PFI_DBICAP_TEXT "PFI_LANG_SELECT_IO_LEVEL_0" "Trace Level 0 (trace disabled)" + !insertmacro PFI_DBICAP_TEXT "PFI_LANG_SELECT_IO_LEVEL_1" "Trace Level 1 (default, Trace DBI method calls returning with results or errors)" + !insertmacro PFI_DBICAP_TEXT "PFI_LANG_SELECT_IO_LEVEL_2" "Trace Level 2 (Trace method entry with parameters and returning with results)" + !insertmacro PFI_DBICAP_TEXT "PFI_LANG_SELECT_IO_LEVEL_3" "Trace Level 3 (As level 2, adding some high-level information from the driver and some internal information from the DBI)" + !insertmacro PFI_DBICAP_TEXT "PFI_LANG_SELECT_IO_LEVEL_4" "Trace Level 4 (As level 3, adding more detailed information from the driver)" + + !insertmacro PFI_DBICAP_TEXT "PFI_LANG_SELECT_IO_EXPLAIN" "Trace level 1 is best for a simple overview of what's happening. Trace level 2 is a good choice for general purpose tracing. Levels 3 and above are best reserved for investigating a specific problem, when you need to see $\"inside$\" the driver and DBI." + + ; Strings used for the main window, shown whilst the utility is running and when the report is complete + !insertmacro PFI_DBICAP_TEXT "PFI_LANG_DBICAP_SELECT_HDR" "Select the DBI_TRACE level" !insertmacro PFI_DBICAP_TEXT "PFI_LANG_DBICAP_SELECT_SUBHDR" "Enable or disable tracing of POPFile's database activity" *************** *** 338,341 **** --- 362,394 ---- #-------------------------------------------------------------------------- + # Installer Function: PFIGUIInit + # (custom .onGUIInit function) + # + # Used to complete the initialization of the utility. + # + # Language strings are used to populate the fields in the INI file, therefore + # this code cannot be included in '.onInit' (because the selected language + # is not available for use inside the '.onInit' function) + #-------------------------------------------------------------------------- + + Function PFIGUIInit + + ; This function adds language texts to the INI file used to define the + ; custom page used to select the value to be assigned to the DBI_TRACE + ; environment variable + + !insertmacro PFI_IO_TEXT "ioDTL.ini" "1" "$(PFI_LANG_SELECT_IO_BOX_HDR)" + + !insertmacro PFI_IO_TEXT "ioDTL.ini" "2" "$(PFI_LANG_SELECT_IO_LEVEL_0)" + !insertmacro PFI_IO_TEXT "ioDTL.ini" "3" "$(PFI_LANG_SELECT_IO_LEVEL_1)" + !insertmacro PFI_IO_TEXT "ioDTL.ini" "4" "$(PFI_LANG_SELECT_IO_LEVEL_2)" + !insertmacro PFI_IO_TEXT "ioDTL.ini" "5" "$(PFI_LANG_SELECT_IO_LEVEL_3)" + !insertmacro PFI_IO_TEXT "ioDTL.ini" "6" "$(PFI_LANG_SELECT_IO_LEVEL_4)" + + !insertmacro PFI_IO_TEXT "ioDTL.ini" "7" "$(PFI_LANG_SELECT_IO_EXPLAIN)" + + FunctionEnd + + #-------------------------------------------------------------------------- # Installer Function: SelectTraceLevelPage (generates a custom page) #-------------------------------------------------------------------------- |