Skip to content

Commit

Permalink
Add Windows version installation instructions to README (#89)
Browse files Browse the repository at this point in the history
* Add installation instructions to README

* Fix README
  • Loading branch information
kio-watanabe authored Aug 29, 2024
1 parent bcb0ff1 commit d6f3c17
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
59 changes: 58 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Open COBOL ESQL 4J (OCESQL 4J) consits of open-source Embedded SQL pre-compiler
* [sbt](https://www.scala-sbt.org/).


## Installation
## Installation (Linux)

### Install opensource COBOL 4J

Expand Down Expand Up @@ -57,3 +57,60 @@ Then, add `/usr/lib/Open-COBOL-ESQL-4J/ocesql4j.jar` to $CLASSPATH.
```sh
export CLASSPATH="$CLASSPATH":/usr/lib/Open-COBOL-ESQL-4J/ocesql4j.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".

### sbt
Download [here](https://www.scala-sbt.org/download/) and install it.

### Install Open COBOL ESQL 4J
#### Install Visual Studio
The Windows version of Open COBOL ESQL 4J uses the CL compiler included in Visual Studio 2022, so you must have [Visual Studio](https://visualstudio.microsoft.com/) installed beforehand.


#### Build a solution file
1. Download the complete set of files for opensource COBOL 4J.
2. Open win/ocesql.sln with Visual Studio.
3. Select "Debug" or "Release" mode.
![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`.

#### Build Scala Files
2. Open PowerShell.

3. Move to "dblibj" directory.
```
cd dblibj
```
4. Execute the following command.
```
sbt assembly
```

#### 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`.
2. Open PowerShell
3. Move to "win" directory and execute "install.ps1".
```
cd win
.\install.ps1
```
* Each file is placed in the following location.
| File name | Location |
|---|---|
| ocesql.exe | C:\ocesql4j\bin |
| ocesql4j.jar | C:\ocesql4j\lib |
* 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".
Binary file added image/readme1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added image/readme2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d6f3c17

Please sign in to comment.