diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b6a333b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Lucifer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..873ff8d --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +--- +title: Windows Memcached Server +created: '2021-08-15 12:00:00' +modified: '2021-08-15 12:00:00' +version: '1.16.10' +--- + +## Windows Memcached Server +#### 说明: +> 从`Memcached`官方源码中编译的`Windows`平台可用的`Memcached Server`程序, 分别编译的版本为`cygwin`和`msys2`, 功能上无差别, 可任意选择. 可选择`exe`安装程序自动安装为Windows系统服务,或可配合nssm手动安装为Windows服务开机自启动. 方便Windows环境下Memcached的调试和日常开发使用. + +### 安装为系统服务: +> 从[此处](https://github.com/X-Lucifer/win-memcached/releases)任意选择`.exe`后缀的可执行程序下载即可. `msys2`或`cygwin`版本功能无差别. +#### 相关源码和其他软件 +1. `Memcached`源码: [https://github.com/memcached/memcached](https://github.com/memcached/memcached) +2. `Memcached`官网: [https://memcached.org/](https://memcached.org/) +3. `msys2`: [https://www.msys2.org/](https://www.msys2.org/) +4. `cygwin`: [https://www.cygwin.com/](https://www.cygwin.com/) +5. `nssm`: [https://www.nssm.cc/](https://www.nssm.cc/) \ No newline at end of file diff --git a/inno script/memcached-cygwin.iss b/inno script/memcached-cygwin.iss new file mode 100644 index 0000000..1840588 --- /dev/null +++ b/inno script/memcached-cygwin.iss @@ -0,0 +1,75 @@ +; Script generated by the Inno Script Studio Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +#define MyAppName "Memcached" +#define MyAppPublisher "Lucifer" +#define MyAppURL "https://github.com/X-Lucifer/win-memcached" +#define MyAppExeName "nssm.exe" +#define MyCopyright "Copyright © Lucifer. All Rights Reserved." +#define MyDescription "Windows Memcached Service" +#define MyAppLowerName "memcached" +#define MyAppPlatform "cygwin" +#define MyAppRuntime "cygwin1.dll" +;升级需要更新的代码块 +#define MyPath "D:\Publish\Memcached" +#define MyAppVersion "1.6.10" + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. +; Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={{7E7F422D-B9D0-475B-AB2C-D872617EE0FE} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={pf}\{#MyAppName} +DefaultGroupName={#MyAppName} +DisableProgramGroupPage=yes +OutputDir={#MyPath} +OutputBaseFilename={#MyAppLowerName}-{#MyAppVersion}-{#MyAppPlatform} +SetupIconFile={#MyPath}\Memcached.ico +Compression=lzma +SolidCompression=yes +WizardStyle=modern +DisableReadyPage=True +DisableFinishedPage=True +AppCopyright={#MyCopyright} +EnableDirDoesntExistWarning=True +DirExistsWarning=no +UninstallDisplayIcon={uninstallexe} +UninstallDisplayName={#MyAppName} +ArchitecturesInstallIn64BitMode=x64 ia64 +VersionInfoVersion={#MyAppVersion} +VersionInfoCompany={#MyAppPublisher} +VersionInfoDescription={#MyDescription} +VersionInfoTextVersion={#MyAppVersion} +VersionInfoProductName={#MyAppName} +UsePreviousGroup=False +AppendDefaultGroupName=False + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Files] +Source: "{#MyPath}\{#MyAppLowerName}-{#MyAppPlatform}\nssm.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyPath}\{#MyAppLowerName}-{#MyAppPlatform}\{#MyAppRuntime}"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyPath}\{#MyAppLowerName}-{#MyAppPlatform}\{#MyAppLowerName}.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyPath}\{#MyAppLowerName}-{#MyAppPlatform}\cygevent_core-2-1-7.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyPath}\{#MyAppLowerName}-{#MyAppPlatform}\cygevent_extra-2-1-7.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyPath}\{#MyAppLowerName}-{#MyAppPlatform}\cygevent_openssl-2-1-7.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyPath}\{#MyAppLowerName}-{#MyAppPlatform}\cygevent_pthreads-2-1-7.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyPath}\{#MyAppLowerName}-{#MyAppPlatform}\cygevent-2-1-7.dll"; DestDir: "{app}"; Flags: ignoreversion +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Run] +Filename: "{app}\nssm.exe"; Parameters: "install {#MyAppName} ""{app}\{#MyAppLowerName}.exe"""; WorkingDir: "{app}\"; Description: "安装为Windows服务"; +Filename: "{app}\nssm.exe"; Parameters: "set {#MyAppName} DisplayName {#MyAppName}"; WorkingDir: "{app}"; Description: "设置服务名称"; +Filename: "{app}\nssm.exe"; Parameters: "set {#MyAppName} Description ""{#MyDescription}"""; WorkingDir: "{app}"; Description: "设置服务描述"; + +[UninstallRun] +Filename: "{app}\nssm.exe"; Parameters: "stop {#MyAppName}"; +Filename: "{app}\nssm.exe"; Parameters: "remove {#MyAppName} confirm"; diff --git a/inno script/memcached-msys2.iss b/inno script/memcached-msys2.iss new file mode 100644 index 0000000..aa755bf --- /dev/null +++ b/inno script/memcached-msys2.iss @@ -0,0 +1,70 @@ +; Script generated by the Inno Script Studio Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +#define MyAppName "Memcached" +#define MyAppPublisher "Lucifer" +#define MyAppURL "https://github.com/X-Lucifer/win-memcached" +#define MyAppExeName "nssm.exe" +#define MyCopyright "Copyright © Lucifer. All Rights Reserved." +#define MyDescription "Windows Memcached Service" +#define MyAppLowerName "memcached" +#define MyAppPlatform "msys2" +#define MyAppRuntime "msys-2.0.dll" +;升级需要更新的代码块 +#define MyPath "D:\Publish\Memcached" +#define MyAppVersion "1.6.10" + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. +; Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={{54B71439-76CC-4BAB-8E94-638DD43FC70A} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={pf}\{#MyAppName} +DefaultGroupName={#MyAppName} +DisableProgramGroupPage=yes +OutputDir={#MyPath} +OutputBaseFilename={#MyAppLowerName}-{#MyAppVersion}-{#MyAppPlatform} +SetupIconFile={#MyPath}\memcached.ico +Compression=lzma +SolidCompression=yes +WizardStyle=modern +DisableReadyPage=True +DisableFinishedPage=True +AppCopyright={#MyCopyright} +EnableDirDoesntExistWarning=True +DirExistsWarning=no +UninstallDisplayIcon={uninstallexe} +UninstallDisplayName={#MyAppName} +ArchitecturesInstallIn64BitMode=x64 ia64 +VersionInfoVersion={#MyAppVersion} +VersionInfoCompany={#MyAppPublisher} +VersionInfoDescription={#MyDescription} +VersionInfoTextVersion={#MyAppVersion} +VersionInfoProductName={#MyAppName} +UsePreviousGroup=False +AppendDefaultGroupName=False + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Files] +Source: "{#MyPath}\{#MyAppLowerName}-{#MyAppPlatform}\nssm.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyPath}\{#MyAppLowerName}-{#MyAppPlatform}\{#MyAppRuntime}"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyPath}\{#MyAppLowerName}-{#MyAppPlatform}\{#MyAppLowerName}.exe"; DestDir: "{app}"; Flags: ignoreversion +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Run] +Filename: "{app}\nssm.exe"; Parameters: "install {#MyAppName} ""{app}\{#MyAppLowerName}.exe"""; WorkingDir: "{app}\"; Description: "安装为Windows服务"; +Filename: "{app}\nssm.exe"; Parameters: "set {#MyAppName} DisplayName {#MyAppName}"; WorkingDir: "{app}"; Description: "设置服务名称"; +Filename: "{app}\nssm.exe"; Parameters: "set {#MyAppName} Description ""{#MyDescription}"""; WorkingDir: "{app}"; Description: "设置服务描述"; + +[UninstallRun] +Filename: "{app}\nssm.exe"; Parameters: "stop {#MyAppName}"; +Filename: "{app}\nssm.exe"; Parameters: "remove {#MyAppName} confirm";