Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Jessica Hawkwell
/
nitrogen
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e0cb4795
authored
Mar 30, 2018
by
Jessica Hawkwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing build system
1 parent
51bf7aa2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
5 deletions
README.md
deps/CMakeLists.txt
deps/apply-patches.sh → deps/patch-resvg.sh
src/libnde/nitrogen/SettingsManager.cpp
src/libnde/nitrogen/SettingsManager.h
README.md
View file @
e0cb479
...
...
@@ -51,6 +51,7 @@ It's easy to build Nitrogen Desktop Experience.
```
console
$
git
clone https://felinewith.me/LadySerenaKitty/nitrogen.git
$
cd
nitrogen
$
git
submodule update
```
**Prep for build**
...
...
deps/CMakeLists.txt
View file @
e0cb479
cmake_minimum_required
(
VERSION 3.10
)
execute_process
(
COMMAND sh apply-patches.sh WORKING_DIRECTORY deps
)
#
execute_process(COMMAND sh apply-patches.sh WORKING_DIRECTORY deps)
find_library
(
RESVG resvg
)
if
(
NOT
${
RESVG
}
OR NOT EXISTS
${
RESVG
}
)
...
...
@@ -7,10 +7,10 @@ if(NOT ${RESVG} OR NOT EXISTS ${RESVG})
include
(
ExternalProject
)
ExternalProject_Add
(
resvg-build
GIT_SUBMODULES resvg
SOURCE_DIR resvg
/capi
PATCH_COMMAND sh ../patch-resvg.sh WORKING DIRECTORY deps
SOURCE_DIR resvg
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND
${
CARGO
}
update
CONFIGURE_COMMAND
""
#
${CARGO} update
BUILD_COMMAND
${
CARGO
}
build --release --features=cairo-backend
INSTALL_COMMAND
""
)
...
...
deps/
apply-patches
.sh
→
deps/
patch-resvg
.sh
View file @
e0cb479
#!/bin/sh
if
[
! -f resvg-patched
]
;
then
patch -ts
resvg/capi/include/resvg.h
patches/resvg-FreeBSD.diff
patch -ts
capi/include/resvg.h ../
patches/resvg-FreeBSD.diff
touch resvg-patched
echo
"ReSVG patched!"
else
...
...
src/libnde/nitrogen/SettingsManager.cpp
View file @
e0cb479
...
...
@@ -33,8 +33,29 @@
#include "SettingsManager.h"
#include <stdlib.h>
#include <regex>
namespace
nitrogen
{
SettingsManager
::
SettingsManager
()
{
paths
=
new
(
UseGC
)
std
::
vector
<
std
::
string
*>
();
paths
->
insert
(
paths
->
end
(),
std
::
string
(
"{home}/.local/etc/nitrogen"
));
paths
->
insert
(
paths
->
end
(),
std
::
string
(
"{home}/.local/share/nitrogen"
));
paths
->
insert
(
paths
->
end
(),
std
::
string
(
"/usr/local/etc/nitrogen"
));
paths
->
insert
(
paths
->
end
(),
std
::
string
(
"/usr/local/share/nitrogen"
));
for
(
std
::
vector
<
std
::
string
>::
iterator
i
=
paths
->
begin
();
i
!=
paths
->
end
();
i
++
)
{
dereference
(
i
);
}
}
void
SettingsManager
::
dereference
(
std
::
string
*
input
)
{
std
::
regex
r
(
"/
\\
{([^
\\
}]+)
\\
}/g"
);
for
(
std
::
regex_iterator
i
=
std
::
regex_iterator
(
input
->
begin
(),
input
->
end
(),
r
);
i
!=
std
::
regex_iterator
();
i
++
)
{
std
::
smatch
m
=
*
i
;
input
->
replace
(
"{"
+
m
.
str
()
+
"}"
,
getenv
(
m
.
str
()));
}
}
}
src/libnde/nitrogen/SettingsManager.h
View file @
e0cb479
...
...
@@ -36,13 +36,19 @@
#include <nde.h>
#include <jsoncpp/json/json.h>
#include <vector>
namespace
nitrogen
{
class
SettingsManager
:
public
gc
{
public
:
SettingsManager
();
private
:
std
::
vector
<
std
::
string
*>*
paths
;
std
::
string
*
dereference
(
std
::
string
*
input
);
};
}
#endif
/* SETTINGSMANAGER_H */
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment