Project setup
This commit is contained in:
commit
858974f789
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
dist/
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "simple-vpn"]
|
||||
path = simple-vpn
|
||||
url = https://codehub.onpointcoding.net/sean/simple-vpn.git
|
12
.vscode/c_cpp_properties.json
vendored
Normal file
12
.vscode/c_cpp_properties.json
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/src/intf/**"
|
||||
],
|
||||
"compilerPath": "/usr/bin/gcc",
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
67
Makefile
Normal file
67
Makefile
Normal file
@ -0,0 +1,67 @@
|
||||
cli_sourcefiles := $(shell find src/impl/cli/ -name *.c)
|
||||
gui_sourcefiles := $(shell find src/impl/gui/ -name *.c)
|
||||
daemon_sourcefiles := $(shell find src/impl/daemon/ -name *.c)
|
||||
refreshpeers_sourcefiles := $(shell find src/impl/refresh-peers/ -name *.c)
|
||||
shared_sourcefiles := $(shell find src/impl/shared/ -name *.c)
|
||||
libshared := "src/intf/"
|
||||
libappindicator := "/usr/include/libappindicator3-0.1/"
|
||||
|
||||
proj_version := $(shell cat project.json | jq .Version -r)
|
||||
|
||||
|
||||
main:
|
||||
make build-logo && \
|
||||
make build-shared && \
|
||||
make build-daemon && \
|
||||
make build-refreshpeers && \
|
||||
make build-user
|
||||
|
||||
all:
|
||||
make main
|
||||
|
||||
build-shared:
|
||||
mkdir -p dist/ && \
|
||||
mkdir -p dist/libmelonvpnshared-obj/ && \
|
||||
./scripts/gcc_multiwrap.sh -I ${libshared} -- dist/libmelonvpnshared.a dist/libmelonvpnshared-obj/ ${shared_sourcefiles}
|
||||
|
||||
build-daemon:
|
||||
mkdir -p dist/ && \
|
||||
gcc -o dist/melonvpndaemon -I ${libshared} ${daemon_sourcefiles} dist/libmelonvpnshared.a -pthread
|
||||
|
||||
build-refreshpeers:
|
||||
mkdir -p dist/ && \
|
||||
gcc -o dist/melonvpnrefreshpeers -I ${libshared} ${refreshpeers_sourcefiles} dist/libmelonvpnshared.a obj/mjson.o
|
||||
|
||||
build-user:
|
||||
mkdir -p dist/ && \
|
||||
make build-gui && \
|
||||
make build-cli
|
||||
|
||||
build-cli:
|
||||
mkdir -p dist/ && \
|
||||
gcc -rdynamic -o dist/melonvpn -I ${libshared} ${cli_sourcefiles} dist/libmelonvpnshared.a -DPROJ_VERSION=\"${proj_version}\" -ldl
|
||||
|
||||
build-gui:
|
||||
mkdir -p dist/ && \
|
||||
gcc `pkg-config --cflags gtk+-3.0` -shared -fPIC -o dist/libmelonvpngui.so -I ${libshared} -I ${libappindicator} ${gui_sourcefiles} dist/libmelonvpnshared.a `pkg-config --libs gtk+-3.0 appindicator3-0.1`
|
||||
|
||||
build-logo:
|
||||
mkdir -p dist/ && \
|
||||
cp "assets/melonvpn.svg" "dist/melonvpn.svg" && \
|
||||
cp "assets/statusmelonoff.png" "dist/statusmelonoff.png" && \
|
||||
cp "assets/statusmelonon.png" "dist/statusmelonon.png" && \
|
||||
inkscape "assets/melonvpn.svg" -o "dist/melonvpn.png" -w 128 -h 128
|
||||
|
||||
package:
|
||||
./scripts/package-melonvpn.sh && \
|
||||
./scripts/package-melonvpngui.sh
|
||||
|
||||
deb:
|
||||
make clean && \
|
||||
make all && \
|
||||
make package
|
||||
|
||||
clean:
|
||||
rm -rf dist/ && \
|
||||
rm -rf package/
|
||||
|
10
project-gui.json
Normal file
10
project-gui.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"Package": "melonvpngui",
|
||||
"Version": "1.0-1",
|
||||
"Section": "base",
|
||||
"Priority": "optional",
|
||||
"Architecture": "amd64",
|
||||
"Depends": "libappindicator3-1, melonvpn",
|
||||
"Maintainer": "MrMelon54 <github@onpointcoding.net>",
|
||||
"Description": "A GUI addon for the Melon VPN client"
|
||||
}
|
10
project.json
Normal file
10
project.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"Package": "melonvpn",
|
||||
"Version": "1.0-1",
|
||||
"Section": "base",
|
||||
"Priority": "optional",
|
||||
"Architecture": "amd64",
|
||||
"Depends": "simple-vpn",
|
||||
"Maintainer": "MrMelon54 <github@onpointcoding.net>",
|
||||
"Description": "A client for Melon VPN server"
|
||||
}
|
Loading…
Reference in New Issue
Block a user