TWI416410B - System and method for updating version of the executable file - Google Patents

System and method for updating version of the executable file Download PDF

Info

Publication number
TWI416410B
TWI416410B TW97113338A TW97113338A TWI416410B TW I416410 B TWI416410 B TW I416410B TW 97113338 A TW97113338 A TW 97113338A TW 97113338 A TW97113338 A TW 97113338A TW I416410 B TWI416410 B TW I416410B
Authority
TW
Taiwan
Prior art keywords
executable file
source code
server
compilation
attribute information
Prior art date
Application number
TW97113338A
Other languages
Chinese (zh)
Other versions
TW200943185A (en
Inventor
jun-wei Huang
Jing Wang
Original Assignee
Hon Hai Prec Ind Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Priority to TW97113338A priority Critical patent/TWI416410B/en
Publication of TW200943185A publication Critical patent/TW200943185A/en
Application granted granted Critical
Publication of TWI416410B publication Critical patent/TWI416410B/en

Links

Abstract

The present invention provides a method for updating version of the executable file. The method includes: setting a time of source code to be compiled; reading attribute of the source code and the executable file; compiling the source code thereby generating a executable file in set time, if the attribute of the source code is not similar with the attribute of the executable file; updating the executable file in server if compiling is successful; amending the version of generated executable file; reading the version of the executable file in server when starting up the executable file in client computer; updating the executable file into the client computer if the version of the executable file in client computer is not the same with the version of the executable file in server. A system for updating version of the executable file is also provided.

Description

可執行文件版本更新系統及方法 Executable version update system and method

本發明涉及一種可執行文件版本更新系統及方法。 The present invention relates to an executable file version update system and method.

在C/S(用戶端/伺服器)模式下,應用系統的結構層次關係體現為兩層,即第一層是安裝在用戶端的可執行文件,第二層是透過網路結合的伺服器。其特點是資料的交互性能強大,並提供了更為安全的存取模式。 In C/S (client/server) mode, the structural hierarchy of the application system is embodied in two layers, that is, the first layer is the executable file installed on the client side, and the second layer is the server combined through the network. It is characterized by strong data interaction and provides a more secure access mode.

但是,由於C/S模式是應用程式在多個用戶端運行,當系統需要功能擴充、修改等需求異動時,需要對應用系統的代碼重新編譯,再將編譯好的可執行文件逐個複製到用戶端重新安裝,如此浪費人力工時,亦不能保證系統功能的同步,且若用戶在某一個時間同時複製,會造成伺服器擁擠,甚至導致伺服器癱瘓。 However, since the C/S mode is an application running on multiple clients, when the system needs function expansion, modification, etc., the code of the application system needs to be recompiled, and the compiled executable files are copied to the user one by one. Reinstalling the end, so waste of manpower, can not guarantee the synchronization of system functions, and if the user copies at the same time, it will cause the server to be crowded and even cause the server to crash.

鑒於以上內容,有必要提供一種可執行文件版本更新系統,其可以在用戶端啟動對應的可執行文件之後自動將伺服器上最新版本的可執行文件更新到用戶端。 In view of the above, it is necessary to provide an executable file version update system, which can automatically update the latest version of the executable file on the server to the client after the client launches the corresponding executable file.

此外,還有必要提供一種可執行文件版本更新方法,其可以在用 戶端啟動對應的可執行文件之後自動將伺服器上最新版本的可執行文件更新到用戶端。 In addition, it is necessary to provide an executable file version update method that can be used After the client starts the corresponding executable file, it automatically updates the latest version of the executable file on the server to the client.

一種可執行文件版本更新系統,包括伺服器、用戶端電腦,所述伺服器包括:設置模組,用於當用戶將需要生成可執行文件的源代碼存放於伺服器時,設置該源代碼的編譯時間;讀取模組,用於讀取所述源代碼中的屬性資訊及伺服器中存放該源代碼對應的可執行文件的屬性資訊;判斷模組,用於判斷讀取的源代碼中的屬性資訊與伺服器中存放該源代碼對應的可執行文件的屬性資訊是否一致;編譯模組,用於當源代碼中的屬性資訊及可執行文件中的屬性資訊不一致時,在設置的編譯時間對該源代碼進行編譯,使其成為可執行文件;更新模組,用於當源代碼編譯成功時,更新伺服器上的可執行文件,使其與編譯成功的可執行文件一致;修改模組,用於修改編譯成功後所生成的可執行文件的版本號;所述用戶端電腦包括:獲取模組,用於當啟動用戶端電腦的可執行文件時,獲取伺服器中對應的可執行文件的版本號;比較模組,用於比較用戶端電腦上啟動的可執行文件的版本號與伺服器上對應的可執行文件的版本號是否一致;下載模組,用於當用戶端電腦上啟動的可執行文件的版本號與伺服器上對應的可執行文件的版本號不一致時,將伺服器上的可執行文件下載到用戶端電腦上,並安裝該可執行文件。 An executable file version updating system includes a server and a client computer, and the server includes: a setting module, configured to set the source code when the user stores the source code of the executable file on the server. a compiling time; the reading module is configured to read the attribute information in the source code and the attribute information of the executable file corresponding to the source code stored in the server; the determining module is configured to determine the read source code The attribute information is consistent with the attribute information of the executable file corresponding to the source code stored in the server; the compiling module is used to compile the settings when the attribute information in the source code and the attribute information in the executable file are inconsistent. Time to compile the source code to make it an executable file; update the module to update the executable file on the server to be consistent with the successfully compiled executable file when the source code is successfully compiled; a group, configured to modify a version number of the executable file generated after the successful compilation; the client computer includes: an acquisition module, configured to start the user terminal The executable file obtains the version number of the corresponding executable file in the server; the comparison module is configured to compare the version number of the executable file started on the client computer with the version number of the corresponding executable file on the server Is it consistent; the download module is used to download the executable file on the server to the client computer when the version number of the executable file started on the client computer is inconsistent with the version number of the corresponding executable file on the server. And install the executable.

一種可執行文件版本更新方法,該方法包括如下步驟:當用戶將需要生成可執行文件的源代碼存放於伺服器時,設置該源代碼的編譯時間;讀取所述源代碼中的屬性資訊及伺服器中存放該源代 碼對應的可執行文件的屬性資訊;當源代碼中的屬性資訊與伺服器中存放該源代碼對應的可執行文件的屬性資訊不一致時,在設置的時間對源代碼進行編譯,使其成為可執行文件;當源代碼編譯成功時,更新伺服器上的可執行文件,使其與編譯成功的可執行文件一致;修改編譯成功後所生成的可執行文件的版本號;當啟動用戶端電腦的可執行文件時,讀取伺服器中對應的可執行文件的版本號;當用戶端電腦上啟動的可執行文件的版本號與伺服器上對應的可執行文件的版本號不一致時,將伺服器上的可執行文件下載到用戶端電腦上,並安裝該可執行文件。 An executable file version update method, the method comprising the following steps: when a user stores a source code that needs to generate an executable file on a server, setting a compile time of the source code; reading attribute information in the source code and Store the source generation in the server The attribute information of the executable file corresponding to the code; when the attribute information in the source code is inconsistent with the attribute information of the executable file corresponding to the source code stored in the server, the source code is compiled at the set time to make it Execute the file; when the source code is successfully compiled, update the executable file on the server to be consistent with the successfully compiled executable file; modify the version number of the executable file generated after successful compilation; when the user computer is started When the executable file is read, the version number of the corresponding executable file in the server is read; when the version number of the executable file started on the client computer does not match the version number of the corresponding executable file on the server, the server is The executable file is downloaded to the client computer and the executable file is installed.

相較於習知技術,其可以在用戶端啟動對應的可執行文件之後自動將伺服器上最新版本的可執行文件更新到用戶端,避免了人為的更新可執行文件,提高了效率,節約了伺服器資源。 Compared with the prior art, it can automatically update the latest version of the executable file on the server to the client after the user launches the corresponding executable file, thereby avoiding the artificial update of the executable file, improving efficiency and saving. Server resources.

1‧‧‧用戶端電腦 1‧‧‧User computer

2‧‧‧網路 2‧‧‧Network

3‧‧‧伺服器 3‧‧‧Server

101‧‧‧獲取模組 101‧‧‧Getting module

102‧‧‧比較模組 102‧‧‧Comparative Module

103‧‧‧下載模組 103‧‧‧Download module

301‧‧‧設置模組 301‧‧‧Setup module

302‧‧‧讀取模組 302‧‧‧Reading module

303‧‧‧判斷模組 303‧‧‧Judgement module

304‧‧‧編譯模組 304‧‧‧Compile module

305‧‧‧更新模組 305‧‧‧Update Module

306‧‧‧修改模組 306‧‧‧Modified module

307‧‧‧寫入模組 307‧‧‧Write module

S10‧‧‧當用戶將需要生成可執行文件的源代碼存放於伺服器時,設置該源代碼的編譯時間 S10‧‧‧ When the user stores the source code of the executable file on the server, set the compile time of the source code.

S11‧‧‧讀取所述源代碼中的屬性資訊及伺服器中存放該源代碼對應的可執行文件的屬性資訊 S11‧‧‧ reading the attribute information in the source code and the attribute information of the executable file corresponding to the source code stored in the server

S12‧‧‧判斷源代碼與可執行文件的屬性資訊是否一致 S12‧‧‧Identifies whether the source code is consistent with the attribute information of the executable file

S13‧‧‧在設置的時間對源代碼進行編譯,使其成為可執行文件 S13‧‧‧ Compile the source code at the set time to make it executable

S14‧‧‧判斷編譯是否成功 S14‧‧‧Determine whether the compilation was successful

S15‧‧‧更新伺服器上的可執行文件,使其與編譯成功的可執行文件一致 S15‧‧‧Update the executable file on the server to match the successfully compiled executable file

S16‧‧‧修改編譯成功後所生成的可執行文件的版本號 S16‧‧‧Modify the version number of the executable file generated after successful compilation

S17‧‧‧用戶端電腦獲取伺服器中對應的可執行文件的版本號 S17‧‧‧ The client computer obtains the version number of the corresponding executable file in the server

S18‧‧‧比較用戶端電腦可執行文件的版本號與伺服器可執行文件的版本號是否一致 S18‧‧‧Comparison whether the version number of the client executable file is the same as the version number of the server executable file

S19‧‧‧將伺服器上的可執行文件下載到用戶端電腦上,並安裝該可執行文件 S19‧‧‧Download the executable file on the server to the client computer and install the executable file

S20‧‧‧將異常報告寫入日誌文件,並通知管理員 S20‧‧‧Write the exception report to the log file and notify the administrator

圖1為本發明可執行文件版本更新系統的較佳實施例的硬體框架圖。 1 is a hardware framework diagram of a preferred embodiment of an executable file version update system of the present invention.

圖2為本發明可執行文件版本更新系統較佳實施例的功能模組圖。 2 is a functional block diagram of a preferred embodiment of an executable file version update system of the present invention.

圖3為本發明可執行文件版本更新方法較佳實施例的流程圖。 3 is a flow chart of a preferred embodiment of an executable file version updating method of the present invention.

如圖1所示,是本發明一種可執行文件版本更新系統較佳實施例的硬體架構圖。該系統包括用戶端電腦10、網路20及伺服器30。該伺服器30可以是個人電腦、網路伺服器,還可以是任意其他適用的電腦。 FIG. 1 is a hardware architecture diagram of a preferred embodiment of an executable file version update system of the present invention. The system includes a client computer 10, a network 20, and a server 30. The server 30 can be a personal computer, a web server, or any other suitable computer.

此外,該伺服器30透過網路20與至少一用戶端電腦10相連,該用戶端電腦10用於提供一個互動式介面給用戶,便於用戶進行操作並在操作過程中將伺服器30中最新的可執行文件版本更新到用戶端電腦10中。所述網路20可以是網際網路、局域網路或者無線通訊網路。 In addition, the server 30 is connected to at least one client computer 10 through the network 20. The client computer 10 is used to provide an interactive interface to the user, which is convenient for the user to operate and the latest in the server 30 during operation. The executable file version is updated to the client computer 10. The network 20 can be an internet, a local area network, or a wireless communication network.

如圖2所示,是本發明可執行文件版本更新系統較佳實施例的功能模組圖。所述伺服器30包括設置模組301、讀取模組302、判斷模組303、編譯模組304、更新模組305、修改模組306及寫入模組307。所述用戶端電腦10包括讀取模組101、比較模組102及下載模組103。本發明所稱的模組是完成一特定功能的電腦程式段,比程式更適合於描述軟體在電腦中的執行過程,因此在本發明以下對軟體描述中都以模組描述。 2 is a functional block diagram of a preferred embodiment of the executable file version update system of the present invention. The server 30 includes a setting module 301, a reading module 302, a determining module 303, a compiling module 304, an updating module 305, a modifying module 306, and a writing module 307. The client computer 10 includes a reading module 101, a comparison module 102, and a download module 103. The module referred to in the present invention is a computer program segment for performing a specific function, and is more suitable for describing the execution process of the software in the computer than the program. Therefore, the following description of the software is described in the module.

所述設置模組301用於當用戶將需要生成可執行文件的源代碼存放於伺服器時,設置該源代碼的編譯時間。用戶可以根據需要在任意時間進行設置,通常為減輕伺服器30的負載,提高伺服器30的處理效率,將編譯時間設置在伺服器30資料處理任務較少的時候。 The setting module 301 is configured to set a compile time of the source code when the user stores the source code that needs to generate the executable file on the server. The user can set it at any time as needed, usually to reduce the load on the server 30, improve the processing efficiency of the server 30, and set the compile time when the server 30 has fewer data processing tasks.

所述讀取模組302用於讀取所述源代碼中的屬性資訊及伺服器30中存放該源代碼對應的可執行文件的屬性資訊。所述的屬性資訊包括編寫日期、修改日期及作者等資料。若伺服器30中存放該源代碼對應的可執行文件不存在,則可執行文件的屬性資訊為空。 The reading module 302 is configured to read the attribute information in the source code and the attribute information of the executable file corresponding to the source code stored in the server 30. The attribute information includes the date of writing, the date of modification, and the author. If the executable file corresponding to the source code stored in the server 30 does not exist, the attribute information of the executable file is empty.

所述判斷模組303用於判斷讀取的源代碼中的屬性資訊與伺服器 30中存放該源代碼對應的可執行文件的屬性資訊是否一致。 The determining module 303 is configured to determine attribute information and a server in the read source code. In 30, the attribute information of the executable file corresponding to the source code is consistent.

所述編譯模組304用於當源代碼中的屬性資訊及伺服器30中存放該源代碼對應的可執行文件的屬性資訊不一致時,在設置的編譯時間對源代碼進行編譯,使其成為可執行文件。在本較佳實施例中,編譯的方式有兩種,一種為增量編譯,即:只對新增加的功能所編寫的源代碼進行編譯,另一種為完全編譯,即:對所編寫的源代碼全部進行編譯。通常判斷使用哪一種編譯的方式是在存放可執行文件的目錄下查找是否存在對應的可執行文件,若存在對應的可執行文件,則為增量編譯,若不存在對應的可執行文件,則為完全編譯。 The compiling module 304 is configured to compile the source code at a set compile time when the attribute information in the source code and the attribute information of the executable file corresponding to the source code stored in the server 30 are inconsistent. executable file. In the preferred embodiment, there are two ways to compile, one is incremental compilation, that is, only the source code written by the newly added function is compiled, and the other is fully compiled, that is, the source is written. The code is compiled all. Usually, the method of compiling is to find out whether there is a corresponding executable file in the directory where the executable file is stored. If there is a corresponding executable file, it is incrementally compiled. If the corresponding executable file does not exist, Compile completely.

所述更新模組305用於當源代碼編譯成功時,更新伺服器上的可執行文件,使其與編譯成功的可執行文件一致。根據對源代碼的編譯方式的不同,更新的方式有兩種,若編譯的方式為增量編譯,則將編譯成功後生成的可執行文件覆蓋該源代碼對應的可執行文件,若編譯的方式為完全編譯,則將編譯成功後生成的可執行文件存放在伺服器30用於存放可執行文件的目錄下。 The update module 305 is configured to update the executable file on the server to be consistent with the successfully compiled executable file when the source code is successfully compiled. According to the different way of compiling the source code, there are two ways to update. If the compilation method is incremental compilation, the executable file generated after successful compilation will overwrite the executable file corresponding to the source code. For complete compilation, the executable file generated after successful compilation is stored in the directory where the server 30 stores the executable file.

所述修改模組306用於修改編譯成功後所生成的可執行文件的版本號。在本較佳實施例中,修改的方式為,若編譯成功一次,則對版本號遞增一個數字,具體而言,假設原有的可執行文件的版本號為1.1,若編譯成功,生成新的可執行文件,則將版本號修改為1.2。然而,視不同情況,在其他實施例中,用戶可以設定其他方式修改版本號,例如,以遞減的方式修改版本號。 The modification module 306 is configured to modify the version number of the executable file generated after the compilation is successful. In the preferred embodiment, the modification manner is: if the compilation succeeds once, the version number is incremented by a number. Specifically, the version number of the original executable file is 1.1, and if the compilation is successful, a new one is generated. Executable file, the version number is changed to 1.2. However, depending on the situation, in other embodiments, the user may set other ways to modify the version number, for example, to modify the version number in a decreasing manner.

所述寫入模組307用於當源代碼編譯失敗時,將異常報告寫入日誌文件,並通知管理員。在本較佳實施例中,通知的方式是以郵件的形式通知管理員。 The write module 307 is configured to write an exception report to the log file when the source code fails to be compiled, and notify the administrator. In the preferred embodiment, the manner of notification is to notify the administrator in the form of a mail.

所述獲取模組101用於當啟動用戶端電腦10的可執行文件時,獲取伺服器30中對應的可執行文件的版本號。通常在用戶端電腦安裝好的可執行文件都有對應的圖示,用戶點擊該圖示就會啟動對應的可執行文件,之後獲取模組101自動獲取伺服器30上的該可執行文件的版本號。具體而言,假設用戶需要使用某一個軟體(例如:瀏覽器),點擊瀏覽器圖示,啟動瀏覽器對應的可執行文件,之後用戶端電腦10自動獲取取伺服器30上瀏覽器對應的可執行文件的版本號。 The obtaining module 101 is configured to obtain a version number of a corresponding executable file in the server 30 when the executable file of the client computer 10 is started. Usually, the executable file installed on the client computer has a corresponding icon. When the user clicks on the icon, the corresponding executable file is started, and then the obtaining module 101 automatically obtains the version of the executable file on the server 30. number. Specifically, it is assumed that the user needs to use a certain software (for example, a browser), click the browser icon, and start the executable file corresponding to the browser, and then the user computer 10 automatically obtains the corresponding browser on the server 30. The version number of the executable file.

所述比較模組102用於比較用戶端電腦10上啟動的可執行文件的版本號與伺服器30上對應的可執行文件的版本號是否一致。 The comparison module 102 is configured to compare whether the version number of the executable file started on the client computer 10 is consistent with the version number of the corresponding executable file on the server 30.

所述下載模組103用於當用戶端電腦10上啟動的可執行文件的版本號與伺服器30上對應的可執行文件的版本號不一致時,將伺服器30上的可執行文件下載到用戶端電腦10上,並安裝該可執行文件。 The download module 103 is configured to download the executable file on the server 30 to the user when the version number of the executable file started on the client computer 10 does not match the version number of the corresponding executable file on the server 30. End the computer 10 and install the executable.

如圖3所示,是本發明一種可執行文件版本更新方法的較佳實施例的流程圖。 3 is a flow chart of a preferred embodiment of an executable file version updating method of the present invention.

首先,步驟S10,當用戶將需要生成可執行文件的源代碼存放於伺服器時,設置模組301設置該源代碼的編譯時間。用戶可以根據需要在任意時間進行設置,通常為減輕伺服器30的負載,提高 伺服器30的處理效率,將編譯時間設置在伺服器30資料處理任務較少的時候。 First, in step S10, when the user stores the source code that needs to generate the executable file on the server, the setting module 301 sets the compile time of the source code. The user can set it at any time as needed, usually to reduce the load on the server 30 and improve The processing efficiency of the server 30 sets the compile time when the server 30 has fewer data processing tasks.

步驟S11,讀取模組302讀取所述源代碼中的屬性資訊及伺服器30中存放該源代碼對應的可執行文件的屬性資訊。所述的屬性資訊包括編寫日期、修改日期及作者等資料。若伺服器30中存放該源代碼對應的可執行文件不存在,則可執行文件的屬性資訊為空。 In step S11, the reading module 302 reads the attribute information in the source code and the attribute information of the executable file corresponding to the source code stored in the server 30. The attribute information includes the date of writing, the date of modification, and the author. If the executable file corresponding to the source code stored in the server 30 does not exist, the attribute information of the executable file is empty.

步驟S12,判斷模組303判斷讀取的源代碼中的屬性資訊與伺服器30中存放該源代碼對應的可執行文件的屬性資訊是否一致。 In step S12, the determining module 303 determines whether the attribute information in the read source code is consistent with the attribute information of the executable file corresponding to the source code stored in the server 30.

步驟S13,當源代碼中的屬性資訊及可執行文件中的屬性資訊不一致時,編譯模組304在設置的時間對源代碼進行編譯,使其成為可執行文件。在本較佳實施例中,編譯的方式有兩種,一種為增量編譯,即:只對新增加的功能所編寫的源代碼進行編譯,另一種為完全編譯,即:對所編寫的源代碼全部進行編譯。通常判斷使用哪一種編譯的方式是在存放可執行文件的目錄下查找是否存在對應的可執行文件,若存在對應的可執行文件,則為增量編譯,若不存在對應的可執行文件,則為完全編譯。 In step S13, when the attribute information in the source code and the attribute information in the executable file are inconsistent, the compiling module 304 compiles the source code at the set time to make it an executable file. In the preferred embodiment, there are two ways to compile, one is incremental compilation, that is, only the source code written by the newly added function is compiled, and the other is fully compiled, that is, the source is written. The code is compiled all. Usually, the method of compiling is to find out whether there is a corresponding executable file in the directory where the executable file is stored. If there is a corresponding executable file, it is incrementally compiled. If the corresponding executable file does not exist, Compile completely.

步驟S14,判斷編譯是否成功。若編譯成功,則生成可執行文件,若編譯不成功,則進入步驟S20,提示異常,將異常報告寫入日誌文件,並及時通知管理員。在本較佳實施例中,通知的方式是以郵件的形式通知管理員。 In step S14, it is judged whether the compilation is successful. If the compilation is successful, an executable file is generated. If the compilation is unsuccessful, the process proceeds to step S20, an exception is indicated, the exception report is written to the log file, and the administrator is notified in time. In the preferred embodiment, the manner of notification is to notify the administrator in the form of a mail.

步驟S15,當源代碼編譯成功時,更新模組305更新伺服器上的可執行文件,使其與編譯成功的可執行文件一致。根據對源代碼的 編譯方式的不同,更新的方式有兩種,若編譯的方式為增量編譯,則將編譯成功後生成的可執行文件覆蓋該源代碼對應的可執行文件,若編譯的方式為完全編譯,則將編譯成功後生成的可執行文件存放在伺服器30用於存放可執行文件的目錄下。 In step S15, when the source code is successfully compiled, the update module 305 updates the executable file on the server to be consistent with the successfully compiled executable file. According to the source code There are two ways to update the compiler. If the compilation method is incremental compilation, the executable file generated after successful compilation will overwrite the executable file corresponding to the source code. If the compilation method is fully compiled, The executable file generated after the successful compilation is stored in the directory where the server 30 stores the executable file.

步驟S16,修改模組306修改編譯成功後所生成的可執行文件的版本號。在本較佳實施例中,修改的方式為,若編譯成功一次,則對版本號遞增一個數字,具體而言,假設原有的可執行文件的版本號為1.1,若編譯成功,生成新的可執行文件,則將版本號修改為1.2。然而,視不同情況,在其他實施例中,用戶可以設定其他方式修改版本號,例如,以遞減的方式修改版本號。 In step S16, the modification module 306 modifies the version number of the executable file generated after the compilation is successful. In the preferred embodiment, the modification manner is: if the compilation succeeds once, the version number is incremented by a number. Specifically, the version number of the original executable file is 1.1, and if the compilation is successful, a new one is generated. Executable file, the version number is changed to 1.2. However, depending on the situation, in other embodiments, the user may set other ways to modify the version number, for example, to modify the version number in a decreasing manner.

步驟S17,當啟動用戶端電腦10的可執行文件時,獲取模組101獲取伺服器30中對應的可執行文件的版本號。通常在用戶端電腦安裝好的可執行文件都有對應的圖示,用戶點擊該圖示就會啟動對應的可執行文件,之後獲取模組101會自動獲取伺服器30上的該可執行文件的版本號。具體而言,假設用戶需要使用瀏覽器,點擊瀏覽器對應的圖示,啟動瀏覽器對應的可執行文件,之後用戶端電腦10自動讀取伺服器30上瀏覽器對應的可執行文件的版本號。 In step S17, when the executable file of the client computer 10 is started, the obtaining module 101 acquires the version number of the corresponding executable file in the server 30. Usually, the executable file installed on the client computer has a corresponding icon. When the user clicks on the icon, the corresponding executable file is started, and then the acquisition module 101 automatically obtains the executable file on the server 30. version number. Specifically, it is assumed that the user needs to use a browser, click the icon corresponding to the browser, and start the executable file corresponding to the browser, and then the client computer 10 automatically reads the version number of the executable file corresponding to the browser on the server 30. .

步驟S18,比較模組102判斷用戶端電腦10上啟動的可執行文件的版本號與伺服器30上對應的可執行文件的版本號是否一致。 In step S18, the comparison module 102 determines whether the version number of the executable file started on the client computer 10 is consistent with the version number of the corresponding executable file on the server 30.

步驟S19,當用戶端電腦10上啟動的可執行文件的版本號與伺服器30上對應的可執行文件的版本號不一致時,下載模組103將伺 服器30上的可執行文件下載到用戶端電腦10上,並安裝該可執行文件。 In step S19, when the version number of the executable file started on the client computer 10 does not match the version number of the corresponding executable file on the server 30, the download module 103 will serve The executable file on the server 30 is downloaded to the client computer 10 and the executable file is installed.

在步驟S12中,當源代碼中的屬性資訊及可執行文件中的屬性資訊一致時,則直接結束流程。 In step S12, when the attribute information in the source code and the attribute information in the executable file match, the flow is directly ended.

在步驟S18中,當用戶端電腦10上啟動的可執行文件的版本號與伺服器30上對應的可執行文件的版本號一致時,則直接結束流程。 In step S18, when the version number of the executable file started on the client computer 10 coincides with the version number of the corresponding executable file on the server 30, the flow is directly ended.

最後所應說明的是,以上實施例僅用以說明本發明的技術方案而非限制,儘管參照以上較佳實施例對本發明進行了詳細說明,本領域的普通技術人員應當理解,可以對本發明的技術方案進行修改或等同替換,而不脫離本發明技術方案的精神和範圍。 It should be noted that the above embodiments are only intended to illustrate the technical solutions of the present invention and are not intended to be limiting, and the present invention will be described in detail with reference to the preferred embodiments thereof The technical solutions are modified or equivalently substituted without departing from the spirit and scope of the technical solutions of the present invention.

S10‧‧‧當用戶將需要生成可執行文件的源代碼存放於伺服器時,設置該源代碼的編譯時間 S10‧‧‧ When the user stores the source code of the executable file on the server, set the compile time of the source code.

S11‧‧‧讀取所述源代碼中的屬性資訊及伺服器中存放該源代碼對應的可執行文件的屬性資訊 S11‧‧‧ reading the attribute information in the source code and the attribute information of the executable file corresponding to the source code stored in the server

S12‧‧‧判斷源代碼與可執行文件的屬性資訊是否一致 S12‧‧‧Identifies whether the source code is consistent with the attribute information of the executable file

S13‧‧‧在設置的時間對源代碼進行編譯,使其成為可執行文件 S13‧‧‧ Compile the source code at the set time to make it executable

S14‧‧‧判斷編譯是否成功 S14‧‧‧Determine whether the compilation was successful

S15‧‧‧更新伺服器上的可執行文件,使其與編譯成功的可執行文件一致 S15‧‧‧Update the executable file on the server to match the successfully compiled executable file

S17‧‧‧修改編譯成功後所生成的可執行文件的版本號‧‧‧S16用戶端電腦獲取伺服器中對應的可執行文件的版本號 S17‧‧‧Modify the version number of the executable file generated after successful compilation. ‧‧S16 client computer obtains the version number of the corresponding executable file in the server

S18‧‧‧比較用戶端電腦可執行文件的版本號與伺服器可執行文件的版本號是否一致 S18‧‧‧Comparison whether the version number of the client executable file is the same as the version number of the server executable file

S19‧‧‧將伺服器上的可執行文件下載到用戶端電腦上,並安裝該可執行文件 S19‧‧‧Download the executable file on the server to the client computer and install the executable file

S20‧‧‧將異常報告寫入日誌文件,並通知管理員 S20‧‧‧Write the exception report to the log file and notify the administrator

Claims (6)

一種可執行文件版本更新系統,包括伺服器、用戶端電腦,所述伺服器包括:設置模組,用於當用戶將需要生成可執行文件的源代碼存放於伺服器時,設置該源代碼的編譯時間;讀取模組,用於讀取所述源代碼中的屬性資訊及伺服器中存放該源代碼對應的可執行文件的屬性資訊;判斷模組,用於判斷讀取的源代碼中的屬性資訊與伺服器中存放該源代碼對應的可執行文件的屬性資訊是否一致;編譯模組,用於當源代碼中的屬性資訊及可執行文件中的屬性資訊不一致時,在設置的編譯時間對該源代碼進行編譯,使其成為可執行文件,編譯的方式包括對新增加的功能所編寫的源代碼進行編譯的增量編譯及對所編寫的源代碼全部進行編譯的完全編譯;更新模組,用於當源代碼編譯成功時,更新伺服器上的可執行文件,若編譯的方式為增量編譯,則將編譯成功後生成的可執行文件覆蓋該源代碼對應的可執行文件,若編譯的方式為完全編譯,則將編譯成功後生成的可執行文件存放在伺服器用於存放可執行文件的目錄下,使其與編譯成功的可執行文件一致;修改模組,用於修改編譯成功後所生成的可執行文件的版本號;所述用戶端電腦包括:獲取模組,用於當啟動用戶端電腦的可執行文件時,獲取伺服器 中對應的可執行文件的版本號;比較模組,用於比較用戶端電腦上啟動的可執行文件的版本號與伺服器上對應的可執行文件的版本號是否一致;下載模組,用於當用戶端電腦上啟動的可執行文件的版本號與伺服器上對應的可執行文件的版本號不一致時,將伺服器上的可執行文件下載到用戶端電腦上,並安裝該可執行文件。 An executable file version updating system includes a server and a client computer, and the server includes: a setting module, configured to set the source code when the user stores the source code of the executable file on the server. a compiling time; the reading module is configured to read the attribute information in the source code and the attribute information of the executable file corresponding to the source code stored in the server; the determining module is configured to determine the read source code The attribute information is consistent with the attribute information of the executable file corresponding to the source code stored in the server; the compiling module is used to compile the settings when the attribute information in the source code and the attribute information in the executable file are inconsistent. Time to compile the source code to make it an executable file. The compilation method includes incremental compilation of the source code written by the newly added function and full compilation of the compiled source code. The module is used to update the executable file on the server when the source code is successfully compiled. If the compilation mode is incremental compilation, it will be compiled into The generated executable file overwrites the executable file corresponding to the source code. If the compiled mode is fully compiled, the executable file generated after the successful compilation is stored in a directory used by the server for storing the executable file, so that Consistent with the compiled executable file; the modification module is configured to modify the version number of the executable file generated after the successful compilation; the client computer includes: an acquisition module, which is used to start the execution of the client computer Get the server when the file is The version number of the corresponding executable file; the comparison module is configured to compare whether the version number of the executable file started on the client computer is consistent with the version number of the corresponding executable file on the server; the download module is used to download When the version number of the executable file started on the client computer does not match the version number of the corresponding executable file on the server, the executable file on the server is downloaded to the client computer, and the executable file is installed. 如申請專利範圍第1項所述之可執行文件版本更新系統,所述屬性資訊包括作者、源代碼的編寫日期及修改日期。 For example, in the executable file version update system described in claim 1, the attribute information includes an author, a date on which the source code is written, and a date of modification. 如申請專利範圍第1項所述之可執行文件版本更新系統,所述伺服器還包括寫入模組,所述寫入模組用於當源代碼編譯失敗時,將異常報告寫入日誌文件,並通知管理員。 The executable file version update system of claim 1, wherein the server further includes a write module, wherein the write module is configured to write an exception report to the log file when the source code fails to be compiled. And notify the administrator. 一種可執行文件版本更新方法,該方法包括如下步驟:當用戶將需要生成可執行文件的源代碼存放於伺服器時,設置該源代碼的編譯時間;讀取所述源代碼中的屬性資訊及伺服器中存放該源代碼對應的可執行文件的屬性資訊;當源代碼中的屬性資訊與伺服器中存放該源代碼對應的可執行文件的屬性資訊不一致時,在設置的時間對源代碼進行編譯,使其成為可執行文件,編譯的方式包括對新增加的功能所編寫的源代碼進行編譯的增量編譯及對所編寫的源代碼全部進行編譯的完全編譯;當源代碼編譯成功時,更新伺服器上的可執行文件,若編譯的方式為增量編譯,則將編譯成功後生成的可執行文件覆蓋該源代碼對應的可執行文件,若編譯的方式為完全編譯,則將編譯成功後 生成的可執行文件存放在伺服器用於存放可執行文件的目錄下,使其與編譯成功的可執行文件一致;修改編譯成功後所生成的可執行文件的版本號;當啟動用戶端電腦的可執行文件時,讀取伺服器中對應的可執行文件的版本號;當用戶端電腦上啟動的可執行文件的版本號與伺服器上對應的可執行文件的版本號不一致時,將伺服器上的可執行文件下載到用戶端電腦上,並安裝該可執行文件。 An executable file version update method, the method comprising the following steps: when a user stores a source code that needs to generate an executable file on a server, setting a compile time of the source code; reading attribute information in the source code and The server stores the attribute information of the executable file corresponding to the source code; when the attribute information in the source code is inconsistent with the attribute information of the executable file corresponding to the source code stored in the server, the source code is performed at the set time. Compile and make it an executable file. The compilation method includes incremental compilation of the source code written by the newly added function and full compilation of the compiled source code. When the source code is compiled successfully, Update the executable file on the server. If the compilation method is incremental compilation, the executable file generated after successful compilation will overwrite the executable file corresponding to the source code. If the compilation mode is fully compiled, the compilation will be successful. Rear The generated executable file is stored in the directory where the server is used to store the executable file, so that it is consistent with the successfully compiled executable file; the version number of the executable file generated after the successful compilation is modified; when the user computer is started When the executable file is read, the version number of the corresponding executable file in the server is read; when the version number of the executable file started on the client computer does not match the version number of the corresponding executable file on the server, the server is The executable file is downloaded to the client computer and the executable file is installed. 如申請專利範圍第4項所述之可執行文件版本更新方法,所述屬性資訊包括作者、源代碼的編寫日期及修改日期。 The method for updating an executable file version as described in claim 4, wherein the attribute information includes an author, a date on which the source code is written, and a date of modification. 如申請專利範圍第4項所述之可執行文件版本更新方法,該方法還包括如下步驟:當源代碼編譯失敗時,將異常報告寫入日誌文件,並通知管理員。 The method for updating an executable file version described in claim 4, the method further comprising the steps of: writing an exception report to a log file and notifying an administrator when the source code fails to compile.
TW97113338A 2008-04-11 2008-04-11 System and method for updating version of the executable file TWI416410B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW97113338A TWI416410B (en) 2008-04-11 2008-04-11 System and method for updating version of the executable file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW97113338A TWI416410B (en) 2008-04-11 2008-04-11 System and method for updating version of the executable file

Publications (2)

Publication Number Publication Date
TW200943185A TW200943185A (en) 2009-10-16
TWI416410B true TWI416410B (en) 2013-11-21

Family

ID=44868948

Family Applications (1)

Application Number Title Priority Date Filing Date
TW97113338A TWI416410B (en) 2008-04-11 2008-04-11 System and method for updating version of the executable file

Country Status (1)

Country Link
TW (1) TWI416410B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897555A (en) * 2019-05-06 2020-11-06 阿里巴巴集团控股有限公司 Dynamic updating method, device and system of client and terminal equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4558413A (en) * 1983-11-21 1985-12-10 Xerox Corporation Software version management system
US5764989A (en) * 1996-02-29 1998-06-09 Supercede, Inc. Interactive software development system
US6651249B2 (en) * 1998-03-25 2003-11-18 Symantec Corporation Multi-tiered incremental software updating
TW567477B (en) * 1999-04-21 2003-12-21 Res Investment Network Inc System, method and computer program product for updating content stored on a portable storage medium
TWI221582B (en) * 2000-05-25 2004-10-01 Ibm Method of applying an update to a contained collection of program and data files based upon versions
TW200802528A (en) * 2006-04-28 2008-01-01 Tokyo Electron Ltd Process information managing device and program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4558413A (en) * 1983-11-21 1985-12-10 Xerox Corporation Software version management system
US5764989A (en) * 1996-02-29 1998-06-09 Supercede, Inc. Interactive software development system
US6651249B2 (en) * 1998-03-25 2003-11-18 Symantec Corporation Multi-tiered incremental software updating
TW567477B (en) * 1999-04-21 2003-12-21 Res Investment Network Inc System, method and computer program product for updating content stored on a portable storage medium
TWI221582B (en) * 2000-05-25 2004-10-01 Ibm Method of applying an update to a contained collection of program and data files based upon versions
TW200802528A (en) * 2006-04-28 2008-01-01 Tokyo Electron Ltd Process information managing device and program

Also Published As

Publication number Publication date
TW200943185A (en) 2009-10-16

Similar Documents

Publication Publication Date Title
US7703090B2 (en) Patch un-installation
US10242023B2 (en) Programming model for synchronizing browser caches across devices and web services
US9448784B2 (en) Reducing downtime during upgrades of interrelated components in a database system
US8495609B2 (en) Methods, systems, and computer program products for taking a snapshot of installed software on a data processing system as part of a software update process
KR100952251B1 (en) Servicing a component base software product
JP5681465B2 (en) Information processing system, information processing apparatus, preparation method, program, and recording medium
US20120324417A1 (en) Systems and methods for incremental software development
CN101546269B (en) System and method capable of executing file version updating
US20060282480A1 (en) Methods, systems, and computer program products for provisioning software using dynamic tags to identify and process files
WO2013026332A1 (en) Software installation and upgrade method and device
WO2012034440A1 (en) Method and device for generating database upgrading script
WO2013078951A1 (en) Method and system for upgrading software
WO2019079080A1 (en) Using semantic annotations to control compatibility behaviors
CN106371875B (en) Mobile phone application updating method based on HTML5
CN113419766B (en) Method, device, equipment and storage medium for intelligently updating program logic
US20220350593A1 (en) Adaptive hot reload for class changes
Stevens Connecting software build with maintaining consistency between models: towards sound, optimal, and flexible building from megamodels
CN108694049B (en) Method and equipment for updating software
WO2022156277A1 (en) Application program installation method and apparatus, and computing device and readable storage medium
US20170322792A1 (en) Updating of operating system images
TWI416410B (en) System and method for updating version of the executable file
JP4828842B2 (en) Reinstallation software creation method, reinstallation software creation program, installation method, installation program, and computer device
WO2011157105A2 (en) Method and device for component expansion
CN109960522B (en) Software upgrading method and device
US8850399B2 (en) Software development using code retraction and background warm up

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees