Browse Source

add InnoSetup

liuyuqi-dellpc 1 year ago
parent
commit
2f0db7d5d2
6 changed files with 264 additions and 0 deletions
  1. 28 0
      InnoSetup/License.txt
  2. 28 0
      InnoSetup/License_cn.txt
  3. 1 0
      InnoSetup/Readme.txt
  4. BIN
      InnoSetup/moderninno.bmp
  5. 147 0
      InnoSetup/moderninno.iss
  6. 60 0
      InnoSetup/setup.iss

+ 28 - 0
InnoSetup/License.txt

@@ -0,0 +1,28 @@
+Zhizhou Technology Product License Agreement
+=================================================
+Welcome to use Zhizhou technology products. The following terms and conditions constitute an agreement between you and Shanghai Zhizhou Information Technology Co., Ltd. (hereinafter referred to as "Zhizhou Technology") regarding software license.
+By installing and using this product, users agree to the following terms and conditions.
+
+1 Intellectual Property Statement
+
+ Protected by the national computer software copyright, it is not allowed to maliciously share product source code, secondary resale, etc.
+
+2 Scope of user license authorization
+2.1 Reserved rights: All other rights not expressly authorized in this "Agreement" still belong to Zhizhou Technology. Users must obtain the written consent of Zhizhou Technology when using other rights.
+2.2. Except as clearly stipulated in this "Agreement", this "Agreement" does not list the service terms of other related individual services of Zhizhou Technology accessed by using this "software". There may be separate service terms for these services To regulate, please understand and confirm when using related services. If the user uses the service, it is regarded as acceptance of the relevant service terms.
+
+3 Rights and Obligations
+
+3.1. Before commercial authorization, the software shall not be used for commercial purposes (including but not limited to corporate websites, operating websites, profit-making or profit-making websites with equivalent or similar functions).
+3.2. Do not redistribute, rent, sell, mortgage or issue sub-licenses to the obtained software authorization, and shall not copy, copy, leak, authorize, etc. to any third party including the user's affiliated company. Nor can the system source code and the system itself be provided to any third party, including the user¡¯s affiliated company, in any way, otherwise it shall bear the corresponding compensation liability.
+3.3. Zhizhou Technology will provide this software to authorized users, as well as provide software installation instructions, instructions for use and other documents. Authorized websites and users shall enjoy the right to use the software according to law.
+3.4. Authorized or unauthorized users have the ownership of all member information, product information, order information and related information in their systems, and independently assume relevant legal obligations.
+3.5. The commercial activities that occur using this software are the responsibility of the user. All disputes arising from the use of this software for commercial activities are not related to Zhizhou Technology.
+3.6. For the convenience of users, the software has built-in many third-party systems such as online payment gateways and short message gateways. However, you should evaluate the risks of using these systems yourself. The specific opening and services of these systems are provided by the corresponding third-party companies, and any commercial disputes arising therefrom have nothing to do with Zhizhou Technology.
+3.7. Before authorized software upgrade, authorized users should backup data by themselves. Zhizhou Technology will not be responsible for data loss caused by authorized users during the upgrade process.
+3.8. Zhizhou Technology shall not bear any responsibility for the loss of authorized users caused by the use of authorized software or software errors, but Zhizhou Technology will try to avoid such situations.
+3.9. You may not remove the copyrights of the front and back of Zhizhou Technology Software without authorization. If the above acts occur, it will be considered that you have violated the intellectual property rights of Zhizhou Technology. Zhizhou Technology will retain prosecution and pursue the law Liability and the right to claim compensation.
+3.10. Authorized users will be subject to the relevant restrictions and restrictions while enjoying the power granted by the above clauses. Actions beyond the scope of the agreement will directly violate this authorization agreement and constitute infringement. We have the right to terminate the authorization at any time, order to stop the damage, and reserve the right to pursue related liabilities.
+3.11. Due to disputes in the implementation of this agreement, the people's court where Zhizhou Technology is located shall hear the case.
+
+Zhizhou Technology has the final interpretation right. Any site using this software means that it accepts this agreement by default.

+ 28 - 0
InnoSetup/License_cn.txt

@@ -0,0 +1,28 @@
+芝舟科技产品许可协议
+=================================================
+欢迎使用芝舟科技产品。以下条款和条件构成您与上海芝舟信息科技有限公司(以下简称“芝舟科技”)就软件使用许可所达成的协议。
+用户安装和使用此产品,即意味着同意以下条款和条件。
+
+1   知识产权声明
+
+ 受国家计算机软件著作权保护,不得恶意分享产品源代码、二次转售等,违者必究。
+
+2   用户使用许可授权范围
+2.1、保留权利: 本《协议》未明示授权的其他一切权利仍归芝舟科技所有,用户使用其他权利时须另外取得芝舟科技的书面同意。
+2.2、除本《协议》有明确规定外,本《协议》并未对利用本"软件"访问的芝舟科技的其他相关单独服务的服务条款予以列明,对于这些服务可能有单独的服务条款加以规范,请用户在使用有关服务时另行了解与确认。如用户使用该服务,视为对相关服务条款的接受。
+
+3   权利与义务
+
+3.1、未获商业授权之前,不得将本软件用于商业用途(包括但不限于企业网站、经营性网站、以营利为目或实现盈利及具有同等或类似功能的网站)。
+3.2、不得对所获本软件授权进行重新分发、出租、出售、抵押或发放子许可证,不得通过拷贝、复制、泄露、授权等方式给任意第三方包括用户的关联公司。也不得以任何方式将系统源代码及系统本身提供给任意第三方包括用户的关联公司,否则应承担相应赔偿责任。
+3.3、芝舟科技将本软件提供给授权用户,同时提供软件的安装说明,使用说明等文档,授权网站、用户依法享有该软件的使用权。
+3.4、授权或非授权用户拥有其系统内全部会员资料、商品资料、订单资料及相关信息的所有权,并独立承担相关法律义务。
+3.5、利用本软件发生的商业行为均由用户自行负责,利用本软件进行商业行为所产生的一切纠纷均与芝舟科技无关。
+3.6、为方便用户使用,软件内置了譬如网上支付网关、短信网关等诸多第三方系统。但您应自行评估使用这些系统的风险。这些系统的具体开通与服务由相应第三方公司提供,由此而产生的任何商业纠纷,均与芝舟科技无关。
+3.7、授权软件升级前授权用户应自行备份数据,升级过程中造成的授权用户数据丢失的芝舟科技不承担责任。
+3.8、芝舟科技不对因授权软件使用错误、软件错误等问题所引起的授权用户损失而承担任何责任,但芝舟科技将尽量避免此类情况的发生。
+3.9、您不得在非授权的情况下,私自去除芝舟科技软件前台、后台版权,如有以上行为发生,将视为您侵犯了芝舟科技的知识产权,芝舟科技将保留起诉、追究法律责任并要求获得赔偿的权利。
+3.10、授权用户将在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。
+3.11、因本协议履行过程中的争议,由芝舟科技所在地人民法院审理。
+
+芝舟科技拥有最终解释权,任何站点使用本软件则表示默认接收此协议。

+ 1 - 0
InnoSetup/Readme.txt

@@ -0,0 +1 @@
+This is the README file for My Program.

BIN
InnoSetup/moderninno.bmp


+ 147 - 0
InnoSetup/moderninno.iss

@@ -0,0 +1,147 @@
+[Code]
+{ from https://stackoverflow.com/questions/11778292/how-to-change-wizard-size-width-and-height-in-an-inno-setup-installer }
+procedure ShiftDown(Control: TControl; DeltaY: Integer);
+begin
+  Control.Top := Control.Top + DeltaY;
+end;
+
+procedure ShiftRight(Control: TControl; DeltaX: Integer);
+begin
+  Control.Left := Control.Left + DeltaX;
+end;
+
+procedure ShiftDownAndRight(Control: TControl; DeltaX, DeltaY: Integer);
+begin
+  ShiftDown(Control, DeltaY);
+  ShiftRight(Control, DeltaX);
+end;
+
+procedure GrowDown(Control: TControl; DeltaY: Integer);
+begin
+  Control.Height := Control.Height + DeltaY;
+end;
+
+procedure GrowRight(Control: TControl; DeltaX: Integer);
+begin
+  Control.Width := Control.Width + DeltaX;
+end;
+
+procedure GrowRightAndDown(Control: TControl; DeltaX, DeltaY: Integer);
+begin
+  GrowRight(Control, DeltaX);
+  GrowDown(Control, DeltaY);
+end;
+
+procedure GrowRightAndShiftDown(Control: TControl; DeltaX, DeltaY: Integer);
+begin
+  GrowRight(Control, DeltaX);
+  ShiftDown(Control, DeltaY);
+end;
+
+{ inspired by https://stackoverflow.com/questions/11778292/how-to-change-wizard-size-width-and-height-in-an-inno-setup-installer
+  and https://stackoverflow.com/questions/38684039/display-image-in-top-panel-of-inno-setup-wizard-instead-of-page-title-and-descri
+  check Projects/Wizard.pas for more items }
+procedure InitializeWizard();
+var
+  DeltaY: Integer;
+  DeltaX: Integer;
+begin
+  with WizardForm do
+  begin
+    DeltaX := ScaleX(WizardSmallBitmapImage.Bitmap.Width)-MainPanel.Width;
+    DeltaY := ScaleY(WizardSmallBitmapImage.Bitmap.Height)-MainPanel.Height;
+    
+    { Banner }
+    MainPanel.Width := ScaleX(WizardSmallBitmapImage.Bitmap.Width);
+    MainPanel.Height := ScaleY(WizardSmallBitmapImage.Bitmap.Height);
+    WizardSmallBitmapImage.Top := 0;
+    WizardSmallBitmapImage.Left := 0;
+    WizardSmallBitmapImage.Width := MainPanel.Width;
+    WizardSmallBitmapImage.Height := MainPanel.Height;
+    WizardSmallBitmapImage.Stretch := True;
+    WizardSmallBitmapImage.AutoSize := False;
+    PageDescriptionLabel.Visible := False;
+    PageNameLabel.Visible := False;
+    Bevel1.Visible := False;
+
+    { Frame }
+    GrowRightAndDown(WizardForm, DeltaX, DeltaY);
+
+    { General Controls }
+    GrowRightAndShiftDown(Bevel, DeltaX, DeltaY);
+    ShiftDownAndRight(CancelButton, DeltaX, DeltaY);
+    ShiftDownAndRight(NextButton, DeltaX, DeltaY);
+    ShiftDownAndRight(BackButton, DeltaX, DeltaY);
+    GrowRightAndDown(OuterNotebook, DeltaX, DeltaY);
+    GrowRight(BeveledLabel, DeltaX);
+    
+    { InnerPage }
+    GrowRightAndDown(InnerNotebook, DeltaX, DeltaY);
+
+    { WelcomePage }
+    WelcomeLabel2.Top := WelcomeLabel2.Top+MainPanel.Height;
+    WelcomeLabel2.Left := ScaleX(20);
+    WelcomeLabel2.Width :=  MainPanel.Width-ScaleX(20);
+    WelcomeLabel1.Top := WelcomeLabel1.Top+MainPanel.Height;
+    WelcomeLabel1.Left := ScaleX(10);
+    WelcomeLabel1.Width :=  MainPanel.Width-ScaleX(10);
+    WizardBitmapImage.Bitmap := WizardSmallBitmapImage.Bitmap;
+    WizardBitmapImage.Width := MainPanel.Width;
+    WizardBitmapImage.Height := MainPanel.Height;
+
+    { LicensePage }
+    ShiftDown(LicenseNotAcceptedRadio, DeltaY);
+    ShiftDown(LicenseAcceptedRadio, DeltaY);
+    GrowRightAndShiftDown(LicenseMemo, DeltaX, DeltaY);
+    GrowRightAndShiftDown(LicenseLabel1, DeltaX, DeltaY);
+
+    { SelectDirPage }
+    GrowRightAndShiftDown(DiskSpaceLabel, DeltaX, DeltaY);
+    ShiftDownAndRight(DirBrowseButton, DeltaX, DeltaY);
+    GrowRightAndShiftDown(DirEdit, DeltaX, DeltaY);
+    GrowRightAndShiftDown(SelectDirBrowseLabel, DeltaX, DeltaY);
+    GrowRightAndShiftDown(SelectDirLabel, DeltaX, DeltaY);
+
+    { SelectComponentsPage }
+    GrowRightAndShiftDown(ComponentsDiskSpaceLabel, DeltaX, DeltaY);
+    GrowRightAndShiftDown(ComponentsList, DeltaX, DeltaY);
+    GrowRightAndShiftDown(TypesCombo, DeltaX, DeltaY);
+    GrowRightAndShiftDown(SelectComponentsLabel, DeltaX, DeltaY);
+
+    { SelectTasksPage }
+    GrowRightAndShiftDown(TasksList, DeltaX, DeltaY);
+    GrowRightAndShiftDown(SelectTasksLabel, DeltaX, DeltaY);
+
+    { ReadyPage }
+    GrowRightAndShiftDown(ReadyMemo, DeltaX, DeltaY);
+    GrowRightAndShiftDown(ReadyLabel, DeltaX, DeltaY);
+
+    { PreparingPage }
+    ShiftDown(PreparingYesRadio, DeltaY);
+    ShiftDown(PreparingNoRadio, DeltaY);
+    GrowRightAndShiftDown(PreparingLabel, DeltaX, DeltaY);
+    GrowRightAndShiftDown(PreparingMemo, DeltaX, DeltaY);
+
+    { InstallingPage }
+    GrowRightAndShiftDown(FilenameLabel, DeltaX, DeltaY);
+    GrowRightAndShiftDown(StatusLabel, DeltaX, DeltaY);
+    GrowRightAndShiftDown(ProgressGauge, DeltaX, DeltaY);
+
+    { FinishedPage }
+    FinishedLabel.Top := FinishedLabel.Top+MainPanel.Height;
+    FinishedLabel.Left := ScaleX(20);
+    FinishedLabel.Width :=  MainPanel.Width-ScaleX(20);
+    FinishedHeadingLabel.Top := FinishedHeadingLabel.Top+MainPanel.Height;
+    FinishedHeadingLabel.Left := ScaleX(10);
+    FinishedHeadingLabel.Width :=  MainPanel.Width-ScaleX(10);
+    WizardBitmapImage2.Bitmap := WizardSmallBitmapImage.Bitmap;
+    WizardBitmapImage2.Width := MainPanel.Width;
+    WizardBitmapImage2.Height := MainPanel.Height;
+  end;
+end;
+
+procedure CurPageChanged(CurPageID: Integer);
+begin
+  if CurPageID = wpSelectTasks then
+    WizardForm.NextButton.Caption := SetupMessage(msgButtonInstall);
+end;

+ 60 - 0
InnoSetup/setup.iss

@@ -0,0 +1,60 @@
+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+#define MyAppName "DayOf1440"
+#define MyAppVersion "1.1"
+#define MyAppPublisher "Zhizhou Technology Co.,Ltd."
+#define MyAppURL "http://blog.yoqi.me/wp/16962.html"
+#define MyAppExeName "DayOf1440.exe"
+
+[Setup]
+; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
+; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
+AppId={{4DD350F5-0A9B-4FC0-8EF6-30A4547FC226}
+AppName={#MyAppName}
+AppVersion={#MyAppVersion}
+;AppVerName={#MyAppName} {#MyAppVersion}
+AppPublisher={#MyAppPublisher}
+AppPublisherURL={#MyAppURL}
+;AppSupportURL={#MyAppURL}
+;AppUpdatesURL={#MyAppURL}
+DefaultDirName={autopf}\Zhizhou\{#MyAppName}
+DisableProgramGroupPage=yes
+; Uncomment the following line to run in non administrative install mode (install for current user only.)
+;PrivilegesRequired=lowest
+PrivilegesRequiredOverridesAllowed=dialog
+OutputBaseFilename=DayOf1440-setup
+SetupIconFile=..\DayOf1440\logo.ico
+Compression=lzma
+SolidCompression=yes
+WizardStyle=modern
+LicenseFile=License.txt
+;InfoBeforeFile=Setup_New.txt
+;InfoAfterFile=Setup_Old.txt
+
+;VersionInfoCompany=
+;VersionInfoDescription=ISsample 
+;VersionInfoVersion=1.0.0.0
+;VersionInfoCopyright=Copyright (C) 2007-2008 Hkiss
+
+[Languages]
+Name: "english"; MessagesFile: "compiler:Default.isl"
+
+[Files]
+Source: "..\DayOf1440\bin\Debug\DayOf1440.exe"; DestDir: "{app}"; Flags: ignoreversion
+; {494909B3-FBD3-4B14-81AC-BD51FA4C0B56}Source: "..\DayOf1440\bin\Debug\msc.dll"; DestDir: "{app}"; Flags: ignoreversion
+; NOTE: Don't use "Flags: ignoreversion" on any shared system files
+
+[Icons]
+Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
+Name: "{usersendto}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" 
+
+[Run]
+Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
+
+[Messages]
+BeveledLabel=Zhizhou
+
+;#include "moderninno.iss"
+;[Setup]  
+;WizardSmallImageFile=moderninno.bmp