Summary of the invention
The object of the present invention is to provide a kind of method and device that makes up multi-platform software running environment, it is used to solve the software installation kit that the special-purpose separately software strapping tool of available technology adopting different system platform makes can not compatible shortcoming.
In order to reach purpose of the present invention, the present invention realizes by the following technical solutions:
A kind of method that makes up multi-platform software running environment comprises:
A, startup scale-of-two startup file are set up multi-platform software running environment inlet;
B, startup decompression module are carried out decompression operation to core compiling and interpreting and graphical environment module, to make up core compiling and interpreting and graphical environment; Cross-platform visual software installed module is carried out decompression operation,, and obtain to install professional with structure visual software installation kit interface;
C, call decompression module, platform standalone module and multi-platform sharing module are carried out decompression operation, visual software installation kit interface to be provided and professional required data are installed; Expansion compiling and interpreting and graphical environment module are carried out decompression operation, to make up expansion compiling and interpreting and graphical environment;
D, the environmental variance of software installation kit operation is set, starts visual software installation kit interface according to the otherness of different system platform, and according to the cross-platform and visual installation of its executive software installation kit.
Preferably, in described step B,, trigger the decompression operation of core compiling and interpreting with graphical environment module, cross-platform visual software installed module according to described scale-of-two startup file.
Preferably, in described step B, after executing, also comprise the step that system environment variable and parameter are set to core compiling and interpreting and graphical environment module execution decompression operation.
Preferably, in described step B, calling first of described decompression module is to trigger according to described scale-of-two startup file.
Preferably, in described step C, described expansion compiling and interpreting and graphical environment are in order to the control and the function of the necessary function of improving the running software that lacks in core compiling and interpreting and the graphical environment, environment, graphical system.
More preferably, described necessary function comprises regular expression function, XML file read-write function and codec functions.
More preferably, in described step B, described cross-platform visual software installed module adopts cross-platform language development.
More preferably, described cross-platform language is python or wxpython.
Preferably, in described step C, described multi-platform sharing module comprises the program's code file that can share for a plurality of platforms and the resource file of program run.
Preferably, in described step C, described platform standalone module comprises built-in function, configuration file, Run Script, the driver that the system platform of multi-platform software running environment dependence is independently used and is the otherness file that shielding different system platform compatibility issue increases.
A kind of device that makes up multi-platform software running environment, it comprises: scale-of-two startup file, installation processing module, decompression module, core compiling and interpreting and graphical environment module, cross-platform visual software installed module, expansion compiling and interpreting and graphical environment module, platform standalone module and multi-platform sharing module, wherein
The scale-of-two startup file is used to set up multi-platform software running environment inlet;
Processing module is installed, be used for triggering decompression module according to the scale-of-two startup file, the control decompression module is carried out the decompression operation to core compiling and interpreting and graphical environment module, cross-platform visual software installed module, expansion compiling and interpreting and graphical environment module, platform standalone module and multi-platform sharing module;
Decompression module, be used to respond the control that processing module is installed, carry out decompression operation core compiling and interpreting and graphical environment module, cross-platform visual software installed module, expansion compiling and interpreting and graphical environment module, platform standalone module and multi-platform sharing module;
Core compiling and interpreting and graphical environment module are used to make up core compiling and interpreting and graphical environment after decompressed;
Cross-platform visual software installed module is used to make up visual software installation kit interface after decompressed, and obtains to install professional;
Expansion compiling and interpreting and graphical environment module are used for making up expansion compiling and interpreting and graphical environment after decompressed;
The platform standalone module is used to preserve the platform independent data that can't share between each platform;
Multi-platform sharing module is used to provide visual software installation kit interface and professional required data is installed after decompressed.
By above technical scheme of the present invention as can be seen, because at present for device fabrication producer, the memory module capacity need satisfy the demand of these installation kits size summations.Installation kit is big more, and the capacity of needed memory module is big more, and generally cost is also just high more.In the cut-throat competition of the current communications industry, the active that the advantage that obtains manufacturing cost often just can the occuping market.In the present invention, the size of using the multi-platform software installation kit will help reducing the software installation kit, the demand of reduction device storage module capacity.
In addition, on the linux system visual software installation kit is arranged seldom still at present, therefore multi-platform software installation kit provided by the invention will help reducing the installation kit size and help that the user more helps the installation process of unified software under different platform to the use and the cognition of software under the Linux.In addition, can also unify the software installation interface of a plurality of platforms, strengthen the unitarity of multi-platform software installation interface friendly and operation flow.
Embodiment
In order to make technical matters to be solved by this invention, technical scheme and beneficial effect clearer, clear,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
Traditional software installation kit is to make up respectively at each system platform, does not have mutual relationship between the installation kit of each system platform.The multi-platform software installation kit is a support with cross-platform language and shape library, set up cross-platform visualized graphs environment, software is installed relevant information represent to the user in patterned mode, all right managing cross-platform resource of multi-platform software installation kit accomplishes that place's copy is multi-platform shared simultaneously.Given this, if can provide a kind of cross-platform visual software Installation Modes to bring double advantage to device fabrication cost cutting and user experience enhancing.Dual consideration based on device fabrication cost and user's use has proposed several problems to manufacturer:
1, how to compress the installation kit size, save manufacturing cost.
2, how to make things convenient for user installation and use, promote software availability.
Based on more than, the invention provides a kind of method that makes up multi-platform software running environment, comprise the steps:
A, startup scale-of-two startup file are set up multi-platform software running environment inlet;
B, startup decompression module are carried out decompression operation to core compiling and interpreting and graphical environment module, to make up core compiling and interpreting and graphical environment; Cross-platform visual software installed module is carried out decompression operation,, and obtain to install professional with structure visual software installation kit interface;
C, call decompression module, platform standalone module and multi-platform sharing module are carried out decompression operation, visual software installation kit interface to be provided and professional required data are installed; Expansion compiling and interpreting and graphical environment module are carried out decompression operation, to make up expansion compiling and interpreting and graphical environment;
D, the environmental variance of software installation kit operation is set, starts visual software installation kit interface according to the otherness of different system platform, and according to the cross-platform and visual installation of its executive software installation kit.
Under the preferred implementation, in described step B,, trigger the decompression operation of core compiling and interpreting with graphical environment module, cross-platform visual software installed module according to described scale-of-two startup file.
Under the preferred implementation, in described step B, after executing, also comprise the step that system environment variable and parameter are set to core compiling and interpreting and graphical environment module execution decompression operation.
Under the preferred implementation, in described step B, calling first of described decompression module is to trigger according to described scale-of-two startup file.
Under the preferred implementation, in described step C, described expansion compiling and interpreting and graphical environment are in order to the control and the function of the necessary function of improving the running software that lacks in core compiling and interpreting and the graphical environment, environment, graphical system.
Wherein, more preferred embodiment down, described necessary function comprises regular expression function, XML file read-write function and codec functions.
More preferred embodiment down, in described step B, described cross-platform visual software installed module adopts cross-platform language development.
More preferred embodiment down, described cross-platform language is python or wxpython.
Under the preferred implementation, in described step C, described multi-platform sharing module comprises the program's code file that can share for a plurality of platforms and the resource file of program run.
Under the preferred implementation, in described step C, described platform standalone module comprises built-in function, configuration file, Run Script, the driver that the system platform of multi-platform software running environment dependence is independently used and is the otherness file that shielding different system platform compatibility issue increases.
In addition, the present invention also provides a kind of device that makes up multi-platform software running environment, as shown in Figure 1, it comprises: scale-of-two startup file 20, installation processing module 10, decompression module 30, core compiling and interpreting and graphical environment module 50, cross-platform visual software installed module 40, expansion compiling and interpreting and graphical environment module 60, platform standalone module 70 and multi-platform sharing module 80, wherein
Scale-of-two startup file 20 is used to set up multi-platform software running environment inlet; For described scale-of-two startup file, the function of this file is at the characteristic under the different system platform, the entrance function of writing, purpose is to call decompression module according to configuration file, set up core compiling and interpreting and graphical environment, trigger the operation of cross-platform visual software installed module 40, installation process is transferred to cross-platform visual software installed module 40 control.
In above-mentioned device and equipment, the scale-of-two startup file is the characteristic at each platform, the relevant inlet of the platform that the method that usage platform is relevant is set up.When code compiling, this part code is fixing unified constant, according to the system interface of different system platform, and unified execution one group system order.This group system order is preserved hereof, and core compiling and interpreting and the graphical environment module 50 that triggers in 30 pairs of installation kits of decompression module decompressed, and sets up core compiling and interpreting and graphical environment.Necessary system environment variable and correlation parameter are set simultaneously.Trigger 30 pairs of cross-platform visual software installed modules 40 of decompression module and decompress, start cross-platform visual software installation kit.Bring the software installation into cross-platform visual software range of control is installed.
Processing module 10 is installed, be used for triggering decompression module 30 according to the scale-of-two startup file, control decompression module 30 is carried out the decompression operation to core compiling and interpreting and graphical environment module 50, cross-platform visual software installed module 40, expansion compiling and interpreting and graphical environment module 60, platform standalone module 70 and multi-platform sharing module 80;
Decompression module 30, be used to respond the control that processing module 10 is installed, carry out decompression operation core compiling and interpreting and graphical environment module 50, cross-platform visual software installed module 40, expansion compiling and interpreting and graphical environment module 60, platform standalone module 70 and multi-platform sharing module 80; Calling first by the scale-of-two startup file of this module triggers, and its objective is decompression core compiling and interpreting and graphical part and cross-platform visual software installed module 40.By calling first, set up compiling and interpreting and graphical environment that cross-platform visual software installation kit can independent operating.After cross-platform visual software installation kit operation, decompression module 30 will call his the relevant compressed file that decompresses by cross-platform visual software installation kit.
Core compiling and interpreting and graphical environment module 50 are used to make up core compiling and interpreting and graphical environment after decompressed; This module is the minimum environment that cross-platform visual software installation kit can independent operating, and when core compiling and interpreting and graphical environment are ready, all functions of cross-platform visual software installation kit module can normally be moved.What core compiling and interpreting and graphical environment were different from expansion compiling and interpreting and graphical environment is, it is through classification and reduction, the necessary function that has only kept the installation kit operation, other function ratio as: regular expression function, XML read-write capability, codec functions etc. these may all can not use.Simultaneously for the graphic interface environment, the method for more possible controls and control can not be used, such as: list control ListCtrl can not use, and perhaps the ordering of list control or the function of inlaying the Check button can not be used etc.With these functions and control be stripped to size, the TOC level that can reduce core compiling and interpreting and graphical environment outside core compiling and interpreting and the graphical environment, decompress the time.Can enter cross-platform software installation kit module more fast from the user like this, experience the visualization display of installation progress.
Cross-platform visual software installed module 40 is used to make up visual software installation kit interface after decompressed, and obtains to install professional; Cross-platform visual software installed module operates under core compiling and interpreting and the graphical environment, and its function just provides the cross-platform visual and consistent software installation interface in interface.Cross-platform visual software installed module 40 is installed software at the installation configuration file under the different system platform, and the part of installation comprises: expansion compiling and interpreting and graphical environment module 60, multi-platform sharing module 80, platform standalone module 70 etc.Cross-platform visual software installed module 40 is by cross-platform language development, such as python, wxpython etc., can shield different system and at software otherness on the median surface is installed.Because the exploitation of cross-platform language, the content that this cross-platform visual software installed module 40 is installed has consistance to a great extent, these consistance can be on different platforms consistent being presented on the user interface, thereby avoided the huge otherness that installation procedure showed under the different system platform.Installation for driving the content relevant with system also may have common feature on different platform, this part also can be placed on the identical interface, just shows different contents on different system platforms.
Expansion compiling and interpreting and graphical environment module 60 are used for making up expansion compiling and interpreting and graphical environment after decompressed; This part of expansion is at core compiling and interpreting and graphical environment, because core compiling and interpreting and graphical environment are once reduction and screening to the complete environment of running software.Kuo Zhan compiling and interpreting and graphical environment are controlled by cross-platform visual software installed module after the normal operation of core environment so, once perfect at the control of necessary function, environment and the graphical system of the running software that lacks in the core environment and function.Such as: increase the regular expression function, XML file read-write function, codec functions or the like.For control systems, the control and the control functionality that need in the time of might increasing some softwares and normally move, such as list control, and the tabulation control ranking function of building, menu control etc.
Platform standalone module 70 is used to preserve the platform independent data that can't share between each platform, and for example preserve platform standalone module 70 the insides is the data that can not share of each platform and Runtime Library driving data etc.
Multi-platform sharing module 80 is used to provide visual software installation kit interface and professional required data is installed after decompressed.
For described platform standalone module 70,, also might run into the problem that the otherness between the system platform is introduced even if adopt cross-platform language development.The problem in program run storehouse for example, the problem of driving is carried out the problem of script command, problem of the system's otherness between same platform or the like.Everyly need can sum up in the point that platform standalone module 70 what different system platform or system handled respectively.Generally cross-platform development language in operation also is the support that needs Runtime Library, at the employed Runtime Library of different platforms or system is different, such as: Window uses the lib storehouse down, and Mac uses dylib or so storehouse down, and Linux uses so storehouse etc. down.Therefore in installation kit these platforms independently module need independently install according to concrete platform, when making bag, just should hew out a position so and be used for preserving independently related content of platform, we are referred to as the platform standalone module here.
For described multi-platform sharing module, because the cross-platform development language and the shape library that adopt, just having much a plurality of platforms so in the software can share.Such as: the resource file of program code, program run etc.The denominator of these files is can directly copy and use the compatibility issue that does not need between the worry system under each system.File in the program code is such as the py file, and resource file is such as, audio files of picture, language file, configuration file and system compatible etc.
Spirit of the present invention in detail described in order better to explain below in conjunction with specific embodiment and accompanying drawing.
The embodiment of the invention is by the in-depth analysis to cross-platform development language and multi-platform software installation, a kind of cross-platform software installation kit model has been proposed, as shown in Figure 1, rely on this model, manufacturing personnel can utilize the characteristic of cross-platform development language at terminal user's specific customization demand, develop the cross-platform software of a cover issue instrument is installed, be a kind of cross-platform visual software installation kit, or speech is a kind of method that makes up multi-platform software running environment.The R﹠D and production personnel mention shape library by cross-platform open language and design and Implement one group of software installation interface according to terminal user's customized demand.The software installation interface that relies on this group to appoint according to software installation kit institutional framework as shown in Figure 1, will can be implemented in the software installation process of style unification, uniform service under a plurality of system platforms (as Windows, Mac, Linux).When the user proposes to revise demand, only need just can realize the collective response of a plurality of plateform systems to the once modification of standing state, greatly promoted efficient.
For realizing following embodiments of the invention scheme, one group of scale-of-two startup file, one group of decompression module, core compiling and interpreting and graphical environment module, expansion compiling and interpreting and graphical environment module, multi-platform sharing module, platform standalone module need be provided in installation kit, and cross-platform visual software installed module.
As shown in Figure 1, scale-of-two startup file 20 is born the inlet of installation kit under the different system, by system triggers decompression module 30 quick core compiling and interpretings and the graphical needed file decompress(ion) of environment, cross-platform visual software installed module 40 simultaneously decompresses, start visual installed module, software is installed paid cross-platform visual software installed module 40 controls.Cross-platform visual software installed module 40 will further call 30 pairs of core compiling and interpretings of decompression module and graphical environment module 50, expansion compiling and interpreting and graphical environment module 60, multi-platform sharing module 80, platform standalone module 70 carry out decompress(ion) and document copying.Set up complete software runtime environment, relevant system environment variable and operational factor are set, erecting equipment driving etc.The all processes that final software is installed all will show on the interface of cross-platform visual software installed module 40.
To move according to flow process shown in Figure 2 when cross-platform visual software installation kit starts in the embodiment of the invention, may further comprise the steps:
S201: cross-platform visual software installed module calls the scale-of-two startup file.This scale-of-two startup file is compiled into the platform independent operating for having transferred the shell of multi-platform software installation kit, and its purpose is exactly to trigger and carry out follow-up software to install and operate;
S202: decompress and the execution script.Cross-platform visual software installed module calls decompression module and carries out follow-up step by carrying out script.For example, decompression module is to core compiling and interpreting in the installation kit and graphical environment, and the part whole and the platform standalone module of cross-platform visual software installed module decompresses;
S203: decompress(ion) core compiling and interpreting and graphical environment module, this module is born the responsibility of the cross-platform visual software installation kit of operation, and the software installation kit that it has been full of one group of minimal set moves needed file;
S204: the cross-platform visual software installed module of decompress(ion), this module use cross-platform language and shape library exploitation one cover code can operate on each system platform.This module the inside has comprised the business of software installation kit interface and installation;
S205: decompress(ion) platform standalone module, here the part of platform standalone module has only decompressed, this part is that cross-platform visual software installed module moves necessary data, comprise independently built-in function of system that installation kit running environment relies on, variant file and configuration file etc. is installed between some system;
S206: the configuration surroundings variable starts visual software installation kit interface.At the otherness under the different system environmental variance of software installation kit operation is set, and on the software installation kit running environment that S201 to S206 step forms before, moves the installation process that cross-platform visual software installation kit carries out multi-platform software.
The visual software installation kit running environment that when cross-platform visual software installed module carries out the software installation in the embodiment of the invention dependency graph 2 is generated, according to software as shown in Figure 3 overall flow figure is installed and carries out the software installation, the software runtime environment that can support institute's install software operation that will generate after finishing as shown in Figure 4 is installed, operating software.
Wherein the cross-platform visual software installed module represented of Fig. 3 carries out the overall flow figure of software when installing and comprises following flow process:
S301: cross-platform visual software installed module loads cross-platform visual software installation interface.
S302: load software is installed configuration file, the step of carrying out the analysis of software installation progress and carrying out the installation of multi-platform software after cross-platform visual installation interface starts.Cross-platform visual installation interface is responsible for the foreground and is shown installation progress and result to the user, and the process that software is installed is carried out on the backstage.
S303: the detailed process and the installation results of installation is responsible for showing to the user in the interface of cross-platform visual software installed module, is responsible for the process that concrete software is installed simultaneously on the backstage.As document copying, environmental structure, system compatibility test, condition test, drive installation, work such as environmental variance configuration.Carry out communicating by letter between program between the interface on foreground and the installation process on backstage.According to configuration file and installation progress being installed to the backstage transmitting control commands, associative operation is carried out after receiving order in the backstage, and the result is returned to the foreground by the foreground, and the foreground shows and the correction installation process in real time according to feedback.
S304: the backstage erection schedule of cross-platform visual software installed module.The backstage erection schedule is carried out the installation of related content according to the installation order that is transmitted by the foreground, returns installation results.
S305: carry out user's operation, the user can control and operate installation process in installation process, install such as cancellation, installation path is set, and some other Installation Options, carry out if the user has operation to forward S307 to,, then forward S306 to and carry out if the user does not make amendment to installation process.
S306: carry out software according to the default installation process of cross-platform visual software installed module and install, show by the interface, foreground.
S307: whether the operation of judging the user is consistent with the installation process of acquiescence, if consistent proceeding installed, if it is inconsistent then respond the user and operate S308, amended installation process and order are sent to the S304 backstage are installed into row and handle, the backstage erection schedule will feed back to interface, S303 foreground according to installation results and show to the user.
S308: response user's operation generate new installation process order, and execution S304 step is sent to the installation of backstage installation carrying out software with this order.
Fig. 4 represents that the multi-platform software installation kit makes up the process flow diagram of multi-platform software running environment and operating software, comprises following flow process:
S401: start scale-of-two startup file and decompression module, in Fig. 2, its effect is illustrated, decompression module also will be called by cross-platform visual software installed module herein, so that expansion compiling and interpreting and graphical environment module and multi-platform sharing module are decompressed.
S402: core compiling and interpreting and graphical environment, what this part comprised is the minimum environment that can make the normal operation of multi-platform software installation kit, has comprised required file of newspaper operation and built-in function etc. are installed, it may comprise some contents shown in step S403.
S403: having comprised in core compiling and interpreting and the graphical environment can be at the core environment bag of Windows, Mac, Linux use, and these bags generally are function libraries, also may be file sometimes.These storehouses and file have been arranged, and file that can be general in cooperation just can construct the minimum environment that is fit to the operation of multi-platform software installation kit.This environment also is simultaneously the follow-up part of required environment when being mounted running software, and it will constitute the required environment of running software jointly with the execution result of step S407.
S404: multi-platform sharing module, this part has comprised the content that can use under each system.The source file that generally comprises cross-platform language and shape library, the common configuration file, language file, the picture resource file, the interface layout file, but be mounted operation code of program etc.
S405: the platform standalone module, this part comprises needed other module stand-alone content when being mounted running software.Generally comprise the built-in function that system independently uses, configuration file, Run Script, driver and some alternative documents that increase for shielding different system compatibility issue.
S406: expansion compiling and interpreting and graphical environment, what this part comprised is to make the minimum environment that is mounted the normal operation of software, it has comprised and has been mounted necessary alternative document of running software and built-in function etc. beyond core compiling and interpreting and the graphical environment.It and core compiling and interpreting and graphical environment S402 have constituted jointly and have been mounted the required environment of running software.It may comprise some contents shown in S407.
S407: S403 is the same with step, and it has also comprised can be at the expansion environment bag of Windows, Mac, Linux use, and it is replenishing of core environment bag and expansion.Expanded multi-platform software running environment and graphics environment on the function, make be mounted software can true(-)running.
S408: when making up expansion compiling and interpreting and graphical environment, might also can need the support of multi-platform sharing module, may comprise structure expansion compiling and interpreting and the graphical shared configuration file of environment here, resource file, and source file.Also may need simultaneously the support of platform standalone module to change step S409.
S409: when making up expansion compiling and interpreting and graphical environment, might need some files of platform standalone module, have extra function as some system and need use extra instrument, function library, source file and driving etc.
S410: the support that the operation of common communication apparatus need drive, at the end that software is installed driving to be installed usually, equipment just can driven get up after the drive installation.
S411: set and other software startup parameters, finish installation, start software as required.
By above technical scheme of the present invention as can be seen, because at present for device fabrication producer, the memory module capacity need satisfy the demand of these installation kits size summations.Installation kit is big more, and the capacity of needed memory module is big more, and generally cost is also just high more.In the cut-throat competition of the current communications industry, the active that the advantage that obtains manufacturing cost often just can the occuping market.In the present invention, the size of using the multi-platform software installation kit will help reducing the software installation kit, the demand of reduction device storage module capacity.
In addition, on the linux system visual software installation kit is arranged seldom still at present, therefore multi-platform software installation kit provided by the invention will help reducing the installation kit size and help that the user more helps the installation process of unified software under different platform to the use and the cognition of software under the Linux.In addition, can also unify the software installation interface of a plurality of platforms, strengthen the unitarity of multi-platform software installation interface friendly and operation flow.
Above-mentioned explanation illustrates and has described a preferred embodiment of the present invention, but as previously mentioned, be to be understood that the present invention is not limited to the disclosed form of this paper, should not regard eliminating as to other embodiment, and can be used for various other combinations, modification and environment, and can in invention contemplated scope described herein, change by the technology or the knowledge of above-mentioned instruction or association area.And change that those skilled in the art carried out and variation do not break away from the spirit and scope of the present invention, then all should be in the protection domain of claims of the present invention.