Git Product home page Git Product logo

antimicro's Introduction

antimicro

🚨 Important information 🚨

This repo is currently unmaintained. The code hasn't been updated for a while.

There is new recommended version of this app called AntiMicroX
Installers can be downloaded from release page.

In case of Windows you can just download antimicrox-x.x.x-AMD64.exe from release page

What will happen to this repo?

Old issues will be triaged/cleaned up: #350
And after releasing the last release this repo will be archived.


Old README

We've Moved!

As of May 24, 2016, antimicro has moved from https://github.com/Ryochan7/antimicro to https://github.com/AntiMicro/antimicro. Additionally, project management has passed from Travis (Ryochan7) to the AntiMicro organization due to Travis having other interests and priorities.

So, thank you for your patience as we settle in. And a special thank you to the following GitHub users who have helped us make the transition:

  • 7185
  • DarkStarSword
  • est31
  • mtdeguzis
  • qwerty12
  • WAZAAAAA0
  • zzpxyx

Description

antimicro is a graphical program used to map keyboard keys and mouse controls to a gamepad. This program is useful for playing PC games using a gamepad that do not have any form of built-in gamepad support. However, you can use this program to control any desktop application with a gamepad; on Linux, this means that your system has to be running an X environment in order to run this program.

This program is currently supported under various Linux distributions, Windows (Vista and later), and FreeBSD. At the time of writing this, antimicro works in Windows XP but, since Windows XP is no longer supported, running the program in Windows XP will not be officially supported. However, efforts will be made to not intentionally break compatibility with Windows XP.

Also, FreeBSD support will be minimal for now. I don't use BSD on a daily basis so the main support for FreeBSD is being offered by Anton. He has graciously made a port of antimicro for FreeBSD that you can find at the following URL: http://www.freshports.org/x11/antimicro/.

License

This program is licensed under the GPL v.3. Please read the gpl.txt text document included with the source code if you would like to read the terms of the license. The license can also be found online at http://www.gnu.org/licenses/gpl.txt

Download

Source code archives and Windows binaries are available from the antimicro Releases section on GitHub:

https://github.com/AntiMicro/antimicro/releases

As well as on BinTray:

https://bintray.com/antimicro/antimicro/antimicro

AntiMicro is currently in the official Fedora repository and can be installed with

$ sudo dnf install antimicro

For Debian and Debian-based distributions, such as Mint, Ubuntu, and Steam OS, please check the LibreGeek Repositories generously hosted by mtdeguzis:

http://packages.libregeek.org/

AntiMicro is currently available for Slackware via SlackBuilds, thanks to NK and Klaatu:

https://slackbuilds.org/result/?search=antimicro&sv=

Ubuntu users may also check the antimicro page on Launchpad:

Latest: https://launchpad.net/~mdeguzis/+archive/ubuntu/libregeek

Deprecated: https://launchpad.net/~ryochan7/+archive/ubuntu/antimicro

Command line

Usage: antimicro [options] [profile]

Options:
-h, --help                     Print help text.
-v, --version                  Print version information.
--tray                         Launch program in system tray only.
--no-tray                      Launch program with the tray menu disabled.
--hidden                       Launch program without the main window
                               displayed.
--profile <location>           Launch program with the configuration file
                               selected as the default for selected
                               controllers. Defaults to all controllers.
--profile-controller <value>   Apply configuration file to a specific
                               controller. Value can be a
                               controller index, name, or GUID.
--unload [<value>]             Unload currently enabled profile(s).
                               Value can be a controller index, name, or GUID.
--startSet <number> [<value>]  Start joysticks on a specific set.
                               Value can be a controller index, name, or GUID.
-d, --daemon                   Launch program as a daemon.
--log-level (debug|info)       Enable logging.
--eventgen (xtest|uinput)      Choose between using XTest support and uinput
                               support for event generation. Default: xtest.
-l, --list                     Print information about joysticks detected by
                               SDL.
--map <value>                  Open game controller mapping window of selected
                               controller. Value can be a controller index or
                               GUID.

Pre-made Profiles

There is a repository for pre-made antimicro profiles. Using a pre-made profile, you can have a controller layout that is suitable for playing a game without having to map everything yourself. It makes using antimicro really convenient. In order to use those pre-made profiles, you have to be running at least antimicro version 2.0 and antimicro must have been compiled with SDL 2 support.

https://github.com/AntiMicro/antimicro-profiles

Wiki

An effort is now being done to utilize the Wiki section on GitHub more. Please check out the Wiki at https://github.com/AntiMicro/antimicro/wiki to read various help pages that have been created. The Wiki is currently open to all GitHub users so feel free to add a new page or modify an existing page.

Build Dependencies

This program is written in C++ using the Qt framework. A C++ compiler and a proper C++ build environment will need to be installed on your system prior to building this program. Under Debian and Debian-based distributions like Ubuntu, the easiest way to get a base build environment set up is to install the meta-package build-essential. The following packages are required to be installed on your system in order to build this program:

  • g++
  • cmake
  • libqt4-dev (Qt 4 support) or qttools5-dev and qttools5-dev-tools (Qt 5 support)
  • libsdl2-dev (SDL 2) or libsdl1.2-dev (SDL 1.2)
  • libxi-dev (optional. Needed to compile with X11 and uinput support)
  • libxtst-dev (optional. Needed to compile with XTest support)
  • libX11-dev (optional when compiled with Qt 5 support)

Building under Linux

In order to build this program, open a terminal and cd into the antimicro directory. Enter the following commands in order to build the program:

cd antimicro
mkdir build && cd build
cmake ..
make
sudo make install

The installation path of antimicro can be customized by specifying the CMAKE_INSTALL_PREFIX variable while running cmake.

cmake -DCMAKE_INSTALL_PREFIX=/usr ..

This will install the antimicro executable to /usr/bin/antimicro. By default, the executable will be installed to /usr/local/bin/antimicro.

The cmake step will use pkg-config to attempt to find any SDL libraries that you have installed. The project is set up to look for a copy of SDL 2 followed by SDL 1.2. This behavior should work fine for most people. You can override this behavior by using the -DUSE_SDL_2 option when you run cmake. Using -DUSE_SDL_2=ON when you run cmake will mean that you want antimicro compiled with SDL 2 support. Using -DUSE_SDL_2=OFF when you run cmake will mean that you want antimicro compiled with SDL 1.2 support.

Here is an example of how to specify that you want antimicro to be compiled with SDL 2 support when you run qmake.

cmake -DUSE_SDL_2=ON ..

Building under Windows

Instructions provided by aybe @ https://github.com/aybe. Modified by Travis Nickles.

  • Download and install CMake: http://www.cmake.org/cmake/resources/software.html

  • You will need Qt with MinGW support: https://www.qt.io/download-open-source/. The current version of Qt that is being used to create builds is 5.6.0.

  • download SDL development package : http://www.libsdl.org/release/SDL2-devel-2.0.3-mingw.tar.gz

  • open the archive and drop the 'SDL2-2.0.3' folder in the 'antimicro' folder

  • open the project (CMakeLists.txt) in Qt Creator The CMake Wizard will appear the first time you open the project in Qt Creator.

  • Choose a Build Location. The recommendation is to create a "build" folder under the root antimicro folder and choose that for the build location.

  • In the Run CMake section, in the Arguments field, please input -DCMAKE_PREFIX_PATH=<Path to MinGW Qt install> -DCMAKE_BUILD_TYPE=Release. Replace "<Path to MinGW Qt install>" with the actual path to your Qt installation. The default path for version Qt 5.6.0 is C:\Qt\Qt5.6.0\5.6\mingw49_32.

  • Choose "MinGW Generator" for the Generator option in the Run CMake section

  • Click the Run CMake button and then click Finish

  • In the main IDE window, open the Build menu and select "Build All" (Ctrl+Shift+B)

  • The application will need SDL2.DLL. A build step has been added to CMakeLists.txt in order to automate the process. Click the "Projects" icon in the sidebar to bring up the "Build Settings" section. Within "Build Steps", click the "Details" button on the Make entry. In the expanded menu, uncheck the "all" checkbox and then check the "copy_sdl_dll" checkbox and run "Build All".

  • At this point, antimicro has been built for Windows and is runnable from Qt Creator. A couple more steps are required in order to make a distributable package.

  • Under "Build Settings", expand the Make menu and check the "install" and "install_dlls" checkboxes.

  • Under the "Build" menu in the main window, select "Run CMake" and add -DCMAKE_INSTALL_PREFIX=<DIR> option and replace <DIR> with the directory that you want to install the application. The default for me is C:\Program Files (x86)\AntiMicro\ although I use a different directory when bundling the Window version for other users.

  • Run "Build All" to have the application and required DLLs installed into the final location that will be ready for distribution.

64 bit build

  • Some additional steps are required in order to compile a 64 bit version of antimicro. The first step is to download a packaged version of Qt and MinGW compiled for 64 bit from the Qt-x64 project @ http://sourceforge.net/projects/qtx64/.

  • You will have to manually create a new Kit in Qt Creator. In the main Qt Creator window, click the "Projects" button in the sidebar to bring up the "Build Settings" page for the project. Click on the "Manage Kits" button near the top of the page. Manually add the 64 bit compiled Qt version under "Qt Versions", add the 64 bit MinGW under "Compilers", and add the 64 bit gdb.exe under "Debuggers".

  • After creating a new kit in Qt Creator, bring up the "Build Settings" page for the project. Hover over the currently selected kit name and click the arrow that appears, hover over "Change Kit" and select the proper 64 bit kit that you created earlier.

  • Perform a clean on the project or delete the build directory that CMake is using. After that, choose the "Run CMake" option under the "Build" menu entry. The arguments that you pass to CMake will have to be changed. You will have to edit -DCMAKE_PREFIX_PATH=<Path to 64 bit MinGW Qt install> variable and have it point to the 64 bit compiled version Qt. Also, make sure to add -DTARGET_ARCH=x86_64 so that CMake will use the proper SDL libraries while building the program and copy the proper Qt and SDL DLLs if you perform an install_dlls.

Building the Windows Installer Package (MSI)

(these instructions have been tested with WiX 3.8)

  • you need to have WiX installed, grab it at http://wixtoolset.org/

  • the building process relies on the WIX environment, it is recommended that you download the installer instead of the binaries as it it will set it up for you

  • if Qt Creator is running while you install or upgrade to a newer version then make sure to restart it as it will either not find that environment variable or fetch the old (incorrect) value from the previous version

  • to build the MSI package, click on the "Projects" icon in the sidebar, click the "Details" button on the make entry, uncheck all other options and check the "buildmsi" box.

  • currently it relies on INSTALL to copy files at the location they are harvested, this might change in the future

Notes about the WXS file and the building process :

  • the WXS file has been generated with WixEdit and manually modified to contain relative paths, it will only work from the 'windows' sub-folder (or any other)

  • WixCop can be run against the WXS file and it should not point out any errors as the WXS has been corrected previously with the -F switch

  • CNDL1113 warning : shortucts are advertised, left as-is as a nice feature about them is that if the program gets corrupted it will be repaired by Windows Installer, by design the shortcuts will not point to antimicro.exe as a regular LNK file

  • LGHT1073 warning : SDL2.DLL does not specify its language in the language column, not a big deal; it could be recompiled but it's pretty much a time waste as it would only prevent this warning

  • all of these warnings have been made silent through the use of command-line switches.

  • built MSI package will be placed in /windows

Testing under Linux

If you are having problems with antimicro detecting a controller or detecting all axes and buttons, you should test the controller outside of antimicro to check if the problem is with antimicro or not. The two endorsed programs for testing gamepads outside of antimicro are sdl-jstest (sdl2-jstest) and evtest. SDL 2 utilizes evdev on Linux so performing testing with older programs that use joydev won't be as helpful since some devices behave a bit differently between the two systems.

https://github.com/Grumbel/sdl-jstest/

Support

In order to obtain support, you can post an issue on the antimicro GitHub page or you can email me at [email protected]. Please include antimicro somewhere in the subject line of the email message or it might be skipped.

https://github.com/AntiMicro/antimicro

Ideas For Future Features

This section is where some of the ideas for future features for this program will be written.

  • Allow buttons to be bound to actions.
  • Use uinput by default and fallback to XTest if necessary. (MOSTLY DONE)
  • Move simulated event generation to a new thread.
  • Allow logging as long as it doesn't cause button lag.
  • Allow notes to be added to a profile in various places.

Along with this, I will put the simple mind map that I am using to write ideas for future development into the repository for this program. The mind map will include extra notes that are not available in this README. Opening the mind map will require the use of the program FreeMind which can be downloaded from http://freemind.sourceforge.net/wiki/index.php/Main_Page.

Translating

New translations as well as updates to current translations are always welcome. Please refer to https://github.com/AntiMicro/antimicro/wiki/Translating-AntiMicro

Shoutout

A big inspiration for this program was the program QJoyPad (http://qjoypad.sourceforge.net/). I was a user of the program for years and it is unfortunate that the program is no longer being maintained. The source code for QJoyPad was an invaluable resource when I made the first version of this program and the UI for this program mostly resembles QJoyPad.

Credits

Original Developer

Travis Nickles [email protected]

Contributors

Zerro Alvein aybe Jeff Backus [email protected] Arthur Moore Anton Tornqvist [email protected] mtdeguzis

Translators

VaGNaroK [email protected] - Brazilian Portuguese zzpxyx - Chinese Belleguic Terence [email protected] - French Leonard Koenig [email protected] - German phob - German tou omiya - Japanese Dmitriy Koshel [email protected] - Russian Jay Alexander Fleming [email protected] - Serbian burunduk - Ukrainian Flavio HR [email protected] - Spanish WAZAAAAA - wazaaaaa00<@>gmail<.>com - Italian

antimicro's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

antimicro's Issues

Change trigger threshold to be a delta instead of an absolute

Current implementation uses an absolute threshold, which can cause problems for those of us with 'lazy trigger finger'. A delta threshold would better accommodate this. Should we make this an additional option (i.e. absolute + delta) or a change (absolute ➑️ delta)? Hmm...

See comments in #29.

Clean up build tasks

Specifically, I want:

  • a simple build target for building the MSI
  • a simple build target for generating the Windows portable zip.

There is already a buildmsi step, so I probably just need to adjust its dependencies. The portable target should only be available when -DPORTABLE_PACKAGE=ON was specified. Is this possible with CMake?

Auto Profiles not working in Steam

Seems Antimicro can't recognize programs started via Steam as profiles don't change even when set properly in Auto Profiles.

Maybe because the programs are a sub-process of the parent Steam.exe, and as such, Antimicro can't see them initiating?

PS. Big thanks to you who are keeping Antimicro alive. Appreciated.

Controllers being listed twice

Happening at least on Windows version. Suspect it is related to SDL 2.0.4 and fix for issue #4. First step is to back the change out and rebuild with SDL 2.0.3 and retest.

Action Names for Trigger Buttons

Hello :)

Currently trying antimicro again after I haven't used it in a while and noticed there seems to be no way of naming Actions for Trigger buttons. It's possible to rename the triggers itself, but then they are for all sets. I want to give action names like they are possible for every other button.

Did I miss something or is it just not possible?

Change set/profile on key combo

Hi,

is there a function to change the set/profile manually with a button combo on the controller?

EDIT: An can I set 2 keys on one button? Like A = shift + left?

Thanks!

Allow user to merge two profiles

Allow user to merge the sets in two profiles into a single profile. User should be able to select which sets to keep from the other profile and to specify a "starting set", at which point the other sets will start.

Add a "hold + turbo" button option

Currently, turbo is disabled if the user specifies a hold assignment. Extend hold to allow turbo if held for an extended period of time.

See comments in #29.

Italian translation files

Here's my Italian translation for antimicro. It's the second most complete translation available (the Chinese one being the first, mad props to @zzpxyx, it was helpful)

http://www.mediafire.com/download/n7odcalacppigv4/antimicro_it.zip
Uploaded as an external link because I'm not sure if a commit to "share\antimicro\translations" would suffice. Contains both the .TS and .QM files.

Qt Linguist has "encoded" special characters in the .TS file like this: Β«'Β» became Β«&​a​p​o​s​;​». Hopefully it won't affect antimicro negatively.

Key Accelerators are missing (the & character before a letter to display the "underline shortcut") because I'm not very familiar on how they should be handled within translations. This is true for other translations too.

