Skip to content

Latest commit

 

History

History
224 lines (190 loc) · 6.89 KB

BUILD.md

File metadata and controls

224 lines (190 loc) · 6.89 KB

Update the program from scratch

  1. Merge pull requests on himananiito/livedl
  2. Apply the 5ch forum patches by volunteers

Follow the steps below to merge pull requests and apply patches on the 5ch forum by volunteers.

Merge the pull requests on himananiito/livedl

Merge the pull requests on himananiito/livedl, merge the following.

  • If you merge PR #51, conflicts will occur frequently when applying 5ch's patches
  • If you merge PR #43 and #44 , conflicts will occur when applying 5ch's patches
git clone https://github.com/himananiito/livedl.git
cd livedl
git checkout master
git reset --hard a2c52e112136ee373e4eb28e2aad224348e6d99c
git fetch origin pull/39/head:dev
git checkout dev
git reset --hard HEAD^
git checkout master
git merge dev
git fetch origin pull/47/head:seqskipfix
git merge seqskipfix

Apply the 5ch forum patches by volunteers

Precautions when applying patches

  • Unix(Linux) and Mac
    When applying patch, if line enfings of the source program and the patch are different, the following error may occur.
Hunk #1 at 49(different line endings).

Because the source program using line endings CRLF. In this case, change the line feed code of the source program from CRLF to LF as follows.

dos2unix (source filename)  

e.g.

dos2unix src/niconico/nico_hls.go  
dos2unix src/niconico/nico_db.go  
  • Windows

If the source program using line endings CRLF, change the line feed code of the patch to CRLF.

unix2dos (patch filename)  

Also, add --binary when applying the patch.

patch -p1 --binary <(patch filename)  

Patch lists

[Copy the patch to the livedl folder]
patch -p1 <livedl-p20200919.01.patch

The following error is displayed when applying the patch.

patching file src/niconico/nico_hls.go  
Hunk #8 FAILED at 638.  
1 out of 20 hunks FAILED -- saving rejects to file src/niconico/nico_hls.go.rej  

Modify line 638 (or surroundings) of src/niconico/nico_hls.go with an editor as follows.
(Change http in the original line to https.)

uri := fmt.Sprintf("https://live.nicovideo.jp/api/getwaybackkey?thread=%s",url.QueryEscape(threadId))
[Copy the patch to the livedl folder]
patch -p1 <livedl-55.patch
[Copy the patch to the livedl folder]
patch -p1 <livedl.ts-start-stop.patch
[Copy the patch to the livedl folder]
patch -p0 <livedl.comment-name-attribute-r1.patch
[Copy the patch to the livedl folder]
patch -p1 <livedl.getedgestatus.patch
[Copy the patch to the livedl folder]
patch -p0 <livedl.http-timeout.patch

The following error is displayed when applying the patch.

$ patch -p0 <livedl.http-timeout.patch
patching file src/options/options.go
Hunk #2 FAILED at 63.

Modify line 69 of src/niconico/options.go with an editor as follows.
(Add HttpTimeout in the original line.)

	HttpProxy              string
	NoChdir                bool
	HttpTimeout            int
[Copy the patch to the livedl folder]
patch -p0 <livedl.youtube-r1.patch
[Copy the patch to the livedl folder]
patch -p1 <livedl.waybackkey.patch
[Copy the patch to the livedl folder]
patch -p0 <livedl.comment-not-saved.patch
[Copy the patch to the livedl folder]
patch -p0 <livedl.youtube-replay-chat.patch
[Copy the patch to the livedl folder]
patch -p0 <livedl.youtube-superchat-amount.patch
[Copy the patch to the livedl folder]
patch -p0 <livedl.youtube-client-2.20210128.02.00.patch
[Copy the patch to the livedl folder]
patch -p0 <livedl.youtube-comment-forever.patch
22: @@ -385,6 +386,45 @@
23: 	return
24: }
       .
       .
       .
65: func ParseArgs() (opt Option) {
66: 	//dbAccountOpen()
67: 	db, err := dbOpen()
[Copy the patch to the livedl folder]
patch -p1 <livedl.yt-comment-start.patch
[Copy the patch to the livedl folder]
patch -p1 <livedl.fix-no-chdir.patch