visegrip Posted April 27, 2012 Posted April 27, 2012 2 Oleg_Sch,I am using version 1.5.0.2367 of the modified module on XP SP3 x86.I created a config.txt with Language Sections. By chance, there were syntax errors in the Language Sections, but the Main Section was without any syntax errors.After I made the SFX with this config.txt, I tested it by running the SFX with the language switch -sfxlang:nnnn.The software was installed but the language section was NOT run. There were NO error messages. Usually, if the main section has syntax errors there is an error message giving the line number where the syntax error is located.After I corrected the syntax error in the config.txt and rebuilt the SFX. I tested again with the language switch and the result was that the software was installed and the language section WAS run.So, I think this would be a bug. Shouldn't the module give a similar error message for syntax errors in the language sections of the config.txt?Otherwise it appears as if the installation is complete, including the language section parameters.Thanks again, for a very useful tool.
gora Posted April 27, 2012 Posted April 27, 2012 2 visegrip 1 Show your config file (with errors) 2 Give the step by step instructions to reproduce the bug.
visegrip Posted April 28, 2012 Posted April 28, 2012 2 visegrip 1 Show your config file (with errors) 2 Give the step by step instructions to reproduce the bug.First, I am sorry but my description of the issue in my previous post is not correct.So, ignore my previous post completely.After more testing, this particular syntax error is not detected by the module at all.It doesn't matter if it is in the main section or a language section of the config.txt.I am sorry if this is a previously known limitation of the module.Therefore, I have reduced the config.txt to: ;!@Install@!UTF-8!GUIMode="2"MiscFlags="4"Title="PhotoScape v.3.6.2"SetEnvironment="app_name=PhotoScape"SetEnvironment="app_path=%ProgramFiles%\\%app_name%\\"SetEnvironment="add_reg=rundll32.exe advpack.dll,LaunchINFSection PhotoScapeReg.inf,DefaultInstall,3,N"SetEnvironment="add_files=hidcon:xcopy %app_name% \"%app_path%\" /s /e /i /y"RunProgram="%add_files%"RunProgram="%add_reg%"RunProgram="hidcon:cmd /c copy Lang\\ar\\lang_3_6.txt\" \"%app_path%\" /y"Shortcut="P,{%app_path%\\%app_name%.exe},{},{%app_name%},{},{%app_name%}"Shortcut="Du,{%app_path%\\%app_name%.exe},{},{},{},{%app_name%}"Shortcut="26,{%app_path%\\%app_name%.exe},{},{Microsoft\\Internet Explorer\\Quick Launch},{},{%app_name%}";!@InstallEnd@!The syntax error is on line 11. There is \" after lang_3_6.txt (which should not be there.)This mistake causes line 11 to fail however no error message is ever given by module.So, apparently the module is not capable of detecting this type of syntax error. ("hanging": \")Perhaps it could be added to the detection method of the module?
gora Posted April 28, 2012 Posted April 28, 2012 (edited) 2 visegrip It's not a bug!Example:;!@Install@!UTF-8!RunProgram="cmd /k Echo Print one double quote \" "RunProgram="cmd /k Echo Print two double quotes \" \" "RunProgram="cmd /k Echo Print three double quotes \" \" \" ";!@InstallEnd@!Another example:;!@Install@!UTF-8!SetEnvironment="prnt=cmd /k Echo Print path \"%programfiles%\\"RunProgram="%prnt%7-Zip\""RunProgram="%prnt%Adobe\\Reader 10.0\"";!@InstallEnd@!All the lines are correct! Edited April 28, 2012 by gora
visegrip Posted April 28, 2012 Posted April 28, 2012 Hmmmm.I understand both your examples.Thanks for those.So, to allow the possibility of your examples, my example is not detected as a syntax error by the module?Or to say it another way, if line 11 in my example is not a syntax error according to the module--what should be the expected result of line 11?
gora Posted April 28, 2012 Posted April 28, 2012 The module checks syntax of a design:Parameter_name="value_parameter"In "value_parameter" there should not be double quotes without a slash. The module doesn't check even/odd number of double quotes with slashes in "value_parameter".The rest in "value_parameter" the user should supervise all.The module can't replace a brain of the user!
visegrip Posted April 28, 2012 Posted April 28, 2012 In "value_parameter" there should not be double quotes without a slash. The module doesn't check even/odd number of double quotes with slashes in "value_parameter"...This explains everything.I guess I was expecting too much after receiving syntax error messages in the past which helped me to correct mistakes I had made.I guess syntax highlighting for \" would be nice in the text editor.Thanks again, gora. You have helped me to understand the working of the module a bit better.
visegrip Posted April 28, 2012 Posted April 28, 2012 Yes, something like that would be nice to use with config.txt.
visegrip Posted May 12, 2012 Posted May 12, 2012 2 Oleg_Sch or gora,Is %7zSfxFolder43% equivalent to:%PROGRAMFILES%\Common Filesor C:\Program Files\Common Files??
gora Posted May 12, 2012 Posted May 12, 2012 (edited) Read here, pleaseBonus Edited May 12, 2012 by gora
gora Posted May 13, 2012 Posted May 13, 2012 Modules, help file, site updated 1.5 beta (build 2478) 05/10/12 1.6 develop (build 2478) 05/10/12 + Support for encryption
visegrip Posted May 21, 2012 Posted May 21, 2012 (edited) 2 Oleg_Sch or gora,Question:What is the command line to add two languages in a 7zSFX with many language sections?I have tried:7zSFX.exe -sfxlang:nnnn:mmmm7zSFX.exe -sfxlang:nnnn+mmmm7zSFX.exe -sfxlang:nnnn;mmmm7zSFX.exe -sfxlang:nnnn,mmmmIs it possible?Next Question,I'm having problems with:\"%^PROGRAMFILES%\\Some Software Name\"I want:%PROGRAMFILES%\Some Software NameI don't want:C:\Program File\Some Software NameWhat I am getting:%^PROGRAMFILES%\Some Software NamePurpose:I am trying to add a Type REG_EXPAND_SZ value to the registry.How do I get the string name returned instead of the string value for %PROGRAMFILES% ?Thanks. Edited May 21, 2012 by visegrip
gora Posted May 21, 2012 Posted May 21, 2012 (edited) 1 No. It is impossible. Syntax of a key:-sfxlang:xxxx The key of sfxlang can be only one in CL2 Export your key to the.reg file and bring him here. I convert it to a line of a config Edited May 21, 2012 by gora
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now