Background technology
The installation procedure framework is a kind of instrument of the developer's of help fabrication and installation program, and the IzPack framework is wherein a kind of.Initial IzPack framework only provides two kinds of Installation Modes: graphic user interface (GUI) pattern and order line (CLI) pattern.
In the GUI pattern, the user imports " java-jar install.jar " and starts installation procedure in order line, and wherein Install.jar is the title of installation file; Then installation procedure start a graphical Setup Wizard step by step with user interactions, each go on foot all to the user prompt relevant information, being set by the user needs the parameter (as installation path) imported.In the GUI pattern, Setup Wizard may provide the installation setting (as the default installation path) of some acquiescences, and these default settings are given when the fabrication and installation program, and the user can change these parameter settings by the needs according to oneself when installation procedure starts.After the user finished all parameter settings, installation procedure just can bring into operation.After the installation task was finished, the user can preserve these parameter settings, and can use described parameter setting in CLI Installation Modes in the future.Consult shown in Figure 1, under the GUI pattern operation installation procedure main flow process as follows:
Step 100: installation procedure reads all default parameters settings and it is added in the mapping table.
Step 110: installation procedure shows GUI installation interface and corresponding default parameter value to the user successively.
Step 120: installation procedure is changed some parameter setting according to user's operation.
Step 130: installation procedure is according to relevant parameters setting in the information updating mapping table of user's input.
Step 140: installation procedure contracts the software product decompress(ion) and carries out subsequent installation according to the parameter setting of user's input.
On the other hand, in the CLI pattern, the user imports " java-jar install.jarsavedConfig.xml " and starts installation procedure in order line, wherein Install.jar is the title of installation file, savedConfig.xml is whole titles (comprising path, file place) of having preserved the configuration file of parameter setting before, from " java-jar install.jar savedConfig.xml ", can find out, the memory location of configuration file is under the same directory of installation file, and the storage format of this configuration file is XML (also can be extended formatting).Then, described installation procedure checks whether the parameter setting in the configuration file is all effective, and invalid if some parameter is provided with, then installation procedure will provide corresponding error information and withdraw from installation; If all parameter settings are all effective, then installation procedure brings into operation.Consult shown in Figure 2, under the CLI pattern operation installation procedure main flow process as follows:
Step 200: installation procedure reads all default parameters settings and it is added in the mapping table.
Step 210: installation procedure obtains the parameter setting of preserving in advance of user's appointment.
Step 220: installation procedure is written into all CLI panels and reads the relevant parameters setting.
Step 230: installation procedure judges further whether described parameter setting of reading is effective, if then carry out step 240; Otherwise, withdraw from and install and to the user prompt relevant error information.
Step 240: installation procedure is provided with according to the parameter that reads and upgrades relevant parameters setting in the mapping table.
Step 250: installation procedure contracts the software product decompress(ion) and carries out subsequent installation according to the parameter setting in the mapping table.
At present, in production environment, software product need be installed on many machines usually.If the installation of this product on described many machines is provided with all identical, then the user only need use the GUI Installation Modes one time, at the default parameters that obtains installation procedure the back being set changes and preserves it according to the application demand of oneself, like this, just, can use the CLI Installation Modes to call the parameter setting of preservation and finish all installations in the installation process afterwards.
Yet, if the installation of software product on described many machines is provided with incomplete same, and have only very a spot of parameter setting to need change (as installation path) when on every machine, installing, the user all uses the GUI pattern that same software product is installed on every machine so, and in installation process each time, have only minimal change though the parameter setting is compared with last installation, the user still will reset all parameter settings one time, and this will waste a lot of times.Perhaps, use the GUI pattern to re-use in the installation process of CLI pattern earlier the user, in the configuration file that the employed default value of some installation procedure is modified and is kept at when described installation procedure moves under the GUI pattern, and the default value before the change may be used (as: default value of Setup Type changes minimum installation into by installing fully, and the parameter setting that installation procedure need use when moving is to install fully) under the CLI pattern when described installation procedure move under the CLI pattern.For this situation, the support staff needs the manually relevant parameter setting of change, if described parameter configuration is stored in database or some the baroque configuration files, the support staff's bottom technology that need understand described database and described configuration file could be made amendment to this parameter configuration so, and this has brought difficulty for to a certain extent support staff's work.
Summary of the invention
The embodiment of the invention provides a kind of installation method and device thereof of software, so that the user can use the designated parameters setting when using graphic user interface pattern install software.
Embodiment of the invention technical scheme comprises:
A kind of installation method of software comprises:
A, the parameter setting of reading acquiescence and user-specified parameters setting, and the parameter setting of described acquiescence is loaded in the mapping table;
B, load all command mode panels, described designated parameters setting is loaded into corresponding command mode panel and the validity of described designated parameters setting is verified, and after all designated parameters settings are by checking, relevant parameters setting in the described mapping table of renewal is set according to these all designated parameters;
C, load graphic user interface pattern panel and from mapping table, read the required parameter setting of each graphic user interface pattern panel successively, and continue the subsequent installation of software.
A kind of software erecting device comprises:
First storage unit is used for the parameter setting of memory map assignments, acquiescence and all graphic user interface pattern panel and order line panels;
Second storage unit is used to store the designated parameters setting;
First processing unit, be used to load all command mode panels, described designated parameters setting is loaded into corresponding command mode panel and the validity of described designated parameters setting is verified, and after all designated parameters settings are by checking, relevant parameters setting in the described mapping table of renewal is set according to these all designated parameters;
Second processing unit is used for loading successively graphic user interface pattern panel and reads the required parameter setting of each graphic user interface pattern panel from mapping table;
Performance element is used to carry out subsequent installation.
Beneficial effect of the present invention is as follows:
The present invention by reading acquiescence earlier parameter setting and designated parameters setting and two kinds of parameter settings are loaded in the corresponding C LI panel, then according to described two kinds of parameters the renewal mapping table is set again, thereby make installation procedure when loading the GUI panel, also can read the designated parameters setting, finish whole software installment works with this; Like this, the user just can save the plenty of time, and the number of times of repetitive operation is reduced to minimum.On the other hand, the user does not need on top of corresponding bottom technology yet, can finish the parameter setting of acquiescence or the modification that designated parameters is provided with in the shown operation interface of GUI panel, has reduced support staff's work difficulty to a great extent.
Embodiment
In order to solve under the prior art, when the user installs same software product on many machines,, and be forced to repeatedly the identical parameter setting of repeatedly setting owing to the function restriction of graphic user interface Installation Modes (GUI) or order line Installation Modes (CLI).The embodiment of the invention is by loading the CLI panel and the designated parameters setting being loaded in the corresponding C LI panel in the GUI Installation Modes, thereby upgraded corresponding default parameter setting in the mapping table, make installation procedure also can read the designated parameters setting when under the GUI pattern, moving, and in installation process, corresponding modification is carried out in described designated parameters setting.
In the present embodiment, the user is on many machines during the install software product, the existing GUI Installation Modes of elder generation's utilization installs this product on a machine, and relevant parameter setting (comprising default parameters setting that does not have modification and the default parameters setting of having revised) is kept in the configuration file.Then, the more new-type GUI Installation Modes of user's utilization is installed same software product on other machine, when using more new-type GUI Installation Modes, the user starts installation procedure by input " java-jar install.jar-update savedConfig.xml " in order line, wherein-update represents that installation procedure moves, and read the relevant parameters setting from the file savedConfig.xml of appointment under the GUI pattern.Consult shown in Figure 3, in the embodiment of the invention, under more new-type GUI pattern the operation installation procedure main flow process as follows:
Step 300: whether the command determination user who imports in order line by the user is chosen under the more new-type GUI pattern and moves installation procedure, if then carry out step 310; Otherwise, under existing GUI pattern or existing CLI pattern, move installation procedure.
Step 310: installation procedure reads all default parameters settings and it is loaded in the mapping table.
Step 320: installation procedure obtains file savedConfig.xml from the memory location of user's appointment.
Step 330: installation procedure loads all CLI panels, reads the required parameter setting of each CLI panel and it is loaded in the corresponding C LI panel from file savedConfig.xml; Described CLI panel is quoted a java class, and this class has realized providing the interface (PanelAutomation) of framework support.
Step 340: installation procedure verifies whether the form of the parameter setting of described loading is valid format, and whether the value of this parameter setting be effective value, if then carry out step 350; Otherwise, the error message of withdrawing from installation and being correlated with to user prompt.
Step 350: installation procedure judges whether that further all parameters that need load are provided with all by checking, if, then carry out step 360, otherwise, step 330 returned.
Step 360: installation procedure is provided with relevant parameters setting in the renewal mapping table according to the parameter of described loading.
Step 370: installation procedure loads the GUI panel one by one, and GUI panel of every loading, installation procedure just read the required parameter setting of this GUI panel and it is loaded in the described GUI panel from the mapping table that has upgraded.
In the process that loads the GUI panel one by one, the user can revise the shown relevant parameter setting in this interface in operation interface, and have only when the user selects " next step " in operation interface, installation procedure just can load next GUI panel, described GUI panel is quoted a java class (IzPanel), and this class is inherited the foundation class (being that IzPanel inherits JPanel) that framework is provided.
Step 380: after all GUI panels all were performed, installation procedure decompressed software product and carries out subsequent installation.
In the step 340 of above-mentioned flow process, if the parameter setting of described loading is not by checking, then installation procedure can not withdraw from installation earlier yet, but to user prompt corresponding error information, and point out the user memory location of specified configuration file once more, if the designated parameters configuration is not yet by checking once more for the user, installation procedure then points out the user whether to withdraw from installation so, and withdraws from this installation process when the user selects "Yes".
In the present embodiment, the user moves installation procedure by using the software erecting device under more new-type GUI pattern, consult shown in Figure 4ly, described software erecting device comprises first storage unit 40, second storage unit 41, judging unit 42, first processing unit 43, second processing unit 44 and performance element 45.Described first storage unit 40 is used for the parameter setting of memory map assignments, acquiescence and all GUI panel and CLI panels; Described second storage unit 41 is used to store the configuration file that the user preserves, i.e. designated parameters configuration; Described judging unit 42 is used to receive the startup command of user's input and judge which kind of mode operation installation procedure the user selects; Described first processing unit 43 is used to load all CLI panels, described designated parameters setting is loaded into corresponding CLI panel and verifies, and after all designated parameters settings are by checking, relevant parameters setting in the described mapping table of renewal is set according to these all designated parameters; Described second processing unit 44 is used for loading successively the GUI panel and reads the required parameter setting of each GUI panel from mapping table; Described performance element 45 is used for software product being decompressed and carrying out subsequent installation.
For example, the user will install the Office office software on many machines, and in the process of installing, the parameter that is provided with that the user need change comprises:
Installation path, default installation path be C: Office, the user need be installed to D: Office.
Need the assembly of installation, the installation component of acquiescence comprises word processing assembly and list processing components, and the user need install all assemblies.
Product ID, the acquiescence product ID is empty, the user need use identical sequence number on many machines.
Software user title and Business Name, the software user title of acquiescence and Business Name are empty, and the user need use identical software user title and Business Name on many machines.
User name, the user of acquiescence is by name empty, and the user need provide unique user name respectively to do differentiation according to different machines.
Under the prior art, the user at first starts the installation procedure of Office office software under the GUI pattern on a machine, then successively (comprising: installation path, assembly, product ID, software user title, Business Name and the user's name that need install) changed in the parameter setting of Office installation procedure acquiescence, then the Office office software is installed on this machine according to the demand of self.After finishing installation, the user repeats above step utilization GUI Installation Modes successively and carries out software and install on other need install the machine of Office office software, all install up to all machines.In installation process, the change of most of default parameters settings is identical on many machines, and then repeated parameter setting will be wasted a lot of times.
When using more new-type GUI pattern that the Office office software is installed, the user also needs to use existing GUI mode operation installation procedure to finish the installation first of Office office software earlier on a machine, and after installation, the parameter setting of revising is kept in the configuration file and (also can be kept in the database), described configuration file comprises not have default parameters setting of revising and the default parameters setting of having revised (as assembly, product ID, software user title, Business Name and the user name of installation path, need installation).So, when the user uses more new-type GUI mode operation installation procedure when finishing the installation of Office office software on other machines, installation procedure on every machine all reads the parameter setting in the configuration file that the user preserves in installing first when starting, and set up the installation of local Office office software according to this parameter.In installation process, the user name that the user only needs to revise on every machine can be finished all installations, thereby avoided a large amount of unnecessary repetitive operation, saved the plenty of time, simultaneously, the support staff does not need on top of corresponding bottom technology yet, can finish the parameter setting of acquiescence or the modification that designated parameters is provided with, and has reduced support staff's work difficulty to a great extent.
In addition, also can only preserve the default parameters setting of having revised in the described configuration file of being preserved when installing first, there is not the default parameters setting revised and do not preserve, like this, when the user uses more new-type GUI pattern that the Office office software is installed on other machine, after the parameter that installation procedure is correlated with in reading configuration file was provided with, for the argument section that relates in the file, installation procedure used the parameter setting after user's change; For the argument section that does not relate in the file, the parameter setting of the acquiescence that reads before installation procedure still uses is to finish the installation of software, and this does not influence realization effect of the present invention.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.