Skip to content

Commit

Permalink
patched virtual desktop actions that broke due to a febrary windows u…
Browse files Browse the repository at this point in the history
…pdate. Virtual Desktop Actions Not Working After Win11 Feb 2024 Update #12
  • Loading branch information
aasmal97 committed Feb 17, 2024
1 parent 7b54aeb commit 5ae41b7
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 23 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ build
*.pptx
__pycache__
run/
*run.spec
*run.spec
.venv
Binary file modified Release/com.arkyasmal.windowactions.streamDeckPlugin
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ def dll_path(file_name:str ):
]
options = {
'packages': include_packages,
# 'zip_exclude': zip_exclude,
# "include_files": [

# ],
"include_files": include_files
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ def determine_ddl_file_used():
elif(major < 22635):
if(major < 22621 or (major == 22621 and revision < 2215)):
return f'VirtualDesktopAccessor-Win11v1.dll'
else:
elif(major == 22621 and revision < 3155):
return attempt_ddl_ver(f'VirtualDesktopAccessor-Win11v2.dll', f'VirtualDesktopAccessor-Win11v3.dll')
else:
return attempt_ddl_ver(f'VirtualDesktopAccessor-Win11latest.dll', f'VirtualDesktopAccessor-Win11latest.dll')
# retain version of previous files
elif(major == 22635 and revision < 2915):
return attempt_ddl_ver(f'VirtualDesktopAccessor-Win11v2.dll', f'VirtualDesktopAccessor-Win11v3.dll')
# due to changes after 22635.2915, this needs an update
else:
return attempt_ddl_ver(f'VirtualDesktopAccessor-Win11latest.dll', f'VirtualDesktopAccessor-Win11latest.dll')
return attempt_ddl_ver(f'VirtualDesktopAccessor-Win11latest.dll', f'VirtualDesktopAccessor-Win11latest.dll')
2 changes: 1 addition & 1 deletion Sources/com.arkyasmal.windowActions.sdPlugin/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
"Description": "Perform any window action with window ids. Window Ids can be a full or partial title, filename, class name, or hwnd. \n\nGeneral Window actions: \n- Minimize Windows\n- Maximize Windows\n- Focus Windows\n- Close Windows\n- Move Windows\n- Resize Windows\n- Toggle Fullscreen Mode on Windows\n- Force Windows to stay on top\n\nFor heavy users:\n- Navigate Virtual Desktops\n- Create Virtual Desktops \n- Move Windows across Virtual Desktops\n- Move Windows across Monitors",
"Name": "Window Actions",
"URL": "https://github.com/aasmal97/Window-Actions",
"Version": "4.1.0",
"Version": "4.1.1",
"SDKVersion": 2,
"OS": [{ "Platform": "windows", "MinimumVersion": "10" }],
"Software": {
Expand Down
1 change: 0 additions & 1 deletion buildFiles/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import shutil
from install import install_requirements
from exclusion import files_to_ignore

def create_dist_directory(curr_dir: str):
new_dist_path = os.path.normpath(os.path.abspath(os.path.join(curr_dir,r'..\Sources\com.arkyasmal.windowactions.sdPlugin\dist')))
old_dist_path = os.path.normpath(os.path.abspath(os.path.join(curr_dir,r'..\Sources\com.arkyasmal.windowactions.sdPlugin\app\windowsScripts\dist')))
Expand Down
7 changes: 4 additions & 3 deletions buildFiles/install.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import os
import subprocess
from virtual import find_package_json
def install_requirements():
# Get current directory
current_dir = os.path.dirname(os.path.abspath(__file__))
new_path = os.path.normpath(os.path.abspath(os.path.join(current_dir,r"..\Sources\com.arkyasmal.windowactions.sdPlugin\app\windowsScripts")))
root_path = find_package_json(current_dir)
# Install cx_Freeze using pip
subprocess.run(['pip', 'install', '--force', '--no-cache', '--pre', '--extra-index-url', 'https://marcelotduarte.github.io/packages/', 'cx_Freeze'], cwd=new_path)
subprocess.run(['pip', 'install', '--force', '--no-cache', '--pre', '--extra-index-url', 'https://marcelotduarte.github.io/packages/', 'cx_Freeze'], cwd=root_path)
# Install requirements.txt using pip
subprocess.run(['pip', 'install', '-r', 'requirements.txt'], cwd=new_path)
subprocess.run(['pip', 'install', '-r', 'requirements.txt'], cwd=root_path)
if __name__ == '__main__':
install_requirements()
10 changes: 0 additions & 10 deletions buildFiles/runPy.bat

This file was deleted.

20 changes: 20 additions & 0 deletions buildFiles/virtual.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import os
import subprocess
def find_package_json(directory):
if(directory is None or directory == ''):
return None
parent = os.path.dirname(directory)
files = os.listdir(directory)
if 'package.json' in files:
return os.path.join(directory)
else:
return find_package_json(parent)
def create_virtual():
curr_dir = os.path.dirname(os.path.abspath(__file__))
root_dir = find_package_json(curr_dir)
app_path = os.path.normpath(os.path.abspath(os.path.join(root_dir,r'.\Sources\com.arkyasmal.windowactions.sdPlugin\app\windowsScripts')))
subprocess.run(['py', '-m', 'venv', 'virtual'], cwd=app_path)
bat_file_path = os.path.join(app_path, 'virtual', 'Scripts')
subprocess.run(['activate.bat'], cwd=bat_file_path)
if __name__ == '__main__':
create_virtual()
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"start": "node .\\Sources\\com.arkyasmal.windowActions.sdPlugin\\app\\index.js",
"test": "echo \"Error: no test specified\" && exit 1",
"virtual": "py .\\buildFiles\\runPy.bat",
"virtual": "py .\\buildFiles\\virtual.py",
"build": "py .\\buildFiles\\build.py",
"install": "py .\\buildFiles\\install.py"
},
Expand Down
File renamed without changes.

0 comments on commit 5ae41b7

Please sign in to comment.