PDA

View Full Version : Command Line Options



dbuechel
02-28-2012, 02:50 AM
Hey,

i have two problems:

i want to save my compiler variable when i make a setup with the function #Edit INI

next try - i load this ini file with command line option /CV

my problem: #Edit INI work only when i put a "=" at the INI item field - example:

Don´t work: _AUSWAHLRN_ "[_AUSWAHLRN_]"
work: _AUSWAHLRN_="[_AUSWAHLRN_]"

the biggest problem is - that the command line field is to short - with only 127 characters.

or can i read direkt a ini file by command line ?

linder
02-28-2012, 03:01 AM
Hello,

Well, the general Windows INI format is:

[section]
keyname=value

In other words, your _AUSWAHLRN_ "[_AUSWAHLRN_]" is not an INI item at all ;-) So it is the expected Windows behavior that this does not work! keyname=valuename translates into your _AUSWAHLRN_="[_AUSWAHLRN_]" which does work fine.

Friedrich

dbuechel
02-28-2012, 03:03 AM
[section]
keyname=value

In other words, your _AUSWAHLRN_ "[_AUSWAHLRN_]" is not an INI item at all ;-) So it is the expected Windows behavior that this does not work! keyname=valuename translates into your _AUSWAHLRN_="[_AUSWAHLRN_]" which does work fine.

Friedrich

hey,

That's right, and I can live with it ;)

But what should I do when i have more then 127 charaters ?!

linder
02-28-2012, 03:51 AM
But what should I do when i have more then 127 charaters ?!

Not sure what 127 byte limitation means in this case. Yes, there is a Windows/DOS command line limitation (depends on different factors), but if you are using a batch file, this is definitely >127 bytes. And there is no 127 bytes command line limitation in the SetupBuilder command line compiler per-se.

See attached screenshot. I passed a 200 byte value to the [TEST1] compiler variable without any problem.

Friedrich

linder
02-28-2012, 10:57 AM
BTW, if you are interested, I can post my test .sb7 project and the batch.bat file.

Friedrich

dbuechel
02-29-2012, 01:11 AM
ok

with a batch file its work - but your function Run Command Line - or Run Program => Command Line have the limit.

I have make a batch file - with 739 characters.

But it is true that I only have one compiler variable can be passed by command line?

In the online help I was able to find anything.

linder
02-29-2012, 01:14 AM
Hello,

You can pass multiple compiler variable values via the sb7.exe command line compiler.

No, not our Run Program command line function has a 127 bytes limit. There is a specific Windows limit (but it depends on the Windows version).

Friedrich

dbuechel
02-29-2012, 01:34 AM
Hello,

You can pass multiple compiler variable values via the sb7.exe command line compiler.

No, not our Run Program command line function has a 127 bytes limit. There is a specific Windows limit (but it depends on the Windows version).

Friedrich

i have 15 compiler variable - the setup take only the first !

i use windows 7 - and your function Run command Line can only this length of string:

12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 1234

linder
02-29-2012, 01:46 AM
The entry fields have a limit of 254. This has nothing to do with the command line length of your compiled .exe.

Create a runtime variable, e.g. %MY_COMMANDLINE% and then you can use a command line value of up to 1,024 bytes.

BTW, if you can only pass one value then you are doing something wrong. See attached screenshot.

The following command line passes two compiler variable values to the compiler:

sb7.exe" /C "c:\sbtest\galedon.sb7" /CV TEST1 "AAAAAAAAAA" /CV TEST2 "BBBBBBBBBB"

BTW, make sure you have defined the compiler variables in the Compiler Variables Visualizer!

Hope this helps.

Friedrich

dbuechel
02-29-2012, 02:20 AM
lol

i have found the first problem - i have make sb7.exe" /C "c:\sbtest\galedon.sb7" /CV TEST1 "AAAAAAAAAA" TEST2 "BBBBBBBBBB"

and not sb7.exe" /C "c:\sbtest\galedon.sb7" /CV TEST1 "AAAAAAAAAA" /CV TEST2 "BBBBBBBBBB"

