Switch to python 3.9.13 and switch how python is installed in Windows

This commit is contained in:
Micah Lee 2022-06-19 18:11:50 -04:00
parent 609cf488eb
commit e8b388995b
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
3 changed files with 27 additions and 49 deletions

View File

@ -17,10 +17,10 @@ workflows:
requires:
- test-cli
# - test-gui
- build-macos:
requires:
- test-cli
# - test-gui
# - build-macos:
# requires:
# - test-cli
# # - test-gui
jobs:
test-cli:
@ -90,9 +90,11 @@ jobs:
- checkout
- run:
name: Install Python 3.9.12
name: Install Python 3.9.13 (64-bit)
command: |
choco install python3 --version=3.9.12
cd ~\Downloads
Invoke-WebRequest -Uri https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe -OutFile python-3.9.13-amd64.exe
.\python-3.9.13-amd64.exe /quiet PrependPath=1
- run:
name: Install poetry
@ -194,13 +196,15 @@ jobs:
- checkout
- run:
name: Install Python 3.9.12 (32-bit)
name: Install Python 3.9.13 (32-bit)
command: |
choco install python3 --params "/InstallDir32:C:\Python-32bit" --version=3.9.12
cd ~\Downloads
Invoke-WebRequest -Uri https://www.python.org/ftp/python/3.9.13/python-3.9.13.exe -OutFile python-3.9.13.exe
.\python-3.9.13.exe /quiet PrependPath=1
- run:
name: Install poetry (32-bit)
command: C:\Python-32bit\Scripts\pip install poetry
name: Install poetry
command: (Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python -
- restore_cache:
key: build-win32-desktop-poetry-deps-{{ checksum "~/project/desktop/poetry.lock" }}-{{ .Environment.CACHE_VERSION }}
@ -208,7 +212,7 @@ jobs:
name: Install poetry dependencies
command: |
cd ~\project\desktop
C:\Python-32bit\Scripts\poetry install
poetry install
- save_cache:
key: build-win32-desktop-poetry-deps-{{ checksum "~/project/desktop/poetry.lock" }}-{{ .Environment.CACHE_VERSION }}
paths:
@ -220,7 +224,7 @@ jobs:
name: Get tor binaries from Tor Browser (32-bit)
command: |
cd desktop
C:\Python-32bit\Scripts\poetry run python .\scripts\get-tor.py win32
poetry run python .\scripts\get-tor.py win32
- save_cache:
key: get-tor-win32-{{ checksum "desktop/scripts/get-tor.py" }}-{{ .Environment.CACHE_VERSION }}
paths:
@ -288,8 +292,8 @@ jobs:
name: Build OnionShare
command: |
cd ~\project\desktop
C:\Python-32bit\Scripts\poetry run python .\setup-freeze.py build
C:\Python-32bit\Scripts\poetry run python .\scripts\build-windows.py cleanup-build
poetry run python .\setup-freeze.py build
poetry run python .\scripts\build-windows.py cleanup-build
- run:
name: Compress
@ -314,9 +318,9 @@ jobs:
brew install go
- run:
name: Install Python 3.9.12
name: Install Python 3.9.13
command: |
wget https://www.python.org/ftp/python/3.9.12/python-3.9.12-macosx10.9.pkg -O ~/Downloads/python.pkg
wget https://www.python.org/ftp/python/3.9.13/python-3.9.13-macosx10.9.pkg -O ~/Downloads/python.pkg
sudo installer -pkg ~/Downloads/python.pkg -target /
- run:

View File

@ -16,12 +16,6 @@ Before making a release, you must update the version in these places:
If you update `flask-socketio`, ensure that you also update the [socket.io.min.js](https://github.com/micahflee/onionshare/blob/develop/cli/onionshare_cli/resources/static/js/socket.io.min.js) file to a version that is [supported](https://flask-socketio.readthedocs.io/en/latest/#version-compatibility) by the updated version of `flask-socketio`.
Use tor binaries from the latest Tor Browser:
- [ ] `desktop/scripts/get-tor-linux.py`
- [ ] `desktop/scripts/get-tor-osx.py`
- [ ] `desktop/scripts/get-tor-windows.py`
Update the documentation:
- [ ] Update all of the documentation in `docs` to cover new features, including taking new screenshots if necessary
@ -100,27 +94,18 @@ snapcraft upload --release=stable onionshare_${VERSION}_amd64.snap
## Windows
Set up the development environment described in desktop `README.md`.
Set up the packaging environment:
- To get `signtool.exe`, install the [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/) and add `C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64` to your path.
- Install the [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/) and add `C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64` to your path (to get `signtool.exe`).
- Go to https://dotnet.microsoft.com/download/dotnet-framework and download and install .NET Framework 3.5 SP1 Runtime. I downloaded `dotnetfx35.exe`.
- Go to https://wixtoolset.org/releases/ and download and install WiX toolset. I downloaded `wix311.exe`. Add `C:\Program Files (x86)\WiX Toolset v3.11\bin` to the path.
Build the Windows binaries, delete extra files, codesign, and create an MSI package:
CircleCI will build the binary and delete extra files, basically running these:
```
poetry run python .\setup-freeze.py build
poetry run python .\scripts\build-windows.py cleanup-build
```
Find the CircleCI jobs `build-win32` and `build-win64`, switch to the artifacts tab, and download:
CircleCI will build the binaries. Find the CircleCI jobs `build-win32` and `build-win64`, switch to the artifacts tab, and download:
- `onionshare-win32.zip`
- `onionshare-win64.zip`
Extract these files, then run:
Extract these files, change to the `desktop` folder, and run:
```
poetry run python .\scripts\build-windows.py codesign [onionshare_win32_path] [onionshare_win64_path]
@ -134,22 +119,11 @@ This will create:
## macOS
Set up the development environment described in `README.md`.
Then build an executable, make it a macOS app bundle, and package it in a dmg.
CircleCI will build the binary and delete extra files, basically running these:
```sh
poetry run python ./setup-freeze.py bdist_mac
poetry run python ./scripts/build-macos.py cleanup-build
```
Find the CircleCI job `build-macos`, switch to the artifacts tab, and download:
CircleCI will build the binaries. Find the CircleCI job `build-macos`, switch to the artifacts tab, and download:
- `onionshare-macos.zip`
Extract this file, then run:
Extract these files, change to the `desktop` folder, and run:
```sh
poetry run python ./scripts/build-macos.py codesign [app_path]

View File

@ -9,7 +9,7 @@ git clone https://github.com/onionshare/onionshare.git
cd onionshare/desktop
```
Make sure you have Python 3 installed. If you're using Windows or macOS, install version 3.9.12 [from python.org](https://www.python.org/downloads/release/python-3912/). For Windows, make sure to check the box to add python to the path on the first page of the installer.
Make sure you have Python 3 installed. If you're using Windows or macOS, install version 3.9.13 [from python.org](https://www.python.org/downloads/release/python-3913/). For Windows, make sure to check the box to add python to the path on the first page of the installer.
Make sure you have [poetry](https://python-poetry.org/) installed: