Skip to content

Add admin popup on Windows when running install-unity #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 36 commits into
base: windows
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9bc9122
[Mac] Add warning when Spotlight is disabled and installations might …
sttz Oct 27, 2022
04c1451
Fix packages besides Mac Intel not properly saved in cache
sttz Nov 26, 2022
2239d78
Use TargetFramework instead of TargetFrameworks so the "dotnet --fram…
sttz Nov 26, 2022
c4be72e
Update scraping of beta and alpha releases, update URLs that now redi…
sttz Feb 5, 2023
3168dfb
[Mac] Fix information log message not showing proper installation path
sttz Feb 5, 2023
fc66031
[Mac] Update Android packages for 2023.1
sttz Feb 5, 2023
ae89567
[Mac] Fix Copy sudo fallback moving instead of copying, use -a instea…
sttz Feb 5, 2023
e7f9c43
[Mac] Fix exception when cleaning up after upgrading an installation …
sttz Feb 5, 2023
9937d9f
Bump to 2.11.1, update changelog
sttz Feb 5, 2023
8688aa4
Remove support for patch releases
sttz Feb 12, 2023
5d78a22
Remove (never used) support for loading UnityHub's limited releases json
sttz Feb 12, 2023
aecb0f5
Switch to .Net 7
sttz May 4, 2023
f4da8d6
Use Unity's official Release API instead of scraping the website, oth…
sttz May 4, 2023
ce05309
Build configuration changes
sttz May 8, 2023
c9439a0
Fix build script, switch from altool to notarytool
sttz May 8, 2023
d4e35fc
Bump to 2.12.0, update changelog
sttz May 13, 2023
e913af6
Copied Windows support from minorai
ewilh Jul 25, 2022
ac79827
Added Runtime Identifies to be able to build with .Net 6.0
ewilh Jul 25, 2022
4d85f4a
Fixed FindInstallations on Windows
ewilh Jul 25, 2022
70918d3
Delete unity folder after uninstalling
ewilh Jul 25, 2022
135d492
Revert kb change
ewilh Jul 26, 2022
c4a4bac
Fix productversion split on older Unity versions
ewilh Jul 26, 2022
42d4823
Added try-catch to directory delete
ewilh Jul 26, 2022
5a6bbdc
Fix PR comments and cleanup code
ewilh Aug 8, 2022
39adee4
Fixed misc
ewilh Aug 8, 2022
069df99
Fix windows path and error handling
ewilh Aug 8, 2022
20deaf6
Fixed case in filename
ewilh Aug 8, 2022
35e5715
Fix capitalization
sttz Sep 4, 2022
213418e
[Win] Path handling updates
sttz Sep 4, 2022
07b91e6
[Win] Fix check that is always true, actually check if Unity editor e…
sttz Sep 4, 2022
8b284de
[Win] Make paths configurable in which Unity installations are searched
sttz Sep 5, 2022
c0cc6b3
[Win] Fix returning default instead of Task leading to null reference…
sttz Sep 5, 2022
c4375bc
[Win] Fix CompleteInstall not returning the right path to the install…
sttz Sep 5, 2022
08663eb
Add app.manifest for admin privileges and fix windows install path
ewilh Sep 23, 2022
9375839
Fix .net version in Command.csproj
ewilh Feb 21, 2024
7a39798
Fix rebase errors
ewilh Feb 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ bin
obj
.vscode
Releases
/.vs
19 changes: 5 additions & 14 deletions Build/build-osx.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
#!/bin/zsh

PROJECT="Command/Command.csproj"
TARGET="net6.0"
TARGET="net7.0"
ARCHES=("osx-x64" "osx-arm64")
SIGN_IDENTITY="Developer ID Application: Feist GmbH (DHNHQKSSYT)"
ASC_PROVIDER="DHNHQKSSYT"
ENTITLEMENTS="Build/notarization.entitlements"
BUNDLE_ID="ch.sttz.install-unity"

# Mapping of arche names used by .Net to the ones used by lipo
typeset -A LIPO_ARCHES=()
LIPO_ARCHES[osx-x64]=x86_64
LIPO_ARCHES[osx-arm64]=arm64

if [[ -z "$ASC_USER" ]]; then
echo "ASC user not set in ASC_USER"
exit 1
fi

if [[ -z "$ASC_KEYCHAIN" ]]; then
echo "ASC keychain item not set in ASC_KEYCHAIN"
if [[ -z "$NOTARY_PROFILE" ]]; then
echo "notarytool keychain profile not set in NOTARY_PROFILE"
exit 1
fi

Expand All @@ -42,9 +35,7 @@ for arch in $ARCHES; do
-r "$arch" \
-c release \
-f "$TARGET" \
-p:PublishSingleFile=true \
-p:PublishReadyToRun=true \
-p:PublishTrimmed=true \
--self-contained \
"$PROJECT" \
|| exit 1

Expand Down Expand Up @@ -79,7 +70,7 @@ pushd "$ARCHIVE"
zip "../install-unity-$VERSION.zip" "install-unity" || exit 1
popd

xcrun altool --notarize-app --primary-bundle-id "$BUNDLE_ID" --asc-provider "$ASC_PROVIDER" --username "$ASC_USER" --password "@keychain:$ASC_KEYCHAIN" --file "$ZIPARCHIVE" || exit 1
xcrun notarytool submit --wait --keychain-profile "$NOTARY_PROFILE" --wait --progress "$ZIPARCHIVE" || exit 1

# Shasum for Homebrew

Expand Down
24 changes: 24 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

### 2.12.0 (2023-05-??)
* Use Unity's official Release API to get release and package information
* Releases should appear quicker when Unity is slow to update their archive webpage
* Can directly request information of a specific Unity version from the API
* No need to load the whole archive, update can be stopped once the last known version is reached
* Reduces number of requests and amount of data transferred when updating cache
* Previously synthesized packages are now provided by Unity (Documentation, language packs and Android components)
* Legacy scraper and ini-based system can still be used for irregular Unity releases
* Split platform and architecture options (e.g. `--platform macOSIntel` becomes `--platform mac_os --arch x68_64`)
* Added `--clear-cache` to force clearing the versions and package cache
* Added `--redownload` to force redownloading all files
* Improve handling of already downloaded or partially downloaded files
* Speed up detecting of current platform (.Net now reports Apple Silicon properly)
* Speed up detecting installed Unity versions by keeping command line invocations to a minimum
* Removed support for Unity patch releases
* Update to .Net 7

### 2.11.1 (2023-02-05)
* Add warning when Spotlight is disabled and installations cannot be found
* Update Android packages for Unity 2023.1
* Fix discovery of beta and alpha releases
* Fix Apple Silicon packages not saved in cache
* Fix exception when cleaning up after installing additional packages to an installation at `/Applications/Unity`

### 2.11.0 (2022-09-03)
* Add "--upgrade <version>" to `run` command to upgrade a project to a specific Unity version
* Fix --allow-newer attempting to downgrade project if project Unity version is newer than installed versions
Expand Down
11 changes: 8 additions & 3 deletions Command/Command.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net7.0</TargetFrameworks>
<RuntimeIdentifiers>win-x64;osx-x64</RuntimeIdentifiers>
<LangVersion>latest</LangVersion>
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>true</PublishReadyToRun>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>

<PropertyGroup Label="Package">
<Version>2.11.0</Version>
<Version>2.12.0</Version>
<Authors>Adrian Stutz (sttz.ch)</Authors>
<Product>install-unity CLI</Product>
<Description>CLI for install-unity unofficial Unity installer library</Description>
Expand All @@ -16,10 +20,11 @@
<RepositoryUrl>https://github.com/sttz/install-unity</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>CLI;Unity;Installer</PackageTags>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>

<ItemGroup>
<RdXmlFile Include="rd.xml" />
<TrimmerRootAssembly Include="sttz.InstallUnity" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading