Commit Graph

69 Commits

Author SHA1 Message Date
TheAssassin
e9bbbc80f4 Switch to new subprocess lib in type 0 plugins, mk. 2
Apparently fixes all buffer-related crashes, but there's a few minor bugs left.

CC #143
2020-08-31 08:39:43 +02:00
TheAssassin
68f4655fc4 Add method to write from buffers to ldLog streams 2020-08-31 06:30:06 +02:00
TheAssassin
f33dc8dd34 Switch to new subprocess lib in type 0 plugins, mk. 1 2020-08-31 04:41:01 +02:00
TheAssassin
66691ee882 Add new helper class pipe reader
Implements synchronous, non-block reading from pipes.
2020-08-28 17:36:56 +02:00
TheAssassin
88dd09f2d1 Set all variables to defaults in header 2020-08-08 00:30:28 +02:00
TheAssassin
d43e8a42bf Fix whitespace 2020-08-08 00:30:28 +02:00
TheAssassin
5feef7880e Try to fix waitpid issues 2020-08-08 00:30:28 +02:00
TheAssassin
2b2c6a913f Set default value 2020-08-07 21:22:58 +02:00
TheAssassin
59a8ec41ba Replace cpp-subprocess with own linuxdeploy-subprocess 2020-08-07 21:22:58 +02:00
TheAssassin
c895a1dc59 Add kill and poll features for processes 2020-08-07 21:22:58 +02:00
TheAssassin
2425ccc832 Extract process handling into separate class
Needed for plugins' subprocess handling.
2020-08-07 21:22:58 +02:00
TheAssassin
55b2d00f23 Add reusable assert template 2020-08-07 21:22:58 +02:00
TheAssassin
e1f6da17b4 Add basic subprocess micro library
cpp-subprocess does not work when linked statically for some weird reason. Therefore, we're going to ship our own.
2020-08-07 21:22:58 +02:00
TheAssassin
557bad2241 Add --deploy-deps-only 2020-07-15 03:17:37 +02:00
TheAssassin
0f3a118687 Add param to automatically rename deployed icons
Useful e.g., when passing multiple icons with different resolutions via -i, if they have the resolution in the filename.

Also removes all traces of that appName concept that has been abandoned.
2020-06-11 21:04:33 +02:00
TheAssassin
f24c167722 Add $LINUXDEPLOY for input plugins
The input plugins can use this environment variable to call linuxdeploy themselves. This can be very handy to have it deploy additional dependencies on libraries they copy themselves.

An alternative approach is to simply use liblinuxdeploy inside the plugin, like the Qt plugin does.
2020-05-03 18:32:55 +02:00
TheAssassin
c45cd46319 Move which to utils module
Also uses the native split functionality provided by the utils module
instead of some external dependency's.

Preparation for using this method in plugins such as the Qt plugin.
2019-11-19 11:28:24 +01:00
TheAssassin
3fd595a63b Expose file copying helper in public interface 2019-08-14 01:33:09 +02:00
TheAssassin
3183ee2f4f Mark methods const where possible 2019-07-27 16:37:16 +02:00
TheAssassin
e24b46d291 Change method name to something more meaningful 2019-07-25 17:44:50 +02:00
TheAssassin
956a253428 Return final deployment path
deployFile allows for specifying a directory as destination, and copies
files into there, simulating the behavior of tools like cp. To do that,
it creates the directory, then appends the filename of the input file
to it and uses that as destination for the "copy file" call.

