From fb917e499c73d06370b5de1678942a03543c882b Mon Sep 17 00:00:00 2001 From: yutaro-sakamoto <80912876+yutaro-sakamoto@users.noreply.github.com> Date: Fri, 30 Aug 2024 14:43:27 +0900 Subject: [PATCH] Release v1.1.0 (#91) * [Update]: update README.md and workflow files * [Doc]: improve CHANGELOG.md and NEWS --- .github/workflows/coverage.yml | 2 +- .github/workflows/doc.yml | 2 +- CHANGELOG.md | 2 +- NEWS | 2 +- README.md | 37 +++++++++++++++++++++++++--------- 5 files changed, 32 insertions(+), 13 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 783f8a7..647f141 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -79,7 +79,7 @@ jobs: run: | cp "$COBOL4J_LIBCOBJ_JAR_PATH" dblibj/lib sudo mkdir -p "$OCESQL4J_LIB_DIR" - sudo curl -L -o "$OCESQL4J_POSTGRESQL_JAR_PATH" https://jdbc.postgresql.org/download/postgresql-42.2.24.jre6.jar + sudo curl -L -o "$OCESQL4J_POSTGRESQL_JAR_PATH" https://jdbc.postgresql.org/download/postgresql-42.2.24.jar sudo cp "$OCESQL4J_POSTGRESQL_JAR_PATH" dblibj/lib sh configure CFLAGS='-fprofile-arcs -ftest-coverage -Werror' --prefix=/usr/ make diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 4521b03..9467ab5 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -63,7 +63,7 @@ jobs: run: | cp "$COBOL4J_LIBCOBJ_JAR_PATH" dblibj/lib sudo mkdir -p "$OCESQL4J_LIB_DIR" - sudo curl -L -o "$OCESQL4J_POSTGRESQL_JAR_PATH" https://jdbc.postgresql.org/download/postgresql-42.2.24.jre6.jar + sudo curl -L -o "$OCESQL4J_POSTGRESQL_JAR_PATH" https://jdbc.postgresql.org/download/postgresql-42.2.24.jar sudo cp "$OCESQL4J_POSTGRESQL_JAR_PATH" dblibj/lib cd dblibj/ sbt doc diff --git a/CHANGELOG.md b/CHANGELOG.md index b22d263..420f253 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [1.1.0] - 2024-08-30 ### Added -- Support Windows (#82) +- Support Windows with Visual Studio 2022(#82) ### Optimized - Implemente caches for prepared statements (#58) diff --git a/NEWS b/NEWS index 24391f0..b5fd1c5 100755 --- a/NEWS +++ b/NEWS @@ -3,7 +3,7 @@ NEWS - user visible changes -*- outline -*- * Open COBOL ESQL 4J 1.1.0 ** New Features - (1) Support Windows + (1) Support Windows with Visual Studio 2022 ** Optimized (1) Implemente caches for prepared statements diff --git a/README.md b/README.md index cab725d..f3d380b 100755 --- a/README.md +++ b/README.md @@ -33,11 +33,21 @@ Open COBOL ESQL 4J (OCESQL 4J) consits of open-source Embedded SQL pre-compiler See [Installation guides of opensource COBOL 4J](https://github.com/opensourcecobol/opensourcecobol4j/wiki). -### Copy libcobj.jar +### Prepare jar files Copy libcobj.jar, which is the runtime library of opensource COBOL 4J, to `dblibj/lib/libcobj.jar`. After you complete the installation procedure described in [Installation guides of opensource COBOL 4J](https://github.com/opensourcecobol/opensourcecobol4j/wiki), you can find libcobj.jar in `/usr/lib/opensourcecobol4j/`. +In addtion, execute the following command to prepare postgresql jdbc driver. + +```sh +# Move to the root directory of Open-COBOL-ESQL-4J +cd Open-COBOL-ESQL-4J/ +mkdir -p /usr/lib/Open-COBOL-ESQL-4J/ +curl -L -o /usr/lib/Open-COBOL-ESQL-4J/postgresql.jar https://jdbc.postgresql.org/download/postgresql-42.2.24.jar +cp /usr/lib/Open-COBOL-ESQL-4J/postgresql.jar dblibj/lib +``` + ### sbt See [the official Installation guide](https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html). @@ -52,18 +62,27 @@ make make install ``` -Then, add `/usr/lib/Open-COBOL-ESQL-4J/ocesql4j.jar` to $CLASSPATH. +Then, add `/usr/lib/Open-COBOL-ESQL-4J/ocesql4j.jar` and `/usr/lib/Open-COBOL-ESQL-4J/postgresql.jar` to $CLASSPATH. ```sh -export CLASSPATH="$CLASSPATH":/usr/lib/Open-COBOL-ESQL-4J/ocesql4j.jar +export CLASSPATH="$CLASSPATH":/usr/lib/Open-COBOL-ESQL-4J/ocesql4j.jar:/usr/lib/Open-COBOL-ESQL-4J/postgresql.jar ``` + ## Installation (Windows) ### Install opensource COBOL 4J See [README.md of opensource COBOL 4J](https://github.com/opensourcecobol/opensourcecobol4j/blob/develop/README.md). -### Copy libcobj.jar -Copy "libcobj.jar", generated by the installation of opensourcecobol4j, into "dblibj/lib". +### Prepare jar files +Copy "libcobj.jar", generated by the installation of opensourcecobol4j, into "dblibj\lib". +In addtion, execute the following command to prepare postgresql jdbc driver. + +```powershell +cd Open-COBOL-ESQL-4J +mkdir C:\ocesql4j\lib +curl -L -o C:\ocesql4j\lib\postgresql.jar https://jdbc.postgresql.org/download/postgresql-42.2.24.jar +copy C:\ocesql4j\lib\postgresql.jar dblibj\lib +``` ### sbt Download [here](https://www.scala-sbt.org/download/) and install it. @@ -80,7 +99,7 @@ The Windows version of Open COBOL ESQL 4J uses the CL compiler included in Visua ![alt text](image/readme1.png) 4. Click "Build" -> "Build Solution". ![alt text](image/readme2.png) -After the build is completed, "cobj.exe" will be created in `win/x64/Debug` or `win/x64/Release`. +After the build is completed, "cobj.exe" will be created in `win\x64\Debug` or `win\x64\Release`. #### Build Scala Files 2. Open PowerShell. @@ -95,7 +114,7 @@ After the build is completed, "cobj.exe" will be created in `win/x64/Debug` or ` ``` #### Place files in the appropriate location -1. If you build in Debug mode, change the 5th line of "win/install.ps1" from `\x64\Release\cobj.exe` to `\x64\Debug\cobj.exe`. +1. If you build in Debug mode, change the 5th line of "win\install.ps1" from `\x64\Release\cobj.exe` to `\x64\Debug\cobj.exe`. 2. Open PowerShell 3. Move to "win" directory and execute "install.ps1". ``` @@ -112,5 +131,5 @@ After the build is completed, "cobj.exe" will be created in `win/x64/Debug` or ` * If you want to change the location of the files, modify "install.ps1". #### Set the environment variables -1. Add C:\ocesql4j\bin to "PATH". -2. Add C:\ocesql4j\lib\ocesql4j.jar to "CLASSPATH". \ No newline at end of file +1. Add `C:\ocesql4j\bin` to "PATH". +2. Add `C:\ocesql4j\lib\ocesql4j.jar` and `C:\ocesql4j\lib\postgresql.jar` to "CLASSPATH". \ No newline at end of file