HelloZeroNet / ZeroNet

ZeroNet - Decentralized websites using Bitcoin crypto and BitTorrent network
https://zeronet.io
Other
18.3k stars 2.26k forks source link

Compile Zeronet need help #2046

Open corsairs opened 5 years ago

corsairs commented 5 years ago

I use this code and I can not. https://github.com/HelloZeroNet/ZeroBundle/blob/master/compile/compile_win.cmd

  1. The first reason is probably not enough dependencies.
  2. The second problem is how you put verpatch.exe and ResourceHacker.exe where you downloaded it
  3. The third problem is what is pvk password?

What am I doing wrong?

F:\ZeroNet-git\ZeroBundle\compile>C:\Python27\scripts\pyinstaller.exe zeronet_win.spec -y
61 INFO: PyInstaller: 3.4
61 INFO: Python: 2.7.16
62 INFO: Platform: Windows-10-10.0.17763
62 INFO: UPX is not available.
68 INFO: Extending PYTHONPATH with paths
['F:\\ZeroNet-git\\ZeroBundle\\compile']
69 INFO: checking Analysis
69 INFO: Building Analysis because Analysis-00.toc is non existent
69 INFO: Initializing module dependency graph...
72 INFO: Initializing module graph hooks...
75 INFO: Analyzing hidden import 'win32file'
76 INFO: Analyzing hidden import 'resource'
78 **ERROR**: Hidden import 'resource' not found
78 INFO: Analyzing hidden import 'gevent'

5446 INFO: Analyzing hidden import '__phello__.foo'
5447 **ERROR**: Hidden import '__phello__.foo' not found
5447 INFO: Analyzing hidden import 'bsddb.dbobj'

5835 INFO: Analyzing hidden import 'email.mime.multipart'
5836 INFO: Analyzing hidden import 'email.mime.text'
5838 INFO: Analyzing hidden import 'gevent.aresd'
5838 **ERROR**: Hidden import 'gevent.aresd' not found
5839 INFO: Analyzing hidden import 'gevent.backdoor'
6913 INFO: Analyzing hidden import 'gevent.corecextd'
6914 **ERROR**: Hidden import 'gevent.corecextd' not found
6914 INFO: Analyzing hidden import 'gevent.coros'
6914 **ERROR**: Hidden import 'gevent.coros' not found
6914 INFO: Analyzing hidden import 'gevent.pywsgi'
6984 INFO: Analyzing hidden import 'gevent.wsgi'
6984 **ERROR**: Hidden import 'gevent.wsgi' not found
6984 INFO: Analyzing hidden import 'gevent._semaphored'
6986 **ERROR**: Hidden import 'gevent._semaphored' not found
6986 INFO: Analyzing hidden import 'hotshot.log'
7019 INFO: Analyzing hidden import 'hotshot.stats'
7023 INFO: Analyzing hidden import 'hotshot.stones'
7036 INFO: Analyzing hidden import 'json.decoder'
7092 INFO: Analyzing hidden import 'json.tool'
7095 INFO: Analyzing hidden import 'logging.config'
7411 INFO: Analyzing hidden import 'msgpack._packerd'
7411 **ERROR**: Hidden import 'msgpack._packerd' not found
7413 INFO: Analyzing hidden import 'msgpack._unpackerd'
7414 **ERROR**: Hidden import 'msgpack._unpackerd' not found
7414 INFO: Analyzing hidden import 'msilib.schema'
7532 INFO: Analyzing hidden import 'msilib.sequence'
7536 INFO: Analyzing hidden import 'msilib.text'

8694 INFO: Determining a mapping of distributions to packages...
22312 **WARNING**: Unable to find package for requirement greenlet from package gevent.
22312 INFO: Packages required by gevent:
['cffi']

F:\ZeroNet-git\ZeroBundle\compile>move dist\ZeroNet\lib\gevent.corecext.pyd dist\ZeroNet
Cannot find the specified file.

F:\ZeroNet-git\ZeroBundle\compile>move dist\ZeroNet\lib\gevent._semaphore.pyd dist\ZeroNet
Cannot find the specified file.

F:\ZeroNet-git\ZeroBundle\compile>git clone --depth 1 file://f:\Work\ZeroNet-git\ZeroBundle\PyInstall\..\..\ZeroNet\.git\ dist\ZeroNet\core
Cloning into 'dist\ZeroNet\core'...
fatal: 'f:\Work\ZeroNet-git\ZeroBundle\PyInstall\..\..\ZeroNet\.git\' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

F:\ZeroNet-git\ZeroBundle\compile>rmdir /S /Q dist\ZeroNet\core\.git
Cannot find the specified file.

