mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-18 04:04:45 -05:00
Fix get_tor_paths() to point to new Windows paths, and actually build onionshare for win64
This commit is contained in:
parent
092715585b
commit
ac9bc039bb
@ -202,7 +202,7 @@ jobs:
|
|||||||
Copy-Item -Path C:\Users\circleci\build\tor\share\tor\geoip6 -Destination C:\Users\circleci\project\desktop\onionshare\resources\tor
|
Copy-Item -Path C:\Users\circleci\build\tor\share\tor\geoip6 -Destination C:\Users\circleci\project\desktop\onionshare\resources\tor
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
# NOTE: make sure to change when uprading obfs4proxy
|
# NOTE: make sure to change when upgrading obfs4proxy
|
||||||
key: build-win64-obfs4proxy-v0.0.13-{{ .Environment.CACHE_VERSION }}"
|
key: build-win64-obfs4proxy-v0.0.13-{{ .Environment.CACHE_VERSION }}"
|
||||||
- run:
|
- run:
|
||||||
name: Build obfs4proxy
|
name: Build obfs4proxy
|
||||||
@ -221,13 +221,13 @@ jobs:
|
|||||||
Move-Item -Path .\obfs4proxy.exe -Destination C:\Users\circleci\project\desktop\onionshare\resources\tor\obfs4proxy.exe
|
Move-Item -Path .\obfs4proxy.exe -Destination C:\Users\circleci\project\desktop\onionshare\resources\tor\obfs4proxy.exe
|
||||||
}
|
}
|
||||||
- save_cache:
|
- save_cache:
|
||||||
# NOTE: make sure to change when uprading obfs4proxy
|
# NOTE: make sure to change when upgrading obfs4proxy
|
||||||
key: build-win64-obfs4proxy-v0.0.13-{{ .Environment.CACHE_VERSION }}"
|
key: build-win64-obfs4proxy-v0.0.13-{{ .Environment.CACHE_VERSION }}"
|
||||||
paths:
|
paths:
|
||||||
- C:\Users\circleci\project\desktop\onionshare\resources\tor\obfs4proxy.exe
|
- C:\Users\circleci\project\desktop\onionshare\resources\tor\obfs4proxy.exe
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
# NOTE: make sure to change when uprading snowflake
|
# NOTE: make sure to change when upgrading snowflake
|
||||||
key: build-win64-snowflake-v2.1.0-{{ .Environment.CACHE_VERSION }}"
|
key: build-win64-snowflake-v2.1.0-{{ .Environment.CACHE_VERSION }}"
|
||||||
- run:
|
- run:
|
||||||
name: Build snowflake-client
|
name: Build snowflake-client
|
||||||
@ -245,13 +245,13 @@ jobs:
|
|||||||
Move-Item -Path .\client.exe -Destination C:\Users\circleci\project\desktop\onionshare\resources\tor\snowflake-client.exe
|
Move-Item -Path .\client.exe -Destination C:\Users\circleci\project\desktop\onionshare\resources\tor\snowflake-client.exe
|
||||||
}
|
}
|
||||||
- save_cache:
|
- save_cache:
|
||||||
# NOTE: make sure to change when uprading snowflake
|
# NOTE: make sure to change when upgrading snowflake
|
||||||
key: build-win64-snowflake-v2.1.0-{{ .Environment.CACHE_VERSION }}"
|
key: build-win64-snowflake-v2.1.0-{{ .Environment.CACHE_VERSION }}"
|
||||||
paths:
|
paths:
|
||||||
- C:\Users\circleci\project\desktop\onionshare\resources\tor\snowflake-client.exe
|
- C:\Users\circleci\project\desktop\onionshare\resources\tor\snowflake-client.exe
|
||||||
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
# NOTE: make sure to change when uprading meek
|
# NOTE: make sure to change when upgrading meek
|
||||||
key: build-win64-meek-v0.37.0-{{ .Environment.CACHE_VERSION }}"
|
key: build-win64-meek-v0.37.0-{{ .Environment.CACHE_VERSION }}"
|
||||||
- run:
|
- run:
|
||||||
name: Build meek-client
|
name: Build meek-client
|
||||||
@ -269,52 +269,47 @@ jobs:
|
|||||||
Move-Item -Path .\meek-client.exe -Destination C:\Users\circleci\project\desktop\onionshare\resources\tor\meek-client.exe
|
Move-Item -Path .\meek-client.exe -Destination C:\Users\circleci\project\desktop\onionshare\resources\tor\meek-client.exe
|
||||||
}
|
}
|
||||||
- save_cache:
|
- save_cache:
|
||||||
# NOTE: make sure to change when uprading meek
|
# NOTE: make sure to change when upgrading meek
|
||||||
key: build-win64-meek-v0.37.0-{{ .Environment.CACHE_VERSION }}"
|
key: build-win64-meek-v0.37.0-{{ .Environment.CACHE_VERSION }}"
|
||||||
paths:
|
paths:
|
||||||
- C:\Users\circleci\project\desktop\onionshare\resources\tor\Tor\meek-client.exe
|
- C:\Users\circleci\project\desktop\onionshare\resources\tor\Tor\meek-client.exe
|
||||||
|
|
||||||
# # Install python
|
- run:
|
||||||
# - run:
|
name: Install Python 3.9.12
|
||||||
# name: Install Python 3.9.12
|
command: |
|
||||||
# command: |
|
choco install python3 --version=3.9.12
|
||||||
# choco install python3 --version=3.9.12
|
|
||||||
|
|
||||||
# # Install poetry
|
- 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 -
|
|
||||||
|
|
||||||
# # Install poetry dependencies
|
- restore_cache:
|
||||||
# - restore_cache:
|
key: build-win64-desktop-poetry-deps-{{ checksum "C:\Users\circleci\project\desktop\poetry.lock" }}-{{ .Environment.CACHE_VERSION }}
|
||||||
# key: build-win64-desktop-poetry-deps-{{ checksum "C:\Users\circleci\project\desktop\poetry.lock" }}-{{ .Environment.CACHE_VERSION }}
|
- run:
|
||||||
# - run:
|
name: Install poetry dependencies
|
||||||
# name: Install poetry dependencies
|
command: |
|
||||||
# command: |
|
cd C:\Users\circleci\project\desktop
|
||||||
# cd C:\Users\circleci\project\desktop
|
poetry install
|
||||||
# poetry install
|
- save_cache:
|
||||||
# - save_cache:
|
key: build-win64-desktop-poetry-deps-{{ checksum "C:\Users\circleci\project\desktop\poetry.lock" }}-{{ .Environment.CACHE_VERSION }}
|
||||||
# key: build-win64-desktop-poetry-deps-{{ checksum "C:\Users\circleci\project\desktop\poetry.lock" }}-{{ .Environment.CACHE_VERSION }}
|
paths:
|
||||||
# paths:
|
- C:\Users\circleci\AppData\Local\pypoetry\Cache\virtualenvs
|
||||||
# - C:\Users\circleci\AppData\Local\pypoetry\Cache\virtualenvs
|
|
||||||
|
|
||||||
# - run:
|
- run:
|
||||||
# name: Copy tor binary into app
|
name: Build OnionShare
|
||||||
# command: cp ~\Downloads\tor\tor-win32\* ~\project\desktop\onionshare\resources\tor
|
command: |
|
||||||
|
cd ~\project\desktop
|
||||||
|
poetry run python .\setup-freeze.py build
|
||||||
|
poetry run python .\scripts\build-windows.py cleanup-build
|
||||||
|
|
||||||
# - run:
|
- run:
|
||||||
# name: Build OnionShare
|
name: Compress
|
||||||
# command: |
|
command: |
|
||||||
# cd ~\project\desktop
|
mv ~\project\desktop\build\exe.win-amd64-3.9\ ~\onionshare-win64
|
||||||
# poetry run python .\setup-freeze.py build
|
Compress-Archive -LiteralPath ~\onionshare-win64 -DestinationPath ~\onionshare-win64.zip
|
||||||
# poetry run python .\scripts\build-windows.py cleanup-build
|
|
||||||
# - run:
|
- store_artifacts:
|
||||||
# name: Compress
|
path: ~\onionshare-win64.zip
|
||||||
# command: |
|
|
||||||
# mv ~\project\desktop\build\exe.win-amd64-3.9\ ~\onionshare-win64
|
|
||||||
# Compress-Archive -LiteralPath ~\onionshare-win64 -DestinationPath ~\onionshare-win64.zip
|
|
||||||
# - store_artifacts:
|
|
||||||
# path: ~\onionshare-win64.zip
|
|
||||||
|
|
||||||
build-win32:
|
build-win32:
|
||||||
executor:
|
executor:
|
||||||
|
@ -332,21 +332,21 @@ class Common:
|
|||||||
# In Windows, the Tor binaries are in the onionshare package, not the onionshare_cli package
|
# In Windows, the Tor binaries are in the onionshare package, not the onionshare_cli package
|
||||||
base_path = self.get_resource_path("tor")
|
base_path = self.get_resource_path("tor")
|
||||||
base_path = base_path.replace("onionshare_cli", "onionshare")
|
base_path = base_path.replace("onionshare_cli", "onionshare")
|
||||||
tor_path = os.path.join(base_path, "Tor", "tor.exe")
|
tor_path = os.path.join(base_path, "tor", "tor.exe")
|
||||||
|
|
||||||
# If tor.exe isn't there, mayber we're running from the source tree
|
# If tor.exe isn't there, mayber we're running from the source tree
|
||||||
if not os.path.exists(tor_path):
|
if not os.path.exists(tor_path):
|
||||||
base_path = os.path.join(os.getcwd(), "onionshare", "resources", "tor")
|
base_path = os.path.join(os.getcwd(), "onionshare", "resources", "tor")
|
||||||
|
|
||||||
tor_path = os.path.join(base_path, "Tor", "tor.exe")
|
tor_path = os.path.join(base_path, "tor.exe")
|
||||||
if not os.path.exists(tor_path):
|
if not os.path.exists(tor_path):
|
||||||
raise CannotFindTor()
|
raise CannotFindTor()
|
||||||
|
|
||||||
obfs4proxy_file_path = os.path.join(base_path, "Tor", "obfs4proxy.exe")
|
obfs4proxy_file_path = os.path.join(base_path, "tor", "obfs4proxy.exe")
|
||||||
snowflake_file_path = os.path.join(base_path, "Tor", "snowflake-client.exe")
|
snowflake_file_path = os.path.join(base_path, "tor", "snowflake-client.exe")
|
||||||
meek_client_file_path = os.path.join(base_path, "Tor", "meek-client.exe")
|
meek_client_file_path = os.path.join(base_path, "tor", "meek-client.exe")
|
||||||
tor_geo_ip_file_path = os.path.join(base_path, "Data", "Tor", "geoip")
|
tor_geo_ip_file_path = os.path.join(base_path, "tor", "geoip")
|
||||||
tor_geo_ipv6_file_path = os.path.join(base_path, "Data", "Tor", "geoip6")
|
tor_geo_ipv6_file_path = os.path.join(base_path, "tor", "geoip6")
|
||||||
|
|
||||||
elif self.platform == "Darwin":
|
elif self.platform == "Darwin":
|
||||||
# Let's see if we have tor binaries in the onionshare GUI package
|
# Let's see if we have tor binaries in the onionshare GUI package
|
||||||
|
Loading…
Reference in New Issue
Block a user