[LINUX] Add option to disable the online updater.
Add option to remove all configuration related to checking for updates online. Although it is not implemented at the moment, these options appeared on our menu `Options` > `General ...`. - Fix need of patch on #140.
This commit is contained in:
parent
dbb5914fa4
commit
060da968eb
|
@ -110,6 +110,8 @@ endif()
|
||||||
|
|
||||||
option(ENABLE_FFMPEG "Enable ffmpeg A/V recording" ${FFMPEG_DEFAULT})
|
option(ENABLE_FFMPEG "Enable ffmpeg A/V recording" ${FFMPEG_DEFAULT})
|
||||||
|
|
||||||
|
option(ENABLE_ONLINEUPDATES "Enable online update checks" ON)
|
||||||
|
|
||||||
set(LTO_DEFAULT ON)
|
set(LTO_DEFAULT ON)
|
||||||
|
|
||||||
# lto produces buggy binaries for 64 bit win32
|
# lto produces buggy binaries for 64 bit win32
|
||||||
|
@ -293,6 +295,10 @@ if(ENABLE_FFMPEG)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT ENABLE_ONLINEUPDATES)
|
||||||
|
add_definitions(-DNO_ONLINEUPDATES)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT ENABLE_FFMPEG)
|
if(NOT ENABLE_FFMPEG)
|
||||||
add_definitions(-DNO_FFMPEG)
|
add_definitions(-DNO_FFMPEG)
|
||||||
endif()
|
endif()
|
||||||
|
@ -444,7 +450,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
|
||||||
if(X86_32 OR AMD64)
|
if(X86_32 OR AMD64)
|
||||||
set(MY_C_OPT_FLAGS ${MY_C_OPT_FLAGS} -mtune=generic)
|
set(MY_C_OPT_FLAGS ${MY_C_OPT_FLAGS} -mtune=generic)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# common debug flags
|
# common debug flags
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
set(MY_C_DBG_FLAGS -ggdb3 -Og -fno-omit-frame-pointer)
|
set(MY_C_DBG_FLAGS -ggdb3 -Og -fno-omit-frame-pointer)
|
||||||
|
|
|
@ -166,6 +166,7 @@ Here is the complete list:
|
||||||
| ENABLE_LINK | Enable GBA linking functionality (requires SFML) | ON |
|
| ENABLE_LINK | Enable GBA linking functionality (requires SFML) | ON |
|
||||||
| ENABLE_LIRC | Enable LIRC support | OFF |
|
| ENABLE_LIRC | Enable LIRC support | OFF |
|
||||||
| ENABLE_FFMPEG | Enable ffmpeg A/V recording | OFF |
|
| ENABLE_FFMPEG | Enable ffmpeg A/V recording | OFF |
|
||||||
|
| ENABLE_ONLINEUPDATES | Enable online update checks | ON |
|
||||||
| ENABLE_LTO | Compile with Link Time Optimization (gcc and clang only) | ON for release build |
|
| ENABLE_LTO | Compile with Link Time Optimization (gcc and clang only) | ON for release build |
|
||||||
| ENABLE_GBA_LOGGING | Enable extended GBA logging | ON |
|
| ENABLE_GBA_LOGGING | Enable extended GBA logging | ON |
|
||||||
| ENABLE_DIRECT3D | Direct3D rendering for wxWidgets (Windows, **NOT IMPLEMENTED!!!**) | ON |
|
| ENABLE_DIRECT3D | Direct3D rendering for wxWidgets (Windows, **NOT IMPLEMENTED!!!**) | ON |
|
||||||
|
|
|
@ -3330,10 +3330,36 @@ bool MainFrame::BindControls()
|
||||||
sc->SetValidator(wxUIntValidator(&o)); \
|
sc->SetValidator(wxUIntValidator(&o)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
{
|
{
|
||||||
|
#ifndef NO_ONLINEUPDATES
|
||||||
// Online Auto Update check frequency
|
// Online Auto Update check frequency
|
||||||
getrbi("UpdateNever", gopts.onlineupdates, 0);
|
getrbi("UpdateNever", gopts.onlineupdates, 0);
|
||||||
getrbi("UpdateDaily", gopts.onlineupdates, 1);
|
getrbi("UpdateDaily", gopts.onlineupdates, 1);
|
||||||
getrbi("UpdateWeekly", gopts.onlineupdates, 7);
|
getrbi("UpdateWeekly", gopts.onlineupdates, 7);
|
||||||
|
#else
|
||||||
|
wxWindowList &children = d->GetChildren();
|
||||||
|
std::vector<wxWindow*> forDeletion;
|
||||||
|
for (wxWindowList::Node *node = children.GetFirst(); node; node = node->GetNext())
|
||||||
|
{
|
||||||
|
wxWindow *current = (wxWindow *)node->GetData();
|
||||||
|
if (dynamic_cast<wxStaticText*>(current))
|
||||||
|
{
|
||||||
|
if (((wxStaticText *)current)->GetName() == wxT("OnlineUpdates"))
|
||||||
|
forDeletion.push_back(current);
|
||||||
|
}
|
||||||
|
else if (dynamic_cast<wxRadioButton*>(current))
|
||||||
|
{
|
||||||
|
wxString tmp = ((wxRadioButton *)current)->GetName();
|
||||||
|
if (tmp == wxT("UpdateNever") ||
|
||||||
|
tmp == wxT("UpdateDaily") ||
|
||||||
|
tmp == wxT("UpdateWeekly"))
|
||||||
|
forDeletion.push_back(current);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (unsigned i = 0; i < forDeletion.size(); ++i)
|
||||||
|
{
|
||||||
|
delete forDeletion[i];
|
||||||
|
}
|
||||||
|
#endif // NO_ONLINEUPDATES
|
||||||
getrbi("PNG", captureFormat, 0);
|
getrbi("PNG", captureFormat, 0);
|
||||||
getrbi("BMP", captureFormat, 1);
|
getrbi("BMP", captureFormat, 1);
|
||||||
getsc("RewindInterval", gopts.rewind_interval);
|
getsc("RewindInterval", gopts.rewind_interval);
|
||||||
|
|
|
@ -225,7 +225,9 @@ opt_desc opts[] = {
|
||||||
BOOLOPT("General/AutoLoadLastState", "", wxTRANSLATE("Automatically load last saved state"), gopts.autoload_state),
|
BOOLOPT("General/AutoLoadLastState", "", wxTRANSLATE("Automatically load last saved state"), gopts.autoload_state),
|
||||||
STROPT("General/BatteryDir", "", wxTRANSLATE("Directory to store game save files (relative paths are relative to ROM; blank is config dir)"), gopts.battery_dir),
|
STROPT("General/BatteryDir", "", wxTRANSLATE("Directory to store game save files (relative paths are relative to ROM; blank is config dir)"), gopts.battery_dir),
|
||||||
BOOLOPT("General/FreezeRecent", "", wxTRANSLATE("Freeze recent load list"), gopts.recent_freeze),
|
BOOLOPT("General/FreezeRecent", "", wxTRANSLATE("Freeze recent load list"), gopts.recent_freeze),
|
||||||
|
#ifndef NO_ONLINEUPDATES
|
||||||
ENUMOPT("General/OnlineUpdates", "", wxTRANSLATE("Automatically check for online updates"), gopts.onlineupdates, wxTRANSLATE("never|daily|weekly")),
|
ENUMOPT("General/OnlineUpdates", "", wxTRANSLATE("Automatically check for online updates"), gopts.onlineupdates, wxTRANSLATE("never|daily|weekly")),
|
||||||
|
#endif // NO_ONLINEUPDATES
|
||||||
STROPT("General/RecordingDir", "", wxTRANSLATE("Directory to store A/V and game recordings (relative paths are relative to ROM)"), gopts.recording_dir),
|
STROPT("General/RecordingDir", "", wxTRANSLATE("Directory to store A/V and game recordings (relative paths are relative to ROM)"), gopts.recording_dir),
|
||||||
INTOPT("General/RewindInterval", "", wxTRANSLATE("Number of seconds between rewind snapshots (0 to disable)"), gopts.rewind_interval, 0, 600),
|
INTOPT("General/RewindInterval", "", wxTRANSLATE("Number of seconds between rewind snapshots (0 to disable)"), gopts.rewind_interval, 0, 600),
|
||||||
STROPT("General/ScreenshotDir", "", wxTRANSLATE("Directory to store screenshots (relative paths are relative to ROM)"), gopts.scrshot_dir),
|
STROPT("General/ScreenshotDir", "", wxTRANSLATE("Directory to store screenshots (relative paths are relative to ROM)"), gopts.scrshot_dir),
|
||||||
|
@ -350,7 +352,9 @@ opts_t::opts_t()
|
||||||
autofire_rate = 1;
|
autofire_rate = 1;
|
||||||
print_auto_page = true;
|
print_auto_page = true;
|
||||||
autoPatch = true;
|
autoPatch = true;
|
||||||
|
#ifndef NO_ONLINEUPDATES
|
||||||
onlineupdates = 1;
|
onlineupdates = 1;
|
||||||
|
#endif // NO_ONLINEUPDATES
|
||||||
// quick fix for issues #48 and #445
|
// quick fix for issues #48 and #445
|
||||||
link_host = "127.0.0.1";
|
link_host = "127.0.0.1";
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,9 @@ extern struct opts_t {
|
||||||
/// General
|
/// General
|
||||||
bool autoload_state, autoload_cheats;
|
bool autoload_state, autoload_cheats;
|
||||||
wxString battery_dir;
|
wxString battery_dir;
|
||||||
|
#ifndef NO_ONLINEUPDATES
|
||||||
int onlineupdates;
|
int onlineupdates;
|
||||||
|
#endif // NO_ONLINEUPDATES
|
||||||
long last_update;
|
long last_update;
|
||||||
wxString last_updated_filename;
|
wxString last_updated_filename;
|
||||||
bool recent_freeze;
|
bool recent_freeze;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxBoxSizer">
|
<object class="wxBoxSizer">
|
||||||
<object class="sizeritem">
|
<object class="sizeritem">
|
||||||
<object class="wxStaticText">
|
<object class="wxStaticText" name="OnlineUpdates">
|
||||||
<label>Check for updates:</label>
|
<label>Check for updates:</label>
|
||||||
</object>
|
</object>
|
||||||
<flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag>
|
<flag>wxALL|wxALIGN_CENTRE_VERTICAL</flag>
|
||||||
|
|
Loading…
Reference in New Issue