F:\ZeroNet-git\ZeroBundle\compile>rmdir /S /Q dist\ZeroNet\core\src\Test\testdata
The system cannot find the path specified.

F:\ZeroNet-git\ZeroBundle\compile>rem powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::CreateFromDirectory('dist/ZeroNet', '../dist/ZeroNet-win.zip'); }"

F:\ZeroNet-git\ZeroBundle\compile>echo Adding info to ZeroNet.exe...
Adding info to ZeroNet.exe...

F:\ZeroNet-git\ZeroBundle\compile>..\..\tools\verpatch.exe dist\ZeroNet\ZeroNet.exe /va /s desc "ZeroNet"
"..\..\tools\verpatch.exe" not internal or external
command, executable program or batch file.

F:\ZeroNet-git\ZeroBundle\compile>..\..\tools\verpatch.exe dist\ZeroNet\ZeroNet-cli.exe 0.5.1.0
"..\..\tools\verpatch.exe" не является внутренней или внешней
command, executable program or batch file.

F:\ZeroNet-git\ZeroBundle\compile>..\..\tools\ResourceHacker.exe -addoverwrite dist\ZeroNet\ZeroNet-cli.exe, dist\ZeroNet\ZeroNet-cli.exe, dist\ZeroNet\ZeroNet-cli.exe.manifest,24,1,1033
"..\..\tools\ResourceHacker.exe" not internal or external
command, executable program or batch file.

F:\ZeroNet-git\ZeroBundle\compile>set INPUT=

F:\ZeroNet-git\ZeroBundle\compile>set /P INPUT=PVK password:
PVK password: 123

F:\ZeroNet-git\ZeroBundle\compile>..\..\tools\signtool sign /f ..\..\cert.pfx /p 123 /t http://timestamp.verisign.com/scripts/timstamp.dll /v dist\ZeroNet\ZeroNet.exe
"..\..\tools\signtool" not internal or external
command, executable program or batch file.

It would be nice to write the instructions in more detail.

HelloZeroNet commented 5 years ago

You need to edit the path in the https://github.com/HelloZeroNet/ZeroBundle/blob/master/compile/compile_win.cmd#L12 line to the git repo in your file system. You can ignore the other errors (verpatch and signtool) as they are optional.

corsairs commented 5 years ago

@HelloZeroNet What should I change this code? I have an F: // drive and I created the Work folder, but it didn't help F:\Work\ZeroNet-git\ZeroBundle PyInstall I do not have such a folder and files

Can i see an example please

As for the verpatch and signtool, I also need it. I would like to create a full installer.

purplesyringa commented 5 years ago

There's a load of full installers already... The official one, Krixano's, and mine.

corsairs commented 5 years ago

@imachug Give me a link please

corsairs commented 5 years ago

@HelloZeroNet I corrected part of the error you said, but I still can't fix the remaining

F:\Work\ZeroNet-git\ZeroBundle\compile>move dist\ZeroNet\lib\gevent.corecext.pyd dist\ZeroNet
Cannot find the specified file.

F:\Work\ZeroNet-git\ZeroBundle\compile>move dist\ZeroNet\lib\gevent._semaphore.pyd dist\ZeroNet
Cannot find the specified file.

F:\Work\ZeroNet-git\ZeroBundle\compile>git clone --depth 1 file://f:\Work\ZeroNet-git\ZeroBundle\PyInstall\..\..\ZeroNet\.git\ dist\ZeroNet\core
Cloning into 'dist\ZeroNet\core'...
remote: Enumerating objects: 613, done.
remote: Counting objects: 100% (613/613), done.
remote: Compressing objects: 100% (541/541), done.
remote: Total 613 (delta 40), reused 354 (delta 29)
Receiving objects: 100% (613/613), 2.56 MiB | 3.47 MiB/s, done.
Resolving deltas: 100% (40/40), done.

F:\Work\ZeroNet-git\ZeroBundle\compile>set /P INPUT=PVK password:
PVK password:

This I get after the build when you click ZeroNet.exe

fatal error detected

Failed to execute script pyi_rth_pkgres

HelloZeroNet commented 5 years ago

What do you have in your dist\ZeroNet\lib directory after the compilation is done?

Btw the is a new script for the py3 version, I recommend to use that if you planning to create a new distribution: https://github.com/HelloZeroNet/ZeroBundle/blob/py3/compile_win.cmd

corsairs commented 5 years ago

@HelloZeroNet I have a lot of different pyd files in there and one ZeroNet.cmd file

Btw the is a new script for the py3 version, I recommend to use that if you planning to create a new distribution: https://github.com/HelloZeroNet/ZeroBundle/blob/py3/compile_win.cmd

I will try to try the next day