前文pyinstaller+python3.6搭建windows客戶端的服務(一)描述了使用python3.6+django+windows服務的方法搭建帶本地服務的客戶端方法。主要存在如下缺點:
- windows服務不完全穩(wěn)定,有時可以訪問正常,但偶爾又訪問不正常;
- 調試windows服務太困難或悲,據(jù)本人所知,就只有事件查看器和自己打印日志去調試程序2種方法,如果在服務運行過程中出現(xiàn)服務自身的異常师溅,可能并一定有日志,這種情況就非常難定位和分析盾舌。
經(jīng)過努力墓臭,本項目又嘗試了另外一種方法實現(xiàn)本地客戶端,詳見下文妖谴。
方案(二)Python3.6+pyinstaller+pythonw
一窿锉、開始
??在查找更好解決方案過程中,網(wǎng)上有人說使用pythonw.exe程序,可以啟動一個無窗體的后臺進程嗡载;而django自身在啟動后窑多,會一直監(jiān)聽端口,此進程是不會退出的洼滚。
??也就是說如果使用pythonw.exe工具埂息,讓django在無窗體的后臺進程中運行,這樣就和window服務的進程看進來沒有區(qū)別了判沟,同時代碼運行的調試能力也方便很多耿芹,因為這個進程的所有日志都可以打印到日志文件中。
二挪哄、主程序打包過程
??上一篇文章已經(jīng)建立好helloworld的django工程吧秕,本次把service.ini和service.py文件刪除,同時刪除【E:\helloworld\hello\settings.py】文件中變量INSTALLED_APPS的'django_windows_tools'迹炼。
2.1砸彬、準備工作
- 將工程中manage.py更名為manage.pyw
此時python能在打包后運行時使用pythonw.exe,而不是使用默認的python.exe去運行
2.2斯入、hello.spec——文件夾形式
# -*- mode: python -*-
block_cipher = None
hide_imports = ['django.contrib.admin.apps', 'django.contrib.auth.apps', 'django.contrib.contenttypes.apps',
'django.contrib.messages.apps', 'django.contrib.staticfiles.apps', 'django.contrib.sessions.models',
'django.contrib.sessions.apps', 'django.contrib.messages.middleware', 'django.contrib.auth.middleware',
'django.contrib.sessions.middleware', 'django.contrib.sessions.serializers','django.core.mail.backends',
'django.views.defaults', 'django.core.mail.backends.smtp',]
a = Analysis(['manage.pyw'], pathex=['E:\\LayaProj\\hello'], binaries=[],
datas=[('logo.ico', '.')], hiddenimports=hide_imports,
hookspath=[], runtime_hooks=[], excludes=[], win_no_prefer_redirects=False,
win_private_assemblies=False, cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(pyz, a.scripts, exclude_binaries=True, name='Hello', debug=False, strip=False, upx=True, console=False, icon='logo.ico')
coll = COLLECT(exe, a.binaries, a.zipfiles, a.datas, strip=False, upx=True, name='Hello')
??其中l(wèi)ogo.ico為應用的圖標砂碉,使用命令【pyinstaller -y hello.spec】編譯工程,會在dist\Hello\目錄下存放生成好的所有文件刻两。
??在cmd命令行中執(zhí)行【dist\Hello\Hello.exe runserver --noreload 0.0.0.0:8800】增蹭,應會創(chuàng)建Hello.exe進程,此進程會創(chuàng)建另外一個Hello.exe進程磅摹,此兩個進程即為django的服務器的監(jiān)聽和處理進程滋迈。
??但,此時只是進行了打包户誓,還是手工執(zhí)行命令啟動服務饼灿,而常規(guī)的windows客戶端程序是點擊桌面的快捷方式啟動程序,還需進一步改進帝美。
三碍彭、實現(xiàn)類桌面應用的網(wǎng)頁版程序
3.1、新增一個啟動工程entry
此工程主要有2個文件:entry.py和entry.spec悼潭。
本項目將其中的配置相關放在Configs.py文件中庇忌,LoggerHelper.py為記錄日志的類,視情況參考女责。
- 源文件entry\Configs.py:
import os, sys
# This is my base path
BASE_PATH = os.path.dirname(os.path.abspath(__file__))
# all tmp dir dirs
APP_TMP_DIR = os.path.join(BASE_PATH, 'tmp')
# determine if application is a script file or frozen exe
if getattr(sys, 'frozen', False):
BASE_PATH = sys._MEIPASS
APP_TMP_DIR = os.path.join(BASE_PATH, '..', 'tmp')
if not BASE_PATH in sys.path:
sys.path.append(BASE_PATH)
DJANGO_PORT = 18800
DJANGO_ARGS = 'runserver --noreload 0.0.0.0:%d' % DJANGO_PORT
DJANGO_PROCESS_ID = 'Hello.exe'
APP_LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'formatters': { # 格式器
'standard': { # 詳細
'format': '[%(asctime)s|%(levelname)s|%(processName)s|%(module)s|%(lineno)s]: %(message)s',
#'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s',
'datefmt': '%Y-%m-%d %H:%M:%S',
},
},
'handlers': {
'start': {
'level': 'DEBUG',
'class': 'logging.handlers.TimedRotatingFileHandler',
'filename': os.path.join(APP_TMP_DIR, 'start.log'),
'when': 'D',
'interval': 1,
'backupCount': 3,
'formatter': 'standard',
},
},
'loggers': {
'start': {
'handlers': ['start'],
'level': 'DEBUG',
'propagate': True,
},
},
}
ROOT_URL = 'http://localhost:8800/'
# 主程序中django的主頁的url
INDEX_URL = '%sstatic/index.html' % ROOT_URL
- 源文件entry\entry.py:
#!/usr/bin/env python
import os, time
import traceback
import subprocess
from subprocess import Popen
from LoggerHelper import logger
from Configs import BASE_PATH, DJANGO_ARGS, DJANGO_PROCESS_ID, ROOT_URL, INDEX_URL, DJANGO_PORT
import webbrowser
import requests
import win32api, win32con
# 檢查服務進程是否啟動漆枚,默認嘗試1次
def check_server(retry=1):
print('檢查服務是否啟動 ...')
ret = False
while retry > 0 and not ret:
try:
r = requests.get(ROOT_URL, timeout=2)
ret = (r.status_code == requests.codes.ok)
except requests.HTTPError as exp:
logger.error('服務器返回了異常:%s' % exp)
ret = False
except (requests.Timeout, requests.ConnectionError) as exp:
logger.error('網(wǎng)頁連接超時或連接失敗:%s' % exp)
ret = False
except (requests.RequestException, Exception) as exp:
logger.error('發(fā)現(xiàn)未處理的異常:%s' % exp)
ret = False
retry = retry - 1
print('%s' % ret)
return ret
# 啟動服務進程
def start_server():
ret = None
try:
print('檢查進程是否存在 ...')
ret = os.system('netstat -an | find "%d"' % DJANGO_PORT)
if ret == 0:
ret = os.system('tasklist | find "%s"' % DJANGO_PROCESS_ID)
if ret == 0:
print('強制結束老進程 ...')
os.system('TASKKILL /F /IM %s' % DJANGO_PROCESS_ID)
time.sleep(0.5)
url = os.path.join(BASE_PATH, '..', 'Hello', r'Hello.exe')
logger.info('開始啟動服務 ... %s' % url)
print('開始啟動服務 ... ')
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
ret = Popen('%s %s' % (url, DJANGO_ARGS), startupinfo=startupinfo)
except Exception as exp:
logger.error('Error : %s, Detail : %s' % (exp, traceback.format_exc()))
return ret
# 打開主頁抵知,為后續(xù)實現(xiàn)雙擊exe可執(zhí)行文件能自動打開瀏覽器網(wǎng)頁作準備
def start_url(url):
ret = None
try:
logger.info('start url ... %s' % url)
ret = webbrowser.open(url, new=2, autoraise=True)
time.sleep(2)
maxWindow()
except Exception as exp:
logger.error('Error : %s, Detail : %s' % (exp, traceback.format_exc()))
return ret
# 瀏覽器中全屏,使用按鍵進行模擬
def maxWindow():
win32api.keybd_event(122,0,0,0) #F11
win32api.keybd_event(122, 0, win32con.KEYEVENT_KEYUP,0) #Realize the F11 button
if __name__ == "__main__":
logger.info('start server ...')
if check_server():
start_url(INDEX_URL)
elif start_server() is not None:
if check_server(30):
start_url(INDEX_URL)
else:
logger.error('ERROR : 服務未成功啟動,請手工殺死進程LotServer.exe刷喜,再嘗試啟動残制!')
print('ERROR : 服務未成功啟動,請手工殺死進程LotServer.exe掖疮,再嘗試啟動初茶!')
else:
print('ERROR : 服務啟動過程中發(fā)生異常,請先手工清理相關進程浊闪,再嘗試啟動恼布!')
start_url(os.path.join(BASE_PATH, 'error.html'))
logger.info('end start!')
- 源文件entry\entry.spec:
# -*- mode: python -*-
block_cipher = None
a = Analysis(['entry.py'],
pathex=['E:\\entry'],
binaries=[],
datas=[('error.html','.')],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='entry',
debug=False,
strip=False,
upx=True,
console=True, icon='logo.ico')
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='entry')
- 源文件entry\LoggerHelper.py(記錄日志):
import sys, os
import logging
from logging.config import dictConfig
from Configs import APP_TMP_DIR, APP_LOGGING
## config the logging
#log_dir = os.path.join(APP_TMP_DIR, 'logs') ## os.getenv('SYSTEMROOT') + '\\..\\LOTS'
try:
if not os.path.exists(APP_TMP_DIR):
os.makedirs(APP_TMP_DIR)
except Exception as exp:
print('ERROR : Create Dir %s failed.' % APP_TMP_DIR)
sys.exit(1)
try:
dictConfig(APP_LOGGING)
except Exception as exp:
print('%s' % exp)
logger = logging.getLogger('start')
global __FIST_TIME
__FIST_TIME = True
if __FIST_TIME:
#sys.stderr.write = lambda s: logger.error(s)
#sys.stdout.write = lambda s: logger.info(s)
__FIST_TIME = False
if __name__ == '__main__':
logger.error("test-error")
logger.info("test-info")
logger.warn("test-warn")
- 源文件entry\error.html文件隨意寫,主要為提示用戶當程序啟動不了時應如何處理搁宾。
3.2折汞、編譯/啟動工程entry
E:\entry>pyinstaller -y entry.spec
E:\entry>dist\entry\entry.exe
便可啟動服務進程了。
四盖腿、最后的安裝包Inno Setup Compiler
??前面已經(jīng)將helloworld(django工程)和entry(普通工程)打包成相應的hello和entry目錄爽待,剩下的就是使用Inno setup將這些可執(zhí)行文件統(tǒng)一打包并進行安裝。
4.1翩腐、安裝向導setup.iss:
4.2鸟款、中文的安裝向導:
需將Inno Setup安裝目錄(如D:\Program Files (x86)\Inno Setup 5\Languages)里添加一個ChineseSimplified.isl文件(此文件內容來自網(wǎng)絡):
; *** Inno Setup version 5.5.3+ Chinese (Simplified) messages ***
; By Qiming Li (qiming at clault.com)
;
; To download user-contributed translations of this file, go to:
; http://www.jrsoftware.org/files/istrans/
;
; Note: When translating this text, do not add periods (.) to the end of
; messages that didn't have them already, because on those messages Inno
; Setup adds the periods automatically (appending a period would result in
; two periods being displayed).
[LangOptions]
; The following three entries are very important. Be sure to read and
; understand the '[LangOptions] section' topic in the help file.
LanguageName=<4E2D><6587><FF08><7B80><4F53><FF09>
LanguageID=$0804
LanguageCodePage=936
; If the language you are translating to requires special font faces or
; sizes, uncomment any of the following entries and change them accordingly.
DialogFontName=宋體
;DialogFontSize=8
;WelcomeFontName=Verdana
;WelcomeFontSize=12
;TitleFontName=Arial
;TitleFontSize=29
;CopyrightFontName=Arial
;CopyrightFontSize=8
[Messages]
; *** Application titles
SetupAppTitle=安裝向導
SetupWindowTitle=安裝向導 - %1
UninstallAppTitle=卸載向導
UninstallAppFullTitle=%1卸載向導
; *** Misc. common
InformationTitle=信息
ConfirmTitle=確認
ErrorTitle=錯誤
; *** SetupLdr messages
SetupLdrStartupMessage=安裝向導將在您的電腦上安裝%1。確定要繼續(xù)嗎茂卦?
LdrCannotCreateTemp=無法創(chuàng)建臨時文件何什。安裝已終止
LdrCannotExecTemp=無法運行臨時文件夾中的文件。安裝已終止
; *** Startup error messages
LastErrorMessage=%1.%n%n錯誤 %2: %3
SetupFileMissing=安裝目錄中缺失文件%1等龙。請解決該問題处渣,或重新獲取一份程序拷貝。
SetupFileCorrupt=安裝文件已被損壞而咆。請重新獲取一份程序拷貝霍比。
SetupFileCorruptOrWrongVer=安裝文件已被損壞,或與本安裝向導版本不兼容暴备。請解決該問題悠瞬,或重新獲取一份程序拷貝。
InvalidParameter=無效命令行參數(shù):%n%n%1
SetupAlreadyRunning=安裝程序已經(jīng)運行涯捻。
WindowsVersionNotSupported=程序不支持您電腦上運行的Windows版本浅妆。
WindowsServicePackRequired=程序要求%1 Service Pack %2或更新版本。
NotOnThisPlatform=程序不可在%1上運行障癌。
OnlyOnThisPlatform=程序必須在%1上運行凌外。
OnlyOnTheseArchitectures=程序只能在為以下處理器架構所設計的Windows版本上安裝:%n%n%1
MissingWOW64APIs=您所使用的Windows版本沒有包含進行64位安裝所需的功能。請安裝Service Pack %1解決此問題涛浙。
WinVersionTooLowError=程序要求%2版本或以上的%1康辑。
WinVersionTooHighError=程序不可安裝的%2或更高版本的%1上摄欲。
AdminPrivilegesRequired=您必須登錄為管理員才能安裝此程序。
PowerUserPrivilegesRequired=您必須登錄為管理員或高權限用戶才能安裝此程序疮薇。
SetupAppRunningError=安裝向導檢測到%1正在運行胸墙。%n%n請關閉其所有窗口并點擊“確定”繼續(xù),或點擊“取消”退出安裝按咒。
UninstallAppRunningError=卸載向導檢測到%1正在運行迟隅。%n%n請關閉其所有窗口,然后點擊“確定”繼續(xù)励七,或點擊“取消”退出智袭。
; *** Misc. errors
ErrorCreatingDir=安裝向導無法創(chuàng)建文件夾“%1”
ErrorTooManyFilesInDir=由于文件夾“%1”中文件過多,無法在其中創(chuàng)建文件
; *** Setup common messages
ExitSetupTitle=退出安裝向導
ExitSetupMessage=安裝尚未完成掠抬。如果現(xiàn)在退出吼野,程序將不會被安裝。 %n%n您可以下次再運行安裝向導來完成程序的安裝剿另。%n%n確定退出安裝向導嗎箫锤?
AboutSetupMenuItem=關于安裝向導(&A)…
AboutSetupTitle=關于安裝向導
AboutSetupMessage=%1版本%2%n%3%n%n%1主頁:%n%4
AboutSetupNote=
TranslatorNote=
; *** Buttons
ButtonBack=< 上一步(&B)
ButtonNext=下一步(&N) >
ButtonInstall=安裝(&I)
ButtonOK=確定
ButtonCancel=取消
ButtonYes=是(&Y)
ButtonYesToAll=全選是(&A)
ButtonNo=否(&N)
ButtonNoToAll=全選否(&O)
ButtonFinish=結束(&F)
ButtonBrowse=瀏覽(&B)…
ButtonWizardBrowse=瀏覽(&R)…
ButtonNewFolder=創(chuàng)建文件夾(&M)
; *** "Select Language" dialog messages
SelectLanguageTitle=選擇語言
SelectLanguageLabel=選擇安裝時使用語言:
; *** Common wizard text
ClickNext=點擊“下一步”繼續(xù),或“取消”退出安裝向導雨女。
BeveledLabel=
BrowseDialogTitle=瀏覽選擇文件夾
BrowseDialogLabel=在以下列表中選取一個文件夾谚攒,并點擊“確定”。
NewFolderName=新建文件夾
; *** "Welcome" wizard page
WelcomeLabel1=歡迎使用[name]安裝向導
WelcomeLabel2=本向導將在您的電腦上安裝[name/ver]%n%n建議您在繼續(xù)之前關閉其他所有應用程序氛堕。
; *** "Password" wizard page
WizardPassword=密碼
PasswordLabel1=本安裝程序由密碼保護揉抵。
PasswordLabel3=請輸入密碼汪诉,并點擊“下一步”晰赞。密碼區(qū)分大小寫茧痒。
PasswordEditLabel=密碼(&P):
IncorrectPassword=您輸入的密碼不正確。請重試锐想。
; *** "License Agreement" wizard page
WizardLicense=許可協(xié)議
LicenseLabel=請閱讀以下重要信息帮寻,然后再進入下一步。
LicenseLabel3=請閱讀以下許可協(xié)議赠摇。您必須接受此協(xié)議的條款固逗,然后才能繼續(xù)安裝。
LicenseAccepted=我接受協(xié)議(&A)
LicenseNotAccepted=我不接受協(xié)議(&D)
; *** "Information" wizard pages
WizardInfoBefore=信息
InfoBeforeLabel=請閱讀以下重要信息再進入下一步藕帜。
InfoBeforeClickLabel=準備好繼續(xù)安裝后烫罩,點擊“下一步”。
WizardInfoAfter=信息
InfoAfterLabel=請閱讀以下重要信息再進入下一步洽故。
InfoAfterClickLabel=準備好繼續(xù)安裝后贝攒,點擊“下一步”。
; *** "User Information" wizard page
WizardUserInfo=用戶信息
UserInfoDesc=請輸入您的信息
UserInfoName=用戶名稱(&U):
UserInfoOrg=機構名稱(&O):
UserInfoSerial=序列號碼(&S):
UserInfoNameRequired=必須輸入用戶名
; *** "Select Destination Location" wizard page
WizardSelectDir=選擇安裝位置
SelectDirDesc=將[name]安裝到何處时甚?
SelectDirLabel3=安裝向導將把[name]安裝到以下文件夾中隘弊。
SelectDirBrowseLabel=點擊“下一步”繼續(xù)哈踱。如果您要選擇不同的文件夾,請點擊“瀏覽”长捧。
DiskSpaceMBLabel=必須至少有[mb]兆字節(jié)(MB)的閑置磁盤空間嚣鄙。
CannotInstallToNetworkDrive=無法安裝至網(wǎng)絡驅動器吻贿。
CannotInstallToUNCPath=無法安裝至UNC路徑串结。
InvalidPath=您必須輸入包括盤符的完整路徑,例如:%n%nC:\應用程序%n%n或如下格式的UNC路徑:%n%n\\服務器名\共享目錄名
InvalidDrive=您選擇的驅動器或UNC共享不存在或不可訪問舅列。請另選一個肌割。
DiskSpaceWarningTitle=磁盤空間不足
DiskSpaceWarning=必須至少有%1千字節(jié)(KB)的閑置空間才可安裝,但所選驅動器僅有%2千字節(jié)(KB)可用空間帐要。%n%n您確定要繼續(xù)嗎把敞?
DirNameTooLong=文件夾名稱或路徑太長。
InvalidDirName=文件夾名稱無效榨惠。
BadDirName32=文件夾名稱不能包含下列字符:%n%n%1
DirExistsTitle=文件夾已存在
DirExists=文件夾%n%n%1%n%n已存在奋早。您確定要安裝到該文件夾嗎?
DirDoesntExistTitle=文件夾不存在
DirDoesntExist=文件夾%n%n%1%n%n不存在赠橙。您要創(chuàng)建該文件夾嗎耽装?
; *** "Select Components" wizard page
WizardSelectComponents=選擇組件
SelectComponentsDesc=要安裝哪些組件?
SelectComponentsLabel2=請選擇要安裝的組件期揪,清除不要安裝的組件掉奄。準備好后點擊“下一步”。
FullInstallation=全部安裝
; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language)
CompactInstallation=簡潔安裝
CustomInstallation=自定義安裝
NoUninstallWarningTitle=組件已存在
NoUninstallWarning=安裝向導檢測到已經(jīng)安裝下列組件:%n%n%1%n%n取消選定不會卸載這些組件凤薛。%n%n您確定要繼續(xù)安裝嗎姓建?
ComponentSize1=%1千字節(jié)(KB)
ComponentSize2=%1兆字節(jié)(MB)
ComponentsDiskSpaceMBLabel=目前所選組件要求至少[mb]兆字節(jié)(MB)磁盤空間。
; *** "Select Additional Tasks" wizard page
WizardSelectTasks=選擇附加任務
SelectTasksDesc=要執(zhí)行哪些附加任務缤苫?
SelectTasksLabel2=請選擇安裝[name]時需要執(zhí)行的附加任務速兔,然后點擊“下一步”。
; *** "Select Start Menu Folder" wizard page
WizardSelectProgramGroup=選擇開始菜單文件夾
SelectStartMenuFolderDesc=把程序快捷方式放到哪里活玲?
SelectStartMenuFolderLabel3=安裝向導將在以下開始菜單文件夾中創(chuàng)建程序快捷方式涣狗。
SelectStartMenuFolderBrowseLabel=點擊“下一步”繼續(xù)。如要選擇另一個文件夾翼虫,點擊“瀏覽”屑柔。
MustEnterGroupName=您必須輸入文件夾名稱
GroupNameTooLong=文件夾名稱或路徑太長。
InvalidGroupName=文件夾名稱無效珍剑。
BadGroupName=文件夾名稱不能包含下列字符:%n%n%1
NoProgramGroupCheck2=不要創(chuàng)建開始菜單文件夾(&D)
; *** "Ready to Install" wizard page
WizardReady=安裝準備完畢
ReadyLabel1=安裝向導已準備完畢掸宛,將開始在您的電腦上安裝[name]。
ReadyLabel2a=點擊“安裝”開始安裝招拙。如要確認或更改設置請點擊“上一步”唧瘾。
ReadyLabel2b=點擊“安裝”開始安裝措译。
ReadyMemoUserInfo=用戶信息:
ReadyMemoDir=安裝位置:
ReadyMemoType=安裝類型:
ReadyMemoComponents=所選組件:
ReadyMemoGroup=開始菜單文件夾:
ReadyMemoTasks=附加任務:
; *** "Preparing to Install" wizard page
WizardPreparing=準備安裝
PreparingDesc=安裝向導正在準備在您的電腦上安裝[name]。
PreviousInstallNotCompleted=上次程序安裝/卸載未能完成饰序。您需要重啟電腦來完成上次安裝领虹。%n%n電腦重啟之后,請重新運行安裝向導來安裝[name]求豫。
CannotContinue=安裝無法繼續(xù)塌衰。請點擊“取消”退出。
ApplicationsFound=安裝向導需要更新的文件被下列應用程序占用蝠嘉。建議允許安裝向導自動關閉這些應用程序最疆。
ApplicationsFound2=安裝向導需要更新的文件被下列應用程序占用。建議允許安裝向導自動關閉這些應用程序蚤告。安裝完成后努酸,安裝向導將嘗試重新啟動這些應用程序。
CloseApplications=自動關閉應用程序(&A)
DontCloseApplications=不自動關閉應用程序(&D)
ErrorCloseApplications=安裝向導無法自動關閉所有的應用程序杜恰。在進入下一步之前获诈,建議您關閉那些占用安裝向導需要更新文件的應用程序。
; *** "Installing" wizard page
WizardInstalling=正在安裝
InstallingLabel=請稍候心褐,安裝向導正在您的電腦上安裝[name]舔涎。
; *** "Setup Completed" wizard page
FinishedHeadingLabel=[name]安裝完成
FinishedLabelNoIcons=安裝向導已在您的電腦上安裝[name]。
FinishedLabel=安裝向導已在您的電腦上安裝[name]檬寂≈粘椋可以通過已安裝的快捷方式來打開此應用程序。
ClickFinish=點擊“結束”退出安裝桶至。
FinishedRestartLabel=為了完成[name]的安裝昼伴,安裝向導必須重啟您的電腦。要立即重啟嗎镣屹?
FinishedRestartMessage=為了完成[name]的安裝圃郊,安裝向導必須重啟您的電腦。%n%n要立即重啟嗎女蜈?
ShowReadmeCheck=是持舆,我要閱讀自述文件
YesRadio=是,立即重啟電腦(&Y)
NoRadio=否伪窖,稍后我再重啟電腦(&N)
; used for example as 'Run MyProg.exe'
RunEntryExec=運行%1
; used for example as 'View Readme.txt'
RunEntryShellExec=查閱%1
; *** "Setup Needs the Next Disk" stuff
ChangeDiskTitle=安裝向導需要下一張磁盤
SelectDiskLabel2=請插入磁盤%1 并點擊“確定”逸寓。%n%n如果該磁盤中的文件并不在以下所示文件夾中,請輸入正確的路徑或點擊“瀏覽”覆山。
PathLabel=路徑(&P):
FileNotInDir2=文件“%1”不在“%2”中竹伸。請插入正確的磁盤或選擇其它文件夾。
SelectDirectoryLabel=請指定下一張磁盤的位置簇宽。
; *** Installation phase messages
SetupAborted=安裝未能完成勋篓。%n%n請解決問題后再重新運行安裝向導吧享。
EntryAbortRetryIgnore=點擊“重試”重新嘗試,點擊“忽略”繼續(xù)安裝譬嚣,或點擊“中止”取消安裝钢颂。
; *** Installation status messages
StatusClosingApplications=正在關閉應用程序…
StatusCreateDirs=正在創(chuàng)建文件夾…
StatusExtractFiles=正在取出文件…
StatusCreateIcons=正在創(chuàng)建快捷方式…
StatusCreateIniEntries=正在創(chuàng)建INI條目…
StatusCreateRegistryEntries=正在創(chuàng)建注冊表條目…
StatusRegisterFiles=正在創(chuàng)建注冊表項目…
StatusSavingUninstall=正在保存卸載信息…
StatusRunProgram=正在結束安裝…
StatusRestartingApplications=正在重啟應用程序…
StatusRollback=正在撤銷更改…
; *** Misc. errors
ErrorInternal2=內部錯誤:%1
ErrorFunctionFailedNoCode=%1失敗
ErrorFunctionFailed=%1失敗,錯誤碼%2
ErrorFunctionFailedWithMessage=%1失敗拜银,錯誤碼%2殊鞭。%n%3
ErrorExecutingProgram=無法運行程序:%n%1
; *** Registry errors
ErrorRegOpenKey=打開注冊表鍵時出錯:%n%1\%2
ErrorRegCreateKey=創(chuàng)建注冊表鍵時出錯:%n%1\%2
ErrorRegWriteKey=寫入注冊表鍵時出錯:%n%1\%2
; *** INI errors
ErrorIniEntry=在文件“%1”中創(chuàng)建INI條目時出錯。
; *** File copying errors
FileAbortRetryIgnore=點擊“重試”重新嘗試盐股,點擊“忽略”跳過此文件(不推薦這樣做)钱豁,或點擊“中止”取消安裝。
FileAbortRetryIgnore2=點擊“重試”重新嘗試疯汁,點擊“忽略”繼續(xù)安裝(不推薦這樣做),或點擊“中止”取消安裝卵酪。
SourceIsCorrupted=源文件已損壞
SourceDoesntExist=源文件“%1”不存在
ExistingFileReadOnly=現(xiàn)有文件被標記為只讀幌蚊。%n%n點擊“重試”移除其只讀屬性并重新嘗試,點擊“忽略”跳過此文件溃卡,或點擊“中止”取消安裝溢豆。
ErrorReadingExistingDest=讀取現(xiàn)有文件時出錯:
FileExists=文件已存在。%n%n讓安裝向導覆蓋它嗎瘸羡?
ExistingFileNewer=現(xiàn)有文件比安裝向導試圖安裝的還要新漩仙。建議保留現(xiàn)有文件。%n%n您要保留現(xiàn)有文件嗎犹赖?
ErrorChangingAttr=更改現(xiàn)有文件屬性時出錯:
ErrorCreatingTemp=在目的文件夾中創(chuàng)建文件時出錯:
ErrorReadingSource=讀取源文件時出錯:
ErrorCopying=復制文件時出錯:
ErrorReplacingExistingFile=替換現(xiàn)有文件時出錯:
ErrorRestartReplace=重啟替換失敹铀:
ErrorRenamingTemp=為目的文件夾中文件重命名時出錯:
ErrorRegisterServer=無法注冊動態(tài)庫或控件(DLL/OCX):%1
ErrorRegSvr32Failed=運行RegSvr32失敗,其返回值為:%1
ErrorRegisterTypeLib=無法注冊類型庫:%1
; *** Post-installation errors
ErrorOpeningReadme=打開自述文件時出錯峻村。
ErrorRestartingComputer=安裝向導無法重啟電腦麸折。請手動重啟。
; *** Uninstaller messages
UninstallNotFound=文件“%1”不存在粘昨。無法卸載垢啼。
UninstallOpenError=無法打開文件“%1”。無法卸載
UninstallUnsupportedVer=此版本的卸載向導無法識別卸載日志文件“%1”的格式张肾。無法卸載
UninstallUnknownEntry=在卸載日志中遇到未知條目 (%1)
ConfirmUninstall=您是否確定要完全刪除%1及其所有組件芭析?
UninstallOnlyOnWin64=此安裝只能在64位Windows上卸載。
OnlyAdminCanUninstall=此安裝只能由具備管理員權限的用戶卸載吞瞪。
UninstallStatusLabel=請稍候馁启,正在刪除%1。
UninstalledAll=已成功地從您的電腦中刪除%1尸饺。
UninstalledMost=%1卸載完畢进统。%n%n某些項目無法在卸載過程中刪除助币。可以手動刪除這些項目螟碎。
UninstalledAndNeedsRestart=若要完成%1的卸載眉菱,必須重啟電腦。%n%n要立即重啟嗎掉分?
UninstallDataCorrupted=文件“%1”已損壞俭缓。無法卸載
; *** Uninstallation phase messages
ConfirmDeleteSharedFileTitle=刪除共享文件嗎?
ConfirmDeleteSharedFile2=系統(tǒng)顯示沒有任何程序使用以下共享文件酥郭。要刪除該共享文件嗎华坦?%n%n如果有程序使用該文件,當它被刪除后這些程序可能無法正常運行不从。如果不確定惜姐,請選擇“否”。留下該文件不會對系統(tǒng)造成任何危害椿息。
SharedFileNameLabel=文件名:
SharedFileLocationLabel=位置:
WizardUninstalling=卸載狀態(tài)
StatusUninstalling=正在卸載%1…
; *** Shutdown block reasons
ShutdownBlockReasonInstallingApp=正在安裝%1歹袁。
ShutdownBlockReasonUninstallingApp=正在卸載%1。
; The custom messages below aren't used by Setup itself, but if you make
; use of them in your scripts, you'll want to translate them.
[CustomMessages]
NameAndVersion=%1版本%2
AdditionalIcons=附加快捷方式:
CreateDesktopIcon=創(chuàng)建桌面快捷方式(&D)
CreateQuickLaunchIcon=創(chuàng)建快速啟動欄快捷方式(&Q)
ProgramOnTheWeb=%1網(wǎng)站
UninstallProgram=卸載%1
LaunchProgram=運行%1
AssocFileExtension=將%1與%2文件擴展名關聯(lián)(&A)
AssocingFileExtension=正在將%1與%2文件擴展名關聯(lián)…
AutoStartProgramGroupDescription=啟動:
AutoStartProgram=自動啟動%1
AddonHostProgramNotFound=在您所選文件夾中找不到%1寝优。%n%n是否仍然繼續(xù)条舔?