I may be credited as:
WAZAAAAA - wazaaaaa00[Γ t)gmail(dΓ²t]com - Italian
(replace the at and dot with actual symbols. GitHub removed the "greater than" and "less than" arrow symbols so I couldn't write them here)

Unfinished lines:

  • the "About" pages were left untranslated on purpose (same for every language except Chinese), those are the words of the author himself to the people after all, they're pretty long, they have changed over time and may currently be outdated
  • Smoothing (not sure which one between "Smussamento/Lisciamento/Ammorbidimento/Spianamento" would fit best. Original is still perfectly fine since it's somehow of an IT term)

Running on OSX / macOS

This has come up in e-mail, so I thought I'd document it for the future. Currently, there are no plans to support AntiMicro on OSX. I currently, don't have the hardware or the time. However, if someone would like to take this on, it would be a welcomed addition. AntiMicro should mostly compile and work on OSX. SDL and Qt both have a OSX ports. The primary issue that I can foresee is that the code to generate key presses is platform dependent. This might be a possible solution:
https://developer.apple.com/library/mac/documentation/Carbon/Reference/QuartzEventServicesRef/index.html

It was mentioned in the following Stack Overflow conversations:

AntiMicro isn't loading the last profile when "Load on Windows Start" is checked.

More specifically, the problem is that Qt5 (since 5.3) defaults to enabling SSE2 on 32-bit, and this is how the official Windows DLLs are distributed. It can be turned off when Qt5 is being built. A set of the correct Qt5.6 libs built without SSE2 should be all that's needed (it was all that was needed on the older builds too, but I was able to actually track down a set of the right libs; attempting to compile Qt5 with MinGW-w64 back then turned into a nightmare).

Auto-profile Select Setup: Modify Edit button to use Add dialog.

To make it easier to set up auto-profile selection entries, add a widget that will allow the user to select the auto-profile trigger window based on windows that are currently open.

One possibility is to allow the user to switch windows to their preferred window and switch back. We could track what windows become active during that time and they can chose based on that.

The other option, of course, is to present a list of currently open windows. This might require a little more work to tweak the current architecture.

Help with toggle a loop of keystrokes

Hi, very nice program tbh, it is really helpful but I can't seem to do what I did in other programs, wich is:

Press joypad UP one time and get as result a LOOP of:
(Toggle ON) "W" > delay x.xx > "A" > delayx.xx = WA (over and over again until I press joy UP one more time)

What I actually get is "WAAAAA..." instead of "WAWAWA...", I tried cycle, hold, release... everything. I think I'm missing something so, can anyone help me please?

Feauture: Switch Profiles with a Keyboard Hotkey(keybound Profiles)

It would be great to see this feature or maybe i'm missing something.
It's quite inconvenient to minimize a game to switch a Profile also i have come accross Situations where one Game would benefit from multiple profiles (due to limited gamepad buttons)
Switching Profiles with a Keybind would be a really welcomed feature if it's not too much to add

Some questions about the program

Hi jsbackus,

First of all, thank you for the very useful software. This helps me a lot in customizing my Xbox controller and other Xiput devices.
I got a couple questions while using antimicro:

  • RT/LT axis hold & release: I notice that the dead zone slider determines how the (mapped) key is triggered (hold/release). I often find myself not always press or release the trigger in the same way (sometime I press and release the trigger lightly and sometime I do a full pull). When the dead zone is set to minimum, I have to release the trigger all the way in order to do the release. This lead to my problem that sometimes I do a full pull but don't do fully release, then the next pull is not registered (of course because I did not release the trigger correctly). If I increase the dead zone, it leads to other problem that it requires me to pull the trigger further in order to trigger the key.
    So the question is: Is there a way to solve this? Basically, is it possible to configure in such a way that the trigger can handle both of the behaviors "nicely": light pull and strong pull (without the need of full release)? (I thought the "normal" in throttle setting could help but it seems like I misunderstood this option).
  • Advanced assignments: Is it possible to custom a button to do 2 actions "Tap&Hold" but the Hold shall cycle through some keys (like turbo mode). For example: Tap will do "R" and Hold will do "E" but keeps repeating "E" (turbo) as long as the button is held. I tried the following but it does not work (maybe I missed something):
    Cycle Reset: 0.50 seconds
    Release 0.01 -> R -> Release 0.49 -> Hold 0.49 -> Cycle -> E
  • Xinput recognition: some games detect the xinputs automatically which causes the keys (which were mapped using antimicro) and original xinputs being triggered simultaneously. Maybe it is outside antimicro scope but do you by chance know if it is possible to complete override the xinput keys. Likes, if I press X button which is mapped with E key, then only the E key is sent and not the X button event?

Hopefully you have some time for my questions, I'm very appreciate for all the things you did.

Incorporate documentation into in-app help

Wiki is fine, but user should have an active internet connection to get help. Should put together a comprehensive help system. Probably can stick with markdown and use a readily available tool to convert to HTML.

Request: XInput to DInput mapping

Hello,
I use four XBOX 360 controllers and I'm having troubles with the direct input IDs.
For example is controller 1 at direct input controller 3 and I can't find a real solution.
The JoyIds program solves my problems only partially. XInput Plus doesn't work either.
Now I want to ask, if it's possible that you add Direct Input mapping e.g. "Xinput A-button" to "Joy1 button 1".

Thank you.

Next Steps

This issue is intended for discussion of our next steps.

Revisit refreshJoysticks() and addInputDevice()

Had to back out changes to InputDaemon::addInputDevice() introduced in fd34684 because they caused issue #22. Don't fully understand why. Plus, there appears to be a lot of reused code. Should look into trying to combine the two. Perhaps refreshJoysticks() could call addInputDevice()? Anyway, question for a future time. Changes introduced in fd34684 can be switched in and out with precompiler directives at top of file.

Allow user to use regular expressions when specify auto-profile triggers

For instance, user could use standard regex when specifying window titles and glob expressions for specifying paths. Would incur a slightly larger performance hit every time user switches windows, but if they're playing a game they'll not likely switch often, and it would probably be "in the noise" compared to the cost of making a graphics-intensive game the active window.

Something to think about....

AntiMicro > 2.20.2 segfaults on Slackware >= 14.1

$ antimicro
Segmentation fault

Last version that works - 2.20.2. I've tried both 2.21 and git current but I'm getting segmentation fault with the same stacktrace:

└─$ cd /tmp
└─$ rm -rf antimicro
└─$ git clone https://github.com/AntiMicro/antimicro
...
└─$ cd antimicro/
└─$ ls
AntiMicro\ Future\ Developments.mm  Changelog       Resources.txt             other/  windows/
BuildOptions.md                     ProfileTips.md  cmake_uninstall.cmake.in  share/
CMakeLists.txt                      README.md       gpl.txt                   src/

slackware32-14.1 and qt4(-4.8.7):

export CFLAGS="-O0 -g -ggdb";
export CXXFLAGS="-O0 -g -ggdb";
mkdir -p build; cd build;
QT_SELECT=4 cmake ../;
make

└─$ export CFLAGS="-O0 -g -ggdb"; export CXXFLAGS="-O0 -g -ggdb"; mkdir -p build; cd build; QT_SELECT=4 cmake ../; make
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.25") 
-- checking for module 'sdl2'
--   found sdl2, version 2.0.4
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/libX11.so
XTest support allowed for simulating events.
Compiling with Qt4 support
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt4: /usr/bin/qmake (found version "4.8.7") 
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/antimicro/build
[  0%] Generating qrc_resources.cxx
[  0%] Generating src/moc_mainwindow.cxx
[  0%] Generating src/moc_joybuttonwidget.cxx
[  0%] Generating src/moc_joystick.cxx
[  1%] Generating src/moc_joybutton.cxx
[  1%] Generating src/joybuttontypes/moc_joygradientbutton.cxx
[  1%] Generating src/moc_inputdaemon.cxx
[  2%] Generating src/moc_joyaxis.cxx

...

[ 30%] Generating src/eventhandlers/moc_xtesteventhandler.cxx
[ 31%] Generating ui_mainwindow.h
[ 31%] Generating ui_axiseditdialog.h
/tmp/antimicro/src/axiseditdialog.ui: Warning: Z-order assignment: '' is not a valid widget.
/tmp/antimicro/src/axiseditdialog.ui: Warning: Z-order assignment: 'verticalSpacer' is not a valid widget.
/tmp/antimicro/src/axiseditdialog.ui: Warning: Z-order assignment: 'verticalSpacer_2' is not a valid widget.
[ 31%] Generating ui_advancebuttondialog.h
/tmp/antimicro/src/advancebuttondialog.ui: Warning: Z-order assignment: 'verticalSpacer_5' is not a valid widget.
/tmp/antimicro/src/advancebuttondialog.ui: Warning: Z-order assignment: '' is not a valid widget.
/tmp/antimicro/src/advancebuttondialog.ui: Warning: Z-order assignment: 'verticalSpacer_6' is not a valid widget.
/tmp/antimicro/src/advancebuttondialog.ui: Warning: Z-order assignment: 'verticalSpacer_2' is not a valid widget.
/tmp/antimicro/src/advancebuttondialog.ui: Warning: Z-order assignment: '' is not a valid widget.
/tmp/antimicro/src/advancebuttondialog.ui: Warning: Z-order assignment: 'verticalSpacer' is not a valid widget.
/tmp/antimicro/src/advancebuttondialog.ui: Warning: Z-order assignment: '' is not a valid widget.
/tmp/antimicro/src/advancebuttondialog.ui: Warning: Z-order assignment: 'verticalSpacer_4' is not a valid widget.
/tmp/antimicro/src/advancebuttondialog.ui: Warning: Z-order assignment: '' is not a valid widget.
[ 31%] Generating ui_aboutdialog.h
[ 32%] Generating ui_setaxisthrottledialog.h
[ 32%] Generating ui_buttoneditdialog.h
[ 32%] Generating ui_joycontrolstickeditdialog.h
[ 33%] Generating ui_advancestickassignmentdialog.h
[ 33%] Generating ui_dpadeditdialog.h
[ 33%] Generating ui_quicksetdialog.h
[ 33%] Generating ui_mousesettingsdialog.h
[ 34%] Generating ui_joystickstatuswindow.h
[ 34%] Generating ui_qkeydisplaydialog.h
[ 34%] Generating ui_gamecontrollermappingdialog.h
[ 35%] Generating ui_mainsettingsdialog.h
[ 35%] Generating ui_setnamesdialog.h
[ 35%] Generating ui_addeditautoprofiledialog.h
[ 35%] Generating ui_editalldefaultautoprofiledialog.h
[ 36%] Generating ui_extraprofilesettingsdialog.h
[ 36%] Generating ui_capturedwindowinfodialog.h
/tmp/antimicro/src/capturedwindowinfodialog.ui: Warning: Z-order assignment: '' is not a valid widget.
Scanning dependencies of target antimicro
[ 37%] Building CXX object CMakeFiles/antimicro.dir/src/main.cpp.o
[ 37%] Building CXX object CMakeFiles/antimicro.dir/src/mainwindow.cpp.o
[ 37%] Building CXX object CMakeFiles/antimicro.dir/src/joybuttonwidget.cpp.o
[ 37%] Building CXX object CMakeFiles/antimicro.dir/src/joystick.cpp.o
[ 38%] Building CXX object CMakeFiles/antimicro.dir/src/joybutton.cpp.o

...

[ 97%] Building CXX object CMakeFiles/antimicro.dir/src/moc_x11extras.cxx.o
[ 98%] Building CXX object CMakeFiles/antimicro.dir/src/moc_qtx11keymapper.cxx.o
[ 98%] Building CXX object CMakeFiles/antimicro.dir/src/moc_unixcapturewindowutility.cxx.o
[ 98%] Building CXX object CMakeFiles/antimicro.dir/src/moc_autoprofilewatcher.cxx.o
[ 98%] Building CXX object CMakeFiles/antimicro.dir/src/moc_capturedwindowinfodialog.cxx.o
[100%] Building CXX object CMakeFiles/antimicro.dir/src/eventhandlers/moc_xtesteventhandler.cxx.o
[100%] Building CXX object CMakeFiles/antimicro.dir/qrc_resources.cxx.o
Linking CXX executable bin/antimicro
[100%] Built target antimicro
└─$ cd bin/
└─$ ./antimicro 
Segmentation fault

$ gdb ./antimicro

└─$ gdb ./antimicro
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-slackware-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tmp/antimicro/build/bin/antimicro...done.
(gdb) r
Starting program: /tmp/antimicro/build/bin/./antimicro 
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
Traceback (most recent call last):
  File "/usr/share/gdb/auto-load/usr/lib/libgobject-2.0.so.0.3600.4-gdb.py", line 9, in <module>
    from gobject import register
  File "/usr/share/glib-2.0/gdb/gobject.py", line 3, in <module>
    import gdb.backtrace
ImportError: No module named backtrace

Program received signal SIGSEGV, Segmentation fault.
0x080c8bc6 in QBasicAtomicInt::ref (this=0x0) at /usr/lib/qt/include/QtCore/qatomic_i386.h:120
120                  : "memory");
(gdb) thread apply all backtrace

Thread 1 (Thread 0xb67f4980 (LWP 504)):
#0  0x080c8bc6 in QBasicAtomicInt::ref (this=0x0)
    at /usr/lib/qt/include/QtCore/qatomic_i386.h:120
#1  0x080c8d12 in QString::QString (this=0x82d32d0 <X11Extras::mouseDeviceName>, other=...)
    at /usr/lib/qt/include/QtCore/qstring.h:726
#2  0x0820676c in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)
    at /tmp/antimicro/src/x11extras.cpp:32
#3  0x0820691b in _GLOBAL__sub_I__ZN9X11Extras15mouseDeviceNameE ()
    at /tmp/antimicro/src/x11extras.cpp:864
#4  0x082299cd in __do_global_ctors_aux ()
#5  0x080c1c00 in _init ()
#6  0xb7fdc488 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

slackware64-current and qt5(-5.6.1):

└─$ export CFLAGS="-O0 -g -ggdb"; export CXXFLAGS="-O0 -g -ggdb"; mkdir -p build; cd build; cmake ../; make
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'sdl2'
--   Found sdl2, version 2.0.4
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so                                    
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found                            
-- Looking for gethostbyname                                                                                 
-- Looking for gethostbyname - found                                                                         
-- Looking for connect                                                                                       
-- Looking for connect - found                                                                               
-- Looking for remove                                                                                        
-- Looking for remove - found                                                                                
-- Looking for shmat                                                                                         
-- Looking for shmat - found                                                                                 
-- Looking for IceConnectionNumber in ICE                                                                    
-- Looking for IceConnectionNumber in ICE - found                                                            
-- Found X11: /usr/lib64/libX11.so                                                                           
XTest support allowed for simulating events.
Compiling with Qt5 support
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/antimicro/build
Scanning dependencies of target antimicro_automoc

...

[ 98%] Building CXX object CMakeFiles/antimicro.dir/qrc_resources.cpp.o
[100%] Building CXX object CMakeFiles/antimicro.dir/antimicro_automoc.cpp.o
[100%] Linking CXX executable bin/antimicro
[100%] Built target antimicro
└─$ gdb ./antimicro
GNU gdb (GDB) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-slackware-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./antimicro...done.
(gdb) r
Starting program: /tmp/antimicro/build/bin/antimicro 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00000000004af56a in QGenericAtomicOps<QBasicAtomicOps<4> >::load<int> (
    _q_value=@0x0: <error reading variable>) at /usr/include/qt5/QtCore/qgenericatomic.h:83
83              return _q_value;
(gdb) thread apply all backtrace

Thread 1 (Thread 0x7ffff7f9d740 (LWP 5450)):
#0  0x00000000004af56a in QBasicAtomicInteger<int>::load() const (_q_value=@0x0: <error reading variable>)
    at /usr/include/qt5/QtCore/qgenericatomic.h:83
#1  0x00000000004af56a in QBasicAtomicInteger<int>::load() const (this=0x0)
    at /usr/include/qt5/QtCore/qbasicatomic.h:116
#2  0x00000000004aebd8 in QtPrivate::RefCount::ref() (this=0x0) at /usr/include/qt5/QtCore/qrefcount.h:49
#3  0x00000000004aef81 in QString::QString(QString const&) (this=0x8efcc0 <X11Extras::mouseDeviceName>, other=...) at /usr/include/qt5/QtCore/qstring.h:890
#4  0x0000000000616001 in __static_initialization_and_destruction_0(int, int) (__initialize_p=1, __priority=65535) at /tmp/antimicro/src/x11extras.cpp:32
#5  0x00000000006161ed in _GLOBAL__sub_I_x11extras.cpp(void) () at /tmp/antimicro/src/x11extras.cpp:864
#6  0x000000000063b3c6 in __do_global_ctors_aux ()
#7  0x0000000000000000 in  ()
(gdb) 

[Key not natively supported]: "Γ±"

I noticed that, apparently, the "Γ±" key, available in Spanish keyboards (as in "espaΓ±ol") is not natively supported by AntiMicro

When I press that key within KeyChecker, I get the following:

Event Handler:        XTest
Native Key Value:     0xf1
Qt Key Value:         0xd1
antimicro Key Value:  0x0

Here is a screenshot of my KeyChecker
antimicro-key not detected

I'd like to add that the key is recognized and works just fine.

On/Off Switch

Was wondering if its possible to map a switch so the key is pressed once when its on the on position and off position

AntiMicro under Wine

The Windows version of AntiMicro more or less works under wine with one exception: due to a bug? deficiency? in how Wine handles controllers, each controller will get listed twice - once with (js) inserted into the name and once with (event) inserted into the name. More information can be found here (see comments section)

Also, Wine doesn't appear to properly handle USB controller insertion at the moment nor does the installer work.

As these are issues with Wine itself, we won't be addressing them. I'm creating this issue for documentation purposes.

The recommended way around this is to use the native version for your platform (i.e. Linux).

Necessity of a 64bit Windows version?

I wasn't part of the original conversation, so please forgive my ignorance, but are there any situations where a 64bit Windows version is required? I understand the need on Linux, since multilib isn't free. But, to my knowledge, there isn't a big difference between 32bit applications and 64bit applications, as long as you don't need the extra resources. I'm willing to support a 64bit version if there is a legitimate requirement for it. If not, then I'd like to reduce the number of build permutations.... Thoughts?

Document setting up build environment under Wine

Verified under a 32bit prefix. Should work fine under 64bit? Need to check... Qt, CMake, and SDL install fine without any hackery. WIX, however, requires .NET. WIX 3.10 requires both 3.5.1 (sp1?) and 4.0, so install both...

Requirements:

  1. Wine
  2. winetricks (https://wiki.winehq.org/Winetricks)
  3. Setup files, as listed in the Readme. (i.e. Qt, SDL, CMake, WIX)

Setup Steps:

  1. Create a new 32bit prefix. On 64bit machines, will need to do: WINEPREFIX=/some/dir WINEARCH=win32 wine wineboot
  2. Install .NET 3.5 sp1 and corefonts: WINEPREFIX=/some/dir winetricks dotnet35sp1 corefonts
  3. Install .NET 4: WINEPREFIX=/some/dir winetricks dotnet40
  4. Follow Readme.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.