NSIS修補(一個文件中有多個補丁)

[英]NSIS patching (multiple patches in one file)


I'm able to generate patch files from one version to another using NSIS' Vpatch. Let's say I have mydll.dll version 1, and I have a patch to update it to version 2. Then I have a new version again, thus I generate another patch to update it to version 3.

我可以使用NSIS的Vpatch從一個版本到另一個版本生成補丁文件。假設我有mydll.dll版本1,我有一個補丁來更新它到版本2.然后我再次有一個新版本,因此我生成另一個補丁,將其更新到版本3。

What bothers me though is, what if user cancels updating to version 2 and so forth. Then my latest version let's say is version 20. User decides to update to version 20. Is there a way to generate a patch that's like accumulative in nature? whereas user can jump from version any old version to the newest version (i.e ver 3 to ver 20) without passing through the versions in between?

令我困擾的是,如果用戶取消更新到版本2等等,該怎么辦?然后我的最新版本就是版本20.用戶決定更新到版本20.是否有辦法生成一個類似累積的補丁?用戶可以從任何舊版本的版本跳到最新版本(即版本3到版本20)而不通過其間的版本?

I've read this line in vpatch's documentation ---> "if you want to be able to upgrade version 1 and 2 to version 3, you can put a 1 > 3 and 2 > 3 patch in one file." But how do I that?

我在vpatch的文檔中讀到了這一行--->“如果你想將版本1和2升級到版本3,你可以在一個文件中放置1> 3和2> 3補丁。”但那我該怎么辦?

What if I alread have like 30 versions. Does that mean I have to create a patch whose arguments are old files(versions 1-29) and new file(version20)?

如果我已經有30個版本怎么辦?這是否意味着我必須創建一個補丁,其參數是舊文件(版本1-29)和新文件(版本20)?

2 个解决方案

#1


I'd say you have two options:

我會說你有兩個選擇:

  • Every time you have a new version you GENPAT a patch for every previous version to the new version
  • 每次有新版本時,都會為每個以前的版本生成新版本的補丁

  • GENPAT just from New-1 to New (Appending to a patch file that already had New-2 to New-1 etc) and keep calling vpatch::vpatchfile at install-time till the return value is "OK, new version already installed" and not just "OK" (You don't need a archive of all old versions for this, but it will take longer for the user to apply the update if they had skipped many updates)
  • GENPAT只是從New-1到New(附加到已經有New-2到New-1的補丁文件等)並且在安裝時繼續調用vpatch :: vpatchfile,直到返回值為“OK,已安裝新版本”而不只是“確定”(您不需要為此存檔所有舊版本,但如果用戶跳過許多更新,則需要更長時間才能應用更新)

#2


VPatch is an open source project in itself so you could ask in their forum. The guy wrote it says you can ask him questions. There is a link from his page to the email form: http://www.tibed.net/vpatch/

VPatch本身就是一個開源項目,所以你可以在他們的論壇中提問。這家伙寫道,你可以問他問題。從他的頁面到電子郵件表單有一個鏈接:http://www.tibed.net/vpatch/


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2009/05/20/72a2cd87f2561e22c0c1d62abd0886b6.html



 
粤ICP备14056181号  © 2014-2020 ITdaan.com