:(

ok - but i have now the next problem:

command line: /CV _AUSWAHLRN_ "|Standard - Deutsch/English|Fränkische|REHAU"

setup select only Standard & Rehau

Command Line: /CV _AUSWAHLAW_ "|standard - update"

setup select two lines !

Command Line:
/CV _TREIBER_ "|BDE|DAO|ALADDIN_DIAGNOSTICS|HARDLOCK|HASP|HELPREG |OPENDWG_CAE|ZIPDLL"

Setup forget one line!

linder
02-29-2012, 02:32 AM
Sorry, but I do not understand. What kind of dialog is this and what are you doing to select the lines in the listbox?

Friedrich

dbuechel
02-29-2012, 03:35 AM
the SKU Management Wizard are the dialogs.

the select entry are from the commad line

excample:

/CV _AUSWAHLAW_ "|standard - update"

picture is the SKU Wizard

linder
02-29-2012, 03:57 AM
Hmm, you pass a compiler variable via the command line and then use this value in the SKU? No, by design it is not supposed to work. So if you see a value in the SKU screen that you passed via the command line then it was only "luck".

Friedrich

linder
02-29-2012, 04:09 AM
BTW, and the compiler variable value must not contain a vertical bar. Your command line value can't be corretly processed.

"|Standard - Deutsch/English|Fränkische|REHAU" is not a valid compiler variable value.

Friedrich

dbuechel
03-01-2012, 12:26 AM
Hmm, you pass a compiler variable via the command line and then use this value in the SKU? No, by design it is not supposed to work. So if you see a value in the SKU screen that you passed via the command line then it was only "luck".

Friedrich

"luck" ? :cool:

in your help file can´t find the word "luck":


Preprocessor: Set Compiler Variable Value

Enter the following command line statement into a batch file or any other program that has the ability to run command line statements, such as Scheduled Tasks in the Control Panel to read the constant value from the compiler command line:

SB7.EXE /C "C:\Development\Sample.sb7" /CV MYCOMPILERVAR "1"

where:

SB7.EXE is the path to the SetupBuilder 7 executable

/C is the compiler switch

"C:\Development\Sample.sb7" is the path to the project file you want to compile

/CV is the switch to read the compiler variable value from the compiler command line

MYCOMPILERVAR is the name of the compiler variable to define

"1" is the new value of the compiler variable



and about this:


BTW, and the compiler variable value must not contain a vertical bar. Your command line value can't be corretly processed.

"|Standard - Deutsch/English|Fränkische|REHAU" is not a valid compiler variable value.

Friedrich

when i make a compiler variable - see picture 1 - and then display the value in a massage box - can i see a vertical bar. -

Or can i only see this ?!:confused:

For what is this function if it does not work as they should actually?

linder
03-01-2012, 12:33 AM
Hello,

Yes, the problem is that the "Value List" does not check for the vertical bar ("|"). So we have fixed this in 7.7. In the "Variable Value" the check works as expected.

And to be on the safe side, we have updated the documentation and added a note that "a compiler variable value must not contain a vertical bar ("|").

Friedrich

dbuechel
03-01-2012, 12:44 AM
thank you :) :) :) :) :) :) :)

but for the future - what is correct - this:

command line: /CV _AUSWAHLRN_ "|Standard - Deutsch/English|Fränkische|REHAU"

or:

?

dbuechel
03-06-2012, 06:28 AM
Hello,

Yes, the problem is that the "Value List" does not check for the vertical bar ("|"). So we have fixed this in 7.7. In the "Variable Value" the check works as expected.

And to be on the safe side, we have updated the documentation and added a note that "a compiler variable value must not contain a vertical bar ("|").

Friedrich

Hey,

can you tell me when the 7.7 ready?


db

linder
03-06-2012, 06:36 AM
No, we do not have a ETA yet (still performing Win8 tests).

But I think there is some misunderstanding here. In V7.7, the '|' in a "Variable List" entry field is detected as invalid character now and then an error message is displayed (similar to what you see in the "Variable Value"). Please note that this does not make the '|' valid at all.

Friedrich

dbuechel
03-06-2012, 06:55 AM
No, we do not have a ETA yet (still performing Win8 tests).

But I think there is some misunderstanding here. In V7.7, the '|' in a "Variable List" entry field is detected as invalid character now and then an error message is displayed (similar to what you see in the "Variable Value"). Please note that this does not make the '|' valid at all.

Friedrich

ok - when this are misunderstanding is - what i must do that i can use the command line function ?

dbuechel
03-06-2012, 09:24 AM
question about the Variable Value by the compilerVariable:

is it correct that the max length is 259 by this field ?

the field - Value List have a max length from 1039.

linder
03-06-2012, 10:10 AM
Hello,

I fear I do not understand.

