mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-20 15:20:30 -04:00
Try fixing installing 32-bit go, and try fixing 32-bit paths in scripts
This commit is contained in:
parent
1d9ce020e5
commit
e77cd6939e
3 changed files with 35 additions and 15 deletions
|
@ -83,7 +83,6 @@ jobs:
|
||||||
command: |
|
command: |
|
||||||
choco install python --version=3.9.12
|
choco install python --version=3.9.12
|
||||||
choco install 7zip
|
choco install 7zip
|
||||||
choco install go
|
|
||||||
- run:
|
- run:
|
||||||
name: Install poetry
|
name: Install poetry
|
||||||
command: (Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python -
|
command: (Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python -
|
||||||
|
@ -123,36 +122,37 @@ jobs:
|
||||||
- run:
|
- run:
|
||||||
name: Install chocolately dependencies
|
name: Install chocolately dependencies
|
||||||
command: |
|
command: |
|
||||||
choco install python3 --params "/InstallDir32:C:\Python39-32bit" --version=3.9.12
|
choco install python3 --params "/InstallDir32:C:\Python-32bit" --version=3.9.12
|
||||||
choco install 7zip
|
choco install 7zip
|
||||||
- run:
|
- run:
|
||||||
name: Install golang (32-bit)
|
name: Install golang (32-bit)
|
||||||
command: |
|
command: |
|
||||||
Invoke-WebRequest -Uri https://go.dev/dl/go1.18.windows-386.msi -OutFile ~\Downloads\go1.18.windows-386.msi
|
cd ~\Downloads
|
||||||
msiexec.exe /i "~\Downloads\go1.18.windows-386.msi" /qn
|
Invoke-WebRequest -Uri https://go.dev/dl/go1.18.windows-386.msi -OutFile go1.18.windows-386.msi
|
||||||
|
msiexec.exe /i go1.18.windows-386.msi /quiet /L*V go-install.log
|
||||||
- run:
|
- run:
|
||||||
name: Install poetry (32-bit)
|
name: Install poetry (32-bit)
|
||||||
command: C:\Python39-32bit\Scripts\pip install poetry
|
command: C:\Python-32bit\Scripts\pip install poetry
|
||||||
- run:
|
- run:
|
||||||
name: Install poetry dependencies
|
name: Install poetry dependencies
|
||||||
command: |
|
command: |
|
||||||
cd ~\project\desktop
|
cd ~\project\desktop
|
||||||
C:\Python39-32bit\Scripts\poetry install
|
C:\Python-32bit\Scripts\poetry install
|
||||||
- run:
|
- run:
|
||||||
name: Get tor
|
name: Get tor
|
||||||
command: |
|
command: |
|
||||||
cd ~\project\desktop
|
cd ~\project\desktop
|
||||||
C:\Python39-32bit\Scripts\poetry run python .\scripts\get-tor-windows.py
|
C:\Python-32bit\Scripts\poetry run python .\scripts\get-tor-windows.py
|
||||||
- run:
|
- run:
|
||||||
name: Build meek
|
name: Build meek
|
||||||
command: |
|
command: |
|
||||||
cd ~\project\desktop
|
cd ~\project\desktop
|
||||||
C:\Python39-32bit\python .\scripts\build-meek-client.py
|
C:\Python-32bit\python .\scripts\build-meek-client.py
|
||||||
- run:
|
- run:
|
||||||
name: Build
|
name: Build
|
||||||
command: |
|
command: |
|
||||||
cd ~\project\desktop
|
cd ~\project\desktop
|
||||||
C:\Python39-32bit\Scripts\poetry run python .\package\build-windows.py --ci-build
|
C:\Python-32bit\Scripts\poetry run python .\package\build-windows.py --ci-build
|
||||||
- run:
|
- run:
|
||||||
name: Compress
|
name: Compress
|
||||||
command: Compress-Archive -LiteralPath ~\project\desktop\build\exe.win32-3.9 -DestinationPath ~\onionshare-win32.zip
|
command: Compress-Archive -LiteralPath ~\project\desktop\build\exe.win32-3.9 -DestinationPath ~\onionshare-win32.zip
|
||||||
|
|
|
@ -162,6 +162,18 @@ def wix_build_components_xml(root, data):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
# Figure out the architecture and python path
|
||||||
|
if "64 bit" in sys.version:
|
||||||
|
python_arch = "win-amd64"
|
||||||
|
else:
|
||||||
|
python_arch = "win32"
|
||||||
|
|
||||||
|
if os.getlogin() == "circleci" and python_arch == "win32":
|
||||||
|
python_path = "C:\\Python-32bit\\python"
|
||||||
|
else:
|
||||||
|
python_path = shutil.which("python")
|
||||||
|
|
||||||
|
# Arguments
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=48)
|
formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=48)
|
||||||
)
|
)
|
||||||
|
@ -185,17 +197,13 @@ def main():
|
||||||
print("> Building binaries")
|
print("> Building binaries")
|
||||||
run(
|
run(
|
||||||
[
|
[
|
||||||
"python",
|
python_path,
|
||||||
"setup-freeze.py",
|
"setup-freeze.py",
|
||||||
"build",
|
"build",
|
||||||
],
|
],
|
||||||
desktop_dir,
|
desktop_dir,
|
||||||
)
|
)
|
||||||
|
|
||||||
if "64 bit" in sys.version:
|
|
||||||
python_arch = "win-amd64"
|
|
||||||
else:
|
|
||||||
python_arch = "win32"
|
|
||||||
build_path = os.path.join(desktop_dir, "build", f"exe.{python_arch}-3.9")
|
build_path = os.path.join(desktop_dir, "build", f"exe.{python_arch}-3.9")
|
||||||
|
|
||||||
# before_size = get_size(build_path)
|
# before_size = get_size(build_path)
|
||||||
|
|
|
@ -26,13 +26,25 @@ and hard-code the sha256 hash.
|
||||||
"""
|
"""
|
||||||
import shutil
|
import shutil
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
import inspect
|
import inspect
|
||||||
import platform
|
import platform
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if shutil.which("go") is None:
|
# Figure out the architecture and python path
|
||||||
|
if "64 bit" in sys.version:
|
||||||
|
python_arch = "win-amd64"
|
||||||
|
else:
|
||||||
|
python_arch = "win32"
|
||||||
|
|
||||||
|
if os.getlogin() == "circleci" and python_arch == "win32":
|
||||||
|
go_path = "C:\\Program Files (x86)\\Go\\bin\\go"
|
||||||
|
else:
|
||||||
|
go_path = shutil.which("go")
|
||||||
|
|
||||||
|
if go_path is None:
|
||||||
print("Install go: https://golang.org/doc/install")
|
print("Install go: https://golang.org/doc/install")
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue