Skip to content

Commit 126c2fc

Browse files
authored
Add files via upload
1 parent 2a9e242 commit 126c2fc

4 files changed

Lines changed: 48 additions & 43 deletions

File tree

VCVM.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ def creditsinfo(self, icon=None, item=None):
799799

800800
title = "About VolumeControl for Voicemeeter"
801801
message = ("VolumeControl for Voicemeeter.\n"
802-
"Version 1.0.3 of may 2026\n\n"
802+
"Version 1.0.4\n\n"
803803
"https://github.com/dayeggpi \n\n"
804804
"Synchronizes Windows volume with Voicemeeter.\n"
805805
"Support them : https://vb-audio.com/\n\n"
@@ -819,7 +819,7 @@ def creditsinfo(self, icon=None, item=None):
819819
logclass.log(error_msg, level='error', exc_info=True)
820820
print(f"Error: {error_msg}")
821821
print("\n=== About VolumeControl for Voicemeeter ===")
822-
print("Version 1.0.3")
822+
print("Version 1.0.4")
823823
print("https://github.com/dayeggpi")
824824
print("Synchronizes Windows volume with Voicemeeter")
825825
print("by dayeggpi")
@@ -880,6 +880,10 @@ def run(self):
880880
logclass.log("Application stopped")
881881

882882
if __name__ == "__main__":
883+
mutex = ctypes.windll.kernel32.CreateMutexW(None, True, "Global\\VCVMSingleInstance")
884+
if ctypes.windll.kernel32.GetLastError() == 183: # ERROR_ALREADY_EXISTS
885+
ctypes.windll.user32.MessageBoxW(0, "VCVM is already running.", "VCVM", 0x30)
886+
sys.exit(1)
883887
logclass = LoggerMaster()
884888
app = VoicemeeterVolumeSync()
885889
app.run()

VCVM.spec

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,48 @@
11
# -*- mode: python ; coding: utf-8 -*-
2-
from PyInstaller.utils.hooks import collect_data_files
32
from PyInstaller.utils.hooks import collect_dynamic_libs
3+
from PyInstaller.utils.hooks import collect_all
44

55
datas = [('icon.ico', '.'), ('icon_status_on.ico', '.'), ('icon_status_off.ico', '.')]
66
binaries = []
7-
datas += collect_data_files('pycaw')
7+
hiddenimports = ['pystray', 'pystray._win32', 'PIL', 'PIL.Image', 'PIL.ImageDraw', 'pycaw', 'pycaw.pycaw', 'comtypes', 'comtypes.client']
88
binaries += collect_dynamic_libs('comtypes')
9+
tmp_ret = collect_all('pycaw')
10+
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
911

1012

11-
block_cipher = None
13+
a = Analysis(
14+
['VCVM.py'],
15+
pathex=[],
16+
binaries=binaries,
17+
datas=datas,
18+
hiddenimports=hiddenimports,
19+
hookspath=[],
20+
hooksconfig={},
21+
runtime_hooks=[],
22+
excludes=['numpy', 'pandas', 'scipy', 'matplotlib', 'tkinter'],
23+
noarchive=False,
24+
optimize=0,
25+
)
26+
pyz = PYZ(a.pure)
1227

13-
14-
a = Analysis(['VCVM.py'],
15-
pathex=[],
16-
binaries=binaries,
17-
datas=datas,
18-
hiddenimports=['pystray', 'pystray._win32', 'PIL', 'PIL.Image', 'PIL.ImageDraw', 'pycaw', 'pycaw.pycaw', 'comtypes', 'comtypes.client'],
19-
hookspath=[],
20-
hooksconfig={},
21-
runtime_hooks=[],
22-
excludes=['numpy', 'pandas', 'scipy', 'matplotlib', 'tkinter'],
23-
win_no_prefer_redirects=False,
24-
win_private_assemblies=False,
25-
cipher=block_cipher,
26-
noarchive=False)
27-
pyz = PYZ(a.pure, a.zipped_data,
28-
cipher=block_cipher)
29-
30-
exe = EXE(pyz,
31-
a.scripts,
32-
a.binaries,
33-
a.zipfiles,
34-
a.datas,
35-
[],
36-
name='VCVM',
37-
debug=False,
38-
bootloader_ignore_signals=False,
39-
strip=False,
40-
upx=True,
41-
upx_exclude=[],
42-
runtime_tmpdir=None,
43-
console=False,
44-
disable_windowed_traceback=False,
45-
target_arch=None,
46-
codesign_identity=None,
47-
entitlements_file=None , icon='icon.ico')
28+
exe = EXE(
29+
pyz,
30+
a.scripts,
31+
a.binaries,
32+
a.datas,
33+
[],
34+
name='VCVM',
35+
debug=False,
36+
bootloader_ignore_signals=False,
37+
strip=False,
38+
upx=True,
39+
upx_exclude=[],
40+
runtime_tmpdir=None,
41+
console=False,
42+
disable_windowed_traceback=False,
43+
argv_emulation=False,
44+
target_arch=None,
45+
codesign_identity=None,
46+
entitlements_file=None,
47+
icon=['icon.ico'],
48+
)

build-exe.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pyinstaller --onefile --windowed --name "VCVM" ^
1111
--hidden-import pycaw.pycaw ^
1212
--hidden-import comtypes ^
1313
--hidden-import comtypes.client ^
14-
--collect-data pycaw ^
14+
--collect-all pycaw ^
1515
--collect-binaries comtypes ^
1616
--add-data "icon.ico;." ^
1717
--add-data "icon_status_on.ico;." ^

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Runtime dependencies for VCVM.py
22
pystray==0.19.4
33
Pillow==8.4.0
4-
pycaw==20220416
5-
comtypes==1.1.14
4+
pycaw==20251023
5+
comtypes==1.4.16
66

77
# Build dependency
88
PyInstaller==4.10

0 commit comments

Comments
 (0)