hi, after the problem was resolved, i got another issue now: how does the installbuilder treat the variable output by setinstallervariablefromscriptoutput?

> <foreach>
>     <progressText>${msg(Installer.Progress.creatingTables.info)}</progressText>
>     <values>${DB_INIT_SCRIPTS}</values>
>     <variables>script</variables>
>     <actionList>
>         <showInfo>
>             <text>${script}</text>
>         </showInfo>
>     </actionList>
>  </foreach>

the xml code before is to get the script file name which is got from setinstallervariablefromscriptoutput, the ouput result is ${DB_INIT_SCRIPTS}, from the debug log i can see the content of ${DB_INIT_SCRIPTS} is correct but the ${script} content is wrong:

<values> : "${DB_INIT_SCRIPTS}" -> "C:PROGRA~1u2520-1.0mysqldbscriptsinitpqm_kpi_init.sql" <variables> : "script" -> "script"

<text> : "${script.dos}" -> "C:PROGRA~1┠-1.0mysqldbscriptsinitpqm_kpi_init.sql" all the backslashes are removed! did i miss somethings?

(Related to How to use setInstallerVariableFromScriptOutput?)

asked 10 Apr '12, 03:41

laiyongyong's gravatar image

laiyongyong
1131314
accept rate: 0%


The foreach interprets the backslashes as escape sequences. To fix it, you could use:

 <foreach>
     <progressText>${msg(Installer.Progress.creatingTables.info)}</progressText>
     <values>${DB_INIT_SCRIPTS.escape_backslashes}</values>
     <variables>script</variables>
     <actionList>
         <showInfo>
             <text>${script}</text>
         </showInfo>
     </actionList>
  </foreach>
link

answered 10 Apr '12, 04:57

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

hi, thanks again, i already found that in the USER GUIDE "4.2 Modifier Suffixes". :)

link

answered 10 Apr '12, 05:04

laiyongyong's gravatar image

laiyongyong
1131314
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×8

Asked: 10 Apr '12, 03:41

Seen: 942 times

Last updated: 10 Apr '12, 05:04