The command line switches are documented in the F1 help or PDF manual. But the command line can't be used to "control" the functionality of your SKU feature. The command line compiler is there to automate the compilation process (no user intervention).

Friedrich

linder
03-06-2012, 10:13 AM
Hello,

Yes, this is correct. The limit of a single entry is 259 bytes and the limit of a SKU list is 1,039 bytes.

Friedrich

linder
03-06-2012, 10:21 AM
BTW, I am not sure yet but I "think" (we have to check this) that we can increase the limit of the "list" in the SKU (e.g. from 1,024 bytes to 5,196 bytes).

Friedrich

dbuechel
03-07-2012, 12:32 AM
Hello,

I fear I do not understand.

The command line switches are documented in the F1 help or PDF manual. But the command line can't be used to "control" the functionality of your SKU feature. The command line compiler is there to automate the compilation process (no user intervention).

Friedrich

I also do not understand!

I feel it exactly automatism - I do not want user intervention - that is to serve only as a check! and if I use this function, the variable is read but do not seem right.

Am I the function: "Do not prompt when compiling from Command Line" activate ? So I do not see the error?

The same with "the increase of the "list" in the SKU (e.g. from 1,024 bytes to 5,196 bytes)."

Good - then I can grab three variables dialogs in one dialogs - but what good is that if the default value is limited to 259 bytes - nothing!

sorry - but you have not thought of this function to an end.

linder
03-07-2012, 12:52 AM
Thanks for your feedback.

With regard to your comment "but you have not thought of this function to an end". The SKU and the command line capability to pass compiler variables are completely different animals! The SKU can not (and should not) "process" command line arguments. We have added a not to the documentation to make clear that the SKU is not a command line processor.

Friedrich

dbuechel
03-07-2012, 01:26 AM
Thanks for your feedback.

With regard to your comment "but you have not thought of this function to an end". The SKU and the command line capability to pass compiler variables are completely different animals! The SKU can not (and should not) "process" command line arguments. We have added a not to the documentation to make clear that the SKU is not a command line processor.

Friedrich

I do not understand.

They have a great feature - which actually leaves something to be desired - but the existing fault - I call this a mistake - and thus to change its user to listen to their programs - they do not want.

Rather just write the documentation and change consequently the functioning dead.

linder
03-07-2012, 01:40 AM
Hello,

Of course, I see where you are coming from. But by design, the SKU can't process command line arguments. This is an oversight in the documentation on our part for which I apologize.

Let me check this again with you. As I understand it, you would like to define a compiler variable (e.g. _AUSWAHLRN_) with the SKU option enabled. Then you would like to pass the "Value List" (e.g. "|Standard - Deutsch/English|Fränkische|REHAU") via the command line to the compiler so the SKU Wizard displays:

Standard - Deutsch/English
Fränkische
REHAU

Is my assumption correct?

Friedrich

dbuechel
03-07-2012, 02:04 AM
Thank You ! :)

ok

Here's an example:

SKU _Auswahl_ List dialog:
Test1
Test2
Test3
Test4
Test5
Test6
Test7
....

long list ;)

ok - this SKU dialogue has no entry in the Variable Value.

If we want to create a setup - the query comes up and the user selects eg Test1 and from Test59 -everything else happens in the script.

Now it is also true that there are certain setup is ALWAYS the Test1 Test3 + + Test44 .... included!

Now it makes sense to call the setup via command line so that they are always initialized!

The user can also see that everything was dialed correctly.

Another possibility is toat the end of the creation of a setup user settings via the function:

# Edit ini: C: \ setup.ini _Auswahl_ => INI Item = "[_Auswahl_]"

to save.

Why?

After the client setup has been tested - can this be with all setting on the command line again loaded and created -if an error was found and thus have again changed files!

linder
03-07-2012, 08:31 AM
Hello,

Okay. We have enhanced the SKU Wizard. For 'Combo entry with list of values (single-select)' and 'List entry with list of values (multi-select)' SKU items, it should be possible now to pass a list of items separated by a vertical bar ("|") via the command line.

See attached screenshot.

This enhancement will be available in V7.7

Friedrich

dbuechel
03-08-2012, 12:17 AM
Hello,

Okay. We have enhanced the SKU Wizard. For 'Combo entry with list of values (single-select)' and 'List entry with list of values (multi-select)' SKU items, it should be possible now to pass a list of items separated by a vertical bar ("|") via the command line.

See attached screenshot.

