调整资源加载方式
parent
12b5fdaa3e
commit
b07ca645c7
|
@ -5,6 +5,7 @@ from PyQt5.QtCore import *
|
||||||
from PyQt5.QtGui import *
|
from PyQt5.QtGui import *
|
||||||
import RecordType
|
import RecordType
|
||||||
from RecordType import *
|
from RecordType import *
|
||||||
|
import resource
|
||||||
|
|
||||||
class RecordTrayIcon(QSystemTrayIcon):
|
class RecordTrayIcon(QSystemTrayIcon):
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
|
@ -56,17 +57,21 @@ class RecordTrayIcon(QSystemTrayIcon):
|
||||||
|
|
||||||
if recording:
|
if recording:
|
||||||
if record_type == RecordType.Camera:
|
if record_type == RecordType.Camera:
|
||||||
self.setIcon(self.get_icon('camera_recording_colorful.png'))
|
# self.setIcon(self.get_icon('camera_recording_colorful.png'))
|
||||||
|
self.setIcon(QIcon(':/resource/camera_recording_colorful.png'))
|
||||||
self.setToolTip('正在录制摄像头...')
|
self.setToolTip('正在录制摄像头...')
|
||||||
|
|
||||||
elif record_type == RecordType.Screen:
|
elif record_type == RecordType.Screen:
|
||||||
self.setIcon(self.get_icon('screen_recording.png'))
|
# self.setIcon(self.get_icon('screen_recording.png'))
|
||||||
|
self.setIcon(QIcon(':/resource/screen_recording.png'))
|
||||||
self.setToolTip('正在录制屏幕...')
|
self.setToolTip('正在录制屏幕...')
|
||||||
else:
|
else:
|
||||||
self.setIcon(self.get_icon('stop.png'))
|
# self.setIcon(self.get_icon('stop.png'))
|
||||||
|
# self.setIcon(QIcon(':/resource/stop.png'))
|
||||||
self.setToolTip('软件缩小在这里.')
|
self.setToolTip('软件缩小在这里.')
|
||||||
else:
|
else:
|
||||||
self.setIcon(self.get_icon('start.png'))
|
# self.setIcon(self.get_icon('start.png'))
|
||||||
|
self.setIcon(QIcon(':/resource/start.png'))
|
||||||
self.setToolTip('软件缩小在这里.')
|
self.setToolTip('软件缩小在这里.')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import sys
|
||||||
from cx_Freeze import setup, Executable
|
from cx_Freeze import setup, Executable
|
||||||
|
|
||||||
# Dependencies are automatically detected, but it might need fine tuning.
|
# Dependencies are automatically detected, but it might need fine tuning.
|
||||||
build_exe_options = { 'include_files':['resource','ffmpeg-shared'], 'build_exe' : 'd:/dev/record/record-win'}
|
build_exe_options = { 'include_files':['ffmpeg-shared'], 'build_exe' : 'd:/dev/record/record-win'}
|
||||||
install_exe_options = { 'install_dir' : 'd:/dev/record/record-win', 'build_dir':'build', 'install_exe':'d:\\record-camera-and-screen'}
|
install_exe_options = { 'install_dir' : 'd:/dev/record/record-win', 'build_dir':'build', 'install_exe':'d:\\record-camera-and-screen'}
|
||||||
|
|
||||||
# GUI applications require a different base on Windows (the default is for a
|
# GUI applications require a different base on Windows (the default is for a
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 87 KiB |
|
@ -34,6 +34,7 @@ Name: "startupicon"; Description: "
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "D:\dev\record\record-win\RecordWindow.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\dev\record\record-win\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
Source: "D:\dev\record\record-win\RecordWindow.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\dev\record\record-win\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
|
|
||||||
; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion”
|
; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion”
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
||||||
|
@ -42,6 +43,7 @@ Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
||||||
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
|
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
|
||||||
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
||||||
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
|
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
|
||||||
|
Name: "{userstartup}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: startupicon
|
||||||
|
|
||||||
[Run]
|
[Run]
|
||||||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
import os,signal
|
|
||||||
|
|
||||||
pid = input('输入进程id:')
|
|
||||||
|
|
||||||
print(os.kill(int(pid) , signal.CTRL_C_EVENT))
|
|
|
@ -0,0 +1,79 @@
|
||||||
|
|
||||||
|
<!-- 帮助参考主题: -->
|
||||||
|
<!-- 1.运行状态 -->
|
||||||
|
<!-- 2.设置解释 -->
|
||||||
|
<!-- 2.1设备设置选择 -->
|
||||||
|
<!-- 2.2快捷键 -->
|
||||||
|
<!-- 3.非法运行限制说明 -->
|
||||||
|
<!-- 4.申明 -->
|
||||||
|
<style>
|
||||||
|
.left{
|
||||||
|
width:180px;
|
||||||
|
height:600px;
|
||||||
|
float: left;
|
||||||
|
display: table;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 600px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left_img{
|
||||||
|
width:180px;
|
||||||
|
height:180px;
|
||||||
|
float:bottom;
|
||||||
|
}
|
||||||
|
.right{
|
||||||
|
margin-left: 210px;
|
||||||
|
height: 600px;
|
||||||
|
text-align: left;
|
||||||
|
line-height: 25px;
|
||||||
|
}
|
||||||
|
ul{
|
||||||
|
margin:0px;
|
||||||
|
padding:0px;
|
||||||
|
float:inherit;
|
||||||
|
}
|
||||||
|
.content_img{
|
||||||
|
width:60px;
|
||||||
|
height:60px;
|
||||||
|
}
|
||||||
|
#status{
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
#status>li{
|
||||||
|
list-style:none;
|
||||||
|
padding-left:20px;
|
||||||
|
text-align:center;
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
|
#status li{
|
||||||
|
list-style:none;
|
||||||
|
}
|
||||||
|
#status ul{
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div class="left">
|
||||||
|
<img class="left_img" src="../resource/gutin.jpg" />
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<h4>谷田会议管理系统-帮助</h4>
|
||||||
|
<p>
|
||||||
|
<div>软件主要功能是录制摄像头和录制屏幕,有非录制状态、录制摄像头、录制屏幕三种状态主要以托盘图标的变化来区分:</div>
|
||||||
|
<div>
|
||||||
|
<ul id="status">
|
||||||
|
<li>
|
||||||
|
<ul><li><img class="content_img" src="../resource/start.png"/></li><li>非录制状态</li></ul></li>
|
||||||
|
<li><ul><li><img class="content_img" src="../resource/camera_recording_colorful.png"/></li><li>正在录制摄像头</li></ul></li>
|
||||||
|
<li><ul><li><img class="content_img" src="../resource/screen_recording.png"/></li><li>正在录制屏幕</li></ul></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <li>软件主要功能是录制摄像头和录制屏幕,有非录制状态、录制摄像头、录制屏幕三种状态主要以托盘图标的变化来区分:<img src="../resource/main-status.png"/></li> -->
|
|
@ -1,8 +0,0 @@
|
||||||
import RecordVideo
|
|
||||||
from RecordVideo import *
|
|
||||||
|
|
||||||
rv=RecordVideo()
|
|
||||||
rv.record_camera()
|
|
||||||
# rv.record()
|
|
||||||
# rv.kill_process(process_name='ffmpeg')
|
|
||||||
# rv.play()
|
|
Loading…
Reference in New Issue