NSIs graphic tutorial 3

Source: Internet
Author: User

Tutorial 2

============================
Iss2nsi v1.0a2
============================
Iss2nsi is a tool for convert Inno Setup script files into NSIs script files.

Usage:
============================
Program:
At the command prompt write: iss2nsi issscript. ISS [nsisscript. NSI]
If nsisied. NSI is no specified then the converted script will be
Saved with the same name of the issscript. ISS but with extension. NSI.

NIS edit Plugin:
1-close hm nis edit.
2-put hmne_iss2nsi.dll In the Plugins directory
(Default $ ProgramFiles \ hmsoft \ NIS edit \ plugins)
3-start hm nis edit.
4-you will found a new item in the Tools menu called "Convert innosetup script ".

Note: Before compile the converted script please check it, because
Complete compatibility is not available. I design this tool to convert my
Inno Setup scripts and is not tested with more complex scripts.

The source code is wrongly ded if you want to contribute to the project
For make the converted script 100% compatible with the original.
Please send my your modifications to ranametal@blistering.net
Note that this project is a modification to the Inno Setup 3.0.6
Compiler and modifications to the Inno Setup source files are under
The Inno Setup license (see: SRC \ is-Src \ is-license.txt ).

Note: the files in the SRC \ is-src directory are unmodified Inno Setup
Source files needed by the compile. Pas unit located in the src directory

---------------------------------------------------------
Hmne_iss2nsi.dll can be used to put this file in the Plugins under the nisedit directory without detailed tests. However, if it is for the version, Inno Setup 3.0.6. It is estimated that it should be okay.
Iss2nsi.rar

Although the version is too low, it should be easier to switch from the ISS script to NSIs learning.

Download the iss2nsi source code.

I don't have time to look at it, just compile it into a DLL. Have time to see how it works.

Iss2nsi_src.rar

Nisedit's enhanced version. I hope someone can help me to add a function. Otherwise, this version will not be better.

Put those files into the nisedit directory. In order to distinguish the original version, the program is renamed vnisedit.
The two versions can exist at the same time, but you must set vnisedit as the default editor to enable it by default.

Fixed:
1. Add a menu skin.
2. added the NSIs Function Wizard function. (Similar to the function in venis)
4. Do not pin the Help window to the top when you change the program to call help, because the top will make it impossible to switch to the editor window when viewing help.

Latest features (segment structure analysis)
The left is explained by vnisedit, And the right is analyzed by venis. Analysis object (makensis. NSI)

Panorama: Give it a try. The analysis speed is much better than venis. Basically, the view cannot flash. The view immediately responds to Real-Time Thread analysis when the code is changed.


What are the following questions,
1. How to control the availability and unavailability of the custom "Next" button
2. How can I add a change event to a component on a custom page?
3. I downloaded the foobar enhanced Chinese version installation file on this website and saw how the page "mui_page_components" was implemented, is how to change the left side of the page to display the description and concealed text

Blue Internet
There are three phases for controlling the next button: Before page initialization, during page initialization, and when the page is to be closed. Different stages correspond to different insert functions.

For example, to disable the next button before page initialization, The Mui interface can do this.

 

 

The following is a code snippet:
! Define mui_page_customfunction_pre componentpre
! Insertmacro mui_page_components

Function componentpre
Getdlgitem $0 $ hwndparent 1
Enablewindow $0 0
Functionend

Colonel
Then "2. How to add a change event for the component on the custom page", I have customized a configuration page, and I want the user to activate the "Next" button after completing the configuration, how can this be done?

Blue Internet
Add the notify flag to the control.
The example is in my signature.

You must first understand the functions of the getdlgitem and enablewindow commands.

Colonel
What about this problem?
3. I downloaded the foobar enhanced Chinese version installation file on this website and saw how the page "mui_page_components" was implemented, is how to change the left side of the page to display the description and concealed text
How can I make the tree directory in "mui_page_components" be selected only when I click the check box?

Blue Internet
Use resource hacker to adjust the control. The default UI file is NSIs \ contrib \ UIS \ modern.exe.
To the next special version of makensis.exe in my signature.

Colonel
I don't want to use onmouseoversection on the component selection page to display the description. If the set-up function can be added, I will think of this "Callback onmousedownsection"

I want to display it through the onchange event in the component directory.

I don't understand VC ++. If I do, I can change the code like MM.

Blue Internet
The special edition is like this. When you click a component, the description area will be displayed or changed.
The normal version is displayed as long as you move the mouse up. Have you ever tried it.

Colonel
Oh ~~~~~~~ I tried it. You changed the onmouseoversection callback. Right, mm. Have you ever performed the onchange event of the component? It is mainly used on custom pages.

Is this used? Call shell32.dll: shchangenoworkflow

Blue Internet
I don't know what you mean by "onchange event of components.
Is the function called when the component is changed? If yes, use function. onselchange directly.

Wq99
Hello everyone, I am a newbie,
When I was reading the function, I didn't find any parameter input.
Maybe my way of thinking is wrong.
Function fname
Functionend
How should we pass parameters?

Blue Internet
NSIs functions are actually pseudo functions and cannot pass parameters like C ++. If you need to pass parameters, use the stack.
For a typical example, see get parent directory in the appendix.

If the content in one edit changes, and the other component changes, how can this edit change event be written?

PS: Maybe I'm used to Delphi, so sometimes the component event name is different from yours.

Colonel
If the content in one edit changes, and the other component changes, how can this edit change event be written?

PS: Maybe I'm used to Delphi, so sometimes the component event name is different from yours.

Blue Internet
You can refer to NSIs \ contrib \ installoptions \ testpolicy. NSI

Wq99
File "$ {location} \ $ R0"
$ R0 is a file and the result is
Said there is no such file,
File "$ {location} \ 123.exe"
Then you can.

Strange, is my first sentence wrong?
File "$ {location} \ $ {R0}" is also incorrect.

Blue Internet
You can check whether the file $ R0 exists in the resource manager first. In general, there are few such strange files without extension extensions, and it is easy to treat them as directories without extension extensions.

Generally, the compiler reports are correct. Here is a test script. You can try it.
Test.zip

Wq99
Ah ~ Sorry, I did not say carefully.

$ R0 is a variable that pops out of the stack.
That is, 123.exe.
File "$ {location} \ $ R0"
That is, file "$ {location} \ 123.exe"

 

The following is a code snippet:
Push "123.exe"
......
Function installone
Pop $ R0
Detailprint $ R0
Setoutpath "$ instdir"
File "$ {location} \ $ R0"
Execwait '"$ instdir \ $ R0 "'
Functionend

Detailprint $ R0
Yes, you can print 123.exe
Change to file "$ {location} \ 123.exe.
How can I use $ R0?

Blue Internet
The file after the file command must be a file that exists in the current system at the time of compilation, and $ R0 must be compiled before the value will certainly fail. The variable is valid only when running.
If you want to change the name, use file "/oname = target file" "local file"
Oname = variables can be used in the target file.

Arthur810
Why is it empty in my "Installer language "?
Thank you for your advice.
Note: Windows XP SP2 Simplified Chinese System

Zhp0083
Manually specified once.
 

The following is a code snippet:
! Insertmacro mui_language "simpchinese"
Sjhome
How can I add files under the same directory as NSIs? How to Set it? Thank you!
.
Only files under the "counter-Strike Source" directory can be added. How can I add binfiles, config files, and so folders under "counter-Strike Source?

Blue Internet
File can use/R or/X.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.