diff --git a/win/code/HGCheckNewApp/HGCheckNewApp.cpp b/win/code/HGCheckNewApp/HGCheckNewApp.cpp index 0004767..435471b 100644 --- a/win/code/HGCheckNewApp/HGCheckNewApp.cpp +++ b/win/code/HGCheckNewApp/HGCheckNewApp.cpp @@ -101,6 +101,9 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, #elif defined(OEM_ZHONGJING) strAppGuid = "{36868C39-B195-498B-BFAE-36125D55305E}_is1"; strAppName = "MicrotekScan.exe"; +#elif defined(OEM_ZIGUANG) + strAppGuid = "{6512BEFD-F0E0-495F-8E12-4D07B5B3BE87}_is1"; + strAppName = "UniscanScan.exe"; #else strAppGuid = "{7076DC53-5C2F-4216-9783-2A6F954FEB3E}_is1"; strAppName = "HuaGoScan.exe"; diff --git a/win/code/HGCheckNewApp/HGCheckNewApp.vcxproj b/win/code/HGCheckNewApp/HGCheckNewApp.vcxproj index 45b4293..edf9e0e 100644 --- a/win/code/HGCheckNewApp/HGCheckNewApp.vcxproj +++ b/win/code/HGCheckNewApp/HGCheckNewApp.vcxproj @@ -41,6 +41,14 @@ Release x64 + + ZGRelease + Win32 + + + ZGRelease + x64 + ZJRelease Win32 @@ -99,6 +107,13 @@ true Unicode + + Application + false + v142 + true + Unicode + Application true @@ -140,6 +155,13 @@ true Unicode + + Application + false + v142 + true + Unicode + @@ -163,6 +185,9 @@ + + + @@ -181,6 +206,9 @@ + + + true @@ -204,6 +232,10 @@ false ZJCheckNewApp + + false + ZGCheckNewApp + true @@ -226,6 +258,10 @@ false ZJCheckNewApp + + false + ZGCheckNewApp + Level3 @@ -339,6 +375,26 @@ copy $(OutDir)ZJCheckNewApp.exe $(SolutionDir)..\x86\Release\ + + + Level3 + true + true + true + WIN32;NDEBUG;_WINDOWS;OEM_ZIGUANG;%(PreprocessorDefinitions) + true + MultiThreaded + + + Windows + true + true + true + + + copy $(OutDir)ZGCheckNewApp.exe $(SolutionDir)..\x86\Release\ + + Level3 @@ -452,6 +508,26 @@ copy $(OutDir)ZJCheckNewApp.exe $(SolutionDir)..\x64\Release\ + + + Level3 + true + true + true + NDEBUG;_WINDOWS;OEM_ZIGUANG;%(PreprocessorDefinitions) + true + MultiThreaded + + + Windows + true + true + true + + + copy $(OutDir)ZGCheckNewApp.exe $(SolutionDir)..\x64\Release\ + + diff --git a/win/code/HGRemoveOldApp/HGRemoveOldApp.cpp b/win/code/HGRemoveOldApp/HGRemoveOldApp.cpp index 6b9ce5e..652c685 100644 --- a/win/code/HGRemoveOldApp/HGRemoveOldApp.cpp +++ b/win/code/HGRemoveOldApp/HGRemoveOldApp.cpp @@ -319,6 +319,8 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, return 0; #elif defined(OEM_ZHONGJING) return 0; +#elif defined(OEM_ZIGUANG) + return 0; #else strAppGuid = "InstallShield_{6BE74035-CDC8-4CBF-937C-EBC08A9D6233}"; strAppName = "HuaGoScan.exe"; diff --git a/win/code/HGRemoveOldApp/HGRemoveOldApp.vcxproj b/win/code/HGRemoveOldApp/HGRemoveOldApp.vcxproj index 2b93198..6d05817 100644 --- a/win/code/HGRemoveOldApp/HGRemoveOldApp.vcxproj +++ b/win/code/HGRemoveOldApp/HGRemoveOldApp.vcxproj @@ -41,6 +41,14 @@ Release x64 + + ZGRelease + Win32 + + + ZGRelease + x64 + ZJRelease Win32 @@ -92,6 +100,13 @@ true Unicode + + Application + false + v142 + true + Unicode + Application false @@ -133,6 +148,13 @@ true Unicode + + Application + false + v142 + true + Unicode + Application false @@ -160,6 +182,9 @@ + + + @@ -178,6 +203,9 @@ + + + @@ -200,6 +228,10 @@ false ZJRemoveOldApp + + false + ZGRemoveOldApp + false LSCRemoveOldApp @@ -222,6 +254,10 @@ false ZJRemoveOldApp + + false + ZGRemoveOldApp + false LSCRemoveOldApp @@ -319,6 +355,26 @@ copy $(OutDir)ZJRemoveOldApp.exe $(SolutionDir)..\x86\Release\ + + + Level3 + true + true + true + WIN32;NDEBUG;_WINDOWS;OEM_ZIGUANG;%(PreprocessorDefinitions) + true + MultiThreaded + + + Windows + true + true + true + + + copy $(OutDir)ZGRemoveOldApp.exe $(SolutionDir)..\x86\Release\ + + Level3 @@ -432,6 +488,26 @@ copy $(OutDir)ZJRemoveOldApp.exe $(SolutionDir)..\x64\Release\ + + + Level3 + true + true + true + NDEBUG;_WINDOWS;OEM_ZIGUANG;%(PreprocessorDefinitions) + true + MultiThreaded + + + Windows + true + true + true + + + copy $(OutDir)ZGRemoveOldApp.exe $(SolutionDir)..\x64\Release\ + + Level3 diff --git a/win/code/Solution.sln b/win/code/Solution.sln index 2f5e6fb..e44359d 100644 --- a/win/code/Solution.sln +++ b/win/code/Solution.sln @@ -19,6 +19,8 @@ Global LSCRelease|x86 = LSCRelease|x86 Release|x64 = Release|x64 Release|x86 = Release|x86 + ZGRelease|x64 = ZGRelease|x64 + ZGRelease|x86 = ZGRelease|x86 ZJRelease|x64 = ZJRelease|x64 ZJRelease|x86 = ZJRelease|x86 EndGlobalSection @@ -43,6 +45,10 @@ Global {AECDDB0F-9344-441E-A98A-9C88F3F49479}.Release|x64.Build.0 = Release|x64 {AECDDB0F-9344-441E-A98A-9C88F3F49479}.Release|x86.ActiveCfg = Release|Win32 {AECDDB0F-9344-441E-A98A-9C88F3F49479}.Release|x86.Build.0 = Release|Win32 + {AECDDB0F-9344-441E-A98A-9C88F3F49479}.ZGRelease|x64.ActiveCfg = ZGRelease|x64 + {AECDDB0F-9344-441E-A98A-9C88F3F49479}.ZGRelease|x64.Build.0 = ZGRelease|x64 + {AECDDB0F-9344-441E-A98A-9C88F3F49479}.ZGRelease|x86.ActiveCfg = ZGRelease|Win32 + {AECDDB0F-9344-441E-A98A-9C88F3F49479}.ZGRelease|x86.Build.0 = ZGRelease|Win32 {AECDDB0F-9344-441E-A98A-9C88F3F49479}.ZJRelease|x64.ActiveCfg = ZJRelease|x64 {AECDDB0F-9344-441E-A98A-9C88F3F49479}.ZJRelease|x64.Build.0 = ZJRelease|x64 {AECDDB0F-9344-441E-A98A-9C88F3F49479}.ZJRelease|x86.ActiveCfg = ZJRelease|Win32 @@ -67,6 +73,10 @@ Global {69A2127B-5734-48AE-834C-2F6995EAD33E}.Release|x64.Build.0 = Release|x64 {69A2127B-5734-48AE-834C-2F6995EAD33E}.Release|x86.ActiveCfg = Release|Win32 {69A2127B-5734-48AE-834C-2F6995EAD33E}.Release|x86.Build.0 = Release|Win32 + {69A2127B-5734-48AE-834C-2F6995EAD33E}.ZGRelease|x64.ActiveCfg = ZGRelease|x64 + {69A2127B-5734-48AE-834C-2F6995EAD33E}.ZGRelease|x64.Build.0 = ZGRelease|x64 + {69A2127B-5734-48AE-834C-2F6995EAD33E}.ZGRelease|x86.ActiveCfg = ZGRelease|Win32 + {69A2127B-5734-48AE-834C-2F6995EAD33E}.ZGRelease|x86.Build.0 = ZGRelease|Win32 {69A2127B-5734-48AE-834C-2F6995EAD33E}.ZJRelease|x64.ActiveCfg = ZJRelease|x64 {69A2127B-5734-48AE-834C-2F6995EAD33E}.ZJRelease|x64.Build.0 = ZJRelease|x64 {69A2127B-5734-48AE-834C-2F6995EAD33E}.ZJRelease|x86.ActiveCfg = ZJRelease|Win32 diff --git a/win/setup/scanner/UniscanScan_App.ico b/win/setup/scanner/UniscanScan_App.ico new file mode 100644 index 0000000..bb06227 Binary files /dev/null and b/win/setup/scanner/UniscanScan_App.ico differ diff --git a/win/setup/scanner/UniscanScan_App_License.txt b/win/setup/scanner/UniscanScan_App_License.txt new file mode 100644 index 0000000..ef4c727 --- /dev/null +++ b/win/setup/scanner/UniscanScan_App_License.txt @@ -0,0 +1,83 @@ +请务必认真阅读和理解本《软件许可使用协议》(以下简称《协议》)中规定的所有权利和限制。除非您接受本《协议》条款,否则您无权下载、安装或使用本”软件”及其相关服务。您一旦安装、复制、下载、访问或以其它方式使用本软件产品,将视为对本《协议》的接受,即表示您同意接受本《协议》各项条款的约束。如果您不同意本《协议》中的条款,请不要安装、复制或使用本软件。 + +  1. 权利声明 + +  本”软件”的一切知识产权,以及与”软件”相关的所有信息内容,包括但不限于:文字表述及其组合、图标、图饰、图像、图表、色彩、界面设计、版面框架、有关数据、附加程序、印刷材料或电子文档等均为作者所有,受著作权法和国际著作权条约以及其他知识产权法律法规的保护。 + +  2. 许可范围 + +  2.1 下载、安装和使用:本软件为免费软件,用户可以非商业性、无限制数量地下载、安装及使用本软件。 + +  2.2 复制、分发和传播:用户可以非商业性、无限制数量地复制、分发和传播本软件产品。但必须保证每一份复制、分发和传播都是完整和真实的, 包括所有有关本软件产品的软件、电子文档, 版权和商标,亦包括本协议。 + +  3. 权利限制 + +  3.1 禁止反向工程、反向编译和反向汇编:用户不得对本软件产品进行反向工程(Reverse Engineer)、反向编译(Decompile)或反向汇编(Disassemble),同时不得改动编译在程序文件内部的任何资源。除法律、法规明文规定允许上述活动外,用户必须遵守此协议限制。 + +  3.2 组件分割:本软件产品是作为一个单一产品而被授予许可使用, 用户不得将各个部分分开用于任何目的。 + +  3.3 个别授权: 如需进行商业性的销售、复制、分发,包括但不限于软件销售、预装、捆绑等,必须获得作者的授权和许可。 + +  3.4 保留权利:本协议未明示授权的其他一切权利仍归作者所有,用户使用其他权利时必须获得作者的书面同意。 + +  4. 用户使用须知 + +  4.1 本软件提供以定时关机为代表的计划任务功能:多种定时方式执行关机/注销/重启/锁定桌面/待机/打开文件(或URL)/复合任务,立即关机/注销/重启/锁定桌面/待机,自动同步网络标准时间,方便的计划任务工具等功能。 + +  4.2 本软件仅适用于Windows XP/Vista/7/8/10/11操作系统,软件可随操作系统启动而自动运行,以便随时提供所有功能服务并减少响应时间。如果用户在安装本软件后因任何原因欲放弃使用,可删除本软件。 + +  4.3 本软件由作者提供产品支持。 + +  4.4 软件的修改和升级:作者保留为用户提供本软件的修改、升级版本的权利。 + +  4.5 本软件不含有任何旨在破坏用户计算机数据和获取用户隐私信息的恶意代码,不含有任何跟踪、监视用户计算机的功能代码,不会监控用户网上、网下的行为,不会收集用户使用其它软件、文档等个人信息,不会泄漏用户隐私。 + +  4.6 用户应在遵守法律及本协议的前提下使用本软件。用户无权实施包括但不限于下列行为: + +  4.6.1 不得删除或者改变本软件上的所有权利管理电子信息; + +  4.6.2 不得故意避开或者破坏著作权人为保护本软件著作权而采取的技术措施; + +  4.6.3 用户不得利用本软件误导、欺骗他人; + +  4.6.4 违反国家规定,对计算机信息系统功能进行删除、修改、增加、干扰,造成计算机信息系统不能正常运行, + +  4.6.5 未经允许,进入计算机信息网络或者使用计算机信息网络资源 + +  4.6.6 未经允许,对计算机信息网络功能进行删除、修改或者增加的; + +  4.6.7 未经允许,对计算机信息网络中存储、处理或者传输的数据和应用程序进行删除、修改或者增加; + +  4.6.8 破坏本软件系统或网站的正常运行,故意传播计算机病毒等破坏性程序; + +  4.6.9 其他任何危害计算机信息网络安全的。 + +  4.7 对于从非作者指定站点下载的本软件产品以及从非作者发行的介质上获得的本软件产品,作者无法保证该软件是否感染计算机病毒、是否隐藏有伪装的特洛伊木马程序或者黑客软件,使用此类软件,将可能导致不可预测的风险,建议用户不要轻易下载、安装、使用,作者不承担任何由此产生的一切法律责任。 + +  4.7.1 不得使用本软件发布违反国家法律的非法广告信息,如色情,赌博等,其造成的一切后果与本作者无关,请自觉营造和谐良性的网络营销环境。违法行为一经发现,本作者有权终止服务并追究法律责任。 + +  4.8 隐私权保护:为了更好地改进软件和服务,在用户启动本软件时,本软件会向作者服务器报告软件所在计算机的唯一标识,具体报告方法为访问服务器的一个页面,服务器根据该页面的被访问次数统计软件使用次数。作者不会将此数据与用户的个人身份信息相关联。 + +  5.免责与责任限制 + +  5.1 本软件经过详细的测试,但不能保证与所有的软硬件系统完全兼容,不能保证本软件完全没有错误。如果出现不兼容及软件错误的情况,用户可登录软件官网论坛将情况报告作者,获得技术支持。如果无法解决兼容性问题,用户可以删除本软件。 + +  5.2 使用本软件产品风险由用户自行承担,在适用法律允许的最大范围内,对因使用或不能使用本软件所产生的损害及风险,包括但不限于直接或间接的个人损害、商业赢利的丧失、贸易中断、商业信息的丢失或任何其它经济损失,作者不承担任何责任。 + +  5.3 对于因电信系统或互联网网络故障、计算机故障或病毒、信息损坏或丢失、计算机系统问题或其它任何不可抗力原因而产生损失,作者不承担任何责任。 + +  5.4 用户违反本协议规定,对作者公司造成损害的。作者有权采取包括但不限于中断使用许可、停止提供服务、限制使用、法律追究等措施。 + +  6 . 法律及争议解决 + +  6.1 本协议适用中华人民共和国法律。 + +  6.2 因本协议引起的或与本协议有关的任何争议,各方应友好协商解决;协商不成的,任何一方均可将有关争议提交至郑州仲裁委员会并按照其届时有效的仲裁规则仲裁;仲裁裁决是终局的,对各方均有约束力。 + +  7. 其他条款 + +  7.1 如果本协议中的任何条款无论因何种原因完全或部分无效或不具有执行力,或违反任何适用的法律,则该条款被视为删除,但本协议的其余条款仍应有效并且有约束力。 + +  7.2 作者有权根据有关法律、法规的变化以及公司经营状况和经营策略的调整等修改本协议。修改后的协议会随附于新版本软件。当发生有关争议时,以最新的协议文本为准。如果不同意改动的内容,用户可以自行删除本软件。如果用户继续使用本软件,则视为您接受本协议的变动。 + +  7.3 本协议的一切解释权与修改权归作者。 \ No newline at end of file diff --git a/win/setup/scanner/UniscanScan_App_Setup.iss b/win/setup/scanner/UniscanScan_App_Setup.iss new file mode 100644 index 0000000..b1820c3 --- /dev/null +++ b/win/setup/scanner/UniscanScan_App_Setup.iss @@ -0,0 +1,318 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! +#define MyAppName "紫光扫描软件" +#define MyAppVersion GetFileVersion('..\..\x64\OEM\uniscan\sane.dll') +#define MyAppSetupName "UniscanScan_App_Setup" +#define MyAppDefSetupDir "UniscanScan" +#define MyAppPublisher "北京紫光信息科技有限公司" + +[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={{6512BEFD-F0E0-495F-8E12-4D07B5B3BE87} +AppName={#MyAppName} +AppVerName={#MyAppName} +AppVersion={#MyAppVersion} +DefaultDirName={pf}\{#MyAppDefSetupDir} +DefaultGroupName={#MyAppName} +VersionInfoVersion={#MyAppVersion} +OutputDir=..\..\package +OutputBaseFilename={#MyAppSetupName}_{#MyAppVersion} +Compression=lzma +AppPublisher={#MyAppPublisher} +SolidCompression=no +UninstallIconFile=uninstall.ico +SetupIconFile=UniscanScan_App.ico +LicenseFile=UniscanScan_App_License.txt +AlwaysShowComponentsList=true +ArchitecturesInstallIn64BitMode=x64 +PrivilegesRequired=admin +DisableWelcomePage=no + +[Languages] +Name: "zn"; MessagesFile: "compiler:Languages/ChineseSimp.isl" + +[Components] +;Name: "Upgrade"; Description: "在线升级功能" ; Types: Full +Name: "TwainG138"; Description: "UNISCANSCAN G138 TWAIN" ; Types: Full +Name: "TwainG238"; Description: "UNISCANSCAN G238 TWAIN" ; Types: Full +Name: "TwainG6005"; Description: "UNISCANSCAN G6005 TWAIN" ; Types: Full +Name: "TwainG6006"; Description: "UNISCANSCAN G6006 TWAIN" ; Types: Full + +[Files] + +; app +Source: ".\UniscanScan_App.ico"; DestDir: "{app}\"; Flags: ignoreversion +Source: "..\..\..\..\code_app\doc\scanner\UniscanScan_App_Help_manual.pdf"; DestDir: "{app}\"; Flags: ignoreversion +Source: "..\..\..\..\code_app\doc\scanner\UniscanScan_scanSettings_Help_manual.pdf"; DestDir: "{app}\"; Flags: ignoreversion + +; app32 +Source: "..\..\x86\Release\hwusbdev.key"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\tessdata\*"; DestDir: "{app}\tessdata\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Qt\iconengines\*"; DestDir: "{app}\iconengines\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Qt\imageformats\*"; DestDir: "{app}\imageformats\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Qt\platforms\*"; DestDir: "{app}\platforms\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Qt\styles\*"; DestDir: "{app}\styles\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Qt\translations\*"; DestDir: "{app}\translations\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Qt\*.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\UniscanScan.exe"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +;Source: "..\..\x86\Release\ZGUpgradeApp.exe"; DestDir: "{app}\"; Flags: ignoreversion; Components: Upgrade; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\cnocr.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\doc_seg.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\ExportFile.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\FormEx.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\GetPdf.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\GetRtf.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\GetXls.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\hanwangOCRdetect.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\hasp_windows_113819.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\ZGBase.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\ZGImgFmt.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\ZGImgProc.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +;Source: "..\..\x86\Release\ZGVersion.dll"; DestDir: "{app}\"; Flags: ignoreversion; Components: Upgrade; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\HwOcrSdk.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\libmupdf.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\libzip.org.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\mp30.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\ofd.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\pdflib.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\PDFParse.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\tinyxml2.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\msvcp140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\vcruntime140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\concrt140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\Release\zlib.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\OEM\uniscan\sane.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\OEM\uniscan\scanner.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\x86\OEM\uniscan\lang.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\..\lang\*"; DestDir: "{app}\lang\"; Flags: ignoreversion; Check: not Is64BitInstallMode + ; app64 +Source: "..\..\x64\Release\hwusbdev.key"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\tessdata\*"; DestDir: "{app}\tessdata\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Qt\iconengines\*"; DestDir: "{app}\iconengines\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Qt\imageformats\*"; DestDir: "{app}\imageformats\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Qt\platforms\*"; DestDir: "{app}\platforms\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Qt\styles\*"; DestDir: "{app}\styles\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Qt\translations\*"; DestDir: "{app}\translations\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Qt\*.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\UniscanScan.exe"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +;Source: "..\..\x64\Release\ZGUpgradeApp.exe"; DestDir: "{app}\"; Flags: ignoreversion; Components: Upgrade; Check: Is64BitInstallMode +Source: "..\..\x64\Release\cnocr.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\doc_seg.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\ExportFile.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\FormEx.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\GetPdf.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\GetRtf.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\GetXls.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\hanwangOCRdetect.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\hasp_windows_x64_113819.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\ZGBase.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\ZGImgFmt.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\ZGImgProc.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +;Source: "..\..\x64\Release\ZGVersion.dll"; DestDir: "{app}\"; Flags: ignoreversion; Components: Upgrade; Check: Is64BitInstallMode +Source: "..\..\x64\Release\HwOcrSdk.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\libmupdf.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\libzip.org.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\mp30.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\ofd.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\pdflib.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\PDFParse.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\tinyxml2.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\msvcp140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\vcruntime140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\vcruntime140_1.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\concrt140.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\Release\zlib.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\OEM\uniscan\sane.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\OEM\uniscan\scanner.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x64\OEM\uniscan\lang.dll"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\..\lang\*"; DestDir: "{app}\lang\"; Flags: ignoreversion; Check: Is64BitInstallMode + +; twain32 Source: "..\..\..\..\code_app\doc\scanner\UniscanScan_scanSettings_Help_manual.pdf"; DestDir: "{win}\twain_32\UniscanTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x86\Release\msvcp140.dll"; DestDir: "{win}\twain_32\UniscanTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x86\Release\vcruntime140.dll"; DestDir: "{win}\twain_32\UniscanTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x86\Release\concrt140.dll"; DestDir: "{win}\twain_32\UniscanTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x86\OEM\uniscan\sane.dll"; DestDir: "{win}\twain_32\UniscanTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x86\OEM\uniscan\scanner.dll"; DestDir: "{win}\twain_32\UniscanTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x86\OEM\uniscan\lang.dll"; DestDir: "{win}\twain_32\UniscanTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\..\lang\*"; DestDir: "{win}\twain_32\UniscanTwain\lang\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x86\Release\ZGBase.dll"; DestDir: "{win}\twain_32\UniscanTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x86\Release\ZGImgFmt.dll"; DestDir: "{win}\twain_32\UniscanTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x86\Release\ZGImgProc.dll"; DestDir: "{win}\twain_32\UniscanTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x86\Release\ZGVersion.dll"; DestDir: "{win}\twain_32\UniscanTwain\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x86\Release\tessdata\*"; DestDir: "{win}\twain_32\UniscanTwain\tessdata\"; Flags: ignoreversion; Check: Is64BitInstallMode +Source: "..\..\x86\OEM\uniscan\uniscantwain138.ds"; DestDir: "{win}\twain_32\UniscanTwain\"; Flags: ignoreversion; Components: TwainG138; +Source: "..\..\x86\OEM\uniscan\uniscantwain238.ds"; DestDir: "{win}\twain_32\UniscanTwain\"; Flags: ignoreversion; Components: TwainG238; +Source: "..\..\x86\OEM\uniscan\uniscantwain6005.ds"; DestDir: "{win}\twain_32\UniscanTwain\"; Flags: ignoreversion; Components: TwainG6005; +Source: "..\..\x86\OEM\uniscan\uniscantwain6006.ds"; DestDir: "{win}\twain_32\UniscanTwain\"; Flags: ignoreversion; Components: TwainG6006; + +; twain64 +Source: "..\..\x64\OEM\uniscan\uniscantwain138.ds"; DestDir: "{win}\twain_64\UniscanTwain\"; Flags: ignoreversion; Components: TwainG138; Check: Is64BitInstallMode +Source: "..\..\x64\OEM\uniscan\uniscantwain238.ds"; DestDir: "{win}\twain_64\UniscanTwain\"; Flags: ignoreversion; Components: TwainG238; Check: Is64BitInstallMode +Source: "..\..\x64\OEM\uniscan\uniscantwain6005.ds"; DestDir: "{win}\twain_64\UniscanTwain\"; Flags: ignoreversion; Components: TwainG6005; Check: Is64BitInstallMode +Source: "..\..\x64\OEM\uniscan\uniscantwain6006.ds"; DestDir: "{win}\twain_64\UniscanTwain\"; Flags: ignoreversion; Components: TwainG6006; Check: Is64BitInstallMode + +Source: "..\..\vs\vc_redist.x86.exe"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode +Source: "..\..\vs\vc_redist.x64.exe"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode + +;拷贝驱动 +Source: "..\..\usb\uniscan\zgusbscan.inf"; DestDir: "{app}\driver\"; Flags: ignoreversion recursesubdirs; +Source: "..\..\usb\uniscan\zgusbscan.cat"; DestDir: "{app}\driver\"; Flags: ignoreversion recursesubdirs; +Source: "..\..\x86\Release\DPInst32.exe"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs; Check: not IsWin64 +Source: "..\..\x64\Release\DPInst64.exe"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs; Check: IsWin64 + +; 临时使用 Source: "..\..\x86\Release\ZGRemoveOldApp.exe"; DestDir: "{tmp}\"; Flags: ignoreversion Source: "..\..\x86\Release\ZGCheckNewApp.exe"; DestDir: "{app}\"; Flags: ignoreversion; Check: not Is64BitInstallMode Source: "..\..\x64\Release\ZGCheckNewApp.exe"; DestDir: "{app}\"; Flags: ignoreversion; Check: Is64BitInstallMode + +[INI] + +[Icons] +Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\UniscanScan.exe" +Name: "{group}\{#MyAppName}"; Filename: "{app}\UniscanScan.exe" +Name: "{group}\紫光扫描软件帮助文档"; Filename: "{app}\UniscanScan_App_Help_manual.pdf" +Name: "{group}\卸载"; Filename: "{uninstallexe}"; + +[Registry] +Root: HKLM; Subkey: "Software\UniscanScan"; ValueType: string; ValueName: "AppDirectory"; ValueData: "{app}"; Flags: uninsdeletekey +Root: HKLM; Subkey: "Software\UniscanScan"; ValueType: string; ValueName: "Application"; ValueData: "{app}\UniscanScan.exe"; Flags: uninsdeletekey +Root: HKLM; Subkey: "Software\UniscanScan"; ValueType: string; ValueName: "AppVersion"; ValueData: "{#MyAppVersion}"; Flags: uninsdeletekey +Root: HKLM; Subkey: "Software\UniscanScan"; ValueType: string; ValueName: "DriverPath"; ValueData: "{app}"; Flags: uninsdeletekey; Check: not Is64BitInstallMode +Root: HKLM; Subkey: "Software\UniscanScan"; ValueType: string; ValueName: "DriverPath"; ValueData: "{win}\twain_32\UniscanTwain"; Flags: uninsdeletekey; Check: Is64BitInstallMode +Root: HKLM; Subkey: "Software\UniscanScan"; ValueType: string; ValueName: "DriverPath64"; ValueData: "{app}"; Flags: uninsdeletekey; Check: Is64BitInstallMode +Root: HKLM; Subkey: "Software\WOW6432Node\UniscanScan"; ValueType: string; ValueName: "DriverPath"; ValueData: "{win}\twain_32\UniscanTwain"; Flags: uninsdeletekey; Check: Is64BitInstallMode +Root: HKLM; Subkey: "Software\WOW6432Node\UniscanScan"; ValueType: string; ValueName: "DriverPath64"; ValueData: "{app}"; Flags: uninsdeletekey; Check: Is64BitInstallMode + +[Code] + +var + globalInstallPath: String; + +//初始化时把路径设置到编辑框 +procedure InitializeWizard; +begin + WizardForm.DirEdit.Text := globalInstallPath; +end; + +function GetInstallString(): String; +var + InstallPath: String; +begin + InstallPath := ExpandConstant('{pf}\{#MyAppDefSetupDir}'); + if RegValueExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6512BEFD-F0E0-495F-8E12-4D07B5B3BE87}_is1', 'Inno Setup: App Path') then + begin + RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6512BEFD-F0E0-495F-8E12-4D07B5B3BE87}_is1', 'Inno Setup: App Path', InstallPath) + end + result := InstallPath; +end; + +function InitializeSetup(): boolean; +var + ErrorCode: Integer; + ResultCode: Integer; + ResultStr: String; + UninstallContinue: Boolean; + CmdStr: String; +begin + Result := false; + globalInstallPath := GetInstallString(); + CmdStr := GetCmdTail(); + ExtractTemporaryFile('ZGRemoveOldApp.exe'); + if Exec(ExpandConstant('{tmp}\ZGRemoveOldApp.exe'), '', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then + begin + if 0 = ErrorCode then + begin + if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6512BEFD-F0E0-495F-8E12-4D07B5B3BE87}_is1', 'UninstallString', ResultStr) then + begin + UninstallContinue := true; + if Pos('/verysilent', CmdStr) = 0 then + begin + if MsgBox('扫描软件已安装,是否卸载原版本?', mbConfirmation, MB_YESNO) <> IDYES then + begin + UninstallContinue := false; + end + end + if UninstallContinue then + begin + ResultStr := RemoveQuotes(ResultStr); + if Exec(ResultStr, '/verysilent', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then + begin + if 0 = ResultCode then + begin + Sleep(1000) + Result := true; + end + end + end + end + else + begin + Result := true; + end + end + else if 2 = ErrorCode then + begin + MsgBox('请先关闭旧版扫描软件!', mbInformation, MB_OK); + end + else + begin + MsgBox('卸载旧版扫描软件失败,停止安装!', mbInformation, MB_OK); + end + end +end; + +function SetUninstallIcon(iconPath:string): Boolean; +var + InstalledVersion,SubKeyName: String; +begin + SubKeyName := 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{6512BEFD-F0E0-495F-8E12-4D07B5B3BE87}_is1'; + RegWriteStringValue(HKLM,SubKeyName,'DisplayIcon',iconPath); +end; + +function InitializeUninstall(): Boolean; +var + ErrorCode: Integer; +begin + Result := false; + if Exec(ExpandConstant('{app}\ZGCheckNewApp.exe'), '', '', SW_HIDE, ewWaitUntilTerminated, ErrorCode) then + begin + if 0 = ErrorCode then + begin + Result := true; + end + else + begin + MsgBox('请先关闭扫描软件!', mbInformation, MB_OK); + end + end +end; + +procedure CurPageChanged(CurPageID: Integer); +begin + if CurPageID = wpFinished then + begin + SetUninstallIcon(ExpandConstant('{app}\UniscanScan_App.ico')); + end; +end; + +procedure CurUninstallStepChanged(CurUninstallStep:TUninstallStep); +begin + if CurUninstallStep = usDone then + begin + DelTree(ExpandConstant('{app}'), True, True, True); + DelTree(ExpandConstant('{win}\twain_32\UniscanTwain'), True, True, True); + DelTree(ExpandConstant('{win}\twain_64\UniscanTwain'), True, True, True); + end; + end; + +[Run] +Filename: "{app}\vc_redist.x86.exe"; Flags: runascurrentuser; Check: not Is64BitInstallMode +Filename: "{app}\vc_redist.x64.exe"; Flags: runascurrentuser; Check: Is64BitInstallMode +Filename: "{app}\DPInst32"; Parameters: "/path ""{app}\driver"" /sw /se /lm /f"; Check: not IsWin64; Flags: runascurrentuser +Filename: "{app}\DPInst64"; Parameters: "/path ""{app}\driver"" /sw /se /lm /f"; Check: IsWin64; Flags: runascurrentuser +;Filename: "{app}\ZGUpgradeApp.exe"; Parameters:"-type=postinstallinfo -appName=Scanner -desc=install/upgrade"; Components: Upgrade; Flags: runascurrentuser +Filename: "{app}\UniscanScan.exe"; Description: "{cm:LaunchProgram, {#MyAppName}}"; Flags: postinstall nowait skipifsilent runascurrentuser + +[UninstallRun] +; 卸载驱动 ;Filename: "{app}\DPInst32"; Parameters: "/u ""{app}\driver\uniscanusba3.inf"" /q /d"; Check: not IsWin64; Flags: runascurrentuser ;Filename: "{app}\DPInst64"; Parameters: "/u ""{app}\driver\uniscanusba3.inf"" /q /d"; Check: IsWin64; Flags: runascurrentuser +;Filename: "{app}\DPInst32"; Parameters: "/u ""{app}\driver\uniscanusba4.inf"" /q /d"; Check: not IsWin64; Flags: runascurrentuser +;Filename: "{app}\DPInst64"; Parameters: "/u ""{app}\driver\uniscanusba4.inf"" /q /d"; Check: IsWin64; Flags: runascurrentuser \ No newline at end of file diff --git a/win/x64/Release/ZGCheckNewApp.exe b/win/x64/Release/ZGCheckNewApp.exe new file mode 100644 index 0000000..12c95a8 Binary files /dev/null and b/win/x64/Release/ZGCheckNewApp.exe differ diff --git a/win/x64/Release/ZGRemoveOldApp.exe b/win/x64/Release/ZGRemoveOldApp.exe new file mode 100644 index 0000000..f1da233 Binary files /dev/null and b/win/x64/Release/ZGRemoveOldApp.exe differ diff --git a/win/x86/Release/ZGCheckNewApp.exe b/win/x86/Release/ZGCheckNewApp.exe new file mode 100644 index 0000000..f8c0ea3 Binary files /dev/null and b/win/x86/Release/ZGCheckNewApp.exe differ diff --git a/win/x86/Release/ZGRemoveOldApp.exe b/win/x86/Release/ZGRemoveOldApp.exe new file mode 100644 index 0000000..4d89870 Binary files /dev/null and b/win/x86/Release/ZGRemoveOldApp.exe differ