Skip to content

Commit

Permalink
switch to jdk 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
litongjava committed Nov 24, 2023
1 parent ac092c6 commit a15fc5b
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 47 deletions.
91 changes: 47 additions & 44 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,47 @@
name: Java CI with Maven and Java FX

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build_windows:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'oracle'
cache: maven

- name: Download and Extract Models
run: |
Invoke-WebRequest -Uri "https://github.com/litongjava/tools-ocr/releases/download/model-ppocr-v4/ch_PP-OCRv4_det_infer-onnx.zip" -OutFile "model_det.zip"
Invoke-WebRequest -Uri "https://github.com/litongjava/tools-ocr/releases/download/model-ppocr-v4/ch_PP-OCRv4_rec_infer-onnx.zip" -OutFile "model_rec.zip"
mkdir models\ch_PP-OCRv4_det_infer
mkdir models\ch_PP-OCRv4_rec_infer
Expand-Archive "model_det.zip" -DestinationPath "models\ch_PP-OCRv4_det_infer"
Expand-Archive "model_rec.zip" -DestinationPath "models\ch_PP-OCRv4_rec_infer"
- name: Copy Models
run: |
mkdir target\jfx\app
xcopy models target\jfx\app /E /I
- name: Build with Maven
run: mvn jfx:native -DskipTests

- name: Upload package
uses: actions/upload-artifact@v3
with:
name: treehole-windows-2.2.8.msi
path: target\jfx\native\treehole-2.2.8.msi
#name: Java CI with Maven and Java FX
#
#on:
# push:
# branches: [ "master" ]
# pull_request:
# branches: [ "master" ]
#
#jobs:
# build_windows:
# runs-on: windows-latest
#
# steps:
# - uses: actions/checkout@v3
# - name: Set up JDK 8
# uses: actions/setup-java@v3
# with:
# java-version: '8'
# distribution: 'oracle'
# cache: maven
#
# - name: Download and Extract Models
# run: |
# Invoke-WebRequest -Uri "https://github.com/litongjava/tools-ocr/releases/download/model-ppocr-v4/ch_PP-OCRv4_det_infer-onnx.zip" -OutFile "model_det.zip"
# Invoke-WebRequest -Uri "https://github.com/litongjava/tools-ocr/releases/download/model-ppocr-v4/ch_PP-OCRv4_rec_infer-onnx.zip" -OutFile "model_rec.zip"
# mkdir models\ch_PP-OCRv4_det_infer
# mkdir models\ch_PP-OCRv4_rec_infer
# Expand-Archive "model_det.zip" -DestinationPath "models\ch_PP-OCRv4_det_infer"
# Expand-Archive "model_rec.zip" -DestinationPath "models\ch_PP-OCRv4_rec_infer"
#
# - name: Copy Models
# run: |
# mkdir target\jfx\app
# xcopy models target\jfx\app /E /I
#
#
# - name: Build with Maven
# run: mvn jfx:native -DskipTests
#
# - name : Show Native Files
# run : dir target\jfx\native
# -
# - name: Upload package
# uses: actions/upload-artifact@v3
# with:
# name: treehole-windows-2.2.8.msi
# path: target\jfx\native\treehole-2.2.8.msi
14 changes: 11 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,17 @@
<!-- <dependency>-->
<!-- <groupId>org.openjfx</groupId>-->
<!-- <artifactId>javafx-controls</artifactId>-->
<!-- <version>11</version>-->
<!-- <version>17</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.openjfx</groupId>-->
<!-- <artifactId>javafx-swing</artifactId>-->
<!-- <version>11</version>-->
<!-- <version>17</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.openjfx</groupId>-->
<!-- <artifactId>javafx-fxml</artifactId>-->
<!-- <version>11</version>-->
<!-- <version>17</version>-->
<!-- </dependency>-->


Expand Down Expand Up @@ -153,6 +153,14 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.8</version>
<configuration>
<mainClass>${main.class}</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 树洞 OCR 文字识别
一款跨平台的 OCR 小工具,调用本地OCR进行识别,无需联网即可使用
用到的技术和框架
- jdk 1.8
- djl
- pytorch
- onnx
Expand Down

0 comments on commit a15fc5b

Please sign in to comment.