-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added a build script for windows and documentation for it #115
Open
gameTryer
wants to merge
1
commit into
samtupy:main
Choose a base branch
from
gameTryer:misc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
if ($args -contains "-it") { | ||
if (-not (Get-Command git -ErrorAction SilentlyContinue)) { | ||
winget install --id Git.Git -e | ||
} | ||
if (-not (Get-Command python -ErrorAction SilentlyContinue)) { | ||
winget install --id Python.Python -e | ||
} | ||
if (-not (Get-Command cl -ErrorAction SilentlyContinue)) { | ||
winget install --id Microsoft.VisualStudio.2022.BuildTools -e | ||
} | ||
} | ||
if ($args -contains "-ci") { | ||
Set-Location .. | ||
} else { | ||
if (-not (Get-Command git -ErrorAction SilentlyContinue)) { | ||
winget install --id Git.Git -e | ||
} | ||
git clone https://github.com/samtupy/nvgt | ||
Set-Location -Path "nvgt" | ||
} | ||
$windevPath = "windev" | ||
if (-not (Test-Path $windevPath) -or (Get-ChildItem $windevPath -Recurse | Measure-Object).Count -eq 0) { | ||
$windevZipUrl = "https://nvgt.gg/windev.zip" | ||
$zipFile = "$env:TEMP\windev.zip" | ||
Invoke-WebRequest -Uri $windevZipUrl -OutFile $zipFile | ||
New-Item -ItemType Directory -Path $windevPath -Force | ||
Expand-Archive -Path $zipFile -DestinationPath $windevPath -Force | ||
} | ||
python -m pip install scons | ||
scons -s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# building nvgt on windows | ||
## building with the build_windows.ps1 script | ||
there is a {script for building nvgt for windows}(https://github.com/samtupy/nvgt/blob/main/build/build_windows.sh) | ||
this script can take multiple parameters for controlling the behaviour of the script | ||
* -it: this parameter instructs the script to download the relevant tooling that will be used, this includes a compiler, python, and git | ||
*ci: this parameter tells the script that you have already cloned the repo and it will proseed to download dependencies and build nvgt | ||
### notes | ||
powershell might refuse to execute the script do to execution policys, in that case run the command: | ||
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process | ||
this will apply this change for the current session of powershell only | ||
for a more permanent solution run one of the following: | ||
* Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser: this will set this property for the current user only | ||
* Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine: this will do it for the intire system | ||
setting this setting permanently requires running powershell as admin | ||
## building nvgt manualy | ||
if you do not want to use the script for building nvgt you can do it manualy, | ||
### required software | ||
* a c++ compiler: the one coming with microsoft visual studio22 comunity eddition is recommended | ||
* git: for cloning the repository | ||
* python: for installing and using scons | ||
### instructions | ||
* 1. open a command prompt and navigate to a directory where you want to download nvgt | ||
* 2. run the following command: git clone https://github.com/samtupy/nvgt | ||
* 3. type cd nvgt | ||
* 4. open a webb browser and (download windev.zip){https://nvgt.gg/windev.zip} | ||
*5. extract windev.zip to the github repo you cloned earlyer/windev. so if i cloned the repo to c:\cloned_repos\nvgt the windev.zip should be extracted to c:\cloned_repos\nvgt\windev | ||
6. go back to your command prompt and run the following commands: | ||
python -m pip install scons | ||
scons -s | ||
#### notes | ||
the scons -s command and pip and or python commands might not work correctly. in that case, google on how to add python packages to environment variable or something along those lines |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will trigger the
winget
installation when a VS CLI session is not active, which is probably not what you want (given thatscons
is able to figure out where it's at without a VS command prompt window not needing to be active).