Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
kitabatake1013 committed Sep 23, 2021
2 parents 68753cb + b728693 commit b2f40dc
Show file tree
Hide file tree
Showing 19 changed files with 1,104 additions and 733 deletions.
1 change: 1 addition & 0 deletions DefaultSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def get():
"autoconnect": True,
"titlebar": 1,
"log_level": "0",
"checkPoint": True,
}

config["view"]={
Expand Down
7 changes: 5 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ after_test:
# 64-bit Python 3.3/3.4. And you need to use %PYTHON% to get the correct
# interpreter
- "%PYTHON%\\python.exe tools\\build.py --appveyor"
- cmd: exit
- cmd: if defined APPVEYOR_PULL_REQUEST_NUMBER appveyor exit 0
- cmd: curl "https://actlab.org/git-release.php?repo_name=%APPVEYOR_REPO_NAME%&tag_name=TCV-latestcommit&password=%SCRIPT_PASSWORD%"
- cmd: git tag -d TCV-latestcommit
- cmd: git push -d https://actlab-auto:%githubToken%@github.com/actlaboratory/TCV.git TCV-latestcommit
Expand All @@ -52,6 +52,7 @@ after_test:

artifacts:
- path: TCV-*.zip
- path: TCV-*.json

deploy:
- provider: GitHub
Expand All @@ -61,9 +62,11 @@ deploy:
description: 'automatic build from master branch'
auth_token:
secure: iNSx8v6c+0TP9IyckinrvNWuX+hc7SKruOqRDl9GxdX59sZ2yqB8+UDAtqdPzKIg
artifact: TCV-snapshot.zip # upload all NuGet packages to release assets
artifact: /(TCV-.*\.zip)|(TCV-.*\.json)/ # upload all NuGet packages to release assets
draft: false
prerelease: false
on:
branch: master # release from master branch only

after_deploy:
- cmd: echo import constants;print("https://actlab.org/api/addAlphaVersion?repo_name=%APPVEYOR_REPO_NAME%&commit_hash=%APPVEYOR_REPO_COMMIT%&version="+constants.APP_VERSION+"&password=%SCRIPT_PASSWORD%",end="") | C:\\Python37\python.exe | xargs -n1 curl
5 changes: 4 additions & 1 deletion constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#アプリケーション基本情報
APP_NAME="TCV"
APP_FULL_NAME = "TwitCasting Viewer"
APP_VERSION="3.1.1"
APP_VERSION="3.2.0"
APP_LAST_RELEASE_DATE = "2021-07-24"
APP_ICON = None
APP_COPYRIGHT_YEAR="2019-2021"
Expand Down Expand Up @@ -62,3 +62,6 @@
TC_CID = "1266762249164619776.c2ee817dafca62d74bbf3af6a7db1ad1c3cce334bef6e3af82c146d670f3cefe"
TC_URL = "https://apiv2.twitcasting.tv/oauth2/authorize"
TC_PORT = 9338

# URLスキーム
SCHEME_NAME = "tcv"
62 changes: 62 additions & 0 deletions customUrlScheme.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Custom URL Scheme Utility

import itertools
import logging
import sys
import traceback
import winreg

import constants
import errorCodes
import globalVars

log = logging.getLogger("%s.%s" % (constants.LOG_PREFIX, "CustomURLSchemeUtility"))

def register(scheme, application=None):
if application == None:
application = globalVars.app.getAppPath()
try:
with winreg.CreateKeyEx(winreg.HKEY_CURRENT_USER, "software\\classes\\" + scheme) as k1:
winreg.SetValueEx(k1, None, 0, winreg.REG_SZ, scheme)
winreg.SetValueEx(k1, "URL Protocol", 0, winreg.REG_SZ, "")
with winreg.CreateKeyEx(k1, "shell") as k2:
with winreg.CreateKeyEx(k2, "open") as k3:
with winreg.CreateKeyEx(k3, "command") as k4:
winreg.SetValueEx(k4, None, 0, winreg.REG_SZ, r'"%s" %%1' % application)
return True
except WindowsError as e:
log.error(traceback.format_exc())
return False

def unregister(scheme):
_deleteKeyAndSubkeys(winreg.HKEY_CURRENT_USER, "software\\classes\\" + scheme)

def isRegistered(scheme):
with winreg.OpenKey(winreg.HKEY_CURRENT_USER, "software\\classes") as k:
return scheme in _getSubKeys(k)

def _deleteKeyAndSubkeys(key, subkey):
isFinished = False
tryCount = 0
while isFinished == False and tryCount <= 10:
try:
with winreg.OpenKey(key, subkey, 0, winreg.KEY_WRITE|winreg.KEY_READ) as k:
for i in itertools.count():
try:
subkeyName = winreg.EnumKey(k, i)
except WindowsError as e:
break
_deleteKeyAndSubkeys(k, subkeyName)
winreg.DeleteKey(k, "")
isFinished = True
except Exception as e:
tryCount += 1

def _getSubKeys(key):
ret = []
for i in itertools.count():
try:
ret.append(winreg.EnumKey(key, i))
except WindowsError:
break
return ret
Binary file modified locale/en-us/LC_MESSAGES/messages.mo
Binary file not shown.
Loading

0 comments on commit b2f40dc

Please sign in to comment.