From 671d070838c8bc964e408355b8a3fa0c7644fc1c Mon Sep 17 00:00:00 2001 From: aryan Date: Thu, 9 Jun 2022 04:03:49 -0700 Subject: [PATCH 01/10] Started cmake Looks like an enormous job. The Domain specific language in wxWidgets/CMakeLists.txt is a huge pile of code in an completely undocumented language that was never intended to be a turing complete language. Need to fix options.cmake, and possibly main.cmake Which overrule our build options for their own. --- CMakeLists.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..2c9a780 --- /dev/null +++ b/CMakeLists.txt @@ -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} +) From fb2d0d022108453ed1284b95525a5d426f963893 Mon Sep 17 00:00:00 2001 From: aryan Date: Thu, 9 Jun 2022 18:09:43 -0700 Subject: [PATCH 02/10] Fixed winConfigure bat to run without visual studio Only visual build tools installed by choco, pluw the desktop compent installed by the visual studio installer installed by choco modified: winConfigure.bat --- winConfigure.bat | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/winConfigure.bat b/winConfigure.bat index 4d20630..8cea4a2 100644 --- a/winConfigure.bat +++ b/winConfigure.bat @@ -7,7 +7,7 @@ IF %ERRORLEVEL% NEQ 0 ( ) 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 +15,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 +82,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 +98,14 @@ IF %ERRORLEVEL% NEQ 0 ( echo on cd ..\..\.. -devenv wallet.sln /build "Debug|x64" +msbuild wallet.vcxproj -p:Configuration=Debug -m echo off IF %ERRORLEVEL% NEQ 0 ( PAUSE GOTO:EOF ) echo on -devenv wallet.sln /build "Release|x64" +msbuild wallet.vcxproj -p:Configuration=Release -m echo off IF %ERRORLEVEL% NEQ 0 ( PAUSE @@ -124,4 +124,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 +) From 099965f9b3dca35eb2d30649d49b13f67eccec5f Mon Sep 17 00:00:00 2001 From: aryan Date: Fri, 10 Jun 2022 04:49:37 -0700 Subject: [PATCH 03/10] documenting that you no longer need the native tools shell --- docs/rootDocs/README.md | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/docs/rootDocs/README.md b/docs/rootDocs/README.md index 199de43..fefb93a 100644 --- a/docs/rootDocs/README.md +++ b/docs/rootDocs/README.md @@ -10,21 +10,22 @@ 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, from the bash command line (git-bash in windows). ```bash2 git clone --recurse-submodules missing url ``` -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: +To configure and build the required third party libraries in windows, +then build the program and run unit test for the first time, execute ```bat -winConfigure.bat +.\winConfigure.bat ``` +from the windows power shell or command window. + Should the libraries change in a subsequent `pull ` you will need ```bat @@ -48,14 +49,16 @@ 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.sh` -winConfigure.bat also configures the repository you just created to use -`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 entryists and shills, who seek to introduce backdoors. +winConfigure.bat also configures the repository you just created to +to use `.gitconfig` in the repository, causing git to to implement +GPG signed commits -- 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. `.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 @@ -93,5 +96,5 @@ files, execute the bash script file `docs/mkdocs.sh`, in an environment where 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. From b3b40efdc0c4473ba9a4093a0f120b5c4882a270 Mon Sep 17 00:00:00 2001 From: aryan Date: Mon, 13 Jun 2022 00:14:48 -0700 Subject: [PATCH 04/10] set git to recurse submodules --- .gitconfig | 4 ++ README.html | 187 ---------------------------------------------------- 2 files changed, 4 insertions(+), 187 deletions(-) delete mode 100644 README.html diff --git a/.gitconfig b/.gitconfig index de3488f..ff549c4 100644 --- a/.gitconfig +++ b/.gitconfig @@ -11,3 +11,7 @@ alias = ! git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\ =\\ / | grep -v ^'alias ' | sort [commit] gpgSign = true +[submodule] + recurseSubmodules = on-demand +[fetch] + recurseSubmodules = on-demand diff --git a/README.html b/README.html deleted file mode 100644 index b4c8405..0000000 --- a/README.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - README - - - - - -
-

README

-
-

pre alpha documentation (mostly a wish list)

-

copyright © and license

-

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).

