summaryrefslogtreecommitdiff
path: root/src/main.cpp
AgeCommit message (Collapse)AuthorFilesLines
2024-04-17macOS: Create an app bundleThorbjørn Lindeijer1-0/+11
Also enable using `cpack -G DragNDrop` to create a DMG to easily drag Mana into the Applications folder. The DMG is also available as a CI artifact. The minimum deployment target has been set to 10.15, as required due to usage of std::filesystem::create_directories.
2024-04-08Fixed choosing preferred language on WindowsThorbjørn Lindeijer1-11/+32
The linker could not find _nl_locale_name_default. Maybe it could be fixed by linking to another library, but it would likely not yield the preferred behavior. Instead, we now use GetUserPreferredUILanguages to set the LANG environment variable with one or more languages and let gettext choose the best fitting available translation. Also fixed the directory from which the translations are loaded to match the installation directory,
2024-04-08Enable UTF-8 support on WindowsThorbjørn Lindeijer1-0/+3
This relies on Windows 10 version 1803 (10.0.17134.0), which is hopefully an acceptable minimum. It fixes handling of paths with special characters.
2024-04-08Compile fixes for MSYS2 UCRT64Thorbjørn Lindeijer1-2/+2
Also added instructions for installing the dependencies on MSYS2. The selection of the default language is commented out for now. It will be fixed in another change.
2024-03-02Exit with error when invalid server type is passed on CLIThorbjørn Lindeijer1-9/+14
Also made it exit with error when there is an unknown option or missing argument.
2024-03-02Added support for -y / --server-type parameterThorbjørn Lindeijer1-2/+7
Usually this would be guessed correctly by the port, but now it is also possible to just specify the server type and the port will be derived from there, unless a default port is given in the branding file. Closes #56
2024-02-19Updated PhysicsFS API usageThorbjørn Lindeijer1-1/+1
Unfortunately, since we're making a difference between config and data, and also want to know where to write screenshots, we can't get rid of PHYSFS_getUserDir entirely. We'd need a replacement to get rid of the deprecation warnings. Also removed copying of old config file at "/.tmw/config.xml".
2024-01-26Apply C++11 fixitsThorbjørn Lindeijer1-18/+18
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
2012-08-11Fixed handling of --chat-log-dir command line optionThorbjørn Lindeijer1-1/+2
It was also setting the screenshot directory. Reviewed-by: Erik Schilling
2012-01-26Updated copyrights to 2012Thorbjørn Lindeijer1-1/+1
2011-10-25Change the wrong, but mostly supported WIN32 macro to the correct _WIN32, ↵Bernd Wachter1-2/+2
enforced by -std=c++0x Reviewed-by: Thorbjørn Lindeijer
2011-06-19More C++0x Windows compilation fixes.Philipp Sehmisch1-1/+1
Another case of M_PI being no longer defined in cmath.h _MAX_PATH doesn't work anymore, but there is still MAX_PATH putenv doesn't work anymore, so I replaced it with a function from the WINApi Reviewed-by: Thorbjorn
2010-10-22Removed short forms for --localdata-dir and --chat-log-dirThorbjørn Lindeijer1-3/+3
They are more confusing than helpful. Users of these options would likely set up a shortcut or alias already anyway.
2010-10-22Fixed command line parameter '--localdata-dir'A.R. iceslice1-5/+5
Also changed '--chat-log-dir' to use -T as short form, to avoid conflict with -l option used by ManaPlus.
2010-09-25Merge branch '1.0'Thorbjørn Lindeijer1-1/+1
Conflicts: src/actorspritemanager.h src/beingmanager.cpp src/game.cpp src/gui/beingpopup.cpp src/gui/chat.cpp src/gui/chat.h src/gui/inventorywindow.h src/gui/itempopup.cpp src/gui/socialwindow.cpp src/gui/statuswindow.cpp src/gui/widgets/chattab.cpp src/gui/widgets/chattab.h src/net/tmwa/inventoryhandler.cpp src/net/tmwa/partyhandler.cpp src/party.cpp src/sound.cpp src/utils/stringutils.cpp src/utils/stringutils.h
2010-09-12Fixing command line argument for serverStefan Dombrowski1-1/+1
The short option for the server -s did not work. Reviewed-by: Thorbjorn
2010-08-15Merge branch '1.0'Chuck Miller1-20/+3
Conflicts: mana.cbp mana.files src/CMakeLists.txt src/Makefile.am src/utils/xml.cpp
2010-08-05Add better XML error logging and do some related cleanupJared Adams1-20/+3
Error details from libxml2 are no longer ignored and are properly logged now. XML initialization code is now in the XML namespace. The XML::Document constructor that took a data pointer was removed because it wasn't being used and it would make the new logging less useful (no filename). Signed-off-by: Chuck Miller
2010-05-29Precised the use of the [mana-file] in --help.Yohann Ferreira1-0/+4
Reviewed-by: Thorbjorn. Resolves: Manasource Mantis #136.
2010-05-01Add chat logging.Andrei Karas1-0/+4
Add option in players setup page. Add command line option. Signed-off-by: Jared Adams <jaxad0127@gmail.com>
2010-02-25Unbreak compile without OpenGLThorbjørn Lindeijer1-1/+2
2010-02-25Add support for platform specifig config/data directories #84Bernd Wachter1-7/+7
Reviewed-by: Jared Adams
2010-02-24Removed a bunch of short options from the command line parametersThorbjørn Lindeijer1-16/+15
They don't have to be specified, so we can leave them out for rarely used options or those for which a single character is rather unclear. Also gave them a bit nicer order, since alphabetical doesn't make much sense. Reviewed-by: Jared Adams
2010-02-24Added the possibility to pass a branding file by command line. Reviewed-by: ↵Philipp Sehmisch1-1/+10
Thorbjørn Lindeijer <thorbjorn@lindeijer.nl>
2010-02-23The crash handler only works with MinGWThorbjørn Lindeijer1-2/+2
Reviewed-by: Bernd Wachter
2010-02-23Fixed compile on WindowsThorbjørn Lindeijer1-0/+4
Reviewed-by: Bernd Wachter
2010-02-21Made tick counter and framerate limiter work during login sequenceThorbjørn Lindeijer1-1087/+17
Much code was moved from main() to the new Client::exec(). This new event loop now integrates with the Game class, so that the tick counter and framerate limiter apply universally. The Client class is also responsible for some things that used to be global variables. Mantis-issue: ...
2010-02-22Modify copyright headersFreeyorp1-1/+2
2010-02-20Just use Mana as the window title by defaultThorbjørn Lindeijer1-2/+1
The fact that it's the client is not interesting to most people.
2010-02-20License header update for The Mana ClientThorbjørn Lindeijer1-4/+3
2010-02-19Fixed a crash when trying to switch serversThorbjørn Lindeijer1-26/+13
Ownership of the charInfo global variable wasn't well defined. It was being locked, unlocked and generally modified from a lot of places, and somewhere in this mess it ended up crashing when switching servers. Now the CharHandler instances, for eAthena and manaserv respectively, own this list of characters. A new class, Net::Character wraps up the slot index in combination with the player dummy. The list is passed on to the CharSelectDialog each time it changes. Both related and unrelated cleanups were made as well. Reviewed-by: Jared Adams
2010-02-14Have -v print 'Mana client' instead of 'The Mana World'Thorbjørn Lindeijer1-1/+1
Mantis-issue: 1
2010-02-07Nicer way of indicating that we're waiting on the serverThorbjørn Lindeijer1-7/+14
No longer a dialog with an annoying progress bar (due to going back and forth), but rather a progress indicator that integrates better with the background.
2010-02-07Updated Copyright year to 2010!Bertram1-1/+1
Also added the update copyright tool from the Wormux Team. ( And not forgetting credit's due. :P )
2010-02-07Removed the no longer used progress bar and labelThorbjørn Lindeijer1-24/+3
They got replaced by the ConnectionDialog.
2010-02-07Show the "Connecting..." dialog more oftenThorbjørn Lindeijer1-0/+2
Also show it when trying to login and when getting the list of characters, both of which are situations in which we are waiting for the server to respond. I hope I got the previous state thing right.
2010-02-06Merged the Engine class into the Game classThorbjørn Lindeijer1-1/+1
There was little point in keeping the Engine class separate. It wasn't an engine at all, but only kept track of the currently active map, a job more suitable for the Game class anyway.
2010-01-28Add support for MingW crash handler; define DEBUG for debug buildsBernd Wachter1-0/+4
2010-01-21Corrected the --default option behaviour to follow --help definition.Bertram1-2/+6
The --help options tells: -D --default : Choose default character server and character The client now choose the defaulted last character entry when --default is set. The --character option still has precedence. Also added a return value to the CharSelectDialog->chooseSelected() function while on it, in case of someone willing to add errors handling at this stage.
2010-01-12Standardize header orderJared Adams1-12/+12
Also remove some extra new lines and fix eAthena's PartyTab define guards.
2010-01-10Change code styleAndrei Karas1-26/+39
2010-01-08Fix a segfault when exiting before netcode is loadedJared Adams1-1/+1
2009-12-19Fixes functionality change broke in ↵Chuck Miller1-1/+1
cbc14c8a3c6614987d2331057e114d92336cbac0, where updates are loaded even if the -d option is given
2009-12-19Added support for resources.xml from update server... Also added option to ↵Chuck Miller1-26/+1
download music optionally I had to edit the XML wrapper a bit, basicilly its constructor can now take a optional thrid arguement which will tell it to use a resman or open the file directly Also I added fallback support for the old resouce2.txt so servers don't have to upgrade if they do not want to
2009-12-19Client now returns to server selection after server disconnectionStefan Dombrowski1-11/+6
This resolves http://bugs.manasource.org/view.php?id=37
2009-12-09Unifying the default folder for screenshots and making it configurableStefan Dombrowski1-30/+38
For all operating systems screenshots are now saved in ~/Desktop. If this folder does not exist, then the user's home is used. The players can change this with the new option --screenshot-dir. This patch is for http://mantis.themanaworld.org/view.php?id=969
2009-12-06Improve keyboard accessibility of login sequenceJared Adams1-7/+7
Enter and Escape now move forward and backwards for all dialogs except ServerSelectDialog (Escape quits) and CharSelectDialog (Enter doesn't do anything special).
2009-12-04Register credentials information serviceJared Adams1-0/+6
2009-11-21Remove another support ifdefJared Adams1-4/+0
2009-11-03Remove two unneeded methods of Net::GeneralHandlerJared Adams1-1/+0