This enhancement will be available in V7.7

Friedrich

WoW - I love you :D

Before now, but I have misunderstood something - I need to ask a question about your picture.

I see the command line and also the SKU dialogue - on the command line is an example / CV _TREIBER_ "|BDE|DAO ........

I thought when I run the setup so are the entries - BDE DAO .... already selected ?

In this SKU dialogue, however, are not there.
Did I misunderstand what now?

Sorry if I demand again :(

linder
03-08-2012, 01:10 AM
Hello,

In the SKU dialog, the List Entry "Value List" displays a list of entries. You can select multiple entries in that list, but by default, none of the entries are selected (highlighted).

Friedrich

dbuechel
03-08-2012, 01:44 AM
Hello,

In the SKU dialog, the List Entry "Value List" displays a list of entries. You can select multiple entries in that list, but by default, none of the entries are selected (highlighted).

Friedrich

oh - which is - I do not have visual control over what the compiler does or does not do: (

this also applies if I have a value directly in the dialogue SKU pretend that?

linder
03-08-2012, 02:01 AM
Hello,

I fear I do not understand what "...visual control over what the compiler does..." means, sorry :(

The SKU Wizard displays a list of entries (the value list comes from the command line [V7.7] -OR- is hard coded in the SKU). In the "List" wizard dialog, you can then select multiple-items and then use the resulting new compiler variable value in your script to handle different actions.

Friedrich

dbuechel
03-08-2012, 02:57 AM
Hello,

I fear I do not understand what "...visual control over what the compiler does..." means, sorry :(

The SKU Wizard displays a list of entries (the value list comes from the command line [V7.7] -OR- is hard coded in the SKU). In the "List" wizard dialog, you can then select multiple-items and then use the resulting new compiler variable value in your script to handle different actions.

Friedrich

I think - we got on the wrong all the time - which is probably also my bad english :(


look screen 1 - i make a compiler variable with SKU Management.

when i start the compiler - the sku dialog comes and I select TEST2 - TEST5 - TEST7 - see my cursor ;) (screen 2)

and when i want to compile this script by command line:

.... /CV "|TEST3|TEST4|TEST7"

The same dialog comes up - not a new one is created -
The only difference is that the pre-selected areas TEST3 and TEST4 and TEST7 already by the calling of the commando line is - you do not see cursor from me - (screen3)

BUT now I could compile it with my mouse either the setup OR TEST1 select any additional if it is with the setup.

I call that a visual check.

linder
03-08-2012, 03:15 AM
Hello,

Yes, I fear there was some fundamental misunderstanding.

No, you can't SELECT items in a SKU list from the command line! The /CV command line switch DEFINES the VALUE of a compiler variable. And the SKU Wizard does exactly the same: it sets a VALUE of a compiler variable. What you are trying to accomplish is to SELECT (highlight) items in a list control. But from the technical point-of-view, this is not possible (because the /CV command line switch sets the value of a compiler variable, it does not select items from a list of values).

Do you see what I mean?

Friedrich

dbuechel
03-08-2012, 03:26 AM
Yes and no ;)


The version 7.6 works already now exactly as I'd like - except for this small error ;)

see http://www.lindersoft.com/forums/showpost.php?p=62504&postcount=10

linder
03-08-2012, 06:16 AM
The problems is that your method only works (partially) by luck. The SKU Wizard "selects" some of your list items because there is a bug in the command line processor. By design, it should not select anything in this specific case.

But we have enhanced the command line processor now. You can define a SKU "Value List" or select existing items in a SKU "Value List" from the command line.

CHANGE : (sync from SB8) IDE: If the SKU Management Configuration option 'Value List' is blank, the /CV command line compiler switch lets you define the SKU 'Value List' for 'Combo entry with list of values (single-select)' and 'List entry with list of values (multi-select)' SKU entry types by passing a list of items separated by a vertical bar ("|").

CHANGE : (sync from SB8) IDE: If the SKU Management Configuration option 'Value List' is defined, the /CV command line compiler switch lets you select one item in the SKU 'Value List' for 'Combo entry with list of values (single-select)' and one or multiple items in the 'List entry with list of values (multi-select)' SKU entry types by passing a list of items separated by a vertical bar ("|").

I hope this will work for you.

Friedrich

dbuechel
03-09-2012, 12:11 AM
If you were a woman - I would send you a bouquet ;)

linder
03-09-2012, 01:13 AM
Thank you :)

Friedrich