From ca337981ae58389b7f87673e195653cc46e33afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Sat, 8 Oct 2022 09:16:30 +0200 Subject: [PATCH] standalone: Windows support --- .github/workflows/build-standalone.yml | 6 +- .github/workflows/publish-standalone.yml | 2 +- README.md | 10 ++- doc/standalone.png | Bin 0 -> 19506 bytes src/standalone/.gitignore | 2 +- src/standalone/Makefile | 84 ++++++++++++++--------- src/standalone/README.md | 9 ++- src/standalone/icon.ico | Bin 0 -> 36988 bytes src/standalone/main.c | 20 +++++- src/standalone/waforth.rc | 28 ++++++++ 10 files changed, 119 insertions(+), 42 deletions(-) create mode 100644 doc/standalone.png create mode 100644 src/standalone/icon.ico create mode 100644 src/standalone/waforth.rc diff --git a/.github/workflows/build-standalone.yml b/.github/workflows/build-standalone.yml index 2111b1b..32758e9 100644 --- a/.github/workflows/build-standalone.yml +++ b/.github/workflows/build-standalone.yml @@ -15,9 +15,5 @@ jobs: steps: - uses: actions/checkout@v2 - uses: ./.github/actions/setup - - run: make -C src/standalone install-deps all - # TODO: Windows support - if: runner.os != 'Windows' + - run: make -C src/standalone install-deps package - run: make -C src/standalone check - # TODO: Windows support - if: runner.os != 'Windows' \ No newline at end of file diff --git a/.github/workflows/publish-standalone.yml b/.github/workflows/publish-standalone.yml index 8fae413..a0dbde1 100644 --- a/.github/workflows/publish-standalone.yml +++ b/.github/workflows/publish-standalone.yml @@ -12,7 +12,7 @@ jobs: needs: build strategy: matrix: - os: [macos-latest, ubuntu-18.04] + os: [macos-latest, ubuntu-18.04, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 diff --git a/README.md b/README.md index 67de77a..c99149d 100644 --- a/README.md +++ b/README.md @@ -39,9 +39,9 @@ document](doc/Design.md).
WAForth console
-
+
-Thurtle program +Thurtle program
WAForth integrated in Thurtle, a turtle graphics programming environment using Forth
@@ -59,6 +59,12 @@ WebAssembly engine that supports the [WebAssembly C API](https://github.com/WebAssembly/wasm-c-api) (although some engines have [known issues](https://github.com/remko/waforth/issues/6#issue-326830993)). +
+
+Thurtle program +
+
Standalone WAForth shell executable
+
## Using WAForth in a JavaScript application diff --git a/doc/standalone.png b/doc/standalone.png new file mode 100644 index 0000000000000000000000000000000000000000..63698da883e839880eeecf917257d11cb1fff5d7 GIT binary patch literal 19506 zcmajH2UJs87dD(3U(1XrgAJsrpr9a4des31LQiJwhl#2%!a12>jEHM4IxgS1$1)2BGdymfd%-kth&*cK{)YZagf^4hyYT9% zW=5;~-Ig0E!Ah=i_wq^ya58mPbh+s6I1wSAma%HtH+XzvT@qP^S)3X`~IKgBXm zl=>Y!rdaZyBeG?NYr@Zu@D5);{!r84kAw@BXN|;aHNrJW270AM3n{dPxA|WkN;gr3 zFGD{vLSagVh1Fxhgz6{P!%1{jhMl~YmatADm!mis@8SXd>beNHRp^GSPTePN80^!v z;RoO1siA2>b{37nDfVZd?tsCJeH+S1$9~c9xraT_&)hc}6zTI;1T5Btec2AerK(A5 zA?eB_#j_H3?zjgnxC z^Bx1H_I}d2H)GkjbvqFJ<1JbOcNSyx3=09_M_L3Ay#1{ZrpGd z#YX#fgR`;M2yM1eWYRYWEJT+1=6A|gMD*G?((D-J=)n4F;KF+h+#o#dSFqOYr(96a zDr(Ekau@Cywd_8%!+kG!MyBBX)Y`G2S|U7T7yQ#-MqE%EvOf_u^$C?n*f%_a50(8@ z9W-WtP!y;}3dz~qQxu&Wa1l)SpP)7HRi&hZm#TJk6!jYSJXM!->lqjN6F!X+FB(1L z7m;HhfKfly`TqiMe+W;^8Lr#u_fQDf)8vKjdRuVr@g*i>@I&XriZG)SN2L&%^nUU5 z%wsXMbo9%ntwr>PWhhx>Ar2Ah=cTK=annyRj7HH)2&ZGUW6^X{pScaWek+Z@TK@i$ z4-97)PB03WtF7#*98L)cpG64^RE&9w^g7aVs7BgXC&a@yHNr^MNrBWpv7Tt!Y!a^t zi@RWH-h$r+o%b7fp6(LY*zjwJ&wUEt#QH_%8%<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zY>f2X6sn^SxHL-r;XG#6UoysMYTPq)1}Z4kb5*_Z+6phTSK+oNseJ-1Cw(uP`#RnB zy`$#%;12kJ$;-;ipOuq6E30fOC$FZcq9&&*DJ!ccD;rw=?D4-I@bGeSxf}F +

+Thurtle program +
+
Standalone WAForth shell executable
+
+ ## Download You can download a pre-built binary of the standalone shell from diff --git a/src/standalone/icon.ico b/src/standalone/icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..b9466d8a0090a88951e71c16b95592cc69f841f7 GIT binary patch literal 36988 zcmeHQ2|SeB`+qIbA}xOHS^AZ9ODJ8-&DOrSQHmmw$W}rk+ZbB7QK&>@X;G*|GYMrY zNg0h6VM^9eOpIYLX2$zJXEgm0QC;`C_c!my*LmObp5=L-^PK&8&mag7G76bE5dp3Q zV#$vndI*9@NOV8P0{;x)Cnxv$SrS3aryz)iM)&iAl?Wod97F&YjK5X{K@>0uvH(1T zsKBS&A29qwD+Qa3AD_HmJbZK37|*#X1#qV)yx^CY&QRP8e7a!>K;dwYT=4D z8#{D|1?jZd9YH&v6reQka|6c*;hJ~aqKxN7Xjd~8rKdkeDLR%YWs3z$zxNPDnM{=V zwj6CXwChFN7um7n+o6o2w`f-f9qoLW_a%O3W-i**-hnbp-l5IA?E8-o%K_v?wRA&U zY`swGUdV5E*-*_6cl%kngETD$=HX|`Qfn{Tyu$|Vz@?!K!V9!LI)P0OlzIE5c(xz? zPCDAGf1rQ*A^$)&%!+ChUN8-g{5o@qY(G|2E!u2!u>bgw_HEWE%`X&f3%iE49y!xp z-XQ;0uRyjR?PM6*tZV&k{x_MTl;8IN9Re;#9vr{ld-!qQ4X@h*XrO+fO;k7su~BLO050KoQ#eZhvO&(&YvT)(f& zgDaCE$ON=C?D`G+iGFl?Sp8r-2imX}M{jmpO#$uZpOPP&r_X&KVl*nszKVKKeianOFZoxKR&Q_wDIE4xoYS%8N8SM0v)N6P|^ zFBq>#-RbrC-+tv5=u3L^89?@J7h-yZ=)PsX0pkLFn}PeaZ}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ZbT-5k}IWHNbA=fiOY`KcLBqAHnh@wr7}ypJ8$kQO;@T#f?`Vk(KR^{D%P z;bOj>OC!f_j?n{ZzM`#Q|ELRDX|k%B4mJY$5zNxlNx7agxAV%`sg^tJ%A3qf*=vBT zEmgEe>%En#69ozmbiNOKqbA2XvePn>hm=fxx{UACA?#bt_xr%8L_yLm= zE@6A4#d84`nv3jsI+oYW$IJ(>PntH?Oz?fVxzhVt+s);LsJ69)5;4o@+ov`x6ZW+6 zO;(XPTg$hicYFKZ6q)C^D+j+T_Qgu)cW?K-G*lUP(eW;=AzJGZ5?DyPlhOE4GyjTk zrB7vpv_LIonPU-irBeI^UPG~{*AHwvBne*HIJY?LEfhQRJ!{RG>GKUN1U#cprQYV@?=Kz6ZWTIHw1_9e^pEl4*sWyh?l z#Jweor!mFO<7uxl<391xOPKZh&1Pk+P@GxvpNFl9A~CBJ7NSbIJi5ji>l%nq5X+vA z&T8tILYTu`5T1XAS~O&&h82B;Da-ObB6kAevEcEk<{A%pJOS@rQd#mq+Fhbae?e(u}42(mv)_uCc z*Sx|LFn8^y_>5y^m%LIFrHx%NB~yccm5zHcnwEJCpS`sKdy0JgrWBuvRe+@Gs!{cV z#oDzdyX9zACSE#LfPh_EZO&7tBYwih&h8zm%z7L?M&^cw<9^yY!%?MLij8H6-$|3% zy0O?hZL{S~9{9b!^PIX#&PtIy%K$7B`lb=A*dD z^&!RDm18OdZkg9KsAXilj^&Z_j)+_7vBPQpTu(mSTuc5iD;dURoqO!5$@`;- +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) +#include +#else #include +#endif #include "waforth_core.h" #include "wasm.h" +#include #ifndef VERSION #define VERSION "dev" @@ -63,6 +67,19 @@ wasm_trap_t *read_cb(const wasm_val_vec_t *args, wasm_val_vec_t *results) { } wasm_trap_t *key_cb(const wasm_val_vec_t *args, wasm_val_vec_t *results) { +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) + HANDLE h = GetStdHandle(STD_INPUT_HANDLE); + if (h == NULL) { + return trap_from_string("no console"); + } + DWORD mode; + GetConsoleMode(h, &mode); + SetConsoleMode(h, mode & ~(ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT)); + TCHAR ch = 0; + DWORD cc; + ReadConsole(h, &ch, 1, &cc, NULL); + SetConsoleMode(h, mode); +#else struct termios old, current; tcgetattr(0, &old); current = old; @@ -71,6 +88,7 @@ wasm_trap_t *key_cb(const wasm_val_vec_t *args, wasm_val_vec_t *results) { tcsetattr(0, TCSANOW, ¤t); char ch = getchar(); tcsetattr(0, TCSANOW, &old); +#endif results->data[0].kind = WASM_I32; results->data[0].of.i32 = ch; return NULL; diff --git a/src/standalone/waforth.rc b/src/standalone/waforth.rc new file mode 100644 index 0000000..ecb3feb --- /dev/null +++ b/src/standalone/waforth.rc @@ -0,0 +1,28 @@ +#pragma code_page(65001) + +id ICON "icon.ico" + +// See https://learn.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource +1 VERSIONINFO +FILEVERSION VERSION_TUPLE +PRODUCTVERSION VERSION_TUPLE +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "0409FDE9" + BEGIN + VALUE "CompanyName", "Remko Tronçon" + VALUE "FileDescription", "WAForth" + VALUE "FileVersion", VERSION_STRING + VALUE "InternalName", "waforth" + VALUE "LegalCopyright", "© 2022 Remko Tronçon" + VALUE "OriginalFilename", "waforth.exe" + VALUE "ProductName", "WAForth" + VALUE "ProductVersion", VERSION_STRING + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 65001 + END +END