From 12796bcbfd17c50c07f33b676fd5d331d2cf681c Mon Sep 17 00:00:00 2001 From: Harton Date: Thu, 21 Mar 2019 21:43:07 +0100 Subject: [PATCH 1/4] Windows Natively Guide --- INSTALL.WIN.md | 121 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 INSTALL.WIN.md diff --git a/INSTALL.WIN.md b/INSTALL.WIN.md new file mode 100644 index 0000000..330ba66 --- /dev/null +++ b/INSTALL.WIN.md @@ -0,0 +1,121 @@ +# Windows + +## Install Natively + +### [Install Chocolatey](https://chocolatey.org/install#installing-chocolatey) + +### [Install git](https://git-scm.com/) + +[Download](https://git-scm.com/download/win) +or +```bash +choco install git +``` + +### [Install Ruby](https://rubyinstaller.org/downloads/) +```bash +choco install ruby +``` + +### [Install nim](https://github.com/dom96/choosenim) + +Download nim: +- [Self-extracting archive](https://github.com/dom96/choosenim/releases/download/v0.3.2/choosenim-0.3.2_windows_i386.exe) +or +- [Zip archive](https://github.com/dom96/choosenim/releases/download/v0.3.2/choosenim-0.3.2_windows_i386.zip), extract and run the ```runme.bat``` + +Add nim to [PATH](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/): +C:\Users\YOUR_USER\\.nimble\bin +or +where your nim is installed (you can check it when installs). + +### [Install neverwinter_utils.nim](https://github.com/niv/neverwinter.nim) +```bash +nimble install neverwinter +``` + +### [Install nwnsc](https://neverwintervault.org/project/nwnee/other/tool/nwnsc-nwn-enhanced-edition-script-compiler) +1. [Download](https://neverwintervault.org/sites/all/modules/pubdlcnt/pubdlcnt.php?file=https://neverwintervault.org/sites/neverwintervault.org/files/project/29016/files/nwnsc-windows-1.0.0.zip&nid=29016) +2. Extract in some folder under your watch +3. Add nwnsc.exe folder to [PATH](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) (optional) + +### [Install nwn-devbase](https://github.com/jakkn/nwn-devbase) +```bash +git clone https://github.com/jakkn/nwn-devbase.git +cd nwn-devbase +gem install bundler +bundle install +``` + +## First usage + +### Without PATH +```bash +mkdir my-project && cd my-project +git init +ruby path-to-nwn-devbase/build.rb init +cp path-to-my-module.mod server/modules/ +ruby path-to-nwn-devbase/build.rb extract +git add -A && git commit -m "Initial commit" +``` + +### With PATH +Create (if not) and add ```C:\Users\YOUR_USER\bin``` to [PATH](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/). +Being in nwn-devbase folder, execute in PowerShell: +```bash +cmd /c MKLINK "$env:USERPROFILE\bin\nwn-build.rb" "$(pwd)\build.rb" +``` +And then: +```bash +mkdir my-project && cd my-project +git init +nwn-build init +cp path-to-my-module.mod server/modules/ +nwn-build extract +git add -A && git commit -m "Initial commit" +``` + +## Pack and compile +For nss compilation to work, it may be necessary to set some PATHs if the defaults do not match with your system environment. Either specify the paths at run time with + +```bash +NWN_USERDIR="$HOME/Beamdog Library/00829" NSS_COMPILER="$HOME/bin/nwnsc" nwn-build compile +``` +or set them permanently in system environment variables. Placing the compiler in a folder on PATH, like `$HOME/bin` should also work. + +#### NSS compiler + +`build.rb` looks for the _NSS_COMPILER_ environment variable, and defaults to `nwnsc` if that does not exist. Either add the compiler to your PATH, or create the NSS_COMPILER environment variable that points to the nss compiler of your choice. + +You can also edit ```config.rb.in``` located in your project folder inside ```.nwnproject```. +``` +NSS_COMPILER ||= "C:/YOUR_USER/bin/nwnsc" +``` + +#### NWN install dir + +The compiler run arguments specify game resources located in _NWN_USERDIR_ environment variable. This is needed to locate `nwscript.nss` and base game includes. + +You can also edit ```config.rb.in``` located in your project folder inside ```.nwnproject```. +``` +INSTALL_DIR ||= "C:/Program Files (x86)/Steam/steamapps/common/Neverwinter Nights" +``` + +#### PACK +Close Aurora Toolset project before. +```bash +nwn-build pack +``` + +## Toolset +If you are interested in locate your .mod packed file in some other folder that is required by the Aurora toolset you can create a symbolic link with the following command in Power Shell: +```bash +cmd /c MKLINK "NWN_USERDIR\modules\my-module.mod" "PATH_TO_REPO\server\modules\my-module.mod" +``` +Replace NWN_USERDIR with the path to where your local NWN client reads modules from (C:\Users\YOUR_USER\Documents\Neverwinter Nights\modules), and PATH_TO_REPO with the path to the repository of a given project. + +Some conversations may not extract correctly due some characters specific to some regions. To fix it use the appropriate character encoding in ```.nwnproject/config.rb.in```. +e.g. +``` +ENCODING = "utf-8" +``` \ No newline at end of file From e63d33f1231fba3b6452519b64c48cbea02d7296 Mon Sep 17 00:00:00 2001 From: Harton Date: Sat, 30 Mar 2019 20:28:51 +0100 Subject: [PATCH 2/4] Added the requested changes --- INSTALL.WIN.md | 78 ++++++++++++++++++-------------------------------- 1 file changed, 28 insertions(+), 50 deletions(-) diff --git a/INSTALL.WIN.md b/INSTALL.WIN.md index 330ba66..c8fcda0 100644 --- a/INSTALL.WIN.md +++ b/INSTALL.WIN.md @@ -2,45 +2,41 @@ ## Install Natively -### [Install Chocolatey](https://chocolatey.org/install#installing-chocolatey) +### [Install Chocolatey](https://chocolatey.org/install#installing-chocolatey) (optional) ### [Install git](https://git-scm.com/) - -[Download](https://git-scm.com/download/win) +[Download](https://git-scm.com/download/) or -```bash +```bat choco install git ``` -### [Install Ruby](https://rubyinstaller.org/downloads/) -```bash +### [Install Ruby](https://www.ruby-lang.org/) +[Download](https://rubyinstaller.org/downloads/) +or +```bat choco install ruby ``` -### [Install nim](https://github.com/dom96/choosenim) - -Download nim: -- [Self-extracting archive](https://github.com/dom96/choosenim/releases/download/v0.3.2/choosenim-0.3.2_windows_i386.exe) -or -- [Zip archive](https://github.com/dom96/choosenim/releases/download/v0.3.2/choosenim-0.3.2_windows_i386.zip), extract and run the ```runme.bat``` - -Add nim to [PATH](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/): -C:\Users\YOUR_USER\\.nimble\bin +### [Install nim](https://nim-lang.org/) +1. [Download](https://nim-lang.org/install_windows.html) +2. Add nim to PATH: +```%USERPROFILE%\.nimble\bin``` or where your nim is installed (you can check it when installs). ### [Install neverwinter_utils.nim](https://github.com/niv/neverwinter.nim) -```bash +```bat nimble install neverwinter ``` -### [Install nwnsc](https://neverwintervault.org/project/nwnee/other/tool/nwnsc-nwn-enhanced-edition-script-compiler) -1. [Download](https://neverwintervault.org/sites/all/modules/pubdlcnt/pubdlcnt.php?file=https://neverwintervault.org/sites/neverwintervault.org/files/project/29016/files/nwnsc-windows-1.0.0.zip&nid=29016) -2. Extract in some folder under your watch -3. Add nwnsc.exe folder to [PATH](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) (optional) +### [Install nwnsc](https://gitlab.com/glorwinger/nwnsc) +1. [Download](https://neverwintervault.org/project/nwnee/other/tool/nwnsc-nwn-enhanced-edition-script-compiler) +2. Extract in some folder under your watch like ```%USERPROFILE%\bin``` +3. Add nwnsc.exe folder to PATH (optional) ### [Install nwn-devbase](https://github.com/jakkn/nwn-devbase) -```bash +```bat git clone https://github.com/jakkn/nwn-devbase.git cd nwn-devbase gem install bundler @@ -50,7 +46,7 @@ bundle install ## First usage ### Without PATH -```bash +```bat mkdir my-project && cd my-project git init ruby path-to-nwn-devbase/build.rb init @@ -60,13 +56,13 @@ git add -A && git commit -m "Initial commit" ``` ### With PATH -Create (if not) and add ```C:\Users\YOUR_USER\bin``` to [PATH](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/). +Create if it does not exist, and add ```%USERPROFILE%\bin``` to PATH. Being in nwn-devbase folder, execute in PowerShell: -```bash +```posh cmd /c MKLINK "$env:USERPROFILE\bin\nwn-build.rb" "$(pwd)\build.rb" ``` And then: -```bash +```bat mkdir my-project && cd my-project git init nwn-build init @@ -78,44 +74,26 @@ git add -A && git commit -m "Initial commit" ## Pack and compile For nss compilation to work, it may be necessary to set some PATHs if the defaults do not match with your system environment. Either specify the paths at run time with -```bash -NWN_USERDIR="$HOME/Beamdog Library/00829" NSS_COMPILER="$HOME/bin/nwnsc" nwn-build compile +```bat +NWN_USERDIR="%programfiles(x86)%/Steam/steamapps/common/Neverwinter Nights" NSS_COMPILER="%USERPROFILE%/bin/nwnsc" nwn-build compile ``` -or set them permanently in system environment variables. Placing the compiler in a folder on PATH, like `$HOME/bin` should also work. +or set them permanently in system environment variables. Placing the compiler in a folder on PATH, like `%USERPROFILE%/bin` should also work. #### NSS compiler - `build.rb` looks for the _NSS_COMPILER_ environment variable, and defaults to `nwnsc` if that does not exist. Either add the compiler to your PATH, or create the NSS_COMPILER environment variable that points to the nss compiler of your choice. -You can also edit ```config.rb.in``` located in your project folder inside ```.nwnproject```. -``` -NSS_COMPILER ||= "C:/YOUR_USER/bin/nwnsc" -``` - #### NWN install dir - The compiler run arguments specify game resources located in _NWN_USERDIR_ environment variable. This is needed to locate `nwscript.nss` and base game includes. -You can also edit ```config.rb.in``` located in your project folder inside ```.nwnproject```. -``` -INSTALL_DIR ||= "C:/Program Files (x86)/Steam/steamapps/common/Neverwinter Nights" -``` - #### PACK Close Aurora Toolset project before. -```bash +```bat nwn-build pack ``` ## Toolset -If you are interested in locate your .mod packed file in some other folder that is required by the Aurora toolset you can create a symbolic link with the following command in Power Shell: -```bash +To locate your .mod packed file in some other folder that is required by the Aurora toolset you can create a symbolic link with the following command in Power Shell: +```posh cmd /c MKLINK "NWN_USERDIR\modules\my-module.mod" "PATH_TO_REPO\server\modules\my-module.mod" ``` -Replace NWN_USERDIR with the path to where your local NWN client reads modules from (C:\Users\YOUR_USER\Documents\Neverwinter Nights\modules), and PATH_TO_REPO with the path to the repository of a given project. - -Some conversations may not extract correctly due some characters specific to some regions. To fix it use the appropriate character encoding in ```.nwnproject/config.rb.in```. -e.g. -``` -ENCODING = "utf-8" -``` \ No newline at end of file +Replace NWN_USERDIR with the path to where your local NWN client reads modules from (%USERPROFILE%\Documents\Neverwinter Nights\modules), and PATH_TO_REPO with the path to the repository of a given project. \ No newline at end of file From 6caa015bd5c121bf617786fb1c3847a037364f2d Mon Sep 17 00:00:00 2001 From: Harton Date: Sat, 30 Mar 2019 20:33:04 +0100 Subject: [PATCH 3/4] Changes requested --- INSTALL.WIN.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/INSTALL.WIN.md b/INSTALL.WIN.md index c8fcda0..ca3df72 100644 --- a/INSTALL.WIN.md +++ b/INSTALL.WIN.md @@ -57,8 +57,9 @@ git add -A && git commit -m "Initial commit" ### With PATH Create if it does not exist, and add ```%USERPROFILE%\bin``` to PATH. -Being in nwn-devbase folder, execute in PowerShell: +Execute in PowerShell: ```posh +cd path-to-nwn-devbase cmd /c MKLINK "$env:USERPROFILE\bin\nwn-build.rb" "$(pwd)\build.rb" ``` And then: From 3208c98108654b1d0bdc852064428a979af029e0 Mon Sep 17 00:00:00 2001 From: Harton Date: Sun, 31 Mar 2019 17:04:15 +0200 Subject: [PATCH 4/4] Changes requested --- INSTALL.WIN.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/INSTALL.WIN.md b/INSTALL.WIN.md index ca3df72..ca4170c 100644 --- a/INSTALL.WIN.md +++ b/INSTALL.WIN.md @@ -35,7 +35,8 @@ nimble install neverwinter 2. Extract in some folder under your watch like ```%USERPROFILE%\bin``` 3. Add nwnsc.exe folder to PATH (optional) -### [Install nwn-devbase](https://github.com/jakkn/nwn-devbase) +### Install nwn-devbase +Navigate to where you want the nwn-devbase sources located on your system. `%USERPROFILE%\src\` is a good choice. ```bat git clone https://github.com/jakkn/nwn-devbase.git cd nwn-devbase @@ -87,7 +88,7 @@ or set them permanently in system environment variables. Placing the compiler in The compiler run arguments specify game resources located in _NWN_USERDIR_ environment variable. This is needed to locate `nwscript.nss` and base game includes. #### PACK -Close Aurora Toolset project before. +First, close the Aurora Toolset, then run: ```bat nwn-build pack ```