thatsIch / sublime-rainmeter

Rainmeter Package for Sublime Text 3
https://thatsich.github.io/sublime-rainmeter/
MIT License
51 stars 3 forks source link

Enhance first user experience #22

Closed thatsIch closed 7 years ago

thatsIch commented 7 years ago

Currently the user just get a notification that Rainmeter could not be found, but it is better if some dialog or input would pop up where the user could enter the directory paths to the skin and rainmeter installation, if not found.

thatsIch commented 7 years ago

Apparently the tkinter library is for that. Not sure if it is ported through out Sublime Text though, needs integration testing in test environment.

thatsIch commented 7 years ago

Not possible.. ST3 does nto ship that part of the python standard libraries

thatsIch commented 7 years ago

Now I am running a custom script executing an open file dialog natively on windows looking like this:

@echo off
setlocal
set "ps=Add-Type -AssemblyName System.windows.forms | Out-Null;"
set "ps=%ps% [System.Windows.Forms.Application]::EnableVisualStyles();"
set "ps=%ps% $f=New-Object System.Windows.Forms.OpenFileDialog;"
set "ps=%ps% $f.Filter='Rainmeter Executable (Rainmeter.exe)|Rainmeter.exe|All files (*.*)|*.*';"
set "ps=%ps% $f.showHelp=$true;"
set "ps=%ps% $f.ShowDialog() | Out-Null;"
set "ps=%ps% $f.FileName"

for /f "delims=" %%I in ('powershell "%ps%"') do set "filename=%%I"

if defined filename (
    echo %filename%
) else (
    echo None
)

goto :EOF
thatsIch commented 7 years ago

I opted to use powershell directly to run it because going over the cmd is more error prone and slower also hiding the cmd call is more difficult. Since Rainmeter 4 requires Win 7+ anyways, ¯\(ツ)