Merge pull request #3036 from hpwamr/mui

+ Chg: Clean up test files directory and minor changes
This commit is contained in:
Pairi Daiza 2020-12-28 14:46:47 +01:00 committed by GitHub
commit 1a8ebfd8df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 825 additions and 11880 deletions

View File

@ -7,7 +7,7 @@ rem ****************************************************************************
rem * *
rem * Notepad3 *
rem * *
rem * make_portable(.zip).bat *
rem * make_portable(.zip).cmd *
rem * Batch file for creating "Portable (*.zip)" packages *
rem * *
rem * See License.txt for details about distribution and modification. *

View File

@ -7,7 +7,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Rizonesoft")]
[assembly: AssemblyProduct("Notepad3")]
[assembly: AssemblyCopyright("Copyright © Rizonesoft 2019")]
[assembly: AssemblyCopyright("Copyright © Rizonesoft 2008-2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

View File

@ -1,14 +1,6 @@
/******************************************************************************
* *
* *
* Notepad3 *
* *
* Config.cpp *
* Methods to read and write configuration *
* *
* (c) Rizonesoft 2008-2016 *
* https://rizonesoft.com *
* *
* *
*******************************************************************************/
@ -481,957 +473,3 @@ extern "C" bool FindIniFile()
//=============================================================================
extern "C" int TestIniFile() {
if (StringCchCompareXI(Globals.IniFile, L"*?") == 0) {
StringCchCopy(Globals.IniFileDefault, COUNTOF(Globals.IniFileDefault), L"");
StringCchCopy(Globals.IniFile, COUNTOF(Globals.IniFile), L"");
return(0);
}
if (PathIsDirectory(Globals.IniFile) || *CharPrev(Globals.IniFile, StrEnd(Globals.IniFile, COUNTOF(Globals.IniFile))) == L'\\') {
WCHAR wchModule[MAX_PATH] = { L'\0' };
GetModuleFileName(NULL, wchModule, COUNTOF(wchModule));
PathCchAppend(Globals.IniFile, COUNTOF(Globals.IniFile), PathFindFileName(wchModule));
PathCchRenameExtension(Globals.IniFile, COUNTOF(Globals.IniFile), L".ini");
if (!PathFileExists(Globals.IniFile)) {
StringCchCopy(PathFindFileName(Globals.IniFile), COUNTOF(Globals.IniFile), L"Notepad3.ini");
if (!PathFileExists(Globals.IniFile)) {
StringCchCopy(PathFindFileName(Globals.IniFile), COUNTOF(Globals.IniFile), PathFindFileName(wchModule));
PathCchRenameExtension(Globals.IniFile, COUNTOF(Globals.IniFile), L".ini");
}
}
}
NormalizePathEx(Globals.IniFile, COUNTOF(Globals.IniFile), true, false);
if (!PathFileExists(Globals.IniFile) || PathIsDirectory(Globals.IniFile)) {
StringCchCopy(Globals.IniFileDefault, COUNTOF(Globals.IniFileDefault), Globals.IniFile);
StringCchCopy(Globals.IniFile, COUNTOF(Globals.IniFile), L"");
return(0);
}
return(1);
}
//=============================================================================
extern "C" bool CreateIniFile()
{
return(CreateIniFileEx(Globals.IniFile));
}
//=============================================================================
extern "C" bool CreateIniFileEx(LPCWSTR lpszIniFile)
{
if (StrIsNotEmpty(lpszIniFile))
{
WCHAR* pwchTail = StrRChrW(lpszIniFile, NULL, L'\\');
if (pwchTail) {
*pwchTail = 0;
SHCreateDirectoryEx(NULL, lpszIniFile, NULL);
*pwchTail = L'\\';
}
HANDLE hFile = CreateFile(lpszIniFile,
GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
Globals.dwLastError = GetLastError();
if (hFile != INVALID_HANDLE_VALUE) {
if (GetFileSize(hFile, NULL) == 0) {
DWORD dw;
//WriteFile(hFile,(LPCVOID)L"\xFE\xFF[Notepad3]\r\n",26,&dw,NULL); // UTF-16LE
WriteFile(hFile, (LPCVOID)L"\xEF\xBB\xBF[Notepad3]\r\n", 26, &dw, NULL); // UTF-8 SIG
Globals.bIniFileFromScratch = true;
}
CloseHandle(hFile);
Style_SetIniFile(lpszIniFile);
return true;
}
}
return false;
}
//=============================================================================
//=============================================================================
//
// LoadSettings()
//
//
static int s_iSettingsVersion = CFG_VER_CURRENT;
void LoadSettings()
{
int const _ver = StrIsEmpty(Globals.IniFile) ? CFG_VER_CURRENT : CFG_VER_NONE;
LoadIniFile(Globals.IniFile);
{
bool bDirtyFlag = false; // do we have to save the file on done
// prerequisites
s_iSettingsVersion = IniSectionGetInt(L"Settings", L"SettingsVersion", _ver);
Defaults.SaveSettings = StrIsNotEmpty(Globals.IniFile);
Settings.SaveSettings = IniSectionGetBool(L"Settings", L"SaveSettings", Defaults.SaveSettings);
// --------------------------------------------------------------------------
// first set "hard coded" .ini-Settings
// --------------------------------------------------------------------------
const WCHAR* const Settings2_Section = L"Settings2";
Defaults2.PreferredLanguageLocaleName[0] = L'\0';
IniSectionGetString(Settings2_Section, L"PreferredLanguageLocaleName", Defaults2.PreferredLanguageLocaleName,
Settings2.PreferredLanguageLocaleName, COUNTOF(Settings2.PreferredLanguageLocaleName));
StringCchCopyW(Defaults2.DefaultExtension, COUNTOF(Defaults2.DefaultExtension), L"txt");
IniSectionGetString(Settings2_Section, L"DefaultExtension", Defaults2.DefaultExtension,
Settings2.DefaultExtension, COUNTOF(Settings2.DefaultExtension));
StrTrim(Settings2.DefaultExtension, L" \t.\"");
Defaults2.DefaultDirectory[0] = L'\0';
IniSectionGetString(Settings2_Section, L"DefaultDirectory", Defaults2.DefaultDirectory,
Settings2.DefaultDirectory, COUNTOF(Settings2.DefaultDirectory));
Defaults2.FileDlgFilters[0] = L'\0';
IniSectionGetString(Settings2_Section, L"FileDlgFilters", Defaults2.FileDlgFilters,
Settings2.FileDlgFilters, COUNTOF(Settings2.FileDlgFilters) - 2);
Defaults2.FileCheckInverval = 2000UL;
Settings2.FileCheckInverval = clampul(IniSectionGetInt(Settings2_Section, L"FileCheckInverval",
Defaults2.FileCheckInverval), 250UL, 300000UL);
FileWatching.FileCheckInverval = Settings2.FileCheckInverval;
Defaults2.AutoReloadTimeout = 2000UL;
Settings2.AutoReloadTimeout = clampul(IniSectionGetInt(Settings2_Section, L"AutoReloadTimeout",
Defaults2.AutoReloadTimeout), 250UL, 300000UL);
FileWatching.AutoReloadTimeout = Settings2.AutoReloadTimeout;
// deprecated
Defaults.RenderingTechnology = IniSectionGetInt(Settings2_Section, L"SciDirectWriteTech", -111);
if ((Defaults.RenderingTechnology != -111) && Settings.SaveSettings) {
// cleanup
IniSectionDelete(Settings2_Section, L"SciDirectWriteTech", false);
bDirtyFlag = true;
}
Defaults.RenderingTechnology = clampi(Defaults.RenderingTechnology, 0, 3);
// Settings2 deprecated
Defaults.Bidirectional = IniSectionGetInt(Settings2_Section, L"EnableBidirectionalSupport", -111);
if ((Defaults.Bidirectional != -111) && Settings.SaveSettings) {
// cleanup
IniSectionDelete(Settings2_Section, L"EnableBidirectionalSupport", false);
bDirtyFlag = true;
}
Defaults.Bidirectional = (clampi(Defaults.Bidirectional, SC_BIDIRECTIONAL_DISABLED, SC_BIDIRECTIONAL_R2L) > 0) ? SC_BIDIRECTIONAL_R2L : 0;
Defaults2.IMEInteraction = -1;
Settings2.IMEInteraction = clampi(IniSectionGetInt(Settings2_Section, L"IMEInteraction", Defaults2.IMEInteraction), -1, SC_IME_INLINE);
// Korean IME use inline mode by default
if (Settings2.IMEInteraction == -1) { // auto detection once
// ScintillaWin::KoreanIME()
int const codePage = Scintilla_InputCodePage();
Settings2.IMEInteraction = ((codePage == 949 || codePage == 1361) ? SC_IME_INLINE : SC_IME_WINDOWED);
}
Defaults2.SciFontQuality = g_FontQuality[3];
Settings2.SciFontQuality = clampi(IniSectionGetInt(Settings2_Section, L"SciFontQuality", Defaults2.SciFontQuality), 0, 3);
Defaults2.MarkOccurrencesMaxCount = 2000;
Settings2.MarkOccurrencesMaxCount = IniSectionGetInt(Settings2_Section, L"MarkOccurrencesMaxCount", Defaults2.MarkOccurrencesMaxCount);
if (Settings2.MarkOccurrencesMaxCount <= 0) { Settings2.MarkOccurrencesMaxCount = INT_MAX; }
Defaults2.UpdateDelayMarkAllOccurrences = 50;
Settings2.UpdateDelayMarkAllOccurrences = clampi(IniSectionGetInt(Settings2_Section, L"UpdateDelayMarkAllOccurrences",
Defaults2.UpdateDelayMarkAllOccurrences), USER_TIMER_MINIMUM, 10000);
Defaults2.DenyVirtualSpaceAccess = false;
Settings2.DenyVirtualSpaceAccess = IniSectionGetBool(Settings2_Section, L"DenyVirtualSpaceAccess", Defaults2.DenyVirtualSpaceAccess);
Defaults2.UseOldStyleBraceMatching = false;
Settings2.UseOldStyleBraceMatching = IniSectionGetBool(Settings2_Section, L"UseOldStyleBraceMatching", Defaults2.UseOldStyleBraceMatching);
Defaults2.CurrentLineHorizontalSlop = 40;
Settings2.CurrentLineHorizontalSlop = clampi(IniSectionGetInt(Settings2_Section, L"CurrentLineHorizontalSlop", Defaults2.CurrentLineHorizontalSlop), 0, 240);
Defaults2.CurrentLineVerticalSlop = 5;
Settings2.CurrentLineVerticalSlop = clampi(IniSectionGetInt(Settings2_Section, L"CurrentLineVerticalSlop", Defaults2.CurrentLineVerticalSlop), 0, 25);
int const iARCLdef = 67;
Defaults2.AnalyzeReliableConfidenceLevel = (float)iARCLdef / 100.0f;
int const iARCLset = clampi(IniSectionGetInt(Settings2_Section, L"AnalyzeReliableConfidenceLevel", iARCLdef), 0, 100);
Settings2.AnalyzeReliableConfidenceLevel = (float)iARCLset / 100.0f;
/* ~~~
int const iRCEDCMdef = 85;
Defaults2.ReliableCEDConfidenceMapping = (float)iRCEDCMdef / 100.0f;
int const iRCEDCMset = clampi(IniSectionGetInt(Settings2_Section, L"ReliableCEDConfidenceMapping", iRCEDCMdef), 0, 100);
Settings2.ReliableCEDConfidenceMapping = (float)iRCEDCMset / 100.0f;
int const iURCEDCMdef = 20;
Defaults2.UnReliableCEDConfidenceMapping = (float)iURCEDCMdef / 100.0f;
int const iURCEDCMset = clampi(IniSectionGetInt(Settings2_Section, L"UnReliableCEDConfidenceMapping", iURCEDCMdef), 0, iRCEDCMset);
Settings2.UnReliableCEDConfidenceMapping = (float)iURCEDCMset / 100.0f;
~~~ */
Defaults2.AdministrationTool[0] = L'\0';
IniSectionGetString(Settings2_Section, L"AdministrationTool.exe", Defaults2.AdministrationTool,
Settings2.AdministrationTool, COUNTOF(Settings2.AdministrationTool));
Defaults2.DefaultWindowPosition[0] = L'\0';
IniSectionGetString(Settings2_Section, L"DefaultWindowPosition", Defaults2.DefaultWindowPosition,
Settings2.DefaultWindowPosition, COUNTOF(Settings2.DefaultWindowPosition));
bool const bExplicitDefaultWinPos = (StringCchLenW(Settings2.DefaultWindowPosition, 0) != 0);
Defaults2.FileLoadWarningMB = 1;
Settings2.FileLoadWarningMB = clampi(IniSectionGetInt(Settings2_Section, L"FileLoadWarningMB", Defaults2.FileLoadWarningMB), 0, 2048);
Defaults2.OpacityLevel = 75;
Settings2.OpacityLevel = clampi(IniSectionGetInt(Settings2_Section, L"OpacityLevel", Defaults2.OpacityLevel), 10, 100);
Defaults2.FindReplaceOpacityLevel = 50;
Settings2.FindReplaceOpacityLevel = clampi(IniSectionGetInt(Settings2_Section, L"FindReplaceOpacityLevel", Defaults2.FindReplaceOpacityLevel), 10, 100);
Defaults2.FileBrowserPath[0] = L'\0';
IniSectionGetString(Settings2_Section, L"filebrowser.exe", Defaults2.FileBrowserPath, Settings2.FileBrowserPath, COUNTOF(Settings2.FileBrowserPath));
StringCchCopyW(Defaults2.AppUserModelID, COUNTOF(Defaults2.AppUserModelID), _W(SAPPNAME));
IniSectionGetString(Settings2_Section, L"ShellAppUserModelID", Defaults2.AppUserModelID, Settings2.AppUserModelID, COUNTOF(Settings2.AppUserModelID));
Defaults2.ExtendedWhiteSpaceChars[0] = L'\0';
IniSectionGetString(Settings2_Section, L"ExtendedWhiteSpaceChars", Defaults2.ExtendedWhiteSpaceChars,
Settings2.ExtendedWhiteSpaceChars, COUNTOF(Settings2.ExtendedWhiteSpaceChars));
Defaults2.AutoCompleteWordCharSet[0] = L'\0';
IniSectionGetString(Settings2_Section, L"AutoCompleteWordCharSet", Defaults2.AutoCompleteWordCharSet,
Settings2.AutoCompleteWordCharSet, COUNTOF(Settings2.AutoCompleteWordCharSet));
StringCchCopyW(Defaults2.TimeStamp, COUNTOF(Defaults2.TimeStamp), L"\\$Date:[^\\$]+\\$ | $Date: %Y/%m/%d %H:%M:%S $");
IniSectionGetString(Settings2_Section, L"TimeStamp", Defaults2.TimeStamp, Settings2.TimeStamp, COUNTOF(Settings2.TimeStamp));
Defaults2.DateTimeShort[0] = L'\0';
IniSectionGetString(Settings2_Section, L"DateTimeShort", Defaults2.DateTimeShort, Settings2.DateTimeShort, COUNTOF(Settings2.DateTimeShort));
Defaults2.DateTimeLong[0] = L'\0';
IniSectionGetString(Settings2_Section, L"DateTimeLong", Defaults2.DateTimeLong, Settings2.DateTimeLong, COUNTOF(Settings2.DateTimeLong));
StringCchCopyW(Defaults2.WebTemplate1, COUNTOF(Defaults2.WebTemplate1), L"https://google.com/search?q=%s");
IniSectionGetString(Settings2_Section, L"WebTemplate1", Defaults2.WebTemplate1, Settings2.WebTemplate1, COUNTOF(Settings2.WebTemplate1));
StringCchCopyW(Defaults2.WebTemplate2, COUNTOF(Defaults2.WebTemplate2), L"https://en.wikipedia.org/w/index.php?search=%s");
IniSectionGetString(Settings2_Section, L"WebTemplate2", Defaults2.WebTemplate2, Settings2.WebTemplate2, COUNTOF(Settings2.WebTemplate2));
// --------------------------------------------------------------------------
const WCHAR* const Settings_Section = L"Settings";
// --------------------------------------------------------------------------
#define GET_BOOL_VALUE_FROM_INISECTION(VARNAME,DEFAULT) \
Defaults.VARNAME = DEFAULT; \
Settings.VARNAME = IniSectionGetBool(Settings_Section, _W(_STRG(VARNAME)), Defaults.VARNAME)
#define GET_INT_VALUE_FROM_INISECTION(VARNAME,DEFAULT,MIN,MAX) \
Defaults.VARNAME = DEFAULT; \
Settings.VARNAME = clampi(IniSectionGetInt(Settings_Section, _W(_STRG(VARNAME)), Defaults.VARNAME),MIN,MAX)
#define GET_CAST_INT_VALUE_FROM_INISECTION(CAST,VARNAME,DEFAULT,MIN,MAX) \
Defaults.VARNAME = static_cast<CAST>(DEFAULT); \
Settings.VARNAME = static_cast<CAST>(clampi(IniSectionGetInt(Settings_Section, _W(_STRG(VARNAME)), Defaults.VARNAME),MIN,MAX))
#define GET_ENC_VALUE_FROM_INISECTION(VARNAME,DEFAULT,MIN,MAX) \
Defaults.VARNAME = (cpi_enc_t)DEFAULT; \
Settings.VARNAME = (cpi_enc_t)clampi(IniSectionGetInt(Settings_Section, _W(_STRG(VARNAME)), (int)Defaults.VARNAME),(int)MIN,(int)MAX)
GET_BOOL_VALUE_FROM_INISECTION(SaveRecentFiles, true);
GET_BOOL_VALUE_FROM_INISECTION(PreserveCaretPos, false);
GET_BOOL_VALUE_FROM_INISECTION(SaveFindReplace, false);
Defaults.EFR_Data.bFindClose = false;
Settings.EFR_Data.bFindClose = IniSectionGetBool(Settings_Section, L"CloseFind", Defaults.EFR_Data.bFindClose);
Defaults.EFR_Data.bReplaceClose = false;
Settings.EFR_Data.bReplaceClose = IniSectionGetBool(Settings_Section, L"CloseReplace", Defaults.EFR_Data.bReplaceClose);
Defaults.EFR_Data.bNoFindWrap = false;
Settings.EFR_Data.bNoFindWrap = IniSectionGetBool(Settings_Section, L"NoFindWrap", Defaults.EFR_Data.bNoFindWrap);
Defaults.EFR_Data.bTransformBS = false;
Settings.EFR_Data.bTransformBS = IniSectionGetBool(Settings_Section, L"FindTransformBS", Defaults.EFR_Data.bTransformBS);
Defaults.EFR_Data.bWildcardSearch = false;
Settings.EFR_Data.bWildcardSearch = IniSectionGetBool(Settings_Section, L"WildcardSearch", Defaults.EFR_Data.bWildcardSearch);
Defaults.EFR_Data.bMarkOccurences = true;
Settings.EFR_Data.bMarkOccurences = IniSectionGetBool(Settings_Section, L"FindMarkAllOccurrences", Defaults.EFR_Data.bMarkOccurences);
Defaults.EFR_Data.bHideNonMatchedLines = false;
Settings.EFR_Data.bHideNonMatchedLines = IniSectionGetBool(Settings_Section, L"HideNonMatchedLines", Defaults.EFR_Data.bHideNonMatchedLines);
Defaults.EFR_Data.bDotMatchAll = false;
Settings.EFR_Data.bDotMatchAll = IniSectionGetBool(Settings_Section, L"RegexDotMatchesAll", Defaults.EFR_Data.bDotMatchAll);
Defaults.EFR_Data.fuFlags = 0;
Settings.EFR_Data.fuFlags = (UINT)IniSectionGetInt(Settings_Section, L"efrData_fuFlags", (int)Defaults.EFR_Data.fuFlags);
Defaults.OpenWithDir[0] = L'\0';
if (!IniSectionGetString(Settings_Section, L"OpenWithDir", Defaults.OpenWithDir, Settings.OpenWithDir, COUNTOF(Settings.OpenWithDir))) {
GetKnownFolderPath(FOLDERID_Desktop, Settings.OpenWithDir, COUNTOF(Settings.OpenWithDir));
}
else {
PathAbsoluteFromApp(Settings.OpenWithDir, NULL, COUNTOF(Settings.OpenWithDir), true);
}
Defaults.FavoritesDir[0] = L'\0';
//StringCchCopyW(Defaults.FavoritesDir, COUNTOF(Defaults.FavoritesDir), L"%USERPROFILE%");
if (!IniSectionGetString(Settings_Section, L"Favorites", Defaults.FavoritesDir, Settings.FavoritesDir, COUNTOF(Settings.FavoritesDir))) {
GetKnownFolderPath(FOLDERID_Favorites, Settings.FavoritesDir, COUNTOF(Settings.FavoritesDir));
}
else {
PathAbsoluteFromApp(Settings.FavoritesDir, NULL, COUNTOF(Settings.FavoritesDir), true);
}
GET_INT_VALUE_FROM_INISECTION(PathNameFormat, 1, 0, 2);
GET_INT_VALUE_FROM_INISECTION(WordWrapMode, 0, 0, 1);
GET_INT_VALUE_FROM_INISECTION(WordWrapIndent, 2, 0, 6);
GET_BOOL_VALUE_FROM_INISECTION(WordWrap, false); Globals.fvBackup.bWordWrap = Settings.WordWrap;
GET_BOOL_VALUE_FROM_INISECTION(TabsAsSpaces, false); Globals.fvBackup.bTabsAsSpaces = Settings.TabsAsSpaces;
GET_BOOL_VALUE_FROM_INISECTION(TabIndents, true); Globals.fvBackup.bTabIndents = Settings.TabIndents;
GET_INT_VALUE_FROM_INISECTION(TabWidth, 4, 1, 1024); Globals.fvBackup.iTabWidth = Settings.TabWidth;
GET_INT_VALUE_FROM_INISECTION(IndentWidth, 4, 0, 1024); Globals.fvBackup.iIndentWidth = Settings.IndentWidth;
GET_INT_VALUE_FROM_INISECTION(LongLinesLimit, 80, 0, LONG_LINES_MARKER_LIMIT); Globals.fvBackup.iLongLinesLimit = Settings.LongLinesLimit;
Globals.iWrapCol = Settings.LongLinesLimit;
Defaults.WordWrapSymbols = 22;
int const iWS = IniSectionGetInt(Settings_Section, L"WordWrapSymbols", Defaults.WordWrapSymbols);
Settings.WordWrapSymbols = clampi(iWS % 10, 0, 2) + clampi((iWS % 100 - iWS % 10) / 10, 0, 2) * 10;
GET_BOOL_VALUE_FROM_INISECTION(ShowWordWrapSymbols, true);
GET_BOOL_VALUE_FROM_INISECTION(MatchBraces, true);
GET_BOOL_VALUE_FROM_INISECTION(AutoCloseTags, false);
GET_INT_VALUE_FROM_INISECTION(HighlightCurrentLine, 1, 0, 2);
GET_BOOL_VALUE_FROM_INISECTION(HyperlinkHotspot, true);
GET_BOOL_VALUE_FROM_INISECTION(ColorDefHotspot, true);
GET_BOOL_VALUE_FROM_INISECTION(ScrollPastEOF, false);
GET_BOOL_VALUE_FROM_INISECTION(ShowHypLnkToolTip, true);
GET_BOOL_VALUE_FROM_INISECTION(AutoIndent, true);
GET_BOOL_VALUE_FROM_INISECTION(AutoCompleteWords, false);
GET_BOOL_VALUE_FROM_INISECTION(AutoCLexerKeyWords, false);
GET_BOOL_VALUE_FROM_INISECTION(AccelWordNavigation, false);
GET_BOOL_VALUE_FROM_INISECTION(ShowIndentGuides, false);
GET_BOOL_VALUE_FROM_INISECTION(BackspaceUnindents, false);
GET_BOOL_VALUE_FROM_INISECTION(WarnInconsistentIndents, false);
GET_BOOL_VALUE_FROM_INISECTION(AutoDetectIndentSettings, false);
GET_BOOL_VALUE_FROM_INISECTION(MarkLongLines, (s_iSettingsVersion < CFG_VER_0002)); Defaults.MarkLongLines = false; // new default
GET_INT_VALUE_FROM_INISECTION(LongLineMode, EDGE_LINE, EDGE_LINE, EDGE_BACKGROUND);
GET_BOOL_VALUE_FROM_INISECTION(ShowSelectionMargin, true);
GET_BOOL_VALUE_FROM_INISECTION(ShowLineNumbers, true);
GET_BOOL_VALUE_FROM_INISECTION(ShowCodeFolding, true); FocusedView.ShowCodeFolding = Settings.ShowCodeFolding;
GET_BOOL_VALUE_FROM_INISECTION(MarkOccurrences, true);
GET_BOOL_VALUE_FROM_INISECTION(MarkOccurrencesMatchVisible, false);
GET_BOOL_VALUE_FROM_INISECTION(MarkOccurrencesMatchCase, false);
GET_BOOL_VALUE_FROM_INISECTION(MarkOccurrencesMatchWholeWords, true);
Defaults.MarkOccurrencesCurrentWord = !Defaults.MarkOccurrencesMatchWholeWords;
Settings.MarkOccurrencesCurrentWord = IniSectionGetBool(Settings_Section, L"MarkOccurrencesCurrentWord", Defaults.MarkOccurrencesCurrentWord);
Settings.MarkOccurrencesCurrentWord = Settings.MarkOccurrencesCurrentWord && !Settings.MarkOccurrencesMatchWholeWords;
GET_BOOL_VALUE_FROM_INISECTION(ViewWhiteSpace, false);
GET_BOOL_VALUE_FROM_INISECTION(ViewEOLs, false);
cpi_enc_t const iPrefEncIniSetting = (cpi_enc_t)Encoding_MapIniSetting(false, (int)CPI_UTF8);
GET_ENC_VALUE_FROM_INISECTION(DefaultEncoding, iPrefEncIniSetting, CPI_NONE, INT_MAX);
Settings.DefaultEncoding = ((Settings.DefaultEncoding == CPI_NONE) ? CPI_UTF8 : (cpi_enc_t)Encoding_MapIniSetting(true, (int)Settings.DefaultEncoding));
GET_BOOL_VALUE_FROM_INISECTION(UseDefaultForFileEncoding, true);
GET_BOOL_VALUE_FROM_INISECTION(LoadASCIIasUTF8, true);
GET_BOOL_VALUE_FROM_INISECTION(UseReliableCEDonly, true);
GET_BOOL_VALUE_FROM_INISECTION(LoadNFOasOEM, true);
GET_BOOL_VALUE_FROM_INISECTION(NoEncodingTags, false);
GET_BOOL_VALUE_FROM_INISECTION(SkipUnicodeDetection, false);
GET_BOOL_VALUE_FROM_INISECTION(SkipANSICodePageDetection, false);
GET_INT_VALUE_FROM_INISECTION(DefaultEOLMode, SC_EOL_CRLF, SC_EOL_CRLF, SC_EOL_LF);
GET_BOOL_VALUE_FROM_INISECTION(WarnInconsistEOLs, true);
GET_BOOL_VALUE_FROM_INISECTION(FixLineEndings, false);
GET_BOOL_VALUE_FROM_INISECTION(FixTrailingBlanks, false);
GET_INT_VALUE_FROM_INISECTION(PrintHeader, 1, 0, 3);
GET_INT_VALUE_FROM_INISECTION(PrintFooter, 0, 0, 1);
GET_INT_VALUE_FROM_INISECTION(PrintColorMode, 3, 0, 4);
int const zoomScale = float2int(1000.0f / GetBaseFontSize(Globals.hwndMain));
Defaults.PrintZoom = (s_iSettingsVersion < CFG_VER_0001) ? (zoomScale / 10) : zoomScale;
int iPrintZoom = clampi(IniSectionGetInt(Settings_Section, L"PrintZoom", Defaults.PrintZoom), 0, SC_MAX_ZOOM_LEVEL);
if (s_iSettingsVersion < CFG_VER_0001) { iPrintZoom = 100 + (iPrintZoom - 10) * 10; }
Settings.PrintZoom = clampi(iPrintZoom, SC_MIN_ZOOM_LEVEL, SC_MAX_ZOOM_LEVEL);
WCHAR localeInfo[3];
GetLocaleInfoEx(LOCALE_NAME_USER_DEFAULT, LOCALE_IMEASURE, localeInfo, 3);
LONG const _margin = (localeInfo[0] == L'0') ? 2000L : 1000L; // Metric system. L'1' is US System
Defaults.PrintMargin.left = _margin;
Settings.PrintMargin.left = clampi(IniSectionGetInt(Settings_Section, L"PrintMarginLeft", Defaults.PrintMargin.left), 0, 40000);
Defaults.PrintMargin.top = _margin;
Settings.PrintMargin.top = clampi(IniSectionGetInt(Settings_Section, L"PrintMarginTop", Defaults.PrintMargin.top), 0, 40000);
Defaults.PrintMargin.right = _margin;
Settings.PrintMargin.right = clampi(IniSectionGetInt(Settings_Section, L"PrintMarginRight", Defaults.PrintMargin.right), 0, 40000);
Defaults.PrintMargin.bottom = _margin;
Settings.PrintMargin.bottom = clampi(IniSectionGetInt(Settings_Section, L"PrintMarginBottom", Defaults.PrintMargin.bottom), 0, 40000);
GET_BOOL_VALUE_FROM_INISECTION(SaveBeforeRunningTools, false);
GET_CAST_INT_VALUE_FROM_INISECTION(FILE_WATCHING_MODE, FileWatchingMode, FWM_NONE, FWM_NONE, FWM_AUTORELOAD); FileWatching.FileWatchingMode = Settings.FileWatchingMode;
GET_BOOL_VALUE_FROM_INISECTION(ResetFileWatching, true); FileWatching.ResetFileWatching = Settings.ResetFileWatching;
GET_INT_VALUE_FROM_INISECTION(EscFunction, 0, 0, 2);
GET_BOOL_VALUE_FROM_INISECTION(AlwaysOnTop, false);
GET_BOOL_VALUE_FROM_INISECTION(MinimizeToTray, false);
GET_BOOL_VALUE_FROM_INISECTION(TransparentMode, false);
GET_BOOL_VALUE_FROM_INISECTION(FindReplaceTransparentMode, true);
GET_INT_VALUE_FROM_INISECTION(RenderingTechnology, Defaults.RenderingTechnology, 0, 3); // set before
GET_INT_VALUE_FROM_INISECTION(Bidirectional, Defaults.Bidirectional, 0, 2); // set before
GET_BOOL_VALUE_FROM_INISECTION(MuteMessageBeep, false);
///~Settings2.IMEInteraction = clampi(IniSectionGetInt(Settings_Section, L"IMEInteraction", Settings2.IMEInteraction), SC_IME_WINDOWED, SC_IME_INLINE);
// see TBBUTTON s_tbbMainWnd[] for initial/reset set of buttons
StringCchCopyW(Defaults.ToolbarButtons, COUNTOF(Defaults.ToolbarButtons), (s_iSettingsVersion < CFG_VER_0002) ? TBBUTTON_DEFAULT_IDS_V1 : TBBUTTON_DEFAULT_IDS_V2);
IniSectionGetString(Settings_Section, L"ToolbarButtons", Defaults.ToolbarButtons, Settings.ToolbarButtons, COUNTOF(Settings.ToolbarButtons));
GET_BOOL_VALUE_FROM_INISECTION(ShowToolbar, true);
GET_BOOL_VALUE_FROM_INISECTION(ShowStatusbar, true);
GET_INT_VALUE_FROM_INISECTION(EncodingDlgSizeX, 340, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(EncodingDlgSizeY, 292, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(RecodeDlgSizeX, 340, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(RecodeDlgSizeY, 292, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(FileMRUDlgSizeX, 487, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(FileMRUDlgSizeY, 339, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(OpenWithDlgSizeX, 305, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(OpenWithDlgSizeY, 281, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(FavoritesDlgSizeX, 305, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(FavoritesDlgSizeY, 281, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(AddToFavDlgSizeX, 317, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(FindReplaceDlgSizeX, 494, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(FindReplaceDlgPosX, CW_USEDEFAULT, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(FindReplaceDlgPosY, CW_USEDEFAULT, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(CustomSchemesDlgSizeX, 833, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(CustomSchemesDlgSizeY, 515, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(CustomSchemesDlgPosX, CW_USEDEFAULT, INT_MIN, INT_MAX);
GET_INT_VALUE_FROM_INISECTION(CustomSchemesDlgPosY, CW_USEDEFAULT, INT_MIN, INT_MAX);
// --------------------------------------------------------------------------
const WCHAR* const StatusBar_Section = L"Statusbar Settings";
// --------------------------------------------------------------------------
WCHAR tchStatusBar[MIDSZ_BUFFER] = { L'\0' };
IniSectionGetString(StatusBar_Section, L"SectionPrefixes", STATUSBAR_SECTION_PREFIXES, tchStatusBar, COUNTOF(tchStatusBar));
ReadStrgsFromCSV(tchStatusBar, s_mxSBPrefix, STATUS_SECTOR_COUNT, MICRO_BUFFER, L"_PRFX_");
IniSectionGetString(StatusBar_Section, L"SectionPostfixes", STATUSBAR_SECTION_POSTFIXES, tchStatusBar, COUNTOF(tchStatusBar));
ReadStrgsFromCSV(tchStatusBar, s_mxSBPostfix, STATUS_SECTOR_COUNT, MICRO_BUFFER, L"_POFX_");
IniSectionGetString(StatusBar_Section, L"VisibleSections", STATUSBAR_DEFAULT_IDS, tchStatusBar, COUNTOF(tchStatusBar));
ReadVectorFromString(tchStatusBar, s_iStatusbarSections, STATUS_SECTOR_COUNT, 0, (STATUS_SECTOR_COUNT - 1), -1);
for (int i = 0; i < STATUS_SECTOR_COUNT; ++i) {
s_iStatusbarVisible[i] = false;
}
int cnt = 0;
for (int i = 0; i < STATUS_SECTOR_COUNT; ++i) {
s_vSBSOrder[i] = -1;
int const id = s_iStatusbarSections[i];
if (id >= 0) {
s_vSBSOrder[cnt++] = id;
s_iStatusbarVisible[id] = true;
}
}
IniSectionGetString(StatusBar_Section, L"SectionWidthSpecs", STATUSBAR_SECTION_WIDTH_SPECS, tchStatusBar, COUNTOF(tchStatusBar));
ReadVectorFromString(tchStatusBar, s_iStatusbarWidthSpec, STATUS_SECTOR_COUNT, -4096, 4096, 0);
Globals.bZeroBasedColumnIndex = IniSectionGetBool(StatusBar_Section, L"ZeroBasedColumnIndex", false);
Globals.bZeroBasedCharacterCount = IniSectionGetBool(StatusBar_Section, L"ZeroBasedCharacterCount", false);
// --------------------------------------------------------------------------
const WCHAR* const ToolbarImg_Section = L"Toolbar Images";
// --------------------------------------------------------------------------
IniSectionGetString(ToolbarImg_Section, L"BitmapDefault", L"",
s_tchToolbarBitmap, COUNTOF(s_tchToolbarBitmap));
IniSectionGetString(ToolbarImg_Section, L"BitmapHot", L"",
s_tchToolbarBitmapHot, COUNTOF(s_tchToolbarBitmap));
IniSectionGetString(ToolbarImg_Section, L"BitmapDisabled", L"",
s_tchToolbarBitmapDisabled, COUNTOF(s_tchToolbarBitmap));
// --------------------------------------------------------------------------
const WCHAR* const Window_Section = L"Window";
// --------------------------------------------------------------------------
int ResX, ResY;
GetCurrentMonitorResolution(Globals.hwndMain, &ResX, &ResY);
WCHAR tchHighDpiToolBar[32] = { L'\0' };
StringCchPrintf(tchHighDpiToolBar, COUNTOF(tchHighDpiToolBar), L"%ix%i HighDpiToolBar", ResX, ResY);
s_iToolBarTheme = IniSectionGetInt(Window_Section, tchHighDpiToolBar, -1);
s_iToolBarTheme = clampi(s_iToolBarTheme, -1, StrIsEmpty(s_tchToolbarBitmap) ? 1 : 2);
if (s_iToolBarTheme < 0) { // undefined: determine high DPI (higher than Full-HD)
s_iToolBarTheme = IsFullHDOrHigher(Globals.hwndMain, ResX, ResY) ? 1 : 0;
}
// --------------------------------------------------------------
// startup window (ignore window position if /p was specified)
// --------------------------------------------------------------
// 1st set default window position
s_DefWinInfo = InitDefaultWndPos(2); // std. default position
if (bExplicitDefaultWinPos) {
int bMaxi = 0;
int const itok = swscanf_s(Settings2.DefaultWindowPosition, L"%i,%i,%i,%i,%i",
&s_DefWinInfo.x, &s_DefWinInfo.y, &s_DefWinInfo.cx, &s_DefWinInfo.cy, &bMaxi);
if (itok == 4 || itok == 5) { // scan successful
if (s_DefWinInfo.cx < 1) s_DefWinInfo.cx = CW_USEDEFAULT;
if (s_DefWinInfo.cy < 1) s_DefWinInfo.cy = CW_USEDEFAULT;
if (bMaxi) s_DefWinInfo.max = true;
if (itok == 4) s_DefWinInfo.max = false;
InitWindowPosition(&s_DefWinInfo, 0);
}
else {
// overwrite bad defined default position
StringCchPrintf(Settings2.DefaultWindowPosition, COUNTOF(Settings2.DefaultWindowPosition),
L"%i,%i,%i,%i,%i", s_DefWinInfo.x, s_DefWinInfo.y, s_DefWinInfo.cx, s_DefWinInfo.cy, s_DefWinInfo.max);
IniFileSetString(Globals.IniFile, L"Settings2", L"DefaultWindowPosition", Settings2.DefaultWindowPosition);
}
}
// 2nd set initial window position
s_WinInfo = s_DefWinInfo;
if (!s_flagPosParam /*|| g_bStickyWinPos*/) {
WCHAR tchPosX[32], tchPosY[32], tchSizeX[32], tchSizeY[32], tchMaximized[32], tchZoom[32];
StringCchPrintf(tchPosX, COUNTOF(tchPosX), L"%ix%i PosX", ResX, ResY);
StringCchPrintf(tchPosY, COUNTOF(tchPosY), L"%ix%i PosY", ResX, ResY);
StringCchPrintf(tchSizeX, COUNTOF(tchSizeX), L"%ix%i SizeX", ResX, ResY);
StringCchPrintf(tchSizeY, COUNTOF(tchSizeY), L"%ix%i SizeY", ResX, ResY);
StringCchPrintf(tchMaximized, COUNTOF(tchMaximized), L"%ix%i Maximized", ResX, ResY);
StringCchPrintf(tchZoom, COUNTOF(tchZoom), L"%ix%i Zoom", ResX, ResY);
s_WinInfo.x = IniSectionGetInt(Window_Section, tchPosX, CW_USEDEFAULT);
s_WinInfo.y = IniSectionGetInt(Window_Section, tchPosY, CW_USEDEFAULT);
s_WinInfo.cx = IniSectionGetInt(Window_Section, tchSizeX, CW_USEDEFAULT);
s_WinInfo.cy = IniSectionGetInt(Window_Section, tchSizeY, CW_USEDEFAULT);
s_WinInfo.max = IniSectionGetBool(Window_Section, tchMaximized, false);
s_WinInfo.max = clampi(s_WinInfo.max, 0, 1);
s_WinInfo.zoom = IniSectionGetInt(Window_Section, tchZoom, (s_iSettingsVersion < CFG_VER_0001) ? 0 : 100);
if (s_iSettingsVersion < CFG_VER_0001) { s_WinInfo.zoom = (s_WinInfo.zoom + 10) * 10; }
s_WinInfo.zoom = clampi(s_WinInfo.zoom, SC_MIN_ZOOM_LEVEL, SC_MAX_ZOOM_LEVEL);
if ((s_WinInfo.x == CW_USEDEFAULT) || (s_WinInfo.y == CW_USEDEFAULT) ||
(s_WinInfo.cx == CW_USEDEFAULT) || (s_WinInfo.cy == CW_USEDEFAULT))
{
s_flagWindowPos = 2; // std. default position (CmdLn: /pd)
}
else
s_flagWindowPos = 0; // init to g_WinInfo
}
// ------------------------------------------------------------------------
// --- override by resolution specific settings ---
WCHAR tchSciDirectWriteTech[64];
StringCchPrintf(tchSciDirectWriteTech, COUNTOF(tchSciDirectWriteTech), L"%ix%i RenderingTechnology", ResX, ResY);
Settings.RenderingTechnology = clampi(IniSectionGetInt(Window_Section, tchSciDirectWriteTech, Settings.RenderingTechnology), 0, 3);
WCHAR tchSciFontQuality[64];
StringCchPrintf(tchSciFontQuality, COUNTOF(tchSciFontQuality), L"%ix%i SciFontQuality", ResX, ResY);
Settings2.SciFontQuality = clampi(IniSectionGetInt(Window_Section, tchSciFontQuality, Settings2.SciFontQuality), 0, 3);
if (bDirtyFlag) {
SaveIniFile(Globals.IniFile);
}
ReleaseIniFile();
}
// define scintilla internal codepage
const int iSciDefaultCodePage = SC_CP_UTF8; // default UTF8
// remove internal support for Chinese, Japan, Korean DBCS use UTF-8 instead
/*
if (Settings.DefaultEncoding == CPI_ANSI_DEFAULT)
{
// check for Chinese, Japan, Korean DBCS code pages and switch accordingly
int acp = (int)GetACP();
if (acp == 932 || acp == 936 || acp == 949 || acp == 950) {
iSciDefaultCodePage = acp;
}
Settings.DefaultEncoding = Encoding_GetByCodePage(iSciDefaultCodePage);
}
*/
// set flag for encoding default
Encoding_SetDefaultFlag(Settings.DefaultEncoding);
// define default charset
Globals.iDefaultCharSet = (int)CharSetFromCodePage((UINT)iSciDefaultCodePage);
// Scintilla Styles
Style_Load();
}
//=============================================================================
//=============================================================================
//
// LoadFlags()
//
//
void LoadFlags()
{
LoadIniFile(Globals.IniFile);
const WCHAR* const Settings2_Section = L"Settings2";
Flags.bDevDebugMode = IniSectionGetBool(Settings2_Section, L"DevDebugMode", DefaultFlags.bDevDebugMode);
Flags.bStickyWindowPosition = IniSectionGetBool(Settings2_Section, L"StickyWindowPosition", DefaultFlags.bStickyWindowPosition);
if (s_flagReuseWindow == 0) {
Flags.bReuseWindow = IniSectionGetBool(Settings2_Section, L"ReuseWindow", DefaultFlags.bReuseWindow);
}
else {
Flags.bReuseWindow = (s_flagReuseWindow == 2);
}
if (s_flagSingleFileInstance == 0) {
Flags.bSingleFileInstance = IniSectionGetBool(Settings2_Section, L"SingleFileInstance", DefaultFlags.bSingleFileInstance);
}
else {
Flags.bSingleFileInstance = (s_flagSingleFileInstance == 2);
}
if (s_flagMultiFileArg == 0) {
Flags.MultiFileArg = IniSectionGetBool(Settings2_Section, L"MultiFileArg", DefaultFlags.MultiFileArg);
}
else {
Flags.MultiFileArg = (s_flagMultiFileArg == 2);
}
if (s_flagShellUseSystemMRU == 0) {
Flags.ShellUseSystemMRU = IniSectionGetBool(Settings2_Section, L"ShellUseSystemMRU", DefaultFlags.ShellUseSystemMRU);
}
else {
Flags.ShellUseSystemMRU = (s_flagShellUseSystemMRU == 2);
}
Flags.RelativeFileMRU = IniSectionGetBool(Settings2_Section, L"RelativeFileMRU", DefaultFlags.RelativeFileMRU);
Flags.PortableMyDocs = IniSectionGetBool(Settings2_Section, L"PortableMyDocs", DefaultFlags.PortableMyDocs);
Flags.NoFadeHidden = IniSectionGetBool(Settings2_Section, L"NoFadeHidden", DefaultFlags.NoFadeHidden);
Flags.ToolbarLook = IniSectionGetInt(Settings2_Section, L"ToolbarLook", DefaultFlags.ToolbarLook);
Flags.ToolbarLook = clampi(Flags.ToolbarLook, 0, 2);
Flags.SimpleIndentGuides = IniSectionGetBool(Settings2_Section, L"SimpleIndentGuides", DefaultFlags.SimpleIndentGuides);
Flags.NoHTMLGuess = IniSectionGetBool(Settings2_Section, L"NoHTMLGuess", DefaultFlags.NoHTMLGuess);
Flags.NoCGIGuess = IniSectionGetBool(Settings2_Section, L"NoCGIGuess", DefaultFlags.NoCGIGuess);
Flags.NoFileVariables = IniSectionGetInt(Settings2_Section, L"NoFileVariables", DefaultFlags.NoFileVariables);
Flags.PrintFileAndLeave = s_flagPrintFileAndLeave;
ReleaseIniFile();
}
//=============================================================================
//
// SaveSettings()
//
#define SAVE_VALUE_IF_NOT_EQ_DEFAULT(TYPE, VARNAME) \
if (Settings.VARNAME != Defaults.VARNAME) { \
IniSectionSet##TYPE(Settings_Section, _W(_STRG(VARNAME)), Settings.VARNAME); \
} \
else { \
IniSectionDelete(Settings_Section, _W(_STRG(VARNAME)), false); \
}
// ----------------------------------------------------------------------------
bool SaveSettings(bool bSaveSettingsNow)
{
if (StrIsEmpty(Globals.IniFile) || !s_bEnableSaveSettings) { return false; }
CreateIniFile();
LoadIniFile(Globals.IniFile);
const WCHAR* const Settings_Section = L"Settings";
if (!(Settings.SaveSettings || bSaveSettingsNow)) {
IniSectionSetInt(Settings_Section, L"SettingsVersion", CFG_VER_CURRENT);
if (Settings.SaveSettings != Defaults.SaveSettings) {
IniSectionSetBool(Settings_Section, L"SaveSettings", Settings.SaveSettings);
}
else {
IniSectionDelete(Settings_Section, L"SaveSettings", false);
}
return SaveIniFile(Globals.IniFile);
}
// update window placement
s_WinInfo = GetMyWindowPlacement(Globals.hwndMain, NULL);
{
IniSectionSetInt(Settings_Section, L"SettingsVersion", CFG_VER_CURRENT);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, SaveSettings);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, SaveRecentFiles);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, PreserveCaretPos);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, SaveFindReplace);
if (Settings.EFR_Data.bFindClose != Defaults.EFR_Data.bFindClose) {
IniSectionSetBool(Settings_Section, L"CloseFind", Settings.EFR_Data.bFindClose);
}
else {
IniSectionDelete(Settings_Section, L"CloseFind", false);
}
if (Settings.EFR_Data.bReplaceClose != Defaults.EFR_Data.bReplaceClose) {
IniSectionSetBool(Settings_Section, L"CloseReplace", Settings.EFR_Data.bReplaceClose);
}
else {
IniSectionDelete(Settings_Section, L"CloseReplace", false);
}
if (Settings.EFR_Data.bNoFindWrap != Defaults.EFR_Data.bNoFindWrap) {
IniSectionSetBool(Settings_Section, L"NoFindWrap", Settings.EFR_Data.bNoFindWrap);
}
else {
IniSectionDelete(Settings_Section, L"NoFindWrap", false);
}
if (Settings.EFR_Data.bTransformBS != Defaults.EFR_Data.bTransformBS) {
IniSectionSetBool(Settings_Section, L"FindTransformBS", Settings.EFR_Data.bTransformBS);
}
else {
IniSectionDelete(Settings_Section, L"FindTransformBS", false);
}
if (Settings.EFR_Data.bWildcardSearch != Defaults.EFR_Data.bWildcardSearch) {
IniSectionSetBool(Settings_Section, L"WildcardSearch", Settings.EFR_Data.bWildcardSearch);
}
else {
IniSectionDelete(Settings_Section, L"WildcardSearch", false);
}
if (Settings.EFR_Data.bMarkOccurences != Defaults.EFR_Data.bMarkOccurences) {
IniSectionSetBool(Settings_Section, L"FindMarkAllOccurrences", Settings.EFR_Data.bMarkOccurences);
}
else {
IniSectionDelete(Settings_Section, L"FindMarkAllOccurrences", false);
}
if (Settings.EFR_Data.bHideNonMatchedLines != Defaults.EFR_Data.bHideNonMatchedLines) {
IniSectionSetBool(Settings_Section, L"HideNonMatchedLines", Settings.EFR_Data.bHideNonMatchedLines);
}
else {
IniSectionDelete(Settings_Section, L"HideNonMatchedLines", false);
}
if (Settings.EFR_Data.bDotMatchAll != Defaults.EFR_Data.bDotMatchAll) {
IniSectionSetBool(Settings_Section, L"RegexDotMatchesAll", Settings.EFR_Data.bDotMatchAll);
}
else {
IniSectionDelete(Settings_Section, L"RegexDotMatchesAll", false);
}
if (Settings.EFR_Data.fuFlags != Defaults.EFR_Data.fuFlags) {
IniSectionSetInt(Settings_Section, L"efrData_fuFlags", Settings.EFR_Data.fuFlags);
}
else {
IniSectionDelete(Settings_Section, L"efrData_fuFlags", false);
}
WCHAR wchTmp[MAX_PATH] = { L'\0' };
if (StringCchCompareXIW(Settings.OpenWithDir, Defaults.OpenWithDir) != 0) {
PathRelativeToApp(Settings.OpenWithDir, wchTmp, COUNTOF(wchTmp), false, true, Flags.PortableMyDocs);
IniSectionSetString(Settings_Section, L"OpenWithDir", wchTmp);
}
else {
IniSectionDelete(Settings_Section, L"OpenWithDir", false);
}
if (StringCchCompareXIW(Settings.FavoritesDir, Defaults.FavoritesDir) != 0) {
PathRelativeToApp(Settings.FavoritesDir, wchTmp, COUNTOF(wchTmp), false, true, Flags.PortableMyDocs);
IniSectionSetString(Settings_Section, L"Favorites", wchTmp);
}
else {
IniSectionDelete(Settings_Section, L"Favorites", false);
}
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, PathNameFormat);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, WordWrap);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, TabsAsSpaces);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, TabIndents);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, TabWidth);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, IndentWidth);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, LongLinesLimit);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, BackspaceUnindents);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, WordWrapMode);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, WordWrapIndent);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, WordWrapSymbols);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, ShowWordWrapSymbols);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, MatchBraces);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, AutoCloseTags);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, HighlightCurrentLine);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, HyperlinkHotspot);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, ColorDefHotspot);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, ScrollPastEOF);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, ShowHypLnkToolTip);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, AutoIndent);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, AutoCompleteWords);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, AutoCLexerKeyWords);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, AccelWordNavigation);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, ShowIndentGuides);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, WarnInconsistentIndents);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, AutoDetectIndentSettings);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, MarkLongLines);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, LongLineMode);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, ShowSelectionMargin);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, ShowLineNumbers);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, ShowCodeFolding);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, MarkOccurrences);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, MarkOccurrencesMatchVisible);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, MarkOccurrencesMatchCase);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, MarkOccurrencesMatchWholeWords);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, MarkOccurrencesCurrentWord);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, ViewWhiteSpace);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, ViewEOLs);
Settings.DefaultEncoding = (cpi_enc_t)Encoding_MapIniSetting(false, (int)Settings.DefaultEncoding);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, DefaultEncoding);
Settings.DefaultEncoding = (cpi_enc_t)Encoding_MapIniSetting(true, (int)Settings.DefaultEncoding);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, UseDefaultForFileEncoding);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, LoadASCIIasUTF8);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, UseReliableCEDonly);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, LoadNFOasOEM);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, NoEncodingTags);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, SkipUnicodeDetection);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, SkipANSICodePageDetection);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, DefaultEOLMode);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, WarnInconsistEOLs);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, FixLineEndings);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, FixTrailingBlanks);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, PrintHeader);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, PrintFooter);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, PrintColorMode);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, PrintZoom);
if (Settings.PrintMargin.left != Defaults.PrintMargin.left) {
IniSectionSetInt(Settings_Section, L"PrintMarginLeft", Settings.PrintMargin.left);
}
else {
IniSectionDelete(Settings_Section, L"PrintMarginLeft", false);
}
if (Settings.PrintMargin.top != Defaults.PrintMargin.top) {
IniSectionSetInt(Settings_Section, L"PrintMarginTop", Settings.PrintMargin.top);
}
else {
IniSectionDelete(Settings_Section, L"PrintMarginTop", false);
}
if (Settings.PrintMargin.right != Defaults.PrintMargin.right) {
IniSectionSetInt(Settings_Section, L"PrintMarginRight", Settings.PrintMargin.right);
}
else {
IniSectionDelete(Settings_Section, L"PrintMarginRight", false);
}
if (Settings.PrintMargin.bottom != Defaults.PrintMargin.bottom) {
IniSectionSetInt(Settings_Section, L"PrintMarginBottom", Settings.PrintMargin.bottom);
}
else {
IniSectionDelete(Settings_Section, L"PrintMarginBottom", false);
}
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, SaveBeforeRunningTools);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, FileWatchingMode);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, ResetFileWatching);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, EscFunction);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, AlwaysOnTop);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, MinimizeToTray);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, TransparentMode);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, FindReplaceTransparentMode);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, RenderingTechnology);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, Bidirectional);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, MuteMessageBeep);
///~IniSectionSetInt(Settings_Section, L"IMEInteraction", Settings2.IMEInteraction);
Toolbar_GetButtons(Globals.hwndToolbar, IDT_FILE_NEW, Settings.ToolbarButtons, COUNTOF(Settings.ToolbarButtons));
if (StringCchCompareX(Settings.ToolbarButtons, Defaults.ToolbarButtons) != 0) {
IniSectionSetString(Settings_Section, L"ToolbarButtons", Settings.ToolbarButtons);
}
else {
IniSectionDelete(Settings_Section, L"ToolbarButtons", false);
}
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, ShowToolbar);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Bool, ShowStatusbar);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, EncodingDlgSizeX);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, EncodingDlgSizeY);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, RecodeDlgSizeX);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, RecodeDlgSizeY);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, FileMRUDlgSizeX);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, FileMRUDlgSizeY);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, OpenWithDlgSizeX);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, OpenWithDlgSizeY);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, FavoritesDlgSizeX);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, FavoritesDlgSizeY);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, AddToFavDlgSizeX);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, FindReplaceDlgSizeX);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, FindReplaceDlgPosX);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, FindReplaceDlgPosY);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, CustomSchemesDlgSizeX);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, CustomSchemesDlgSizeY);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, CustomSchemesDlgPosX);
SAVE_VALUE_IF_NOT_EQ_DEFAULT(Int, CustomSchemesDlgPosY);
}
int ResX, ResY;
GetCurrentMonitorResolution(Globals.hwndMain, &ResX, &ResY);
const WCHAR* const Window_Section = L"Window";
WCHAR tchHighDpiToolBar[32];
StringCchPrintf(tchHighDpiToolBar, COUNTOF(tchHighDpiToolBar), L"%ix%i HighDpiToolBar", ResX, ResY);
IniSectionSetInt(Window_Section, tchHighDpiToolBar, s_iToolBarTheme);
WCHAR tchPosX[32], tchPosY[32], tchSizeX[32], tchSizeY[32], tchMaximized[32], tchZoom[32];
StringCchPrintf(tchPosX, COUNTOF(tchPosX), L"%ix%i PosX", ResX, ResY);
StringCchPrintf(tchPosY, COUNTOF(tchPosY), L"%ix%i PosY", ResX, ResY);
StringCchPrintf(tchSizeX, COUNTOF(tchSizeX), L"%ix%i SizeX", ResX, ResY);
StringCchPrintf(tchSizeY, COUNTOF(tchSizeY), L"%ix%i SizeY", ResX, ResY);
StringCchPrintf(tchMaximized, COUNTOF(tchMaximized), L"%ix%i Maximized", ResX, ResY);
StringCchPrintf(tchZoom, COUNTOF(tchMaximized), L"%ix%i Zoom", ResX, ResY);
if (!Flags.bStickyWindowPosition)
{
IniSectionSetInt(Window_Section, tchPosX, s_WinInfo.x);
IniSectionSetInt(Window_Section, tchPosY, s_WinInfo.y);
IniSectionSetInt(Window_Section, tchSizeX, s_WinInfo.cx);
IniSectionSetInt(Window_Section, tchSizeY, s_WinInfo.cy);
IniSectionSetBool(Window_Section, tchMaximized, s_WinInfo.max);
IniSectionSetInt(Window_Section, tchZoom, s_WinInfo.zoom);
}
else {
IniSectionDelete(Window_Section, tchPosX, false);
IniSectionDelete(Window_Section, tchPosY, false);
IniSectionDelete(Window_Section, tchSizeX, false);
IniSectionDelete(Window_Section, tchSizeY, false);
IniSectionDelete(Window_Section, tchMaximized, false);
IniSectionDelete(Window_Section, tchZoom, false);
}
bool const ok = SaveIniFile(Globals.IniFile);
if (ok) {
Style_Save(); // Scintilla Styles
Globals.bIniFileFromScratch = false;
}
return ok;
}
//=============================================================================
//=============================================================================

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,116 @@
; -- AllPagesExample.iss --
; Same as Example1.iss, but shows all the wizard pages Setup may potentially display
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
[Setup]
AppName=My Program
AppVersion=1.5
WizardStyle=modern
DefaultDirName={autopf}\My Program
DefaultGroupName=My Program
UninstallDisplayIcon={app}\MyProg.exe
Compression=lzma2
SolidCompression=yes
OutputDir=userdocs:Inno Setup Examples Output
DisableWelcomePage=no
LicenseFile=license.txt
#define Password 'password'
Password={#Password}
InfoBeforeFile=readme.txt
UserInfoPage=yes
PrivilegesRequired=lowest
DisableDirPage=no
DisableProgramGroupPage=no
InfoAfterFile=readme.txt
[Files]
Source: "MyProg.exe"; DestDir: "{app}"
Source: "MyProg.chm"; DestDir: "{app}"
Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme
[Icons]
Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"
[Components]
Name: "component"; Description: "Component";
[Tasks]
Name: "task"; Description: "Task";
[Code]
var
OutputProgressWizardPage: TOutputProgressWizardPage;
OutputProgressWizardPageAfterID: Integer;
procedure InitializeWizard;
var
InputQueryWizardPage: TInputQueryWizardPage;
InputOptionWizardPage: TInputOptionWizardPage;
InputDirWizardPage: TInputDirWizardPage;
InputFileWizardPage: TInputFileWizardPage;
OutputMsgWizardPage: TOutputMsgWizardPage;
OutputMsgMemoWizardPage: TOutputMsgMemoWizardPage;
AfterID: Integer;
begin
WizardForm.PasswordEdit.Text := '{#Password}';
AfterID := wpSelectTasks;
AfterID := CreateCustomPage(AfterID, 'CreateCustomPage', 'ADescription').ID;
InputQueryWizardPage := CreateInputQueryPage(AfterID, 'CreateInputQueryPage', 'ADescription', 'ASubCaption');
InputQueryWizardPage.Add('&APrompt:', False);
AfterID := InputQueryWizardPage.ID;
InputOptionWizardPage := CreateInputOptionPage(AfterID, 'CreateInputOptionPage', 'ADescription', 'ASubCaption', False, False);
InputOptionWizardPage.Add('&AOption');
AfterID := InputOptionWizardPage.ID;
InputDirWizardPage := CreateInputDirPage(AfterID, 'CreateInputDirPage', 'ADescription', 'ASubCaption', False, 'ANewFolderName');
InputDirWizardPage.Add('&APrompt:');
InputDirWizardPage.Values[0] := 'C:\';
AfterID := InputDirWizardPage.ID;
InputFileWizardPage := CreateInputFilePage(AfterID, 'CreateInputFilePage', 'ADescription', 'ASubCaption');
InputFileWizardPage.Add('&APrompt:', 'Executable files|*.exe|All files|*.*', '.exe');
AfterID := InputFileWizardPage.ID;
OutputMsgWizardPage := CreateOutputMsgPage(AfterID, 'CreateOutputMsgPage', 'ADescription', 'AMsg');
AfterID := OutputMsgWizardPage.ID;
OutputMsgMemoWizardPage := CreateOutputMsgMemoPage(AfterID, 'CreateOutputMsgMemoPage', 'ADescription', 'ASubCaption', 'AMsg');
AfterID := OutputMsgMemoWizardPage.ID;
OutputProgressWizardPage := CreateOutputProgressPage('CreateOutputProgressPage', 'ADescription');
OutputProgressWizardPageAfterID := AfterID;
{ See CodeDownloadFiles.iss for a CreateDownloadPage example }
end;
function NextButtonClick(CurPageID: Integer): Boolean;
var
Position, Max: Integer;
begin
if CurPageID = OutputProgressWizardPageAfterID then begin
try
Max := 25;
for Position := 0 to Max do begin
OutputProgressWizardPage.SetProgress(Position, Max);
if Position = 0 then
OutputProgressWizardPage.Show;
Sleep(2000 div Max);
end;
finally
OutputProgressWizardPage.Hide;
end;
end;
Result := True;
end;
function PrepareToInstall(var NeedsRestart: Boolean): String;
begin
if SuppressibleMsgBox('Do you want to stop Setup at the Preparing To Install wizard page?', mbConfirmation, MB_YESNO, IDNO) = IDYES then
Result := 'Stopped by user';
end;

View File

@ -0,0 +1,63 @@
; -- Example3.iss --
; Same as Example1.iss, but creates some registry entries too and allows the end
; use to choose the install mode (administrative or non administrative).
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
[Setup]
AppName=My Program
AppVersion=1.5
WizardStyle=modern
DefaultDirName={autopf}\My Program
DefaultGroupName=My Program
UninstallDisplayIcon={app}\MyProg.exe
Compression=lzma2
SolidCompression=yes
OutputDir=userdocs:Inno Setup Examples Output
ChangesAssociations=yes
UserInfoPage=yes
PrivilegesRequiredOverridesAllowed=dialog
[Files]
Source: "MyProg.exe"; DestDir: "{app}"
Source: "MyProg.chm"; DestDir: "{app}"
Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme
[Icons]
Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"
; NOTE: Most apps do not need registry entries to be pre-created. If you
; don't know what the registry is or if you need to use it, then chances are
; you don't need a [Registry] section.
[Registry]
; Create "Software\My Company\My Program" keys under CURRENT_USER or
; LOCAL_MACHINE depending on administrative or non administrative install
; mode. The flags tell it to always delete the "My Program" key upon
; uninstall, and delete the "My Company" key if there is nothing left in it.
Root: HKA; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty
Root: HKA; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "Language"; ValueData: "{language}"
; Associate .myp files with My Program (requires ChangesAssociations=yes)
Root: HKA; Subkey: "Software\Classes\.myp\OpenWithProgids"; ValueType: string; ValueName: "MyProgramFile.myp"; ValueData: ""; Flags: uninsdeletevalue
Root: HKA; Subkey: "Software\Classes\MyProgramFile.myp"; ValueType: string; ValueName: ""; ValueData: "My Program File"; Flags: uninsdeletekey
Root: HKA; Subkey: "Software\Classes\MyProgramFile.myp\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\MyProg.exe,0"
Root: HKA; Subkey: "Software\Classes\MyProgramFile.myp\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\MyProg.exe"" ""%1"""
Root: HKA; Subkey: "Software\Classes\Applications\MyProg.exe\SupportedTypes"; ValueType: string; ValueName: ".myp"; ValueData: ""
; HKA (and HKCU) should only be used for settings which are compatible with
; roaming profiles so settings like paths should be written to HKLM, which
; is only possible in administrative install mode.
Root: HKLM; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty; Check: IsAdminInstallMode
Root: HKLM; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey; Check: IsAdminInstallMode
Root: HKLM; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"; Check: IsAdminInstallMode
; User specific settings should always be written to HKCU, which should only
; be done in non administrative install mode.
Root: HKCU; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "UserName"; ValueData: "{userinfoname}"; Check: not IsAdminInstallMode
Root: HKCU; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "UserOrganization"; ValueData: "{userinfoorg}"; Check: not IsAdminInstallMode
[Code]
function ShouldSkipPage(PageID: Integer): Boolean;
begin
// User specific pages should be skipped in administrative install mode
Result := IsAdminInstallMode and (PageID = wpUserInfo);
end;

View File

@ -1,19 +0,0 @@
[InstallShield Silent]
Version=v7.00
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[{F132AF7F-7BCA-4EDE-8A7C-958108FE7DBC}-DlgOrder]
Dlg0={F132AF7F-7BCA-4EDE-8A7C-958108FE7DBC}-MessageBox-0
Count=2
Dlg1={F132AF7F-7BCA-4EDE-8A7C-958108FE7DBC}-SdFinishReboot-0
[{F132AF7F-7BCA-4EDE-8A7C-958108FE7DBC}-MessageBox-0]
Result=6
[Application]
Name=Realtek High Definition Audio Driver
Version=2.49
Company=Realtek Semiconductor Corp.
Lang=0009
[{F132AF7F-7BCA-4EDE-8A7C-958108FE7DBC}-SdFinishReboot-0]
Result=1
BootOption=0

View File

@ -1,462 +0,0 @@
;* Notepad3 - Installer script
;*
;* (c) Rizonesoft 2008-2016
; 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_v142\Notepad3.exe"
#error Compile Notepad3 x86 first
#endif
#ifnexist bindir + "\Release_x86_v142\minipath.exe"
#error Compile MiniPath x86 first
#endif
#ifnexist bindir + "\Release_x86_v142\np3encrypt.exe"
#error Compile np3encrypt.exe x86 first
#endif
#ifnexist bindir + "\Release_x64_v142\Notepad3.exe"
#error Compile Notepad3 x64 first
#endif
#ifnexist bindir + "\Release_x64_v142\minipath.exe"
#error Compile MiniPath x64 first
#endif
#ifnexist bindir + "\Release_x64_v142\np3encrypt.exe"
#error Compile np3encrypt.exe x64 first
#endif
#define app_version GetFileVersion(bindir + "\Release_x86_v142\Notepad3.exe")
#define app_name "Notepad3"
#define app_copyright "(c) Rizonesoft 2008-2016"
#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=.\Packages
OutputBaseFilename={#app_name}_{#app_version}_Setup
WizardStyle=modern
WizardSmallImageFile=.\Resources\WizardSmallImageFile.bmp
Compression=lzma2/max
InternalCompressLevel=max
SolidCompression=yes
EnableDirDoesntExistWarning=no
AllowNoIcons=yes
ShowTasksTreeLines=yes
DisableDirPage=yes
DisableProgramGroupPage=yes
DisableReadyPage=yes
DisableWelcomePage=yes
AllowCancelDuringInstall=yes
MinVersion=6.0
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_RemoveDefault =Restore Windows notepad
en.tsk_SetDefault =Replace Windows notepad with {#app_name}
en.tsk_StartMenuIcon =Create a Start Menu shortcut
en.tsk_LaunchWelcomePage =Important Release Information!
[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()
Name: set_default; Description: {cm:tsk_SetDefault}; GroupDescription: {cm:tsk_Other}; Check: not DefaulNotepadCheck()
Name: remove_default; Description: {cm:tsk_RemoveDefault}; GroupDescription: {cm:tsk_Other}; Flags: checkedonce unchecked; Check: DefaulNotepadCheck()
[Files]
Source: {#bindir}\Release_x64_v142\Notepad3.exe; DestDir: {app}; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\Notepad3.exe; DestDir: {app}; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: License.txt; DestDir: {app}; Flags: ignoreversion
Source: Readme.txt; DestDir: {app}; Flags: ignoreversion
Source: {#bindir}\Release_x64_v142\minipath.exe; DestDir: {app}; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\minipath.exe; DestDir: {app}; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: Notepad3.ini; DestDir: {userappdata}\Rizonesoft\Notepad3; Flags: onlyifdoesntexist uninsneveruninstall
Source: minipath.ini; DestDir: {userappdata}\Rizonesoft\Notepad3; Flags: onlyifdoesntexist uninsneveruninstall
Source: themes\Dark.ini; DestDir: {userappdata}\Rizonesoft\Notepad3\themes; Flags: onlyifdoesntexist uninsneveruninstall
Source: themes\Obsidian.ini; DestDir: {userappdata}\Rizonesoft\Notepad3\themes; Flags: onlyifdoesntexist uninsneveruninstall
Source: {#bindir}\Release_x64_v142\lng\mplng.dll; DestDir: {app}\lng; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\mplng.dll; DestDir: {app}\lng; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\np3lng.dll; DestDir: {app}\lng; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\np3lng.dll; DestDir: {app}\lng; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\af-ZA\mplng.dll.mui; DestDir: {app}\lng\af-ZA; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\af-ZA\mplng.dll.mui; DestDir: {app}\lng\af-ZA; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\af-ZA\np3lng.dll.mui; DestDir: {app}\lng\af-ZA; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\af-ZA\np3lng.dll.mui; DestDir: {app}\lng\af-ZA; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\be-BY\mplng.dll.mui; DestDir: {app}\lng\be-BY; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\be-BY\mplng.dll.mui; DestDir: {app}\lng\be-BY; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\be-BY\np3lng.dll.mui; DestDir: {app}\lng\be-BY; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\be-BY\np3lng.dll.mui; DestDir: {app}\lng\be-BY; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\de-DE\mplng.dll.mui; DestDir: {app}\lng\de-DE; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\de-DE\mplng.dll.mui; DestDir: {app}\lng\de-DE; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\de-DE\np3lng.dll.mui; DestDir: {app}\lng\de-DE; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\de-DE\np3lng.dll.mui; DestDir: {app}\lng\de-DE; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\en-GB\mplng.dll.mui; DestDir: {app}\lng\en-GB; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\en-GB\mplng.dll.mui; DestDir: {app}\lng\en-GB; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\en-GB\np3lng.dll.mui; DestDir: {app}\lng\en-GB; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\en-GB\np3lng.dll.mui; DestDir: {app}\lng\en-GB; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\es-ES\mplng.dll.mui; DestDir: {app}\lng\es-ES; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\es-ES\mplng.dll.mui; DestDir: {app}\lng\es-ES; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\es-ES\np3lng.dll.mui; DestDir: {app}\lng\es-ES; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\es-ES\np3lng.dll.mui; DestDir: {app}\lng\es-ES; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\fr-FR\mplng.dll.mui; DestDir: {app}\lng\fr-FR; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\fr-FR\mplng.dll.mui; DestDir: {app}\lng\fr-FR; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\fr-FR\np3lng.dll.mui; DestDir: {app}\lng\fr-FR; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\fr-FR\np3lng.dll.mui; DestDir: {app}\lng\fr-FR; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\hu-HU\mplng.dll.mui; DestDir: {app}\lng\hu-HU; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\hu-HU\mplng.dll.mui; DestDir: {app}\lng\hu-HU; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\hu-HU\np3lng.dll.mui; DestDir: {app}\lng\hu-HU; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\hu-HU\np3lng.dll.mui; DestDir: {app}\lng\hu-HU; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\it-IT\mplng.dll.mui; DestDir: {app}\lng\it-IT; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\it-IT\mplng.dll.mui; DestDir: {app}\lng\it-IT; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\it-IT\np3lng.dll.mui; DestDir: {app}\lng\it-IT; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\it-IT\np3lng.dll.mui; DestDir: {app}\lng\it-IT; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\ja-JP\mplng.dll.mui; DestDir: {app}\lng\ja-JP; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\ja-JP\mplng.dll.mui; DestDir: {app}\lng\ja-JP; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\ja-JP\np3lng.dll.mui; DestDir: {app}\lng\ja-JP; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\ja-JP\np3lng.dll.mui; DestDir: {app}\lng\ja-JP; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\ko-KR\mplng.dll.mui; DestDir: {app}\lng\ko-KR; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\ko-KR\mplng.dll.mui; DestDir: {app}\lng\ko-KR; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\ko-KR\np3lng.dll.mui; DestDir: {app}\lng\ko-KR; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\ko-KR\np3lng.dll.mui; DestDir: {app}\lng\ko-KR; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\nl-NL\mplng.dll.mui; DestDir: {app}\lng\nl-NL; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\nl-NL\mplng.dll.mui; DestDir: {app}\lng\nl-NL; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\nl-NL\np3lng.dll.mui; DestDir: {app}\lng\nl-NL; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\nl-NL\np3lng.dll.mui; DestDir: {app}\lng\nl-NL; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\pl-PL\mplng.dll.mui; DestDir: {app}\lng\pl-PL; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\pl-PL\mplng.dll.mui; DestDir: {app}\lng\pl-PL; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\pl-PL\np3lng.dll.mui; DestDir: {app}\lng\pl-PL; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\pl-PL\np3lng.dll.mui; DestDir: {app}\lng\pl-PL; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\pt-BR\mplng.dll.mui; DestDir: {app}\lng\pt-BR; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\pt-BR\mplng.dll.mui; DestDir: {app}\lng\pt-BR; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\pt-BR\np3lng.dll.mui; DestDir: {app}\lng\pt-BR; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\pt-BR\np3lng.dll.mui; DestDir: {app}\lng\pt-BR; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\ru-RU\mplng.dll.mui; DestDir: {app}\lng\ru-RU; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\ru-RU\mplng.dll.mui; DestDir: {app}\lng\ru-RU; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\ru-RU\np3lng.dll.mui; DestDir: {app}\lng\ru-RU; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\ru-RU\np3lng.dll.mui; DestDir: {app}\lng\ru-RU; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\zh-CN\mplng.dll.mui; DestDir: {app}\lng\zh-CN; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\zh-CN\mplng.dll.mui; DestDir: {app}\lng\zh-CN; Flags: ignoreversion; Check: not Is64BitInstallMode()
Source: {#bindir}\Release_x64_v142\lng\zh-CN\np3lng.dll.mui; DestDir: {app}\lng\zh-CN; Flags: ignoreversion; Check: Is64BitInstallMode()
Source: {#bindir}\Release_x86_v142\lng\zh-CN\np3lng.dll.mui; DestDir: {app}\lng\zh-CN; Flags: ignoreversion; Check: not Is64BitInstallMode()
[Dirs]
Name: "{userappdata}\Rizonesoft\Notepad3\Favorites"
Name: "{userappdata}\Rizonesoft\Notepad3\themes"
[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: {commonprograms}\{#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: https://rizone.tech/2Ho5UVQ; Description: {cm:tsk_LaunchWelcomePage}; Flags: nowait postinstall shellexec skipifsilent unchecked
[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]
const
IFEO = 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe';
function InitializeSetup: Boolean;
begin
Result := True;
//Check for Processor SSE2 support.
#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;
// Check if Notepad3 has replaced Windows Notepad
function DefaulNotepadCheck(): Boolean;
var
sDebugger: String;
begin
if RegQueryStringValue(HKLM, IFEO, 'Debugger', sDebugger) and
(sDebugger = (ExpandConstant('"{app}\Notepad3.exe" /z'))) then begin
Log('Custom Code: {#app_name} is set as the default notepad');
Result := True;
end
else begin
Log('Custom Code: {#app_name} is NOT set as the default notepad');
Result := False;
end;
end;
#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;
// This is the case where the old build is installed; the DefaulNotepadCheck() returns true
// and the set_default task isn't selected
if not IsTaskSelected('remove_default') then
RegWriteStringValue(HKLM, IFEO, 'Debugger', ExpandConstant('"{app}\Notepad3.exe" /z'));
end;
end;
if CurStep = ssPostInstall then begin
if IsTaskSelected('set_default') then
RegWriteStringValue(HKLM, IFEO, 'Debugger', ExpandConstant('"{app}\Notepad3.exe" /z'));
if IsTaskSelected('remove_default') then begin
RegDeleteValue(HKLM, IFEO, 'Debugger');
RegDeleteKeyIfEmpty(HKLM, IFEO);
end;
// 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;
if DefaulNotepadCheck() then
RegDeleteValue(HKLM, IFEO, 'Debugger');
RegDeleteKeyIfEmpty(HKLM, IFEO);
RemoveReg();
end;
end;
procedure InitializeWizard();
begin
WizardForm.SelectTasksLabel.Hide;
WizardForm.TasksList.Top := 0;
WizardForm.TasksList.Height := PageFromID(wpSelectTasks).SurfaceHeight;
end;

View File

@ -1,71 +1,360 @@
Notepad3 and MiniPath Copyright © 2008-2016 Rizonesoft, All rights reserved.
https://www.rizonesoft.com

Note that the only valid version of the GPL as far as this project
is concerned is _this_ particular version of the license (ie v2, not
v2.2 or v3.x or whatever), unless explicitly otherwise stated.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
HOWEVER, in order to allow a migration to GPLv3 if that seems like
a good idea, I also ask that people involved with the project make
their preferences known. In particular, if you trust me to make that
decision, you might note so in your copyright message, ie something
like
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
3. Neither the name of Florian Balmer nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.
This file is licensed under the GPL v2, or a later version
at the discretion of Linus.
01 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
02 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
03 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
04 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
05 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
06 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
07 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
08 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
09 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
10 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
might avoid issues. But we can also just decide to synchronize and
contact all copyright holders on record if/when the occasion arises.
==================================================
License for Scintilla and SciTE
==================================================
Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>
Linus Torvalds
All Rights Reserved
----------------------------------------
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted, provided that
the above copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting documentation.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NEIL
HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
DAMAGESWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
==================================================
License for Onigmo (Oniguruma-mod) RegEx Engine
==================================================
Copyright (c) 2002-2009 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
Copyright (c) 2011-2014 K.Takata <kentkt AT csc DOT jp>
All rights reserved.
Preamble
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View File

@ -1,68 +1,299 @@
================================================================================
= =
= Notepad3 - light-weight Scintilla-based text editor for Windows =
= =
= (c) Rizonesoft 2008-2016 =
= https://www.rizonesoft.com =
= =
================================================================================
Description
--------------------------------------------------------------------------------
Notepad like text editor based on the Scintilla source code. Notepad3 based on
code from Notepad2 and MiniPath on code from metapath.
The dictionary file was created using the "final" English and Canadian SCOWL
(Spell Checker Oriented Word Lists) wordlists available at Kevin's Word Lists
Page (http://wordlist.sourceforge.net). Lists with the suffixes 10, 20, 35,
50, 65 and 65 were used. Lists with the suffixes 70, 80 and 95 were excluded.
Copyright information for SCOWL and the wordlists used in creating it is
reproduced below.
The affix file is identical to the MySpell English (United States) affix file.
It is a heavily modified version of the original english.aff file which was
released as part of Geoff Kuenning's Ispell and as such is covered by his BSD
license.
---
COPYRIGHT, SOURCES, and CREDITS from SCOWL readme file:
The collective work is Copyright 2000 by Kevin Atkinson as well as any
of the copyrights mentioned below:
Copyright 2000 by Kevin Atkinson
Permission to use, copy, modify, distribute and sell these word
lists, the associated scripts, the output created from the scripts,
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appears in all copies and
that both that copyright notice and this permission notice appear in
supporting documentation. Kevin Atkinson makes no representations
about the suitability of this array for any purpose. It is provided
"as is" without express or implied warranty.
Alan Beale <biljir@pobox.com> also deserves special credit as he has,
in addition to providing the 12Dicts package and being a major
contributor to the ENABLE word list, given me an incredible amount of
feedback and created a number of special lists (those found in the
Supplement) in order to help improve the overall quality of SCOWL.
The 10 level includes the 1000 most common English words (according to
the Moby (TM) Words II [MWords] package), a subset of the 1000 most
common words on the Internet (again, according to Moby Words II), and
frequently class 16 from Brian Kelk's "UK English Wordlist
with Frequency Classification".
The MWords package was explicitly placed in the public domain:
The Moby lexicon project is complete and has
been place into the public domain. Use, sell,
rework, excerpt and use in any way on any platform.
Placing this material on internal or public servers is
also encouraged. The compiler is not aware of any
export restrictions so freely distribute world-wide.
You can verify the public domain status by contacting
Grady Ward
3449 Martha Ct.
Arcata, CA 95521-4884
grady@netcom.com
grady@northcoast.com
The "UK English Wordlist With Frequency Classification" is also in the
Public Domain:
Date: Sat, 08 Jul 2000 20:27:21 +0100
From: Brian Kelk <Brian.Kelk@cl.cam.ac.uk>
> I was wondering what the copyright status of your "UK English
> Wordlist With Frequency Classification" word list as it seems to
> be lacking any copyright notice.
There were many many sources in total, but any text marked
"copyright" was avoided. Locally-written documentation was one
source. An earlier version of the list resided in a filespace called
PUBLIC on the University mainframe, because it was considered public
domain.
Date: Tue, 11 Jul 2000 19:31:34 +0100
> So are you saying your word list is also in the public domain?
That is the intention.
The 20 level includes frequency classes 7-15 from Brian's word list.
The 35 level includes frequency classes 2-6 and words appearing in at
least 11 of 12 dictionaries as indicated in the 12Dicts package. All
words from the 12Dicts package have had likely inflections added via
my inflection database.
The 12Dicts package and Supplement is in the Public Domain.
The WordNet database, which was used in the creation of the
Inflections database, is under the following copyright:
This software and database is being provided to you, the LICENSEE,
by Princeton University under the following license. By obtaining,
using and/or copying this software and database, you agree that you
have read, understood, and will comply with these terms and
conditions.:
Permission to use, copy, modify and distribute this software and
database and its documentation for any purpose and without fee or
royalty is hereby granted, provided that you agree to comply with
the following copyright notice and statements, including the
disclaimer, and that the same appear on ALL copies of the software,
database and documentation, including modifications that you make
for internal use or for distribution.
WordNet 1.6 Copyright 1997 by Princeton University. All rights
reserved.
THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT-
ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE
LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT INFRINGE ANY
THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
The name of Princeton University or Princeton may not be used in
advertising or publicity pertaining to distribution of the software
and/or database. Title to copyright in this software, database and
any associated documentation shall at all times remain with
Princeton University and LICENSEE agrees to preserve same.
The 50 level includes Brian's frequency class 1, words words appearing
in at least 5 of 12 of the dictionaries as indicated in the 12Dicts
package, and uppercase words in at least 4 of the previous 12
dictionaries. A decent number of proper names is also included: The
top 1000 male, female, and Last names from the 1990 Census report; a
list of names sent to me by Alan Beale; and a few names that I added
myself. Finally a small list of abbreviations not commonly found in
other word lists is included.
The name files form the Census report is a government document which I
don't think can be copyrighted.
The name list from Alan Beale is also derived from the linux words
list, which is derived from the DEC list. He also added a bunch of
miscellaneous names to the list, which he released to the Public Domain.
The DEC Word list doesn't have a formal name. It is labeled as "FILE:
english.words; VERSION: DEC-SRC-92-04-05" and was put together by Jorge
Stolfi <stolfi@src.dec.com> DEC Systems Research Center. The DEC Word
list has the following copyright statement:
(NON-)COPYRIGHT STATUS
To the best of my knowledge, all the files I used to build these
wordlists were available for public distribution and use, at least
for non-commercial purposes. I have confirmed this assumption with
the authors of the lists, whenever they were known.
Therefore, it is safe to assume that the wordlists in this package
can also be freely copied, distributed, modified, and used for
personal, educational, and research purposes. (Use of these files in
commercial products may require written permission from DEC and/or
the authors of the original lists.)
Whenever you distribute any of these wordlists, please distribute
also the accompanying README file. If you distribute a modified
copy of one of these wordlists, please include the original README
file with a note explaining your modifications. Your users will
surely appreciate that.
(NO-)WARRANTY DISCLAIMER
These files, like the original wordlists on which they are based,
are still very incomplete, uneven, and inconsitent, and probably
contain many errors. They are offered "as is" without any warranty
of correctness or fitness for any particular purpose. Neither I nor
my employer can be held responsible for any losses or damages that
may result from their use.
However since this Word List is used in the linux.words package which
the author claims is free of any copyright I assume it is OK to use
for most purposes. If you want to use this in a commercial project
and this concerns you the information from the DEC word list can
easily be removed without much sacrifice in quality as only the name
lists were used.
The file special-jargon.50 uses common.lst and word.lst from the
"Unofficial Jargon File Word Lists" which is derived from "The Jargon
File". All of which is in the Public Domain. This file also contain
a few extra UNIX terms which are found in the file "unix-terms" in the
special/ directory.
The 60 level includes Brian's frequency class 0 and all words
appearing in at least 2 of the 12 dictionaries as indicated by the
12Dicts package. A large number of names are also included: The 4,946
female names and 3,897 male names from the MWords package and the
files "computer.names", "misc.names", and "org.names" from the DEC
package.
The 65 level includes words found in the Ispell "medium" word list.
The Ispell word lists are under the same copyright of Ispell itself
which is:
Copyright 1993, Geoff Kuenning, Granada Hills, CA
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All modifications to the source code must be clearly marked as
such. Binary redistributions based on modified source code
must be clearly marked as modified versions in the documentation
and/or other materials provided with the distribution.
4. All advertising materials mentioning features or use of this software
must display the following acknowledgment:
This product includes software developed by Geoff Kuenning and
other unpaid contributors.
5. The name of Geoff Kuenning may not be used to endorse or promote
products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS
IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GEOFF
KUENNING OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
The 70 level includes the 74,550 common dictionary words and the 21,986 names
list from the MWords package. The common dictionary words, like those
from the 12Dicts package, have had all likely inflections added.
The 80 level includes the ENABLE word list, all the lists in the
ENABLE supplement package (except for ABLE), the "UK Advanced Cryptics
Dictionary" (UKACD), the list of signature words in from YAWL package,
and the 10,196 places list from the MWords package.
The ENABLE package, mainted by M\Cooper <thegrendel@theriver.com>,
is in the Public Domain:
The ENABLE master word list, WORD.LST, is herewith formally released
into the Public Domain. Anyone is free to use it or distribute it in
any manner they see fit. No fee or registration is required for its
use nor are "contributions" solicited (if you feel you absolutely
must contribute something for your own peace of mind, the authors of
the ENABLE list ask that you make a donation on their behalf to your
favorite charity). This word list is our gift to the Scrabble
community, as an alternate to "official" word lists. Game designers
may feel free to incorporate the WORD.LST into their games. Please
mention the source and credit us as originators of the list. Note
that if you, as a game designer, use the WORD.LST in your product,
you may still copyright and protect your product, but you may *not*
legally copyright or in any way restrict redistribution of the
WORD.LST portion of your product. This *may* under law restrict your
rights to restrict your users' rights, but that is only fair.
UKACD, by J Ross Beresford <ross@bryson.demon.co.uk>, is under the
following copyright:
Copyright (c) J Ross Beresford 1993-1999. All Rights Reserved.
The following restriction is placed on the use of this publication:
if The UK Advanced Cryptics Dictionary is used in a software package
or redistributed in any form, the copyright notice must be
prominently displayed and the text of this document must be included
verbatim.
There are no other restrictions: I would like to see the list
distributed as widely as possible.
The 95 level includes the 354,984 single words and 256,772 compound
words from the MWords package, ABLE.LST from the ENABLE Supplement,
and some additional words found in my part-of-speech database that
were not found anywhere else.
Accent information was taken from UKACD.
My VARCON package was used to create the American, British, and
Canadian word list.
Since the original word lists used used in the
VARCON package came from the Ispell distribution they are under the
Ispell copyright.
The variant word lists were created from a list of variants found in
the 12dicts supplement package as well as a list of variants I created
myself.
--------------------------------------------------------------------------------
Changes compared to Flo's official Notepad2 (made in Notepad2-mod):
--------------------------------------------------------------------------------
- Code folding
- Support for bookmarks
- Option to mark all occurrences of a word
- Updated Scintilla component
- Word auto-completion
- Syntax highlighting support for AutoHotkey (AHK), AutoIt3, AviSynth, Bash,
CMake, CoffeeScript, Inno Setup, LaTeX, Lua, Markdown, NSIS, Ruby, Tcl,
YAML and VHDL scripts.
- Improved support for NFO ANSI art
- Other various minor changes and tweaks
--------------------------------------------------------------------------------
Changes compared to the Notepad2-mod fork:
--------------------------------------------------------------------------------
- Additional syntax highlighting support for Awk, D, golang, MATLAB
- State of the art Regular Expression search engine (Onigmu)
- New toolbar icons based on Yusuke Kamiyaman's Fugue Icons
(Purchased by Rizonesoft)
- Hyperlink Hotspot highlighting
(single click Open in Browser (Ctrl) / Load in Editor (Alt))
- New program icon and other small cosmetic changes
- In-App support for AES-256 Rijndael encryption/decryption of files.
(incl. external commandline tool for batch processing)
- Virtual Space rectangular selection box (Alt-Key down)
- High-DPI awareness, including high definition toolbar icons
- Undo/Redo preserves selection
- File History preserves Caret position (optional)
and remembers encoding of file
- Accelerated word navigation
- Preserve caret position of items in file history
- Count occurrences of a marked selection or word
- Count and Mark occurrences of matching search/find expression
- Visual Studio style copy/paste current line (no selection)
- Insert GUIDs
- Dropped support for Windows XP version
- Other various minor changes, tweaks and bugfixes
--------------------------------------------------------------------------------
Supported Operating Systems:
--------------------------------------------------------------------------------
Windows 7, 8, 8.1 and 10 both 32-bit and 64-bit
--------------------------------------------------------------------------------
Contributors
--------------------------------------------------------------------------------
- Rainer Kottenhoff
- Florian Balmer ( https://www.flos-freeware.ch )
- XhmikosR ( https://xhmikosr.github.io/notepad2-mod/ )
- Kai Liu ( https://code.kliu.org/misc/notepad2/ )
- RL Vision
- Aleksandar Lekov
- Bruno Barbieri

View File

@ -1,136 +0,0 @@
================================================================================
= =
= Notepad3 - light-weight Scintilla-based text editor for Windows =
= =
= (c) Rizonesoft 2008-2016 =
= https://www.rizonesoft.com =
= =
================================================================================
Description
--------------------------------------------------------------------------------
Notepad like text editor based on the Scintilla source code. Notepad3 based on
code from Notepad2 and MiniPath on code from metapath.
--------------------------------------------------------------------------------
Changes compared to Flo's official Notepad2 (made in Notepad2-mod):
--------------------------------------------------------------------------------
- Code folding
- Support for bookmarks
- Option to mark all occurrences of a word
- Updated Scintilla component
- Word auto-completion
- Syntax highlighting support for AutoHotkey (AHK), AutoIt3, AviSynth, Bash,
CMake, CoffeeScript, Inno Setup, LaTeX, Lua, Markdown, NSIS, Ruby, Tcl,
YAML and VHDL scripts.
- Improved support for NFO ANSI art
- Other various minor changes and tweaks
--------------------------------------------------------------------------------
Changes compared to the Notepad2-mod fork:
--------------------------------------------------------------------------------
- Additional syntax highlighting support for Awk, D, golang, MATLAB
- State of the art Regular Expression search engine (Onigmu)
- New toolbar icons based on Yusuke Kamiyaman's Fugue Icons
(Purchased by Rizonesoft)
- Hyperlink Hotspot highlighting
(single click Open in Browser (Ctrl) / Load in Editor (Alt))
- New program icon and other small cosmetic changes
- In-App support for AES-256 Rijndael encryption/decryption of files.
(incl. external commandline tool for batch processing)
- Virtual Space rectangular selection box (Alt-Key down)
- High-DPI awareness, including high definition toolbar icons
- Undo/Redo preserves selection
- File History preserves Caret position (optional)
and remembers encoding of file
- Accelerated word navigation
- Preserve caret position of items in file history
- Count occurrences of a marked selection or word
- Count and Mark occurrences of matching search/find expression
- Visual Studio style copy/paste current line (no selection)
- Insert GUIDs
- Dropped support for Windows XP version
- Other various minor changes, tweaks and bugfixes
--------------------------------------------------------------------------------
Supported Operating Systems:
--------------------------------------------------------------------------------
Windows 7, 8, 8.1 and 10 both 32-bit and 64-bit
--------------------------------------------------------------------------------
Contributors
--------------------------------------------------------------------------------
- Rainer Kottenhoff
- Florian Balmer ( https://www.flos-freeware.ch )
- XhmikosR ( https://xhmikosr.github.io/notepad2-mod/ )
- Kai Liu ( https://code.kliu.org/misc/notepad2/ )
- RL Vision
- Aleksandar Lekov
- Bruno Barbieri
================================================================================
= =
= Notepad3 - light-weight Scintilla-based text editor for Windows =
= =
= (c) Rizonesoft 2008-2016 =
= https://www.rizonesoft.com =
= =
================================================================================
Description
--------------------------------------------------------------------------------
Notepad like text editor based on the Scintilla source code. Notepad3 based on
code from Notepad2 and MiniPath on code from metapath.
--------------------------------------------------------------------------------
Changes compared to Flo's official Notepad2 (made in Notepad2-mod):
--------------------------------------------------------------------------------
- Code folding
- Support for bookmarks
- Option to mark all occurrences of a word
- Updated Scintilla component
- Word auto-completion
- Syntax highlighting support for AutoHotkey (AHK), AutoIt3, AviSynth, Bash,
CMake, CoffeeScript, Inno Setup, LaTeX, Lua, Markdown, NSIS, Ruby, Tcl,
YAML and VHDL scripts.
- Improved support for NFO ANSI art
- Other various minor changes and tweaks
--------------------------------------------------------------------------------
Changes compared to the Notepad2-mod fork:
--------------------------------------------------------------------------------
- Additional syntax highlighting support for Awk, D, golang, MATLAB
- State of the art Regular Expression search engine (Onigmu)
- New toolbar icons based on Yusuke Kamiyaman's Fugue Icons
(Purchased by Rizonesoft)
- Hyperlink Hotspot highlighting
(single click Open in Browser (Ctrl) / Load in Editor (Alt))
- New program icon and other small cosmetic changes
- In-App support for AES-256 Rijndael encryption/decryption of files.
(incl. external commandline tool for batch processing)
- Virtual Space rectangular selection box (Alt-Key down)
- High-DPI awareness, including high definition toolbar icons
- Undo/Redo preserves selection
- File History preserves Caret position (optional)
and remembers encoding of file
- Accelerated word navigation
- Preserve caret position of items in file history
- Count occurrences of a marked selection or word
- Count and Mark occurrences of matching search/find expression
- Visual Studio style copy/paste current line (no selection)
- Insert GUIDs
- Dropped support for Windows XP version
- Other various minor changes, tweaks and bugfixes
--------------------------------------------------------------------------------
Supported Operating Systems:
--------------------------------------------------------------------------------
Windows 7, 8, 8.1 and 10 both 32-bit and 64-bit
--------------------------------------------------------------------------------
Contributors
--------------------------------------------------------------------------------
- Rainer Kottenhoff
- Florian Balmer ( https://www.flos-freeware.ch )
- XhmikosR ( https://xhmikosr.github.io/notepad2-mod/ )
- Kai Liu ( https://code.kliu.org/misc/notepad2/ )
- RL Vision
- Aleksandar Lekov
- Bruno Barbieri