Skip to content

Commit 4445524

Browse files
committed
Add instructions for building stand alone .exe with ocra. Add to readme.
1 parent a4b6495 commit 4445524

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ TP+ is a higher-level language abstraction that translates into FANUC TP. It fea
5656
Install
5757
-----------
5858

59+
> [!**NOTE**]
60+
> A Standalone `.exe` can be found in https://github.com/kobbled/tp_plus/releases, where you do not have to install anything. Simply add the location where the `tpp.exe` file resides onto your environment `Path`. However, with this method you will not recieve up to date changes to TP+.
61+
5962
1. Install Ruby
6063
2. Install git
6164
3. Install bundler `gem install bundler`

ocra/GemFile_ocra

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
source "https://rubygems.org"
2+
3+
gem'benchmark-ips', '~> 2.1'
4+
gem'rexical', '~> 1.0'
5+
gem'racc', '~> 1.4.15'
6+
gem'test-unit', '~> 3.0'
7+
gem'rake', '~> 12.3.3'
8+
gem'ruby-prof', '~> 0.15'
9+
gem'rdoc'
10+
gem'ruby_deep_clone'
11+
gem'matrix', '~> 0.4.2'
12+
gem'ppr'

ocra/building_exe_with_ocra.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
1. install ocra `gem install ocra`
2+
2. Copy this repo to another location as you will have to delete and modify files
3+
3. Replace the contents in `Gemfile` with `Genfile_ocra`
4+
```
5+
source "https://rubygems.org"
6+
7+
gem'benchmark-ips', '~> 2.1'
8+
gem'rexical', '~> 1.0'
9+
gem'racc', '~> 1.4.15'
10+
gem'test-unit', '~> 3.0'
11+
gem'rake', '~> 12.3.3'
12+
gem'ruby-prof', '~> 0.15'
13+
gem'rdoc'
14+
gem'ruby_deep_clone'
15+
gem'matrix', '~> 0.4.2'
16+
gem'ppr'
17+
```
18+
4. Delete the following directories and files
19+
* .vscode
20+
* .git
21+
* .gitignore
22+
* .travis.yml
23+
* *.code-workspace
24+
* bin/*.bat
25+
* examples
26+
5. Add .rb extension to `bin/tpp` -> `bin/tpp.rb`
27+
6. Download `fiber.so` from https://github.com/larsch/ocra/files/8249797/fiber.zip. Copy `fiber.so` into `C:\Ruby<version>-x64\lib\ruby\3.1.0\x64-mingw-ucrt` where \<version\> is the current ruby version number.
28+
7. Run ocra command in root directory to build
29+
```
30+
ocra bin/tpp.rb lib\tp_plus\karel\templates\karelenv.erb lib\tp_plus\karel\templates\rossumenv.erb lib\tp_plus\motion\templates\ls.erb --gemfile Gemfile --add-all-core --dll ruby_builtin_dlls/libgmp-10.dll --dll ruby_builtin_dlls/libffi-7.dll --dll ruby_builtin_dlls/libssp-0.dll --dll ruby_builtin_dlls/libssl-1_1-x64.dll --dll ruby_builtin_dlls/libcrypto-1_1-x64.dll --dll ruby_builtin_dlls/libgcc_s_seh-1.dll --dll ruby_builtin_dlls/libwinpthread-1.dll
31+
```
32+

0 commit comments

Comments
 (0)