Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
bitmask-vpn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julian Merlin
bitmask-vpn
Commits
011e5944
Unverified
Commit
011e5944
authored
4 years ago
by
t h
Committed by
Kali Kaneko
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Updating makefile to support Cygwin64 for Windows users.
- Closes: #394
parent
08760e8f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+4
-0
4 additions, 0 deletions
.gitignore
Makefile
+34
-4
34 additions, 4 deletions
Makefile
README.md
+44
-6
44 additions, 6 deletions
README.md
gui/build.sh
+2
-5
2 additions, 5 deletions
gui/build.sh
with
84 additions
and
15 deletions
.gitignore
+
4
−
0
View file @
011e5944
...
...
@@ -22,3 +22,7 @@ providers/assets
.*.swp
*.exe
# IDE
.idea
.vs
This diff is collapsed.
Click to expand it.
Makefile
+
34
−
4
View file @
011e5944
...
...
@@ -20,10 +20,10 @@ TARGET_GOLIB=lib/libgoshim.a
SOURCE_GOLIB
=
gui/backend.go
# detect OS
UNAME
=
$(
shell
uname
-s
)
ifeq
($(OS), Windows_NT)
PLATFORM
=
windows
else
UNAME
=
$(
shell
uname
-s
)
PLATFORM
?=
$(
shell
echo
${
UNAME
}
|
awk
"{print tolower(
\$
$0
)
}"
)
endif
...
...
@@ -70,6 +70,13 @@ dependsDarwin:
@
brew
install
python3 golang make pkg-config curl
@
brew
install
--default-names
gnu-sed
dependsCYGWIN_NT-10.0
:
@
echo
@
echo
"==================================WARNING=================================="
@
echo
"You need to install all dependencies manually, please see README.md!"
@
echo
"==================================WARNING=================================="
@
echo
ifeq
($(PLATFORM), darwin)
EXTRA_FLAGS
=
MACOSX_DEPLOYMENT_TARGET
=
10.10
GOOS
=
darwin
CC
=
clang
else
...
...
@@ -90,6 +97,14 @@ lib/%.a: $(PKGFILES)
@
XBUILD
=
no ./gui/build.sh
--just-golib
relink_vendor
:
@
echo
"==========RELINK VENDOR=========="
@
echo
"PLATFORM:
${
PLATFORM
}
"
@
echo
"VENDOR_PATH:
${
VENDOR_PATH
}
"
@
echo
"PROVIDER:
${
PROVIDER
}
"
ifeq
($(UNAME), CYGWIN_NT-10.0)
[
-L
providers/assets
]
||
(
CYGWIN
=
winsymlinks:nativestrict
ln
-s
${
PROVIDER
}
/assets providers/assets
)
endif
ifneq
($(UNAME), CYGWIN_NT-10.0)
ifeq
($(PLATFORM), windows)
rm
-rf
providers/assets
endif
...
...
@@ -97,19 +112,29 @@ ifeq ($(VENDOR_PATH), providers)
@
unlink
providers/assets
||
true
@
ln
-s
${
PROVIDER
}
/assets providers/assets
endif
endif
@
echo
"==========RELINK VENDOR=========="
build_golib
:
lib/libgoshim.a
build_gui
:
relink_vendor
@
echo
"==========BUILD GUI=========="
@
echo
"TARGET:
${
TARGET
}
"
@
echo
"VENDOR_PATH:
${
VENDOR_PATH
}
"
@
XBUILD
=
no
TARGET
=
${
TARGET
}
VENDOR_PATH
=
${
VENDOR_PATH
}
gui/build.sh
--skip-golib
@
echo
"==========BUILD GUI=========="
build
:
build_golib build_helper build_gui
build_helper
:
@
echo
"==========BUILDER HELPER=========="
@
echo
"PLATFORM:
${
PLATFORM
}
"
@
echo
"APPNAME:
${
APPNAME
}
"
@
echo
"VERSION:
${
VERSION
}
"
@
echo
"EXTRA_GO_LDFLAGS:
${
EXTRA_GO_LDFLAGS
}
"
@
mkdir
-p
build/bin/
${
PLATFORM
}
@
go build
-o
build/bin/
${
PLATFORM
}
/bitmask-helper
-ldflags
"-X main.AppName=
${
APPNAME
}
-X main.Version=
${
VERSION
}
${
EXTRA_GO_LDFLAGS
}
"
./cmd/bitmask-helper/
@
echo
"
build helper done.
"
@
echo
"
==========BUILDER HELPER==========
"
build_openvpn
:
@
[
-f
$(
OPENVPN_BIN
)
]
&&
echo
"OpenVPN already built at"
$(
OPENVPN_BIN
)
||
./branding/thirdparty/openvpn/build_openvpn.sh
...
...
@@ -190,7 +215,7 @@ ifeq (${PLATFORM}, windows)
"c:
\w
indows
\s
ystem32
\s
igntool.exe"
sign
-f
"z:
\l
eap
\L
EAP.pfx"
-p
${
WINCERTPASS
}
build/installer/
${
APPNAME
}
-installer-
${
VERSION
}
.exe
endif
check_qtifw
:
check_qtifw
:
ifdef
HAS_QTIFW
@
echo
"[+] Found QTIFW"
else
...
...
@@ -201,9 +226,11 @@ clean:
@
rm
-rf
build/
@
unlink
branding/assets/default
||
true
########################################################################
# tests
#########################################################################
qmllint
:
@
qmllint gui/qml/
*
.qml
...
...
@@ -214,7 +241,11 @@ test_ui: build_golib
@
qmake
-o
tests/Makefile test.pro
@
make
-C
tests clean
@
make
-C
tests
ifeq
($(PLATFORM), windows)
@
./tests/build/test_ui.exe
else
@
./tests/build/test_ui
endif
#########################################################################
...
...
@@ -282,7 +313,6 @@ endif
endif
#########################################################################
# packaging action
#########################################################################
...
...
This diff is collapsed.
Click to expand it.
README.md
+
44
−
6
View file @
011e5944
Build
-----
## Build
Clone this repo, install dependencies and build the application. Dependencies
assume debian packages, or homebrew for osx. For other systems try
assume debian packages, or homebrew for osx. For
Windows OS see corresponding section below. For
other systems try
manually, or send us a patch.
```
git clone 0xacab.org
/
leap/bitmask-vpn && cd bitmask-vpn
git clone
git@
0xacab.org
:
leap/bitmask-vpn
.git
&& cd bitmask-vpn
sudo make depends
make build
```
...
...
@@ -19,8 +18,7 @@ You need at least go 1.11. If you have something older and are using ubuntu, you
For other situations, have a look at https://github.com/golang/go/wiki/Ubuntu or https://golang.org/dl/
Test
----
## Test
You can run some tests too.
...
...
@@ -30,6 +28,46 @@ You can run some tests too.
make test_ui
```
## Windows
As for now app can be build on Win OS using
`Cygwin`
terminal.
#### Precondition
You need to have installed and added to your user PATH (mentioned version tested in Win10):
1) Go (>= go1.15.4)
2) QT (>= Qt5.12.9)
3) QtIFW (>= QtIFW-4.0.0)
4) Cygwin64 (>= 2.905 64 bit)
5) Using Cygwin
`Package Select`
window install
`python3`
and
`make`
packages.
**Note:**
for #5 you don't need to add packages to PATH they will available in
`cygwin`
after installation.
#### Get Source
```
git clone git@0xacab.org:leap/bitmask-vpn.git && cd bitmask-vpn
```
#### Build
Build script uses a symbolic link in one of the stages. Unfortunately Cygwin can't create native symlink from local non
admin user due to windows security restriction. To avoid this issue we need to call next target from cygwin terminal as
Administrator. This need to be done only once.
```
bash
make relink_vendor
```
After
`relink_vendor`
use this to build the app:
```
bash
make build
```
After successful build application will be available at:
`build/qt/release/riseup-vpn.exe`
#### Test
To run tests:
```
bash
make
test
make test_ui
```
Translations
------------
...
...
This diff is collapsed.
Click to expand it.
gui/build.sh
+
2
−
5
View file @
011e5944
...
...
@@ -85,15 +85,12 @@ function renameOutput {
mv
$RELEASE
/bitmask
$RELEASE
/
$TARGET
strip
$RELEASE
/
$TARGET
echo
"[+] Binary is in"
$RELEASE
/
$TARGET
fi
if
[
"
$PLATFORM
"
==
"Darwin"
]
elif
[
"
$PLATFORM
"
==
"Darwin"
]
then
rm
-rf
$RELEASE
/
$TARGET
.app
mv
$RELEASE
/bitmask.app/
$RELEASE
/
$TARGET
.app/
echo
"[+] App is in"
$RELEASE
/
$TARGET
fi
if
[
"
$PLATFORM
"
==
"MINGW64_NT-10.0"
]
then
else
# for MINGWIN or CYGWIN
mv
$RELEASE
/bitmask.exe
$RELEASE
/
$TARGET
.exe
fi
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment