Commit Graph

932 Commits

Author SHA1 Message Date
Thierry Crozat
62957b38ac CMD: Handle --game=<ID> for --detect and --auto-detect
The README and command line help indicated this should work,
but this was not implemented.
2017-08-06 19:14:13 +01:00
Thierry Crozat
8e5b8510c8 CMD: Improve warnings for --detect and --add when no game is found 2017-08-06 19:14:13 +01:00
Tobia Tesan
78253e38d1 CMD: Print full path information for --detect 2017-08-06 19:14:13 +01:00
Tobia Tesan
31c541beda CMD: Update error codes in case of autodetector error 2017-08-06 19:14:13 +01:00
Tobia Tesan
426ec1f989 CMD: Add --recursive option for adding & detection
New semantics is as follows:

[-p <dir>] --add                 adds all games in <dir> or
                                 working dir

[-p <dir>] --detect              enumerates dectected games in
                                 <dir> with their ids

[-p <dir>] --game <id> --add     adds just game <id> if found
                                 in <dir> and not already added

[-p <dir>] --recursive --add     adds all games in <dir> and
                                 subdirs if not already added

[-p <dir>] --recursive --game <id> --add
                                 adds just game <id> if found
                                 in <dir> or its subdirs and
                                 not already added

[-p <dir>] --recursive --detect  enumerates games in <dir>
                                 and subdirs

[-p <dir>] --auto-detect         launches the first game
                                 found in <dir>

[-p <dir>] --recursive --auto-detect
                                 displays error message

The reason for the displaying an error message when attempting to do
autodetection on a whole tree is mainly one of UX, IMO it *might* get
confusing on a sufficiently large/deep tree.
The relevant if() can be removed safely if it's concluded that's not the
case.
2017-08-06 19:14:13 +01:00
Tobia Tesan
c3058ad0ee CMD: Fix batch adding of games
This implements the behaviour as discussed in PR926:
https://github.com/scummvm/scummvm/pull/926#discussion_r126132411

Essentially:

[-p <dir>] --add                adds all games in <dir> or working dir
[-p <dir>] --detect             enumerates dectected games with their
ids
[-p <dir>] --game <id> --add    adds just game <id>
2017-08-06 19:14:13 +01:00
Eugene Sandulenko
940b2a20f1 Revert "COMMON: Change way the Singleton instances are instantiated"
This reverts commit eefa72afa1.

With this patch ConfigManager is broken.
2017-07-10 21:17:41 +02:00
Thierry Crozat
eefa72afa1 COMMON: Change way the Singleton instances are instantiated
This fixes tons of warnings with clang from a recent xcode version on
macOS (and possibly other systems) complaining that an instantiation
of _singleton is required but no definition is available.
2017-07-10 21:11:20 +02:00
Thierry Crozat
ee0ac26621 BASE: Fix auto-detect command to detect and start game
There were several issues.

The first one was introduced recently and caused the preferred target
to be used as a game ID, which resulted in an error when this is not
a valid game ID. Thus this fixes bug #9754.

The other issues were here since the auto-detect command was added and
caused other command line options, suh as the path, to be lost. This
usually resulted in a failure to start the game as the data files could
not be found (unless the ID happened to be the same name as a target
previously added). This also caused a reappearance of the old bug
2017-05-03 00:17:16 +01:00
Thierry Crozat
ae8944e104 BASE: Improve error handling when detecting games 2017-04-24 20:04:05 +01:00
Thierry Crozat
5d91efa74d BASE: Check scanf return value when adding a game 2017-04-24 20:04:05 +01:00
yinsimei
28ab63136a CMD: Detect and add game(s) with commandline
This implements feature request #7885
2017-04-23 21:52:19 +01:00
Thierry Crozat
7caeb60350 BASE: Ignore -NSDocumentRevisionDebugMode command line argument on OS X
This is automatically added by Xcode when not toggling off the
"Allow debugging when using document Versions Browser". Since
this is on by default, and to avoid everybody having to google it,
I have decided to just ignore it on OS X.
2017-02-06 21:54:50 +00:00
Thierry Crozat
577e189a37 BASE: Auto-detect now starts the first game found 2016-11-07 19:29:53 +00:00
Thierry Crozat
6d2fd12bb4 BASE: Clarify how to specify a path in help for the auto-detect command 2016-10-29 23:41:21 +01:00
Thierry Crozat
5fd376d020 BASE: Auto-detect option now uses the specified path 2016-10-29 17:56:47 +01:00
iskrich
d65f2b3821 BASE: Formatting code 2016-10-29 17:56:47 +01:00
iskrich
598407a425 BASE: Add --auto-detect command
Allows to display games in the current directory that are compatible with ScummVM.

This option enables the user to find games in the directory from which ScummVM was launched. In terminal it looks like:

--------------------------------------------------------------------------------------

$ scummvm --auto-detect

ID                   Description
-------------------- ---------------------------------------------------------
drascula             Drascula: The Vampire Strikes Back (DOS/English)
queen                Flight of the Amazon Queen (Talkie/DOS/English)

--------------------------------------------------------------------------------------

The current directory is defined as dir(".") then using EngineMan.detectGames to recognise games.
2016-10-29 17:56:47 +01:00
Thierry Crozat
3ae52a61af COMMON: Add referencing and destruction of the OSDMessageQueue instance
Registering the OSDMessageQueue instance as an event source is now done
right after the event manager is initialised. This ensures that it is created in a
sensible place and not for example in another thread). Also registering the
event source is moved to a separate function instead of being in the constructor
to remove any issue in case some code tries to display a OSD Message very early
on (the instance would be created then, but it would be registered as an event
source later).
2016-10-29 15:13:32 +01:00
Eugene Sandulenko
047e0b9f84 BASE: Add command line for specifyong Director start movie 2016-10-24 10:56:40 +02:00
Eugene Sandulenko
e8b70a4686 ALL: Fix compilation with disabled cloud but enabled libcurl 2016-10-17 18:55:22 +02:00
Thierry Crozat
3e08c33c35 GUI: Add checkbox and config option to enable/disable graphics filtering 2016-10-13 01:45:01 +01:00
Eugene Sandulenko
355c4fa646 JANITORIAL: Remove more trailing spaces 2016-10-09 15:02:02 +02:00
Eugene Sandulenko
53790e7497 RELEASE: This is 1.10.0git 2016-09-26 20:57:54 +02:00
Eugene Sandulenko
4af0bc4924 AMIGAOS: Amiga needs date in specific format in version cookie. Now AmiUpdate works 2016-09-10 22:19:32 +02:00
Alexander Tkachev
b180c73675 CLOUD: Do some refactoring/cleanup
Nothing really major.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
3da38ca60b CLOUD: Replace USE_CLOUD with USE_LIBCURL
In most cases that's the right one to check. USE_CLOUD is defined when
either USE_LIBCURL or USE_SDL_NET are, which means if there is no curl,
USE_CLOUD still could be defined and linking errors would appear.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
0af97e59bc CLOUD: Add LocalWebserver
Available as LocalServer singleton. It's being started and stopped by
StorageWizardDialog. It doesn't handle clients yet, though.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b3bf532211 CLOUD: Make CloudManager singleton
It's needed to ::destroy() it in main().
2016-08-24 16:07:55 +06:00
Alexander Tkachev
1f974a7a2a CLOUD: Fix ConnectionManager's destructor
It now terminates active Requests.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
4e7dec5500 CLOUD: Add DropboxCreateDirectoryRequest
Also add CloudManager::testFeature(), because syncSaves() now works fine
and I don't want to break it again and again with my testing requests.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e743a65636 CLOUD: Add Dropbox into CloudManager's configs
This commit adds:
* ConfMan's new "cloud" domain;
* CloudManager's init() method, where it loads keys from "cloud" configs
domain;
* CurlJsonRequest's addHeader() and addPostField() methods;
* temporary Storage's printInfo() method;
* DropboxStorage's implementation of printInfo(), which is using access
token and user id;
* DropboxStorage's loadFromConfig() static method to load access token
and user id from configs and create a Storage instance with those;
* temporary DropboxStorage's authThroughConsole() static method, which
guides user through auth process from the console.

So, in CloudManager's init() implementation ScummVM checks that there is
"current_storage_type" key in "cloud" domain of configs, and loads
corresponding storage if there is such key.

If there is no such key, ScummVM offers user to auth with Dropbox.
That's done through console, and thus it's temporary (it also requires
restarting ScummVM twice and manually editing config.ini file).
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b272bba751 CLOUD: Do minor fixes 2016-08-24 16:07:55 +06:00
Alexander Tkachev
fade746f37 CLOUD: Add USE_CLOUD feature
Adds USE_CLOUD in both configure and create_project.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ca2eeb2214 CLOUD: Add Cloud::Manager and Cloud::Storage
This commit introduces Common::CloudManager, which can be accessed from
OSystem.

The backend for this manager is Cloud::Manager (defined in
backends/cloud/manager.h). It should load all users storages from
configs and provide access to current Storage instance. For now it just
creates a new one.

Cloud::Storage (backends/cloud/storage.h) provides an API to interact
with cloud storage, for example, create new directory or sync files.
Right now it's not ready and has only two dummy methods: listDirectory()
and syncSaves().

There is Cloud::Dropbox::DropboxStorage backend
(backends/cloud/dropbox/dropboxstorage.h) for Cloud::Storage. Right now
it implements both listDirectory() and syncSaves() with starting timer
task and handling it by printing out some JSON examples.
2016-08-24 16:05:07 +06:00
Alexander Tkachev
7446ffd73b CLOUD: Integrate CloudThread into OSystem
Would be changed soon.
2016-08-24 16:05:07 +06:00
Alexander Tkachev
8429c40362 CLOUD: Add SimpleJSON library as Common::JSON
This commit also adds CloudThread class, which work() method is called
every second by TimerManager.

Right now it prints JSON examples on the console, so that's why it's
introduced with SimpleJSON library.
2016-08-24 16:05:07 +06:00
Eugene Sandulenko
0fdab36710 COMMON: Introduce --debug-channels-only command line flag.
Many of our systems currently generate significant amount of debug
output on deeper levels. Now, when your engine is using Debug Channels,
you might want to show that debug information only, which is currently
not possible, as the generic output will be mixed in your output.

Alternative solution would be to implement possibility to specify
per-channel debug levels.
2016-08-13 21:07:43 +02:00
Ori Avtalion
4d120800fa ALL: Don't use 'defined' in macro definitions
This is undefined behavior and clang warns about it.
See <http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160118/147239.html>.
2016-07-23 16:18:51 +03:00
Hubert Maier
866f8ede2d BASE: Fix Typo 2016-07-03 23:12:07 +03:00
Bastien Bouclet
8294d55a53 BASE: Allow setting the debug flags from the configuration file
Useful for devices where passing command line arguments is not possible.
2016-06-05 11:49:40 +02:00
Eugene Sandulenko
97a2a9c622 Merge pull request #710 from vandalo/master
COMMON: Fix wrong warning message
2016-05-16 10:18:00 +02:00
Eugene Sandulenko
2cd0a99e2b Merge pull request #745 from Cruel/3ds
3DS: New Backend
2016-05-16 10:05:00 +02:00
vandalo
a406ce6d55 COMMON: Fix wrong error message
The error message was not correct.

When you add a game data dir to launcher and after do this
rename game data dir the error was wrong.
It said that the "path wasn't a directory",
the expected error message was
"Path does not exists" because we had changed.

How to solve this:
We split in two the validation of the path, first
we check if it's a existing path and then if the path is a directory.

if (!dir.exists())
	err = Common::kPathDoesNotExist;
else if (!dir.isDirectory())
	err = Common::kPathNotDirectory;

Solve Bug: 6765 Wrong error code if directory missing
2016-04-16 17:59:20 +02:00
Thomas Edvalson
e2b9572a83 3DS: Initial commit 2016-04-06 02:12:02 -04:00
Eugene Sandulenko
17a8f0badd UPDATES: Plug updates dialog in.
Launched when ScummVM is run first time with updates feature.
2016-03-30 10:58:57 +02:00
Johannes Schickel
5336882555 Merge pull request #704 from lordhoto/clone2727-audiocd
Implement Custom Audio CD Support for Win32, Linux, and Mac OS X.
2016-03-21 01:48:38 +01:00
Thierry Crozat
4cb5c81192 BASE: Ignore -psn command line argument on OS X
Prior to OS X 10.9, the OS was passing the process serial number
as an additional argument on OS X when starting an application bundle.
For whatever reason, when compiling with SDL 1.2 this gets suppressed
before getting to the place where we handle command line arguments.
But when compiling with SDL2 this additional argument remains so we
need to ignore it to avoid erroring out.
2016-03-13 21:51:49 +00:00
Matthew Hoops
1626fbd633 BACKENDS: Allow for specifying a drive via the cdrom option 2016-03-13 13:57:01 +01:00
Eugene Sandulenko
0930018045 RELEASE: This is 1.9.0git 2016-02-05 23:31:25 +01:00