Skip to content

Commit

Permalink
Merge pull request #179 from UOX3DevTeam/feature/JS-upgrade
Browse files Browse the repository at this point in the history
Feature/js upgrade
  • Loading branch information
Xoduz authored Aug 27, 2023
2 parents 8b41473 + 177c1dc commit 38ba094
Show file tree
Hide file tree
Showing 226 changed files with 48,587 additions and 25,872 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/UOX3Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,23 @@ on:
- '**.dfn'
- '**.scp'
- '**.txt'
- '**.md'
- '**.html'
- '**.sln'
- '**.vcxproj'
- '**.xcodeproj'

pull_request:
paths-ignore:
- '**.js'
- '**.dfn'
- '**.scp'
- '**.txt'
- '**.md'
- '**.html'
- '**.sln'
- '**.vcxproj'
- '**.xcodeproj'

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand Down
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Supported UO Client versions: **~4.0.0p** to at least **~7.0.97.25** (with encryption removed by [ClassicUO](https://www.classicuo.eu), [Razor](https://github.com/msturgill/razor/releases) or similar tools). For additional details on UO client compatibility, check https://www.uox3.org/forums/viewtopic.php?f=1&t=2289

UOX3 relies on **SpiderMonkey v1.7.0** for its JS-based scripting engine, and on **zlib-1.2.11** for data compression matters, and comes bundled with specific, compatible versions of these.
UOX3 relies on **SpiderMonkey v1.8.0-RC1** for its JS-based scripting engine, and on **zlib-1.2.11** for data compression matters, and comes bundled with specific, compatible versions of these.

Join the [UOX3 Discord](https://discord.gg/uBAXxhF) for support and/or a quick chat!

Expand Down Expand Up @@ -40,7 +40,7 @@ Join the [UOX3 Discord](https://discord.gg/uBAXxhF) for support and/or a quick c
---

## Step 2: Clone the UOX3 Git Repository
*Next up, clone the UOX3 git repository, which also includes the latest verified compatible version of SpiderMonkey (v1.7.0) and a minimal set of files required to compile zlib-1.2.11.*
*Next up, clone the UOX3 git repository, which also includes the latest verified compatible version of SpiderMonkey (v1.8.0-RC1) and a minimal set of files required to compile zlib-1.2.11.*
<details>
<summary>Using <strong>GitHub Desktop</strong> (Windows/macOS)</summary>

Expand Down Expand Up @@ -82,14 +82,10 @@ Join the [UOX3 Discord](https://discord.gg/uBAXxhF) for support and/or a quick c

> If you don't wish to rely on the automake.sh script, but want control over the process yourself, follow these steps (same as what automake.sh does) in a Terminal. This also works on Windows/macOS as an alternative to compiling with IDEs:
> - Navigate to root of cloned UOX3 git repository, and execute these commands:\
> `cd make/cmake`\
> `mkdir build`\
> `cd build`\
> `cmake .. -DCMAKE_BUILD_TYPE=Release` (Windows/Linux/FreeBSD)\
> `cmake .. -DCMAKE_BUILD_TYPE=Release -G"Unix Makefiles"` (macOS)\
> `cmake --build . --config Release`\
> Replace "Release" with "Debug" in the above instructions to create a debug-build; delete **make/cmake/build** directory to do clean builds.
> `cmake make/cmake -B ./build -DCMAKE_BUILD_TYPE=Release`\
> `cmake --build ./build --config Release`
> Replace "Release" with "Debug" in the above instructions to create a debug-build; delete **build** directory to do clean builds.
</details>
<details>
Expand Down
16 changes: 6 additions & 10 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h1>UOX3 Documentation</h1>
</div>

<div style="text-align: center; margin-top: 0; margin-bottom: 0">
<p style="margin:0"><small>Last Updated: 1. July, 2023</small></p>
<p style="margin:0"><small>Last Updated: 28. August, 2023</small></p>
<p style="margin:0"><small>Written for UOX3 Version: v0.99.6-RC6</small></p>
</div>

Expand Down Expand Up @@ -4857,7 +4857,7 @@ <h4>Step 1: Set up a Build Environment</h4>
</div>

<h4>Step 2: Clone the UOX3 Git Repository</h4>
<em>Next up, clone the UOX3 git repository, which also includes the latest verified compatible version of SpiderMonkey (v1.7.0) and a minimal set of files required to compile zlib-1.2.11.</em>
<em>Next up, clone the UOX3 git repository, which also includes the latest verified compatible version of SpiderMonkey (v1.8.0-RC1) and a minimal set of files required to compile zlib-1.2.11.</em>
<input type="checkbox" id="spoiler_clone_with_github_desktop">
<label for="spoiler_clone_with_github_desktop">Using <strong>GitHub Desktop (Windows/macOS) </strong> <i class="fas fa-angle-down"></i></label>
<div class="spoiler">
Expand Down Expand Up @@ -4896,12 +4896,8 @@ <h4>Step 3: Compile UOX3</h4>
<p>If you don't wish to rely on the automake.sh script, but want control over the process yourself, follow these steps (same as what automake.sh does) in a Terminal. This also works on Windows/macOS as an alternative to compile with IDEs:</p>
<ul>
<li>Navigate to root of cloned UOX3 git repository</li>
<li><span class="hl">cd make/cmake</span></li>
<li><span class="hl">mkdir build</span></li>
<li><span class="hl">cd build</span></li>
<li><span class="hl">cmake .. -DCMAKE_BUILD_TYPE=Release</span> (Windows/Linux/FreeBSD)</li>
<li><span class="hl">cmake .. -DCMAKE_BUILD_TYPE=Release -G"Unix Makefiles"</span> (macOS)</li>
<li><span class="hl">cmake --build . --config Release</span></li>
<li><span class="hl">cmake make/cmake -B ./build -DCMAKE_BUILD_TYPE=Release</span></li>
<li><span class="hl">cmake --build ./build --config Release</span></li>
</ul>
<p>Replace "Release" with "Debug" in the above instructions to create a debug-build; delete <strong>make/cmake/build</strong> directory to do clean builds.</p>
</div>
Expand Down Expand Up @@ -8167,7 +8163,7 @@ <h3>How to Use the DFN Priority System</h3>
<a class="cd-faq__trigger" href="#jsIntro" id="jsIntro"><span>Introduction to JS Engine in UOX3</span></a>
<div class="cd-faq__content">
<div class="text-component">
<p>UOX3's scripting engine is based on an embedded C++ implementation of JavaScript called <strong>SpiderMonkey</strong> (<a href="https://www-archive.mozilla.org/js/spidermonkey/release-notes/js_170" target="_blank" title="SpiderMonkey 1.7.0 Change Log">v1.7.0</a>). It allows UOX3 to load, read and interpret JavaScript files containing JS events, methods, functions, objects and properties written specifically for UOX3 in order to expose the inner workings of the server to prospective shard admins and script writers.</p>
<p>UOX3's scripting engine is based on an embedded C++ implementation of JavaScript called <strong>SpiderMonkey</strong> (<a href="https://udn.realityripple.com/docs/Mozilla/Projects/SpiderMonkey/Releases/1.8" target="_blank" title="SpiderMonkey 1.8.0-RC1 Change Log">v1.8.0</a>). It allows UOX3 to load, read and interpret JavaScript files containing JS events, methods, functions, objects and properties written specifically for UOX3 in order to expose the inner workings of the server to prospective shard admins and script writers.</p>
<p>UOX3's JavaScripts can be reloaded dynamically without restarting the server, making it very easy to iterate on new features or modify existing ones.</p>
<p>Example of a simple JavaScript in UOX3, used with the Dice and Cup object to allow players to roll a dice and have the number displayed for others to see:<br>
<pre><code class="language-javascript">// The onUseChecked event triggers when the player double-clicks an item
Expand Down Expand Up @@ -8264,7 +8260,7 @@ <h3>How to Use the DFN Priority System</h3>
<div class="cd-faq__content">
<div class="text-component">
<p>The <a href="jsdocs.html">UOX3 JSE Documentation</a> covers all the UOX3-specific events, triggers, methods, functions and properties available to script writers. You can also find some tutorials and/or tips for achieving specific things with UOX3's scripting engine in this document!</p>
<p>UOX3 contains an embedded scripting engine based on <a href="https://www-archive.mozilla.org/js/spidermonkey/release-notes/js_170" target="_blank" title="SpiderMonkey 1.7.0 Change Log">SpiderMonkey v1.7.0</a>, which offers an equivalent JavaScript feature set to <a href="https://developer.mozilla.org/en-US/docs/Archive/Web/JavaScript/New_in_JavaScript/1.7" target="_blank" title="developer.mozilla.com - New in JavaScript 1.7">JavaScript 1.7</a> or <a href="https://www.w3schools.com/js/js_es5.asp" target="_blank" title="w3schools.com - ECMAScript 5">ECMAScript 5</a>, though certain features (especially browser-specific ones) might not be fully supported.</p>
<p>UOX3 contains an embedded scripting engine based on <a href="https://udn.realityripple.com/docs/Mozilla/Projects/SpiderMonkey/Releases/1.8" target="_blank" title="SpiderMonkey 1.8.0-RC1 Change Log">SpiderMonkey v1.8.0-RC1</a>, which offers an equivalent JavaScript feature set to <a href="https://web.archive.org/web/20120612114822/https://developer.mozilla.org/en/New_in_JavaScript_1.8" target="_blank" title="developer.mozilla.com - New in JavaScript 1.8">JavaScript 1.8</a>, though certain features (especially browser-specific ones) might not be fully supported.</p>
<p>For additional help with or discussion around any of these, don't hesitate to make use of the <a href="https://www.uox3.org/forums/" target="_blank" title="UOX3 Community Forums">UOX3.org forums</a> or the <a href="https://discord.gg/uBAXxhF" target="_blank" title="UOX3 Discord Server">UOX3 Discord chat</a>!</p>
</div>
</div> <!-- cd-faq__content -->
Expand Down
5 changes: 2 additions & 3 deletions make/VS2017/uox3.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</BrowseInformation>
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</BrowseInformation>
</ClCompile>
<ClCompile Include="..\..\source\cBaseobject.cpp">
<ClCompile Include="..\..\source\cBaseObject.cpp">
<Optimization Condition="'$(Configuration)|$(Platform)'=='DebugProfile|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='DebugProfile|x64'">Disabled</Optimization>
<BrowseInformation Condition="'$(Configuration)|$(Platform)'=='DebugProfile|Win32'">true</BrowseInformation>
Expand Down Expand Up @@ -1419,7 +1419,7 @@
<ClInclude Include="..\..\source\EventTimer.hpp" />
<ClInclude Include="..\..\source\funcdecl.h" />
<ClInclude Include="..\..\source\GenericList.h" />
<ClInclude Include="..\..\source\gump.h" />
<ClInclude Include="..\..\source\CGump.h" />
<ClInclude Include="..\..\source\IP4Address.hpp" />
<ClInclude Include="..\..\source\jail.h" />
<ClInclude Include="..\..\source\JSEncapsulate.h" />
Expand All @@ -1436,7 +1436,6 @@
<ClInclude Include="..\..\source\power.h" />
<ClInclude Include="..\..\source\Prerequisites.h" />
<ClInclude Include="..\..\source\regions.h" />
<ClInclude Include="..\..\source\resource.h" />
<ClInclude Include="..\..\source\scriptc.h" />
<ClInclude Include="..\..\source\SEFunctions.h" />
<ClInclude Include="..\..\source\skills.h" />
Expand Down
Loading

0 comments on commit 38ba094

Please sign in to comment.