Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
X-Lucifer committed Aug 15, 2021
0 parents commit 476a8b9
Show file tree
Hide file tree
Showing 4 changed files with 185 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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/)
75 changes: 75 additions & 0 deletions inno script/memcached-cygwin.iss
Original file line number Diff line number Diff line change
@@ -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";
70 changes: 70 additions & 0 deletions inno script/memcached-msys2.iss
Original file line number Diff line number Diff line change
@@ -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";

0 comments on commit 476a8b9

Please sign in to comment.