-
git clone --recurse-submodules missing url
-

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:

-
winConfigure.bat
-

Should the libraries change in a subsequent pull you will need

-
git pull
-rem you get a status message indicating libraries have been updated.
-git pull -force --recurse-submodules
-winConfigure.bat
-

in order to rebuild the libraries.

-

The --force is necessary, because winConfigure.bat changes -many of the library files, and therefore git will abort the pull.

-

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 -entryists and shills, who seek to introduce backdoors.

-

This may be inconvenient if you do not have gpg installed and set up.

-

.gitconfig adds several git aliases:

-
    -
  1. git lg to display the gpg trust information for the last four commits. -For this to be useful you need to import the repository public key -public_key.gpg into gpg, and locally sign that key.
  2. -
  3. git graph to graph the commit tree with signing status
  4. -
  5. git alias to display the git aliases.
  6. -
-
# To verify that the signature on future pulls is
-# unchanged.
-gpg --import  public_key.gpg
-gpg --lsign 096EAE16FB8D62E75D243199BC4482E49673711C
-

We ignore the Gpg Web of Trust model and instead use the Zooko -identity model.

-

We use Gpg signatures to verify that remote repository code -is coming from an unchanging entity, not for Gpg Web of Trust. Web -of Trust is too complicated and too user hostile to be workable or safe.

-

Never –sign any Gpg key related to this project. –lsign it.

-

Never check any Gpg key related to this project against a public -gpg key repository. It should not be there.

-

Never use any email address on a gpg key related to this project -unless it is only used for project purposes, or a fake email, or the -email of an enemy. We don’t want Gpg used to link different email -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, which means it does not yet work even well enough for -it to be apparent what it would do if it did work.

