Ryan Houdek
f1663abe81
Removes getenv usage for aotir
...
We can't rely on `getenv("HOME")` always working.
Have the AOTIR code use the helper method for getting the data directory instead.
2021-04-04 21:43:14 -07:00
Ryan Houdek
8319a85524
Merge pull request #946 from Sonicadvance1/fix_eventfd
...
Fixes eventfd and eventfd2
2021-04-03 06:52:32 -07:00
Ryan Houdek
8ad45071e4
Merge pull request #945 from Sonicadvance1/fix_truncate_creat
...
Fixes truncate and creat
2021-04-03 06:47:31 -07:00
Ryan Houdek
3379f3a8f9
Fixes eventfd and eventfd2
...
glibc function signature doesn't match kernel
2021-04-03 06:46:28 -07:00
Stefanos Kornilios Mitsis Poiitidis
c76205040e
Merge pull request #944 from Sonicadvance1/fix_clock_nanosleep
...
Fixes clock_nanosleep
2021-04-03 11:09:46 +03:00
Stefanos Kornilios Mitsis Poiitidis
648ef617cf
Merge pull request #943 from Sonicadvance1/fix_fexconfig_unnamed_options
...
Fixes FEXConfig filling in unnamed options
2021-04-03 11:09:21 +03:00
Ryan Houdek
5d63dc179c
Fixes truncate and creat
...
These were using the passthrough helper which doesn't was breaking the result value
2021-04-02 20:45:33 -07:00
Ryan Houdek
858566c356
Fixes clock_nanosleep
...
glibc version behaves slightly differently than kernel
2021-04-02 20:41:04 -07:00
Ryan Houdek
fb94e62df1
Fixes FEXConfig filling in unnamed options
...
These aren't meant to be set by the user
2021-04-02 20:28:12 -07:00
Ryan Houdek
51e4fe7f0a
Fixes wrapping cmdline arguments
...
In case an application checks this
2021-04-02 20:26:28 -07:00
Ryan Houdek
6923c47a70
Fixes pselect6 signal arg pack argument
...
This doesn't exactly match the glibc call so do the syscall directly
2021-04-02 13:23:07 -07:00
Ryan Houdek
f922e6420b
Allow opening the first configuration file passed in
...
Lets us easily open any configuration file
2021-04-01 19:25:17 -07:00
Ryan Houdek
7ff06c828f
Loads default config if doesn't exist
...
Allows us to save a folder with the default if we want it
2021-04-01 19:22:53 -07:00
Ryan Houdek
be16cc1456
Fixes window ordering so popup message is visible without config open
...
This was a child of the config popup before.
Moves it to a child of the workspace instead so that if we had a load error the message is still visible
2021-04-01 19:16:03 -07:00
Ryan Houdek
59df3d13cc
Don't set up RootFS folder or inotify thread on config load failure
...
Can happen in the case that the default file tries to get loaded and doens't exist
2021-04-01 19:15:08 -07:00
Ryan Houdek
1adf518e6f
Don't try creating inotify thread twice
...
If the inotify FD is already opened then just early exit
Can happen in the case that a config tries to get opened and didn't exist
2021-04-01 19:13:43 -07:00
Ryan Houdek
68171ad9b5
Creates RootFS data folder as a user convenience
...
To make sure users don't mess this up, create the folder if it isn't found
2021-04-01 19:12:56 -07:00
Ryan Houdek
5f49b57948
Merge pull request #928 from Sonicadvance1/pthreads_threading
...
Switches FEXCore over to pthreads implementation
2021-04-01 01:15:43 -07:00
Ryan Houdek
38778953a1
Merge pull request #924 from Sonicadvance1/select_named_rootfs
...
Adds support for Named RootFS folders in FEXConfig
2021-04-01 00:32:15 -07:00
Ryan Houdek
21a364c2ad
Switches FEXCore over to pthreads implementation
...
This defaults to a pthread implementation but it can be switched over to a custom thread
handler if the frontend desires.
2021-04-01 00:31:45 -07:00
Ryan Houdek
3294cc209f
Adds support for Named RootFS folders in FEXConfig
...
Provides a drop down dialog of RootFS folders to select.
Will be empty if the user doesn't have any folders in place.
Just allowing directory paths to be inserted
Fixes #689
2021-04-01 00:15:29 -07:00
Stefanos Kornilios Mitsis Poiitidis
ae5d41e46b
Merge pull request #926 from Sonicadvance1/disable_seccomp
...
Disables seccomp
2021-04-01 10:03:36 +03:00
Ryan Houdek
1ab6726498
Moves Config directory finding to FEXCore
...
This will be necessary in the next commit
2021-03-31 23:46:07 -07:00
Ryan Houdek
fac6377ed3
Fixes a crash in openat
2021-03-31 23:37:57 -07:00
Ryan Houdek
4f3cb933cb
Fixes execve
2021-03-31 23:37:56 -07:00
Ryan Houdek
83eb7f4ad3
Return EPERM in ptrace. A Feral launcher is attempting to use this to ensure it can't ptrace.
2021-03-31 23:37:56 -07:00
Ryan Houdek
c3854c211a
Fix finding home directory when we have no environment variables.
2021-03-31 23:37:56 -07:00
Ryan Houdek
4004d5a3b7
Disables seccomp
...
FEX doesn't support seccomp in userspace and allowing these through causes chromium secure sandbox to break.
Disabling these with EINVAL allows FEX to behave as if seccomp isn't enabled in the kernel config
Necessary to get the Civ6 launcher further
2021-03-31 23:23:40 -07:00
Stefanos Kornilios Mitsis Poiitidis
942b8549c6
Docs: Add tags to the source code
2021-03-30 12:21:18 +03:00
Ryan Houdek
15dd70487f
Removes legacy difference between FEX config env variable and enum names
2021-03-29 00:26:11 -07:00
Ryan Houdek
b6c0a9f2a0
Configuration option improvements
...
This commit does three things that are bounded to each other
1) Moves configs from ConfigValues.inl to Config.json
2) Uses the json to generate a man file with the options inside of it
3) Generates the code required for FEXLoader to automatically parse defined options
Moving the configuration options to a parseable format was required to generate the man pages.
Can't really include an inl file in the man page
Man page gets generated and installed through the regular cmake install process
`man FEX` to get the man page
With this change, FEXLoader's argument parsing now will automatically be generated from the json.
This way whatever is in the json file matches what is in the man page, in the json, AND what is returned in FEXLoader --help.
It will stay in sync now.
FEXConfig is the only application that stays out of sync for now as it requires some more thought to plan out.
A minor improvement that this brings as well is that every boolean option that has a long argument also gains the inversion of that property.
aka, `--gdb` also gains `--no-gdb` The use case for this is minor but boolean arguments should always allow negated variants.
2021-03-28 23:28:41 -07:00
Ryan Houdek
650877adca
Replaces FEX's usage of classic C array element count with std::size
...
Just learned that this is a c++17 feature and it's a nice little
cleanup.
Only one remains in our codebase which can't easily be replaced
2021-03-28 05:39:35 -07:00
Ryan Houdek
432b6fccf2
Merge pull request #907 from Sonicadvance1/replace_glfw
...
Replaces FEXConfig usage of GLFW with SDL2
2021-03-27 05:53:00 -07:00
Ryan Houdek
8ebef457fc
Replaces FEXConfig usage of GLFW with SDL2
...
Sometimes GLFW3 can just consume a full CPU core, spinning on nothing.
Fixes #906
2021-03-27 05:23:58 -07:00
Ryan Houdek
51c43a0761
Adds option to disable silent logging
2021-03-26 18:00:23 -07:00
Ryan Houdek
5c624684b7
Merge pull request #887 from Sonicadvance1/FEXBashLoader
...
Adds a FEXBash helper program
2021-03-23 21:37:45 -07:00
Ryan Houdek
ef11b534ef
Adds a FEXBash helper program
...
This is a helper program to execute a bash command through FEX.
Works around an edge case of
eg:
FEXInterpreter /bin/sh -c "echo A"
versus
FEXBash "echo A"
Argument expansion ends up being a pain point
This isn't currently used but will be very shortly
2021-03-23 21:27:30 -07:00
Ryan Houdek
cd32eeb428
Adds FEXInterpreter as a build target
...
Makes it easier to have FEXInterpreter around
2021-03-23 21:27:29 -07:00
Ryan Houdek
43984c810d
Merge pull request #886 from Sonicadvance1/namespace_perm
...
Returns EPERM on clone with namespace
2021-03-23 20:56:20 -07:00
Scott Mansell
6a8f68022f
Join threads after fork.
...
Also, add some comments to document things and
rename function to be clear about it's purpose.
2021-03-24 15:41:09 +13:00
Ryan Houdek
9b35cb4408
Returns EPERM on clone with namespace
...
Notably this allows applications to work that don't require the namespace but check up front if they are able to clone with it.
Civ 6's launcher checks this as an example
2021-03-23 19:28:06 -07:00
Scott Mansell
41a1a9d400
Cleanup threads when they exit
2021-03-24 03:14:23 +13:00
Stefanos Kornilios Mitsis Poiitidis
82c2b49a2e
Merge pull request #878 from Sonicadvance1/fexconfig_actual_default
...
Changes FEXConfig to actually load default configuration
2021-03-22 18:24:57 +02:00
Ryan Houdek
91a5a625ac
Implements a couple quality of life configuration option handling
...
This takes the changes from #829 and moves it to the correct location to be picked up from any loader.
This also fixes #873 .
Expands the config paths. Anything that has ~ or is relative will be converted to an absolute path.
2021-03-21 02:25:30 -07:00
Ryan Houdek
0c48f1409e
Changes FEXConfig to actually load default configuration
...
This was previously just some default values that I put in as placeholder
Now that we actually have defaults configured somewhere, use those.
Fixed #874
2021-03-21 00:48:51 -07:00
Stefanos Kornilios Mitsis Poiitidis
d34cde12ae
Merge pull request #850 from Sonicadvance1/struct_verifier
...
libclang based Struct verifier written in python
2021-03-19 10:06:34 +02:00
Ryan Houdek
bdeefa7bf0
Merge pull request #861 from Sonicadvance1/add_version_config
...
Implements a --version argument
2021-03-18 12:39:00 -07:00
Stefanos Kornilios Mitsis Poiitidis
0106b362d6
EmulatedFiles: Lock around FDToNameMap accesses
2021-03-18 12:45:27 +02:00
Ryan Houdek
9b2bd8df28
Implements a --version argument
...
Nicer for the user to determine what their version is
2021-03-17 00:00:57 -07:00
Ryan Houdek
2a074204bc
Merge pull request #859 from Sonicadvance1/improve_fexinterpreter_msg
...
Adds an installer message to the FEXInterpreter install
2021-03-16 23:13:12 -07:00