Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows build #3

Open
wants to merge 174 commits into
base: master
Choose a base branch
from
Open

Windows build #3

wants to merge 174 commits into from

Conversation

ok-sh
Copy link

@ok-sh ok-sh commented Oct 22, 2020

It didnt work an my Win10 64Bit. So we maked some changes to build bitmask on Windows 10 and adapted Readme file.
@cyBerta helped me with it.

@kalikaneko
Copy link
Member

hey @ok-sh - first of all, thanks for the pull request! it's great to have more people helping in the windows front, we really need more hands and help in there.

unfortunately, we are basing development on libraries branch nowadays (it's a branch building the frontend in Qt, linking against the go library). we're solving a couple of blockers and trying to merge into master asap. would you mind to try and see how hard is it to apply your changes on top of that branch?

the build process has changed a little bit (qmake-based, although we're still using the Makefile as the main entry point), but for what I see most of your changeset applies to setting up the build environment etc.

if you're interested in cross-build, I have some notes about the steps I did to cross-compile using mxe (needed some patches to compile Qt, but an earlier version of the libraries branch did work correctly in the end).

@ok-sh
Copy link
Author

ok-sh commented Oct 22, 2020

hey kalikaneko, thanks for the massage!
Im exited to learn more about the project and hope that ill able to do more f.E. in the windows front yes. Thank @cyBerta, i get some introduction trainings :-)

I saw now your changes in makefile on libraries branch and understand that its hard to implement my changes.
Im trying to understand the hole project at the moment and yes im interested in cross-build please send me the notes, ill check them.

@kalikaneko
Copy link
Member

kalikaneko commented Oct 23, 2020

@ok-sh I just merged into the new "main" branch. this can get you started on the direction i'm talking about

https://github.com/leapcode/bitmask-vpn/blob/main/docs/cross-compiling-with-mxe.rst

I know it can be super-awkward to develop using Makefiles in windows - i'm all ears to any other suggestion you might have. It was the easiest way for me, a linux die-hard, to get something running in windows. But it will make more sense to switch to visual studio, powershell, or any other more native tooling. I want to learn something about the WLS, but didn't started yet... :(

You can reach me on irc (#leap on freenode) for more fluent conversation.

By the way, this repo here in github is largely unattended, just a mirror for more visibility. We do everyday development in here though: https://0xacab.org/leap/bitmask-vpn

Signed-off-by: kali kaneko (leap communications) <[email protected]>
Signed-off-by: kali kaneko (leap communications) <[email protected]>
Signed-off-by: kali kaneko (leap communications) <[email protected]>
Signed-off-by: kali kaneko (leap communications) <[email protected]>
Signed-off-by: kali kaneko (leap communications) <[email protected]>
Signed-off-by: kali kaneko (leap communications) <[email protected]>
Signed-off-by: kali kaneko (leap communications) <[email protected]>
Signed-off-by: kali kaneko (leap communications) <[email protected]>
Signed-off-by: kali kaneko (leap communications) <[email protected]>
Signed-off-by: kali kaneko (leap communications) <[email protected]>
Signed-off-by: kali kaneko (leap communications) <[email protected]>
Signed-off-by: kali kaneko (leap communications) <[email protected]>
Signed-off-by: kali kaneko (leap communications) <[email protected]>
```
Build it
```
make build
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me this still not working, I've win 10 + cygwin64 getting:

$ make build
[build.sh] VENDOR_PATH = providers
[+] Using go in /cygdrive/c/dev/Go/bin/go [go version go1.15.4 windows/amd64]
[+] Building Go library with standard Go compiler
# 0xacab.org/leap/bitmask-vpn/pkg/backend
pkg\backend\init.go:108:47: undefined: bitmask.Autostart
pkg\backend\init.go:109:15: undefined: bitmask.NewAutostart
pkg\backend\init.go:112:16: undefined: bitmask.DummyAutostart
pkg\backend\status.go:46:18: undefined: bitmask.Autostart
make: *** [Makefile:94: lib/libgoshim.a] Error 2

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we rebased from main with qt implementation, its also not working for me. but im still working on this branch and heard that kali got worked main on win-10.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @kyxap - are you running from the "main" branch? this error is related to a conditional compilation that disables autostart for windows, because the library was giving some trouble.

i'm indeed using the makefile to build from a win 10 install. there might be troubles with some hardcoded paths that probably can be better autodetected, but I'll try to improve it and for sure will accept patches with any fixes.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @kalikaneko finally I was able to build. Will keep digging... thanks!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @kyxap, nice that you are able to build! Can you maybe write your compiler- and toolset here?

Copy link

@kyxap kyxap Nov 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ok-sh looks like I need add more clarification on what I meant :D
I was able to build just one bin: bitmask-connect which I can run in Win 10 and basically get vpn working thought command line without ui.

But after some changing in makefiles I was able to build: bitmask-vpn which starts as systray and actually working somehow O_o.

[EDITED] Anyway:
I'm using cygwin64 CYGWIN_NT-10.0 pc 3.1.7(0.340/5/3) 2020-08-22 17:48 x86_64 Cygwin got install file from: https://www.cygwin.com/setup-x86_64.exe

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kyxap - glad to hear!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ok-sh
FYI there MR in progress for cygwin64: https://0xacab.org/leap/bitmask-vpn/-/merge_requests/123

@kalikaneko
Copy link
Member

@ok-sh:

for the record, this is what I'm using currently - I should add this to the docs.

export PATH=/c/Qt/Qt5.14.2/5.14.2/mingw73_64/bin/:$PATH

$ qmake --version
QMake version 3.1
Using Qt version 5.14.2 in C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib

$ gcc --version
gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0

@ok-sh
Copy link
Author

ok-sh commented Nov 14, 2020

@ok-sh:

for the record, this is what I'm using currently - I should add this to the docs.

export PATH=/c/Qt/Qt5.14.2/5.14.2/mingw73_64/bin/:$PATH

$ qmake --version
QMake version 3.1
Using Qt version 5.14.2 in C:/Qt/Qt5.14.2/5.14.2/mingw73_64/lib

$ gcc --version
gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0

thank you @kalikaneko .
by me now:

Qmake version 3.1
Using Qt version 5.15.1 in C:/Qt/5.15.1/mingw81_64/lib

gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0

i think its not the problem that i have higher versions, but still have errors.. I would try to fix them with cyberta. Otherwise will continue with linux :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants