Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Obs Studio
提交
8103457c
O
Obs Studio
项目概览
小白菜888
/
Obs Studio
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Obs Studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
8103457c
编写于
7月 18, 2020
作者:
J
Jim
提交者:
GitHub
7月 18, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3183 from derrod/disable-updater
UI: Add flag/file to disable built-in updater
上级
1fed2231
30862d75
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
1 deletion
+23
-1
UI/obs-app.cpp
UI/obs-app.cpp
+17
-1
UI/obs-app.hpp
UI/obs-app.hpp
+1
-0
UI/window-basic-main.cpp
UI/window-basic-main.cpp
+5
-0
未找到文件。
UI/obs-app.cpp
浏览文件 @
8103457c
...
@@ -79,6 +79,7 @@ bool opt_start_virtualcam = false;
...
@@ -79,6 +79,7 @@ bool opt_start_virtualcam = false;
bool
opt_minimize_tray
=
false
;
bool
opt_minimize_tray
=
false
;
bool
opt_allow_opengl
=
false
;
bool
opt_allow_opengl
=
false
;
bool
opt_always_on_top
=
false
;
bool
opt_always_on_top
=
false
;
bool
opt_disable_updater
=
false
;
string
opt_starting_collection
;
string
opt_starting_collection
;
string
opt_starting_profile
;
string
opt_starting_profile
;
string
opt_starting_scene
;
string
opt_starting_scene
;
...
@@ -1424,6 +1425,11 @@ bool OBSApp::IsPortableMode()
...
@@ -1424,6 +1425,11 @@ bool OBSApp::IsPortableMode()
return
portable_mode
;
return
portable_mode
;
}
}
bool
OBSApp
::
IsUpdaterDisabled
()
{
return
opt_disable_updater
;
}
#ifdef __APPLE__
#ifdef __APPLE__
#define INPUT_AUDIO_SOURCE "coreaudio_input_capture"
#define INPUT_AUDIO_SOURCE "coreaudio_input_capture"
#define OUTPUT_AUDIO_SOURCE "coreaudio_output_capture"
#define OUTPUT_AUDIO_SOURCE "coreaudio_output_capture"
...
@@ -2450,6 +2456,9 @@ int main(int argc, char *argv[])
...
@@ -2450,6 +2456,9 @@ int main(int argc, char *argv[])
}
else
if
(
arg_is
(
argv
[
i
],
"--allow-opengl"
,
nullptr
))
{
}
else
if
(
arg_is
(
argv
[
i
],
"--allow-opengl"
,
nullptr
))
{
opt_allow_opengl
=
true
;
opt_allow_opengl
=
true
;
}
else
if
(
arg_is
(
argv
[
i
],
"--disable-updater"
,
nullptr
))
{
opt_disable_updater
=
true
;
}
else
if
(
arg_is
(
argv
[
i
],
"--help"
,
"-h"
))
{
}
else
if
(
arg_is
(
argv
[
i
],
"--help"
,
"-h"
))
{
std
::
string
help
=
std
::
string
help
=
"--help, -h: Get list of available commands.
\n\n
"
"--help, -h: Get list of available commands.
\n\n
"
...
@@ -2467,7 +2476,8 @@ int main(int argc, char *argv[])
...
@@ -2467,7 +2476,8 @@ int main(int argc, char *argv[])
"--multi, -m: Don't warn when launching multiple instances.
\n\n
"
"--multi, -m: Don't warn when launching multiple instances.
\n\n
"
"--verbose: Make log more verbose.
\n
"
"--verbose: Make log more verbose.
\n
"
"--always-on-top: Start in 'always on top' mode.
\n\n
"
"--always-on-top: Start in 'always on top' mode.
\n\n
"
"--unfiltered_log: Make log unfiltered.
\n\n
"
;
"--unfiltered_log: Make log unfiltered.
\n\n
"
"--disable-updater: Disable built-in updater (Windows/Mac only)
\n\n
"
;
#ifdef _WIN32
#ifdef _WIN32
MessageBoxA
(
NULL
,
help
.
c_str
(),
"Help"
,
MessageBoxA
(
NULL
,
help
.
c_str
(),
"Help"
,
...
@@ -2493,6 +2503,12 @@ int main(int argc, char *argv[])
...
@@ -2493,6 +2503,12 @@ int main(int argc, char *argv[])
os_file_exists
(
BASE_PATH
"/portable_mode.txt"
)
||
os_file_exists
(
BASE_PATH
"/portable_mode.txt"
)
||
os_file_exists
(
BASE_PATH
"/obs_portable_mode.txt"
);
os_file_exists
(
BASE_PATH
"/obs_portable_mode.txt"
);
}
}
if
(
!
opt_disable_updater
)
{
opt_disable_updater
=
os_file_exists
(
BASE_PATH
"/disable_updater"
)
||
os_file_exists
(
BASE_PATH
"/disable_updater.txt"
);
}
#endif
#endif
upgrade_settings
();
upgrade_settings
();
...
...
UI/obs-app.hpp
浏览文件 @
8103457c
...
@@ -144,6 +144,7 @@ public:
...
@@ -144,6 +144,7 @@ public:
std
::
string
GetVersionString
()
const
;
std
::
string
GetVersionString
()
const
;
bool
IsPortableMode
();
bool
IsPortableMode
();
bool
IsUpdaterDisabled
();
const
char
*
InputAudioSource
()
const
;
const
char
*
InputAudioSource
()
const
;
const
char
*
OutputAudioSource
()
const
;
const
char
*
OutputAudioSource
()
const
;
...
...
UI/window-basic-main.cpp
浏览文件 @
8103457c
...
@@ -1894,6 +1894,9 @@ void OBSBasic::OBSInit()
...
@@ -1894,6 +1894,9 @@ void OBSBasic::OBSInit()
ui
->
actionUploadLastCrashLog
=
nullptr
;
ui
->
actionUploadLastCrashLog
=
nullptr
;
ui
->
menuCrashLogs
=
nullptr
;
ui
->
menuCrashLogs
=
nullptr
;
ui
->
actionCheckForUpdates
=
nullptr
;
ui
->
actionCheckForUpdates
=
nullptr
;
#elif _WIN32 || __APPLE__
if
(
App
()
->
IsUpdaterDisabled
())
ui
->
actionCheckForUpdates
->
setEnabled
(
false
);
#endif
#endif
OnFirstLoad
();
OnFirstLoad
();
...
@@ -3248,6 +3251,8 @@ void trigger_sparkle_update();
...
@@ -3248,6 +3251,8 @@ void trigger_sparkle_update();
void
OBSBasic
::
TimedCheckForUpdates
()
void
OBSBasic
::
TimedCheckForUpdates
()
{
{
if
(
App
()
->
IsUpdaterDisabled
())
return
;
if
(
!
config_get_bool
(
App
()
->
GlobalConfig
(),
"General"
,
if
(
!
config_get_bool
(
App
()
->
GlobalConfig
(),
"General"
,
"EnableAutoUpdates"
))
"EnableAutoUpdates"
))
return
;
return
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录