Skip to content

Commit 4df4436

Browse files
Merge pull request #153 from paulocoutinhox/version-7169
updated to version 7243
2 parents 0a2328d + e00a7fa commit 4df4436

File tree

12 files changed

+96
-132
lines changed

12 files changed

+96
-132
lines changed

.github/workflows/android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
config:
18-
- { name: "Ubuntu", os: "ubuntu-20.04", target: "android" }
18+
- { name: "Ubuntu", os: "ubuntu-24.04", target: "android" }
1919

2020
steps:
2121
- uses: actions/checkout@v4

.github/workflows/wasm.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
config:
18-
- { name: "Ubuntu", os: "ubuntu-20.04", target: "wasm" }
18+
- { name: "Ubuntu", os: "ubuntu-24.04", target: "wasm" }
1919

2020
steps:
2121
- uses: actions/checkout@v4
@@ -44,9 +44,14 @@ jobs:
4444
version: "1.10.0"
4545

4646
- name: Install EMSDK
47-
uses: mymindstorm/setup-emsdk@v14
48-
with:
49-
version: "3.1.64"
47+
run: |
48+
mkdir -p emsdk
49+
cd emsdk
50+
git clone https://github.com/emscripten-core/emsdk.git .
51+
./emsdk install 4.0.10
52+
./emsdk activate 4.0.10
53+
echo "EMSDK=${{ github.workspace }}/emsdk" >> $GITHUB_ENV
54+
echo "${{ github.workspace }}/emsdk:${{ github.workspace }}/emsdk/upstream/emscripten" >> $GITHUB_PATH
5055
5156
- name: Install Node
5257
uses: actions/setup-node@v4

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ Thumbs.db
1919
__pycache__/
2020
*.py[cod]
2121
*$py.class
22+
23+
# Virtual env
24+
.venv

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Paulo Coutinho
3+
Copyright (c) 2018-2025 Paulo Coutinho
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Check tutorial here: [How to include files](docs/HOW_TO_INCLUDE_FILES.md)
116116

117117
Support the continuous development of this project.
118118

119-
<a href='https://ko-fi.com/paulocoutinho' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi1.png?v=2' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
119+
<a href='https://ko-fi.com/A0A412XEV' target='_blank'><img height='36' style='border:0px;height:36px;' src='https://storage.ko-fi.com/cdn/kofi2.png?v=6' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a>
120120

121121
## My other projects
122122

@@ -129,4 +129,4 @@ This license informations is about this personal project, not the Google PDFium
129129

130130
[MIT](http://opensource.org/licenses/MIT)
131131

132-
Copyright (c) 2018-2024, Paulo Coutinho
132+
Copyright (c) 2018-2025, Paulo Coutinho

docker/android/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ RUN mkdir /build
5454
WORKDIR /build
5555
RUN gclient config --custom-var checkout_configuration=minimal --unmanaged https://pdfium.googlesource.com/pdfium.git
5656
RUN echo "target_os = [ 'android' ]" >> .gclient
57-
RUN gclient sync -r origin/chromium/6694 --no-history --shallow
57+
RUN gclient sync -r origin/chromium/7243 --no-history --shallow
5858

5959
# pdfium reset and clean directories
6060
RUN git -C /build/pdfium reset --hard
@@ -80,7 +80,7 @@ RUN apt-get install -o APT::Immediate-Configure=false -f apt \
8080
&& apt-get -f install \
8181
&& dpkg --configure -a \
8282
&& apt-get -y dist-upgrade \
83-
&& echo n | ./build/install-build-deps.sh --android \
83+
&& echo n | ./build/install-build-deps.sh --android || true \
8484
&& rm -rf /build
8585

8686
# ninja

docker/wasm/Dockerfile

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ ENV PATH=${PATH}:/opt/depot-tools
3737
RUN mkdir /build
3838
WORKDIR /build
3939
RUN gclient config --custom-var checkout_configuration=minimal --unmanaged https://pdfium.googlesource.com/pdfium.git
40-
RUN echo "target_os = [ 'wasm' ]" >> .gclient
41-
RUN gclient sync -r origin/chromium/6694 --no-history --shallow
40+
RUN echo "target_os = [ 'emscripten' ]" >> .gclient
41+
RUN gclient sync -r origin/chromium/7243 --no-history --shallow
4242

4343
# pdfium reset and clean directories
4444
RUN git -C /build/pdfium reset --hard
@@ -60,11 +60,8 @@ RUN git status
6060
# system dependencies
6161
RUN ln -s /usr/bin/python3 /usr/bin/python
6262

63-
RUN apt-get install -o APT::Immediate-Configure=false -f apt \
64-
&& apt-get -f install \
65-
&& dpkg --configure -a \
66-
&& apt-get -y dist-upgrade \
67-
&& echo n | ./build/install-build-deps.sh \
63+
RUN apt update -y \
64+
&& echo n | ./build/install-build-deps.sh || true \
6865
&& rm -rf /build
6966

7067
# ninja
@@ -78,16 +75,16 @@ RUN pip3 install setuptools docopt pygemstones
7875
RUN mkdir /emsdk
7976
WORKDIR /emsdk
8077
RUN git clone https://github.com/emscripten-core/emsdk.git .
81-
RUN ./emsdk install 3.1.64
82-
RUN ./emsdk activate 3.1.64
78+
RUN ./emsdk install 4.0.10
79+
RUN ./emsdk activate 4.0.10
8380
ENV PATH="${PATH}:/emsdk:/emsdk/upstream/emscripten"
8481

8582
# cache system libraries
8683
RUN bash -c 'echo "int main() { return 0; }" > /tmp/main.cc'
8784
RUN bash -c 'source /emsdk/emsdk_env.sh && em++ -s USE_ZLIB=1 -s USE_LIBJPEG=1 -s USE_PTHREADS=1 -s ASSERTIONS=1 -o /tmp/main.html /tmp/main.cc'
8885

8986
# nodejs and npm
90-
RUN curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
87+
RUN curl -sL https://deb.nodesource.com/setup_22.x | bash -
9188
RUN apt-get install -y nodejs
9289
RUN npm install -g npm@latest
9390

docs/BUILD_WASM.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
```python3 make.py patch-wasm```
1515

1616
6. PDFium Linux dependencies
17-
```./build/wasm32/pdfium/build/install-build-deps.sh```
17+
```./build/emscripten/pdfium/build/install-build-deps.sh```
1818

1919
7. Compile:
2020
```python3 make.py build-wasm```

modules/common.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,10 @@ def get_build_args(
167167
# static lib
168168
if not shared:
169169
args.append("pdf_is_complete_lib=true")
170-
elif target_os.startswith("wasm"):
170+
elif target_os.startswith("emscripten"):
171171
args.append("pdf_is_complete_lib=true")
172172
args.append("is_clang=false")
173173
args.append("use_custom_libcxx=false")
174-
args.append("use_sysroot=false")
175174

176175
if libc == "musl":
177176
args.append("is_musl=true")

modules/config.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
task = ""
44

55
# pdfium
6-
pdfium_git_branch = "chromium/6694"
7-
# ^ ref: https://pdfium.googlesource.com/pdfium/+/refs/heads/chromium/6694
6+
pdfium_git_branch = "chromium/7243"
7+
# ^ ref: https://pdfium.googlesource.com/pdfium/+/refs/heads/chromium/7243
88
# OBS 1: don't forget change in android docker file (docker/android/Dockerfile)
99
# OBS 2: don't forget change in wasm docker file (docker/wasm/Dockerfile)
1010

1111
# emsdk
12-
emsdk_version = "3.1.64"
12+
emsdk_version = "4.0.10"
1313
# OBS 1: don't forget change in wasm docker file (docker/wasm/Dockerfile)
1414

1515
# macos
@@ -78,5 +78,5 @@
7878
configurations_wasm = ["release"]
7979
shared_lib_wasm = False
8080
targets_wasm = [
81-
{"target_os": "wasm32", "target_cpu": "wasm", "pdfium_os": "wasm"},
81+
{"target_os": "emscripten", "target_cpu": "wasm", "pdfium_os": "emscripten"},
8282
]

0 commit comments

Comments
 (0)