@@ -26,42 +26,42 @@ Here are the steps for creating a single executable application using one such
2626tool, [ postject] [ ] :
2727
28281 . Create a JavaScript file:
29- ``` console
30- $ echo 'console.log(`Hello, ${process.argv[2]}!`);' > hello.js
29+ ``` bash
30+ echo ' console.log(`Hello, ${process.argv[2]}!`);' > hello.js
3131 ```
3232
33332 . Create a configuration file building a blob that can be injected into the
3434 single executable application (see
3535 [ Generating single executable preparation blobs] [ ] for details):
36- ``` console
37- $ echo '{ "main": "hello.js", "output": "sea-prep.blob" }' > sea-config.json
36+ ``` bash
37+ echo ' { "main": "hello.js", "output": "sea-prep.blob" }' > sea-config.json
3838 ```
3939
40403 . Generate the blob to be injected:
41- ``` console
42- $ node --experimental-sea-config sea-config.json
41+ ``` bash
42+ node --experimental-sea-config sea-config.json
4343 ```
4444
45454 . Create a copy of the ` node ` executable and name it according to your needs:
4646
4747 * On systems other than Windows:
4848
49- ``` console
50- $ cp $(command -v node) hello
49+ ``` bash
50+ cp $( command -v node) hello
5151 ```
5252
5353 * On Windows:
5454
5555 Using PowerShell:
5656
57- ``` console
58- $ cp (Get-Command node).Source hello.exe
57+ ``` bash
58+ cp (Get-Command node).Source hello.exe
5959 ```
6060
6161 Using Command Prompt:
6262
63- ``` console
64- $ for /F "tokens=*" %n IN ('where.exe node') DO @(copy "%n" hello.exe)
63+ ``` bash
64+ for /F " tokens=*" %n IN (' where.exe node' ) DO @ (copy " %n" hello.exe)
6565 ```
6666
6767 The ` .exe ` extension is necessary.
@@ -70,17 +70,17 @@ tool, [postject][]:
7070
7171 * On macOS:
7272
73- ``` console
74- $ codesign --remove-signature hello
73+ ``` bash
74+ codesign --remove-signature hello
7575 ```
7676
7777 * On Windows (optional):
7878
7979 [ signtool] [ ] can be used from the installed [ Windows SDK] [ ] . If this step is
8080 skipped, ignore any signature-related warning from postject.
8181
82- ``` console
83- $ signtool remove /s hello.exe
82+ ``` bash
83+ signtool remove /s hello.exe
8484 ```
8585
86866 . Inject the blob into the copied binary by running ` postject ` with
@@ -100,20 +100,20 @@ tool, [postject][]:
100100 To summarize, here is the required command for each platform:
101101
102102 * On Linux:
103- ``` console
104- $ npx postject hello NODE_SEA_BLOB sea-prep.blob \
103+ ``` bash
104+ npx postject hello NODE_SEA_BLOB sea-prep.blob \
105105 --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2
106106 ```
107107
108108 * On Windows:
109- ```console
110- $ npx postject hello.exe NODE_SEA_BLOB sea-prep.blob \
109+ ` ` ` bash
110+ npx postject hello.exe NODE_SEA_BLOB sea-prep.blob \
111111 --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2
112112 ` ` `
113113
114114 * On macOS:
115- ```console
116- $ npx postject hello NODE_SEA_BLOB sea-prep.blob \
115+ ` ` ` bash
116+ npx postject hello NODE_SEA_BLOB sea-prep.blob \
117117 --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \
118118 --macho-segment-name NODE_SEA
119119 ` ` `
@@ -122,17 +122,17 @@ tool, [postject][]:
122122
123123 * On macOS:
124124
125- ```console
126- $ codesign --sign - hello
125+ ` ` ` bash
126+ codesign --sign - hello
127127 ` ` `
128128
129129 * On Windows (optional):
130130
131131 A certificate needs to be present for this to work. However, the unsigned
132132 binary would still be runnable.
133133
134- ``` console
135- $ signtool sign /fd SHA256 hello.exe
134+ ` ` ` bash
135+ signtool sign /fd SHA256 hello.exe
136136 ` ` `
137137
1381388. Run the binary:
0 commit comments