Merge remote-tracking branch 'origin/cmake' into docs
This commit is contained in:
commit
3129c736f2
@ -1,7 +1,6 @@
|
||||
[core]
|
||||
autocrlf = input
|
||||
whitespace = -tab-in-indent,tabwidth=4,indent-with-non-tab,trailing-space,space-before-tab
|
||||
whitespace = fix
|
||||
safecrlf=warn
|
||||
[apply]
|
||||
whitespace = fix
|
||||
@ -19,6 +18,7 @@
|
||||
[pull]
|
||||
verify-signatures = true
|
||||
[submodule]
|
||||
active = *
|
||||
recurse = true
|
||||
[diff]
|
||||
submodule = log
|
||||
|
27
CMakeLists.txt
Normal file
27
CMakeLists.txt
Normal file
@ -0,0 +1,27 @@
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
project(wallet)
|
||||
# add_subdirectory(libsodium)
|
||||
# add_subdirectory(mpir)
|
||||
add_subdirectory(wxWidgets)
|
||||
# include( ${libsodium_USE_FILE} )
|
||||
# include( ${mpir_USE_FILE} )
|
||||
# include( ${wxWidgets_USE_FILE} )
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
# Whenever this glob's value changes, cmake will rerun and update the build with the
|
||||
# new/removed files.
|
||||
file(GLOB walletcpp CONFIGURE_DEPENDS "*.cpp" )
|
||||
file(GLOB walletc CONFIGURE_DEPENDS "*.c" )
|
||||
file(GLOB walletmanifest CONFIGURE_DEPENDS "*.manifest" )
|
||||
file(GLOB walletmanifest CONFIGURE_DEPENDS "*.rc" )
|
||||
add_executable(${PROJECT_NAME}
|
||||
${walletcpp}
|
||||
${walletc}
|
||||
${walletmanifest}
|
||||
${walletrc}
|
||||
)
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
${wxWidgets_LIBRARIES}
|
||||
${libsodium_LIBRARIES}
|
||||
${mpir_LIBRARIES}
|
||||
)
|
@ -10,47 +10,76 @@ pre-requisite, Pandoc to build the html documentation from the markdown files.
|
||||
|
||||
Windows pre-requisites: Visual Studio and git-bash
|
||||
|
||||
To obtain the source code from which the project can be built, including
|
||||
this README, from the bash command line (git-bash in windows).
|
||||
To obtain the source code from which the project can be built,
|
||||
including this README.html, from the bash command line (git-bash in windows).
|
||||
|
||||
```bash2
|
||||
```bash
|
||||
git clone --recurse-submodules missing url
|
||||
```
|
||||
|
||||
To build the docs, you need pandoc on the path.
|
||||
|
||||
```bash2
|
||||
cd wallet/docs
|
||||
./mkdocs.sh
|
||||
```
|
||||
|
||||
To configure and build the required third party libraries in windows, then
|
||||
build the program and run unit test for the first time, launch the Visual
|
||||
Studio X64 native tools command prompt in the cloned directory, then:
|
||||
build the program and run unit test for the first time, you need to have
|
||||
Visual studio build tools at their default location)
|
||||
|
||||
```bat
|
||||
winConfigure.bat
|
||||
```bash2
|
||||
cd wallet
|
||||
./winConfigure.bat
|
||||
```
|
||||
|
||||
Should the libraries change in a subsequent `pull ` you will need
|
||||
Or, if you are in the command shell or power shell,
|
||||
|
||||
```bat
|
||||
git pull
|
||||
rem you get a status message indicating libraries have been updated.
|
||||
git pull -force --recurse-submodules
|
||||
winConfigure.bat
|
||||
.\winConfigure.bat
|
||||
```
|
||||
|
||||
in order to rebuild the libraries.
|
||||
After a pull from remote in which the submodules have changed, the pull
|
||||
fails to automatically update the submodules by default, and when you
|
||||
switch or checkout branches, the switch fails to automatically switch
|
||||
and checkout the brances.
|
||||
|
||||
The `--force` is necessary, because `winConfigure.bat` changes
|
||||
many of the library files, and therefore git will abort the pull.
|
||||
After a pull that gives you a status of modified submodules.
|
||||
|
||||
```bash
|
||||
git submodule update --init --recursive --remote
|
||||
```
|
||||
|
||||
After a checkout or branch switch that gives you a status of modified submodules.
|
||||
|
||||
```bash
|
||||
git submodule update --recursive
|
||||
```
|
||||
|
||||
The documentation is in pandoc flavored markdown, which is
|
||||
conveniently edited in vscode with the `markdown lint` and `Pandoc`
|
||||
extensions included and, if you have launched `code` in the docs directory,
|
||||
with `file/preferences/Extensions/Markdown/Styles` set to
|
||||
`pandoc_templates\\style.css`, that being the style used by the `mkdocs.sh` documentation build script.
|
||||
|
||||
On Windows, if Git Bash and Pandoc has been installed, you should be
|
||||
able to run this shell file in bash by double clicking on it.
|
||||
|
||||
if you add the recommended repository configuration defaults to your local repository configuration
|
||||
|
||||
```bash
|
||||
git config --local include.path ../.gitconfig
|
||||
```
|
||||
|
||||
this will substantially mitigate the problem of submodules failing to
|
||||
update in pushes, pulls, checkouts, and switches.
|
||||
|
||||
[cryptographic software is under attack]:./docs/contributor_code_of_conduct.html#code-will-be-cryptographically-signed
|
||||
"Contributor Code of Conduct"
|
||||
{target="_blank"}
|
||||
|
||||
The winConfigure script builds everything, including the documents, but
|
||||
takes a while. Normally when you make changes to the source code you
|
||||
should rebuild just the program, using `wallet.sln` on windows.
|
||||
To rebuild the documents after editing them, `docs/mkdocs`
|
||||
|
||||
winConfigure.bat also configures the repository you just created to use
|
||||
`.gitconfig` in the repository, causing git to to implement GPG signed
|
||||
commits -- because [cryptographic software is under attack] from NSA
|
||||
It will, however, also implement signed commits, insist that you have `gpg` on your path, and that you have cohfigured a signing key in your local config, and will refuse to pull updates that are signed by a gpg key that you have not locally trusted.
|
||||
because [cryptographic software is under attack] from NSA
|
||||
entryists and shills, who seek to introduce backdoors.
|
||||
|
||||
This may be inconvenient if you do not have `gpg` installed and set up.
|
||||
@ -59,7 +88,7 @@ It also means that subsequent pulls and merges will require you to have `gpg `tr
|
||||
|
||||
`.gitconfig` adds several git aliases:
|
||||
|
||||
1. `git lg` to display the gpg trust information for the last four commits.
|
||||
1. `git lg` to display the gpg trust information for the last few commits.
|
||||
For this to be useful you need to import the repository public key
|
||||
`public_key.gpg` into gpg, and locally sign that key.
|
||||
1. `git graph` to graph the commit tree with signing status
|
||||
@ -105,11 +134,5 @@ addresses as owned by the same entity, and we don't want email
|
||||
addresses used to link people to the project, because those
|
||||
identities would then come under state and quasi state pressure.
|
||||
|
||||
To build the documentation in its intended html form from the markdown
|
||||
files, execute the bash script file `docs/mkdocs.sh`, in an environment where
|
||||
`pandoc` is available. On Windows, if Git Bash and Pandoc
|
||||
has been installed, you should be able to run this shell
|
||||
file in bash by double clicking on it.
|
||||
|
||||
[Pre alpha release](./RELEASE_NOTES.html), which means it does not yet work even well enough for
|
||||
it to be apparent what it would do if it did work.
|
||||
[Pre alpha release](./RELEASE_NOTES.html), which means it does not yet work even well
|
||||
enough for it to be apparent what it would do if it did work.
|
||||
|
@ -1,13 +1,9 @@
|
||||
winConfigure.sh
|
||||
echo off
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo error in git-bash shell file winConfigure.sh
|
||||
PAUSE
|
||||
GOTO:EOF
|
||||
)
|
||||
call C:\"Program Files (x86)"\"Microsoft Visual Studio"\2022\BuildTools\VC\Auxiliary\Build\vcvarsamd64_x86.bat
|
||||
call C:\"Program Files"\"Microsoft Visual Studio"\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
echo on
|
||||
cd libsodium
|
||||
msbuild libsodium.sln -p:Configuration=Release;Platform=x64;PlatformToolset=v143;WindowsTargetPlatformVersion=10.0 -m
|
||||
msbuild libsodium.vcxproj -p:Configuration=Release;Platform=x64;PlatformToolset=v143;WindowsTargetPlatformVersion=10.0 -m
|
||||
echo off
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
cd ..
|
||||
@ -15,7 +11,7 @@ IF %ERRORLEVEL% NEQ 0 (
|
||||
GOTO:EOF
|
||||
)
|
||||
echo on
|
||||
msbuild libsodium.sln -p:Configuration=Debug;Platform=x64;PlatformToolset=v143;WindowsTargetPlatformVersion=10.0 -m
|
||||
msbuild libsodium.vcxproj -p:Configuration=Debug;Platform=x64;PlatformToolset=v143;WindowsTargetPlatformVersion=10.0 -m
|
||||
echo off
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
cd ..
|
||||
@ -82,14 +78,14 @@ IF %ERRORLEVEL% NEQ 0 (
|
||||
echo on
|
||||
cd ..\..\..
|
||||
cd wxWidgets\build\msw
|
||||
msbuild wx_vc16.sln -m -p:Configuration=Release;Platform=x64;PlatformToolset=v143;WindowsTargetPlatformVersion=10.0
|
||||
msbuild wx_vc17.sln -m -p:Configuration=Release;Platform=x64;PlatformToolset=v143;WindowsTargetPlatformVersion=10.0
|
||||
echo off
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
PAUSE
|
||||
GOTO:EOF
|
||||
)
|
||||
echo on
|
||||
msbuild wx_vc16.sln -m -p:Configuration=Debug;Platform=x64;PlatformToolset=v143;WindowsTargetPlatformVersion=10.0
|
||||
msbuild wx_vc17.sln -m -p:Configuration=Debug;Platform=x64;PlatformToolset=v143;WindowsTargetPlatformVersion=10.0
|
||||
echo off
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
PAUSE
|
||||
@ -98,14 +94,14 @@ IF %ERRORLEVEL% NEQ 0 (
|
||||
|
||||
echo on
|
||||
cd ..\..\..
|
||||
devenv wallet.sln /build "Debug|x64"
|
||||
msbuild wallet.vcxproj -p:Configuration=Debug;Platform=x64 -m
|
||||
echo off
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
PAUSE
|
||||
GOTO:EOF
|
||||
)
|
||||
echo on
|
||||
devenv wallet.sln /build "Release|x64"
|
||||
msbuild wallet.vcxproj -p:Configuration=Release;Platform=x64 -m
|
||||
echo off
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
PAUSE
|
||||
@ -124,4 +120,5 @@ echo off
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo failed unit test on release build
|
||||
) ELSE (
|
||||
echo passed unit test on release build)
|
||||
echo passed unit test on release build
|
||||
)
|
Loading…
Reference in New Issue
Block a user