Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
lalala123123 committed Nov 17, 2023
1 parent fb00548 commit 9bee7de
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion scripts/installer/windows/product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
Directory="DynamicCliDir"
Execute="commit"
Impersonate="no"
ExeCommand="cmd.exe /c SC CREATE PromptFlowService "displayname=Prompt Flow Service" start=auto type=userown binPath= "\"%ProgramFiles%\promptflow\pfs.exe\"""
ExeCommand="cmd.exe /c SC CREATE PromptFlowService "displayname=Prompt Flow Service" start=auto type=userown binPath= "\"%ProgramFiles%\promptflow\pfsvc.exe\"""
Return="check" />
<CustomAction Id="UninstallPromptFlowService"
Directory="DynamicCliDir"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import servicemanager # Simple setup and logging


class MyService:
class PromptFlowService:
"""Silly little application stub"""
def stop(self):
"""Stop the service"""
Expand All @@ -23,7 +23,7 @@ def run(self):
servicemanager.LogInfoMsg("Service running...")


class MyServiceFramework(win32serviceutil.ServiceFramework):
class PromptFlowServiceFramework(win32serviceutil.ServiceFramework):

_svc_name_ = 'PromptFlowService'
_svc_display_name_ = 'Prompt Flow Service'
Expand All @@ -37,7 +37,7 @@ def SvcStop(self):
def SvcDoRun(self):
"""Start the service; does not return until stopped"""
self.ReportServiceStatus(win32service.SERVICE_START_PENDING)
self.service_impl = MyService()
self.service_impl = PromptFlowService()
self.ReportServiceStatus(win32service.SERVICE_RUNNING)
# Run the service
self.service_impl.run()
Expand All @@ -46,10 +46,10 @@ def SvcDoRun(self):
def init():
if len(sys.argv) == 1:
servicemanager.Initialize()
servicemanager.PrepareToHostSingle(MyServiceFramework)
servicemanager.PrepareToHostSingle(PromptFlowServiceFramework)
servicemanager.StartServiceCtrlDispatcher()
else:
win32serviceutil.HandleCommandLine(MyServiceFramework)
win32serviceutil.HandleCommandLine(PromptFlowServiceFramework)


if __name__ == '__main__':
Expand Down
22 changes: 11 additions & 11 deletions scripts/installer/windows/scripts/promptflow.spec
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ pfazure_exe = EXE(
version="./version_info.txt",
)

pfs_a = Analysis(
['pfs.py'],
pfsvc_a = Analysis(
['pfsvc.py'],
pathex=[],
binaries=[],
datas=datas,
Expand All @@ -100,13 +100,13 @@ pfs_a = Analysis(
cipher=block_cipher,
noarchive=False,
)
pfs_pyz = PYZ(pfs_a.pure, pfs_a.zipped_data, cipher=block_cipher)
pfs_exe = EXE(
pfs_pyz,
pfs_a.scripts,
pfsvc_pyz = PYZ(pfsvc_a.pure, pfsvc_a.zipped_data, cipher=block_cipher)
pfsvc_exe = EXE(
pfsvc_pyz,
pfsvc_a.scripts,
[],
exclude_binaries=True,
name='pfs',
name='pfsvc',
debug=False,
bootloader_ignore_signals=False,
strip=False,
Expand All @@ -130,10 +130,10 @@ coll = COLLECT(
pfazure_a.binaries,
pfazure_a.zipfiles,
pfazure_a.datas,
pfs_exe,
pfs_a.binaries,
pfs_a.zipfiles,
pfs_a.datas,
pfsvc_exe,
pfsvc_a.binaries,
pfsvc_a.zipfiles,
pfsvc_a.datas,
strip=False,
upx=True,
upx_exclude=[],
Expand Down

0 comments on commit 9bee7de

Please sign in to comment.