It's pretty handy for some applications to get the full path of the
new file returned by this method directly (doesn't have to implement
this concatenation more than once).
2019-02-06 23:23:48 +01:00
TheAssassin
028d85a070 Explicitly disable all copy/move(-assignment) behavior 2019-01-29 00:03:35 +01:00
TheAssassin
8df605cb19 Use shared pointer to manage PImpl object 2019-01-29 00:02:49 +01:00
TheAssassin
5374e7ece9 Switch to extracted desktop file library 2018-12-22 23:09:04 +01:00
TheAssassin
0b5ab2fc36 Fix return type of setter 2018-11-19 21:51:26 +01:00
TheAssassin
92a1370b30 Be able to use EXPECT_EQ with DesktopFile objects
GoogleTest internally uses operator==(first, second) instead of
first.operator==(second). By implementing the operators outside the
classes, GoogleTest can be made happy.
2018-11-15 23:36:04 +01:00
TheAssassin
1c4e4a3888 Remove redundant setters/getters 2018-11-15 20:53:16 +01:00
TheAssassin
e4bf795211 No need for a string conversion operator
Doesn't make sense here anyway.
2018-11-15 20:44:43 +01:00
TheAssassin
f7975f1b80 Use return types with guaranteed sizes
This will ensure the conversions work equally on both 32-bit platforms
(int == long on 32-bit Linux systems, on 64 bit long > int).
2018-11-15 17:19:42 +01:00
TheAssassin
fbc1d78122 Use custom exceptions for error handling 2018-11-14 10:31:41 +01:00
TheAssassin
d6e6cac6e0 Move libraries into directories following package path 2018-11-10 01:43:36 +01:00
TheAssassin
574a883733 Don't require desktop file's path to exist 2018-11-09 21:28:40 +01:00
TheAssassin
11bbe4d219 Rewrite DesktopFile using own parser 2018-11-09 16:04:40 +01:00
TheAssassin
8a2d57e8d5 Move definition of types into DesktopFile
Types will be shared with future DesktopFileWriter class.
2018-11-09 02:26:09 +01:00
TheAssassin
5ba8b613d6 Fix includes 2018-11-09 00:36:55 +01:00
Alexis López Zubieta
d9ca907da8 Add symlinkFile to the public AppDir interface (#42)
* Add symlinkFile to the public AppDir interface

* Rename AppDir::symlinkFile to AppDir::createSymlink

* change return value to bool

* Remove duplicated header

* Remove blank lines

* Add comment

* Fix test name

* Change createSymlink signature. Name changed to createRelativeSymlink and remove the useRelativePath argument

* Remove commented tests.
2018-11-05 22:10:18 +01:00
TheAssassin
542edaf410 Allow disabling copyright files deployment for debugging 2018-11-04 17:21:36 +01:00
TheAssassin
10df75f877 Extract subprocessing into separate library 2018-10-25 14:34:54 +02:00
TheAssassin
485507a2d1 Buffer subprocess communication 2018-10-07 00:05:59 +02:00
TheAssassin
0ced1390ce Improve ELF library, mk. 2 2018-08-31 17:35:45 +02:00
TheAssassin
dcf1726889 Improve ELF library, mk. 1 2018-08-31 16:48:36 +02:00
TheAssassin
276c6f2d18 Improve multiplexing of subprocess output
Setting pipes to be non-blocking now, and reading using fgets() instead
of getline(), using std::getline() to read lines after non-blocking read
from pipes.

Fixes #14
2018-08-28 22:35:05 +02:00
TheAssassin
e8dee64447 Deprecate --app-name
It's been a useful parameter, but only in some rare edge cases. Instead,
we'll focus more on desktop files, e.g., using the Icon entry contents
for (re)naming icons, etc.
2018-08-25 23:46:13 +02:00
TheAssassin
4de8b6589f Remove unused dependency libmagic
Our use of libmagic isn't very portable, and the checks aren't used
anyway. Therefore removing dependency on libmagic.

Fixes #17.
2018-08-20 23:54:35 +02:00
TheAssassin
7184bcb61d Abort if library is missing 2018-08-11 15:30:06 +02:00
TheAssassin
1c7e768b86 Provide interface to linuxdeploy_util 2018-08-03 00:56:16 +02:00
TheAssassin
bd052a5b1f Add prefix to every line in plugin output 2018-07-10 15:08:17 +02:00
TheAssassin
f06d5e5832 Store plugin name in plugin class 2018-07-10 15:06:39 +02:00
TheAssassin
df61b059d3 Force deploy libraries specified on the CLI 2018-06-30 23:27:02 +02:00
TheAssassin
77ae6072d8 Add int-type log operators 2018-06-20 21:14:30 +02:00