- - From 4a31f556a246dd59d57450637eeba6d6c6add747 Mon Sep 17 00:00:00 2001 From: aryan Date: Sat, 18 Jun 2022 13:41:40 -0700 Subject: [PATCH 05/10] shortened names of winConfigure to winConfig Typed them wrong too many times. --- winConfigure.bat => winConfig.bat | 0 winConfigure.sh => winConfig.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename winConfigure.bat => winConfig.bat (100%) rename winConfigure.sh => winConfig.sh (100%) diff --git a/winConfigure.bat b/winConfig.bat similarity index 100% rename from winConfigure.bat rename to winConfig.bat diff --git a/winConfigure.sh b/winConfig.sh similarity index 100% rename from winConfigure.sh rename to winConfig.sh From 9dc3b9f97943ee7054d11d4740b8b67d8fb515c1 Mon Sep 17 00:00:00 2001 From: aryan Date: Sat, 18 Jun 2022 14:05:46 -0700 Subject: [PATCH 06/10] modified: .gitconfig Trying to get recursion to work. modified: libsodium to our customized fork. modified: mpir to our customized fork. modified: wxWidgets to our customized fork. --- .gitconfig | 9 +++------ libsodium | 2 +- mpir | 2 +- wxWidgets | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.gitconfig b/.gitconfig index 5e223f3..46ee228 100644 --- a/.gitconfig +++ b/.gitconfig @@ -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 @@ -13,8 +12,6 @@ [commit] gpgSign = true [submodule] - recurseSubmodules = on-demand -[fetch] - recurseSubmodules = on-demand -[diff] - submodule = log + active = * + recurse = true + diff --git a/libsodium b/libsodium index 561e556..012e892 160000 --- a/libsodium +++ b/libsodium @@ -1 +1 @@ -Subproject commit 561e556dad078af581f338fe3de9ee6362d28b16 +Subproject commit 012e892841ed6edc521f88a23b55863c7afe4622 diff --git a/mpir b/mpir index 33be900..8c8e90f 160000 --- a/mpir +++ b/mpir @@ -1 +1 @@ -Subproject commit 33be9007f95b85230da2330ef3ed525896370cc2 +Subproject commit 8c8e90fe338ccad11a8a6c728314eefb9e95b70a diff --git a/wxWidgets b/wxWidgets index 35a6d7b..1e91b6c 160000 --- a/wxWidgets +++ b/wxWidgets @@ -1 +1 @@ -Subproject commit 35a6d7b15fedfdb5198bb6c28b31cda33b2c2a76 +Subproject commit 1e91b6c1fb844e415cc0f210c4a6159098464e44 From b3bfce98cc21712943cc8f1b76971048412da53b Mon Sep 17 00:00:00 2001 From: aryan Date: Sat, 18 Jun 2022 14:35:18 -0700 Subject: [PATCH 07/10] incorporating modified submodules --- wxWidgets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wxWidgets b/wxWidgets index 1e91b6c..270d386 160000 --- a/wxWidgets +++ b/wxWidgets @@ -1 +1 @@ -Subproject commit 1e91b6c1fb844e415cc0f210c4a6159098464e44 +Subproject commit 270d38601df59429710dda66832d8d91e3701296 From 08dd5321c350d29cbfd0c264941d10af92bea103 Mon Sep 17 00:00:00 2001 From: aryan Date: Sat, 18 Jun 2022 16:33:48 -0700 Subject: [PATCH 08/10] amending winConfig preparatory to abandoning winConfig.sh --- mpir | 2 +- winConfig.bat | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/mpir b/mpir index 8c8e90f..20795fa 160000 --- a/mpir +++ b/mpir @@ -1 +1 @@ -Subproject commit 8c8e90fe338ccad11a8a6c728314eefb9e95b70a +Subproject commit 20795fa90044ea9adfc5a2e28c9a60d8e2eebcbd diff --git a/winConfig.bat b/winConfig.bat index 629937f..85f4b61 100644 --- a/winConfig.bat +++ b/winConfig.bat @@ -1,10 +1,3 @@ -winConfigure.sh -echo off -IF %ERRORLEVEL% NEQ 0 ( - echo error in git-bash shell file winConfigure.sh - PAUSE - GOTO:EOF -) echo on call C:\"Program Files (x86)"\"Microsoft Visual Studio"\2022\BuildTools\VC\Auxiliary\Build\vcvarsamd64_x86.bat cd libsodium From 0e7099554117835ecc40a8893421aef4ce92a9c7 Mon Sep 17 00:00:00 2001 From: aryan Date: Sun, 19 Jun 2022 16:17:52 -0700 Subject: [PATCH 09/10] Documented changes in the install source process --- docs/rootDocs/README.md | 78 ++++++++++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 28 deletions(-) diff --git a/docs/rootDocs/README.md b/docs/rootDocs/README.md index 4aa1748..7baac33 100644 --- a/docs/rootDocs/README.md +++ b/docs/rootDocs/README.md @@ -11,47 +11,75 @@ 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). +including this README.html, from the bash command line (git-bash in windows). -```bash2 +```bash git clone --recurse-submodules missing url ``` -To configure and build the required third party libraries in windows, -then build the program and run unit test for the first time, execute +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, you need to have +Visual studio build tools at their default location) + +```bash2 +cd wallet +./winConfigure.bat +``` + +Or, if you are in the command shell or power shell, ```bat .\winConfigure.bat ``` -from the windows power shell or command window. +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. -Should the libraries change in a subsequent `pull ` you will need +After a pull that gives you a status of modified submodules. -```bat -git pull -rem you get a status message indicating libraries have been updated. -git pull -force --recurse-submodules -winConfigure.bat +```bash +git submodule update --init --recursive --remote ``` -in order to rebuild the libraries. +After a checkout or branch switch that gives you a status of modified submodules. -The `--force` is necessary, because `winConfigure.bat` changes -many of the library files, and therefore git will abort the pull. +```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.sh` - -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. @@ -99,11 +127,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. From 063c9f1f10e88a6eaeeb6781a12aa208038e3852 Mon Sep 17 00:00:00 2001 From: aryan Date: Mon, 20 Jun 2022 05:23:59 -0700 Subject: [PATCH 10/10] should work on your computer now --- winConfig.bat | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/winConfig.bat b/winConfig.bat index 85f4b61..2c905e2 100644 --- a/winConfig.bat +++ b/winConfig.bat @@ -1,5 +1,7 @@ -echo on +echo off 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.vcxproj -p:Configuration=Release;Platform=x64;PlatformToolset=v143;WindowsTargetPlatformVersion=10.0 -m echo off