Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows version installation instructions to README #89

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading