diff --git a/.vs/Notepad3/v15/Browse.VC.db b/.vs/Notepad3/v15/Browse.VC.db index 32980e864..9a81dd2e6 100644 Binary files a/.vs/Notepad3/v15/Browse.VC.db and b/.vs/Notepad3/v15/Browse.VC.db differ diff --git a/.vs/Notepad3/v15/Solution.VC.db b/.vs/Notepad3/v15/Solution.VC.db index 143c9f626..e3d64ecaa 100644 Binary files a/.vs/Notepad3/v15/Solution.VC.db and b/.vs/Notepad3/v15/Solution.VC.db differ diff --git a/.vs/Notepad3/v15/Solution.VC.db-shm b/.vs/Notepad3/v15/Solution.VC.db-shm index 80b70d574..2a926c021 100644 Binary files a/.vs/Notepad3/v15/Solution.VC.db-shm and b/.vs/Notepad3/v15/Solution.VC.db-shm differ diff --git a/.vs/Notepad3/v15/Solution.VC.db-wal b/.vs/Notepad3/v15/Solution.VC.db-wal index a7a589faf..38aeb0146 100644 Binary files a/.vs/Notepad3/v15/Solution.VC.db-wal and b/.vs/Notepad3/v15/Solution.VC.db-wal differ diff --git a/.vs/Notepad3_vs2017/v15/Browse.VC.db b/.vs/Notepad3_vs2017/v15/Browse.VC.db index 1b8cfcfcf..41a2494d4 100644 Binary files a/.vs/Notepad3_vs2017/v15/Browse.VC.db and b/.vs/Notepad3_vs2017/v15/Browse.VC.db differ diff --git a/.vs/Notepad3_vs2017/v15/Solution.VC.db b/.vs/Notepad3_vs2017/v15/Solution.VC.db index e46997bb0..4ed675979 100644 Binary files a/.vs/Notepad3_vs2017/v15/Solution.VC.db and b/.vs/Notepad3_vs2017/v15/Solution.VC.db differ diff --git a/.vs/Notepad3_vs2017/v15/Solution.VC.db-shm b/.vs/Notepad3_vs2017/v15/Solution.VC.db-shm index 909d48f0b..c4593d466 100644 Binary files a/.vs/Notepad3_vs2017/v15/Solution.VC.db-shm and b/.vs/Notepad3_vs2017/v15/Solution.VC.db-shm differ diff --git a/.vs/Notepad3_vs2017/v15/Solution.VC.db-wal b/.vs/Notepad3_vs2017/v15/Solution.VC.db-wal index bdaf48721..067089572 100644 Binary files a/.vs/Notepad3_vs2017/v15/Solution.VC.db-wal and b/.vs/Notepad3_vs2017/v15/Solution.VC.db-wal differ diff --git a/.vs/Notepad3_vs2017/v15/ipch/AutoPCH/NOTEPAD3-b8c0b620/DIALOGS-61714f7c/DIALOGS.ipch b/.vs/Notepad3_vs2017/v15/ipch/AutoPCH/NOTEPAD3-b8c0b620/DIALOGS-61714f7c/DIALOGS.ipch index 02fd2ba7d..0b0335a8d 100644 Binary files a/.vs/Notepad3_vs2017/v15/ipch/AutoPCH/NOTEPAD3-b8c0b620/DIALOGS-61714f7c/DIALOGS.ipch and b/.vs/Notepad3_vs2017/v15/ipch/AutoPCH/NOTEPAD3-b8c0b620/DIALOGS-61714f7c/DIALOGS.ipch differ diff --git a/.vs/Notepad3_vs2017/v15/ipch/AutoPCH/NOTEPAD3-b8c0b620/VERSION-db3ce04/VERSION.ipch b/.vs/Notepad3_vs2017/v15/ipch/AutoPCH/NOTEPAD3-b8c0b620/VERSION-db3ce04/VERSION.ipch index e174acf17..0e9bb4601 100644 Binary files a/.vs/Notepad3_vs2017/v15/ipch/AutoPCH/NOTEPAD3-b8c0b620/VERSION-db3ce04/VERSION.ipch and b/.vs/Notepad3_vs2017/v15/ipch/AutoPCH/NOTEPAD3-b8c0b620/VERSION-db3ce04/VERSION.ipch differ diff --git a/Version.ini b/Version.ini index 3e0ed404e..074c7269c 100644 --- a/Version.ini +++ b/Version.ini @@ -3,7 +3,7 @@ ; Minor ; Maintenance: 0 - prototype, 1 - beta, 2 - release candidate, 3 - final release ; Build number auto increments. -Version=1.0.2.397 +Version=1.0.2.398 [Templates] Versions\VersionEx.h.tpl = src\VersionEx.h diff --git a/distrib/Changes.txt b/distrib/Changes.txt index 8341c0c96..3c6617777 100644 --- a/distrib/Changes.txt +++ b/distrib/Changes.txt @@ -3,12 +3,19 @@ Rizonesoft Notepad3 CHANGES ================================================== -------------------------------------------------- -Version 1 Build 300 (06 January 2017) +Version 2 Build 398 (13 June 2017) +-------------------------------------------------- +- Updated Scintilla to version 3.7.4 +- Don't use 2nd default syntax scheme by default. (Issue #21) +- Added Microsoft Visual C++ 2017 (vc141) support. +- Bigger Toolbar Buttons (24px). Should be big enough now. (Issue #21) + +-------------------------------------------------- +Version 1 Build 388 (06 January 2017) -------------------------------------------------- - Updated Scintilla to version 3.7.2 - MiniPath now works on Windows XP - -------------------------------------------------- Version 1 Build 386 (08 December 2016) -------------------------------------------------- diff --git a/distrib/Notepad3-1.0.2.386.exe b/distrib/Notepad3-1.0.2.386.exe deleted file mode 100644 index bace474e1..000000000 Binary files a/distrib/Notepad3-1.0.2.386.exe and /dev/null differ diff --git a/distrib/notepad3_setup.iss b/distrib/notepad3_setup.iss index ee12c3c82..389aeeb7d 100644 --- a/distrib/notepad3_setup.iss +++ b/distrib/notepad3_setup.iss @@ -50,7 +50,7 @@ UninstallDisplayName={#app_name} {#app_version} DefaultDirName={pf}\Notepad3 LicenseFile=License.txt OutputDir=. -OutputBaseFilename={#app_name}-{#app_version} +OutputBaseFilename={#app_name}_x_{#app_version} SetupIconFile=Setup.ico WizardImageFile=compiler:WizModernImage-IS.bmp WizardSmallImageFile=WizardSmallImageFile.bmp diff --git a/distrib/notepad3_setup_2.iss b/distrib/notepad3_setup_2.iss new file mode 100644 index 000000000..269a5b2fa --- /dev/null +++ b/distrib/notepad3_setup_2.iss @@ -0,0 +1,349 @@ +;* Notepad3 - Installer script +;* +;* Copyright (C) 2008-2016 Rizonesoft + +; Requirements: +; Inno Setup: http://www.jrsoftware.org/isdl.php + +; Preprocessor related stuff +#if VER < EncodeVer(5,5,9) + #error Update your Inno Setup version (5.5.9 or newer) +#endif + +#define bindir "..\Bin" + +#ifnexist bindir + "\Release_x86\Notepad3.exe" + #error Compile Notepad3 x86 first +#endif + +#ifnexist bindir + "\Release_x86\minipath.exe" + #error Compile MiniPath x86 first +#endif + +#ifnexist bindir + "\Release_x64\Notepad3.exe" + #error Compile Notepad3 x64 first +#endif + +#ifnexist bindir + "\Release_x64\minipath.exe" + #error Compile MiniPath x64 first +#endif + +#define app_version GetFileVersion(bindir + "\Release_x86\Notepad3.exe") +#define app_name "Notepad3" +#define app_copyright "Copyright © 2008-2016, Rizonesoft." +#define quick_launch "{userappdata}\Microsoft\Internet Explorer\Quick Launch" + +[Setup] +AppId={#app_name} +AppName={#app_name} +AppVersion={#app_version} +AppVerName={#app_name} {#app_version} +AppPublisher=Rizonesoft +AppPublisherURL=https://rizonesoft.com +AppSupportURL=https://rizonesoft.com +AppUpdatesURL=https://rizonesoft.com +AppContact=https://rizonesoft.com +AppCopyright={#app_copyright} +;VersionInfoVersion={#app_version} +UninstallDisplayIcon={app}\Notepad3.exe +UninstallDisplayName={#app_name} {#app_version} +DefaultDirName={pf}\Notepad3 +LicenseFile=License.txt +OutputDir=. +OutputBaseFilename={#app_name}_{#app_version} +SetupIconFile=Setup.ico +WizardImageFile=compiler:WizModernImage-IS.bmp +WizardSmallImageFile=WizardSmallImageFile.bmp +Compression=lzma2/max +InternalCompressLevel=max +SolidCompression=yes +EnableDirDoesntExistWarning=no +AllowNoIcons=yes +ShowTasksTreeLines=yes +DisableDirPage=yes +DisableProgramGroupPage=yes +DisableReadyPage=yes +DisableWelcomePage=yes +AllowCancelDuringInstall=no +MinVersion=5.1sp3 +ArchitecturesAllowed=x86 x64 +ArchitecturesInstallIn64BitMode=x64 +#ifexist "..\signinfo_notepad3.txt" +SignTool=MySignTool +#endif +CloseApplications=true +SetupMutex='{#app_name}' + '_setup_mutex' + + +[Languages] +Name: en; MessagesFile: compiler:Default.isl + + +[Messages] +;BeveledLabel ={#app_name} {#app_version} - Compiled with VC2015 +SetupAppTitle =Setup - {#app_name} +SetupWindowTitle =Setup - {#app_name} + + +[CustomMessages] +en.msg_AppIsRunning =Setup has detected that {#app_name} is currently running.%n%nPlease close all instances of it now, then click OK to continue, or Cancel to exit. +en.msg_AppIsRunningUninstall =Uninstall has detected that {#app_name} is currently running.%n%nPlease close all instances of it now, then click OK to continue, or Cancel to exit. +en.msg_DeleteSettings =Do you also want to delete {#app_name}'s settings?%n%nIf you plan on installing {#app_name} again then you do not have to delete them. +#if defined(sse_required) +en.msg_simd_sse =This build of {#app_name} requires a CPU with SSE extension support.%n%nYour CPU does not have those capabilities. +#elif defined(sse2_required) +en.msg_simd_sse2 =This build of {#app_name} requires a CPU with SSE2 extension support.%n%nYour CPU does not have those capabilities. +#endif +en.tsk_AllUsers =For all users +en.tsk_CurrentUser =For the current user only +en.tsk_Other =Other tasks: +en.tsk_ResetSettings =Reset {#app_name}'s settings +en.tsk_StartMenuIcon =Create a Start Menu shortcut +en.tsk_LaunchWelcomePage =Visit Rizonesoft for more downloads + + +[Tasks] +Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked +Name: desktopicon\user; Description: {cm:tsk_CurrentUser}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked exclusive +Name: desktopicon\common; Description: {cm:tsk_AllUsers}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked exclusive +Name: startup_icon; Description: {cm:tsk_StartMenuIcon}; GroupDescription: {cm:AdditionalIcons} +Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked; OnlyBelowVersion: 6.01 +Name: reset_settings; Description: {cm:tsk_ResetSettings}; GroupDescription: {cm:tsk_Other}; Flags: checkedonce unchecked; Check: SettingsExistCheck() + + +[Files] +Source: {#bindir}\Release_x64\Notepad3.exe; DestDir: {app}; Flags: ignoreversion; Check: Is64BitInstallMode() +Source: {#bindir}\Release_x86\Notepad3.exe; DestDir: {app}; Flags: ignoreversion; Check: not Is64BitInstallMode() +Source: License.txt; DestDir: {app}; Flags: ignoreversion +Source: Readme.txt; DestDir: {app}; Flags: ignoreversion +Source: Notepad3.ini; DestDir: {userappdata}\Rizonesoft\Notepad3; Flags: onlyifdoesntexist uninsneveruninstall +Source: {#bindir}\Release_x64\minipath.exe; DestDir: {app}; Flags: ignoreversion; Check: Is64BitInstallMode() +Source: {#bindir}\Release_x86\minipath.exe; DestDir: {app}; Flags: ignoreversion; Check: not Is64BitInstallMode() +Source: minipath.ini; DestDir: {userappdata}\Rizonesoft\Notepad3; Flags: onlyifdoesntexist uninsneveruninstall + +[Dirs] +Name: "{userappdata}\Rizonesoft\Notepad3\Favorites" + +[Icons] +Name: {commondesktop}\{#app_name}; Filename: {app}\Notepad3.exe; Tasks: desktopicon\common; Comment: {#app_name} {#app_version}; WorkingDir: {app}; AppUserModelID: Notepad3; IconFilename: {app}\Notepad3.exe; IconIndex: 0 +Name: {userdesktop}\{#app_name}; Filename: {app}\Notepad3.exe; Tasks: desktopicon\user; Comment: {#app_name} {#app_version}; WorkingDir: {app}; AppUserModelID: Notepad3; IconFilename: {app}\Notepad3.exe; IconIndex: 0 +Name: {userstartmenu}\{#app_name}; Filename: {app}\Notepad3.exe; Tasks: startup_icon; Comment: {#app_name} {#app_version}; WorkingDir: {app}; AppUserModelID: Notepad3; IconFilename: {app}\Notepad3.exe; IconIndex: 0 +Name: {#quick_launch}\{#app_name}; Filename: {app}\Notepad3.exe; Tasks: quicklaunchicon; Comment: {#app_name} {#app_version}; WorkingDir: {app}; IconFilename: {app}\Notepad3.exe; IconIndex: 0 + + +[INI] +Filename: {app}\Notepad3.ini; Section: Notepad3; Key: Notepad3.ini; String: %APPDATA%\Rizonesoft\Notepad3\Notepad3.ini +Filename: {app}\minipath.ini; Section: minipath; Key: minipath.ini; String: %APPDATA%\Rizonesoft\Notepad3\minipath.ini + +Filename: {userappdata}\Rizonesoft\Notepad3\Notepad3.ini; Section: Settings; Key: Favorites; String: %APPDATA%\Rizonesoft\Notepad3\Favorites\ + + +[Run] +Filename: {app}\Notepad3.exe; Description: {cm:LaunchProgram,{#app_name}}; WorkingDir: {app}; Flags: nowait postinstall skipifsilent unchecked +Filename: "http://www.rizonesoft.com/downloads/"; Description: {cm:tsk_LaunchWelcomePage}; Flags: nowait postinstall shellexec skipifsilent + + +[InstallDelete] +Type: files; Name: {userdesktop}\{#app_name}.lnk; Check: not IsTaskSelected('desktopicon\user') and IsUpgrade() +Type: files; Name: {commondesktop}\{#app_name}.lnk; Check: not IsTaskSelected('desktopicon\common') and IsUpgrade() +Type: files; Name: {userstartmenu}\{#app_name}.lnk; Check: not IsTaskSelected('startup_icon') and IsUpgrade() +Type: files; Name: {#quick_launch}\{#app_name}.lnk; Check: not IsTaskSelected('quicklaunchicon') and IsUpgrade(); OnlyBelowVersion: 6.01 +Type: files; Name: {app}\Notepad3.ini +Type: files; Name: {app}\Readme.txt +Type: files; Name: {app}\minipath.ini + + +[UninstallDelete] +Type: files; Name: {app}\Notepad3.ini +Type: files; Name: {app}\minipath.ini +Type: dirifempty; Name: {app} + +[Code] +#if defined(sse_required) || defined(sse2_required) +function IsProcessorFeaturePresent(Feature: Integer): Boolean; +external 'IsProcessorFeaturePresent@kernel32.dll stdcall'; +#endif + +#if defined(sse_required) +function IsSSESupported(): Boolean; +begin + // PF_XMMI_INSTRUCTIONS_AVAILABLE + Result := IsProcessorFeaturePresent(6); +end; + +#elif defined(sse2_required) + +function IsSSE2Supported(): Boolean; +begin + // PF_XMMI64_INSTRUCTIONS_AVAILABLE + Result := IsProcessorFeaturePresent(10); +end; + +#endif + + +function IsOldBuildInstalled(sInfFile: String): Boolean; +begin + if RegKeyExists(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Notepad2') and + FileExists(ExpandConstant('{pf}\Notepad2\' + sInfFile)) then + Result := True + else + Result := False; +end; + + +function IsUpgrade(): Boolean; +var + sPrevPath: String; +begin + sPrevPath := WizardForm.PrevAppDir; + Result := (sPrevPath <> ''); +end; + + +// Check if Notepad3's settings exist +function SettingsExistCheck(): Boolean; +begin + if FileExists(ExpandConstant('{userappdata}\Rizonesoft\Notepad3\Notepad3.ini')) then begin + Log('Custom Code: Settings are present'); + Result := True; + end + else begin + Log('Custom Code: Settings are NOT present'); + Result := False; + end; +end; + + +function UninstallOldVersion(sInfFile: String): Integer; +var + iResultCode: Integer; +begin + // Return Values: + // 0 - no idea + // 1 - error executing the command + // 2 - successfully executed the command + + // default return value + Result := 0; + // TODO: use RegQueryStringValue + if not Exec('rundll32.exe', ExpandConstant('advpack.dll,LaunchINFSectionEx ' + '"{pf}\Notepad2\' + sInfFile +'",DefaultUninstall,,8,N'), '', SW_HIDE, ewWaitUntilTerminated, iResultCode) then begin + Result := 1; + end + else begin + Result := 2; + Sleep(200); + end; +end; + + +function ShouldSkipPage(PageID: Integer): Boolean; +begin + // Hide the license page if IsUpgrade() + if IsUpgrade() and (PageID = wpLicense) then + Result := True; +end; + + +procedure AddReg(); +begin + RegWriteStringValue(HKCR, 'Applications\notepad3.exe', 'AppUserModelID', 'Notepad3'); + RegWriteStringValue(HKCR, 'Applications\notepad3.exe\shell\open\command', '', ExpandConstant('"{app}\Notepad3.exe" %1')); + RegWriteStringValue(HKCR, '*\OpenWithList\notepad3.exe', '', ''); +end; + + +procedure CleanUpSettings(); +begin + DeleteFile(ExpandConstant('{userappdata}\Rizonesoft\Notepad3\Notepad3.ini')); + DeleteFile(ExpandConstant('{userappdata}\Rizonesoft\Notepad3\minipath.ini')); + RemoveDir(ExpandConstant('{userappdata}\Rizonesoft\Notepad3')); +end; + + +procedure RemoveReg(); +begin + RegDeleteKeyIncludingSubkeys(HKCR, 'Applications\notepad3.exe'); + RegDeleteKeyIncludingSubkeys(HKCR, '*\OpenWithList\notepad3.exe'); +end; + + +procedure CurPageChanged(CurPageID: Integer); +begin + if CurPageID = wpSelectTasks then + WizardForm.NextButton.Caption := SetupMessage(msgButtonInstall) + else if CurPageID = wpFinished then + WizardForm.NextButton.Caption := SetupMessage(msgButtonFinish); +end; + + +procedure CurStepChanged(CurStep: TSetupStep); +begin + if CurStep = ssInstall then begin + if IsTaskSelected('reset_settings') then + CleanUpSettings(); + + if IsOldBuildInstalled('Uninstall.inf') or IsOldBuildInstalled('Notepad2.inf') then begin + if IsOldBuildInstalled('Uninstall.inf') then begin + Log('Custom Code: The old build is installed, will try to uninstall it'); + if UninstallOldVersion('Uninstall.inf') = 2 then + Log('Custom Code: The old build was successfully uninstalled') + else + Log('Custom Code: Something went wrong when uninstalling the old build'); + end; + + if IsOldBuildInstalled('Notepad2.inf') then begin + Log('Custom Code: The official Notepad2 build is installed, will try to uninstall it'); + if UninstallOldVersion('Notepad2.inf') = 2 then + Log('Custom Code: The official Notepad2 build was successfully uninstalled') + else + Log('Custom Code: Something went wrong when uninstalling the official Notepad2 build'); + end; + end; + end; + + if CurStep = ssPostInstall then begin + // Always add Notepad3's AppUserModelID and the rest registry values + AddReg(); + end; + +end; + + +procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); +begin + // When uninstalling, ask the user to delete Notepad3's settings + if CurUninstallStep = usUninstall then begin + if SettingsExistCheck() then begin + if SuppressibleMsgBox(CustomMessage('msg_DeleteSettings'), mbConfirmation, MB_YESNO or MB_DEFBUTTON2, IDNO) = IDYES then + CleanUpSettings(); + end; + end; +end; + + +procedure InitializeWizard(); +begin + WizardForm.SelectTasksLabel.Hide; + WizardForm.TasksList.Top := 0; + WizardForm.TasksList.Height := PageFromID(wpSelectTasks).SurfaceHeight; +end; + + +function InitializeSetup(): Boolean; +begin + Result := True; + +#if defined(sse2_required) + if not IsSSE2Supported() then begin + SuppressibleMsgBox(CustomMessage('msg_simd_sse2'), mbCriticalError, MB_OK, MB_OK); + Result := False; + end; +#elif defined(sse_required) + if not IsSSESupported() then begin + SuppressibleMsgBox(CustomMessage('msg_simd_sse'), mbCriticalError, MB_OK, MB_OK); + Result := False; + end; +#endif + +end; diff --git a/minipath/Version.ini b/minipath/Version.ini index 4e0173037..89544c117 100644 --- a/minipath/Version.ini +++ b/minipath/Version.ini @@ -3,7 +3,7 @@ ; Minor ; Maintenance: 0 - prototype, 1 - beta, 2 - release candidate, 3 - final release ; Build number auto increments. -Version=1.0.2.130 +Version=1.0.2.131 [Templates] Versions\VersionEx.h.tpl = src\VersionEx.h diff --git a/minipath/res/Notepad3.exe.manifest.conf b/minipath/res/Notepad3.exe.manifest.conf index fb5ddc6bf..cf9342ef4 100644 --- a/minipath/res/Notepad3.exe.manifest.conf +++ b/minipath/res/Notepad3.exe.manifest.conf @@ -3,7 +3,7 @@ metapath diff --git a/minipath/src/VersionEx.h b/minipath/src/VersionEx.h index 1c544f410..560aabdfb 100644 --- a/minipath/src/VersionEx.h +++ b/minipath/src/VersionEx.h @@ -1,4 +1,4 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 0 #define VERSION_REV 2 -#define VERSION_BUILD 130 +#define VERSION_BUILD 131 diff --git a/res/Notepad3.exe.manifest.conf b/res/Notepad3.exe.manifest.conf index b533c4b52..c3a1d342a 100644 --- a/res/Notepad3.exe.manifest.conf +++ b/res/Notepad3.exe.manifest.conf @@ -3,7 +3,7 @@ Notepad3 diff --git a/src/VersionEx.h b/src/VersionEx.h index 1ee421a07..9b18ebc68 100644 --- a/src/VersionEx.h +++ b/src/VersionEx.h @@ -1,4 +1,4 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 0 #define VERSION_REV 2 -#define VERSION_BUILD 397 +#define VERSION_BUILD 398