-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
66 changed files
with
1,682 additions
and
1,103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ gfast.exe | |
makezip | ||
##dirs | ||
AutumnBox-Canary | ||
adb_binary/ | ||
.vs/ | ||
publish/ | ||
out/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
nuget.exe | ||
out | ||
!sdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,49 @@ | ||
# should working on root directory | ||
# You should run this script as : ./scripts/canary_build.ps1 | ||
|
||
|
||
#Configures | ||
$DNCGUI = [System.IO.Path]::Combine($PSScriptRoot, "../src/AutumnBox.DNCGUI") | ||
$StdExt = [System.IO.Path]::Combine($PSScriptRoot, "../src/AutumnBox.Extensions.DNCStandard") | ||
$EssExt = [System.IO.Path]::Combine($PSScriptRoot, "../src/AutumnBox.Extensions.DNCEssentials") | ||
$CanaryPath = [System.IO.Path]::Combine($PSScriptRoot,"../AutumnBox-Canary/"); | ||
$ExtensionsOutputDir = [System.IO.Path]::Combine($CanaryPath, "extensions"); | ||
$AdbOutputDir = [System.IO.Path]::Combine($CanaryPath, "adb_binary"); | ||
$CompileConfigure = "Release"; | ||
$Runtime ="win-x86"; | ||
$ADBBinariesDirectoryPath = [System.IO.Path]::Combine($PSScriptRoot, "../adb_binary") | ||
# Functions | ||
function Write-Green($message) { | ||
[System.Console]::ForegroundColor = [System.ConsoleColor]::Green; | ||
Write-Output $message | ||
[System.Console]::ResetColor() | ||
} | ||
function Initialize-Canary(){ | ||
if($CanaryDir.Exists){ | ||
Write-Green $CanaryDir.FullName; | ||
$CanaryDir.Delete($true) | ||
} | ||
[System.IO.Directory]::CreateDirectory($CanaryPath) | ||
} | ||
|
||
#Configures | ||
$CanaryPath = "AutumnBox-Canary/"; | ||
$CanaryExtensionsPath = [System.IO.Path]::Combine($CanaryPath, "extensions"); | ||
$Runtime = "win-x86"; | ||
$CompileConfigure = "Release"; | ||
Initialize-Canary | ||
|
||
#Build | ||
Write-Green "Restoring dependencies" | ||
dotnet restore src/ | ||
|
||
Write-Green "Compiling AutumnBox.DNCGUI" | ||
dotnet publish src/AutumnBox.DNCGUI -c $CompileConfigure -r $Runtime --no-dependencies --self-contained true --output $CanaryPath | ||
|
||
Write-Green "Compiling Extensions." | ||
dotnet publish src/AutumnBox.Extensions.DNCEssentials -c $CompileConfigure -r $Runtime --output $CanaryExtensionsPath | ||
dotnet publish src/AutumnBox.Extensions.DNCStandard -c $CompileConfigure -r $Runtime --output $CanaryExtensionsPath | ||
dotnet publish $DNCGUI -c $CompileConfigure -r $Runtime --no-dependencies --self-contained true -o $CanaryPath | ||
|
||
Write-Green "Place adb binaries." | ||
Copy-Item -Recurse -Force .\adb_binary $([System.IO.Path]::Combine($CanaryPath,"adb_binary")) | ||
#Copying Adb binaries | ||
Write-Green "Copying adb files" | ||
Copy-Item -Force -Recurse $ADBBinariesDirectoryPath $AdbOutputDir -Exclude **/.git | ||
|
||
#Finishing | ||
Write-Green "Clear Useless files." | ||
Remove-Item -Recurse -Force $([System.IO.Path]::Combine($CanaryExtensionsPath, "*")) -Exclude AutumnBox.Extensions.*.dll; | ||
#Build extensions | ||
Write-Green "Compiling Extensions" | ||
dotnet publish $StdExt -c $CompileConfigure -r $Runtime -o $ExtensionsOutputDir | ||
dotnet publish $EssExt -c $CompileConfigure -r $Runtime -o $ExtensionsOutputDir | ||
Remove-Item -Force -Recurse $([System.IO.Path]::Combine($ExtensionsOutputDir,"*")) -Exclude "AutumnBox.Extensions.*.dll" | ||
|
||
#Finished | ||
Write-Green "===Finished===" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
$ADBGitStore = "https://github.com/zsh2401/AutumnBox-AdbBinaries-Store" | ||
$BranchName = "1.0.40" | ||
$ADBBinariesDirectoryPath = [System.IO.Path]::Combine($PSScriptRoot, "../adb_binary") | ||
$ADBBinariesDirectory = [System.IO.DirectoryInfo]::new($ADBBinariesDirectoryPath); | ||
if ($ADBBinariesDirectory.Exists) { | ||
Remove-Item $ADBBinariesDirectory.FullName -Force -Recurse; | ||
$ADBBinariesDirectory.Create(); | ||
} | ||
git clone -b $BranchName $ADBGitStore $ADBBinariesDirectory.FullName |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
nuget.exe | ||
tmp | ||
API_KEY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0"?> | ||
<package > | ||
<metadata> | ||
<id>AutumnBox.SDK</id> | ||
<version>11.5</version> | ||
<title>AutumnBox.SDK</title> | ||
<authors>zsh2401</authors> | ||
<owners>zsh2401</owners> | ||
<licenseUrl>https://github.com/zsh2401/AutumnBox/blob/master/LICENSE</licenseUrl> | ||
<projectUrl>http://github.com/zsh2401/AutumnBox</projectUrl> | ||
<iconUrl>http://atmb.top/images/leaves.png</iconUrl> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>Let's develop AutumnBox extension together!This assembly includes a serials of tools useful for third party developers.</description> | ||
<releaseNotes>11.5 update logs: Bug fixes,change target to .net fx 4.5 again.</releaseNotes> | ||
<copyright>Copyright zsh2401,2017-2020</copyright> | ||
<tags>ADB AutumnBox</tags> | ||
<language>zh-CN</language> | ||
</metadata> | ||
<files> | ||
<file src="tmp\net45\AutumnBox.Core.dll" target="lib/net45"/> | ||
<file src="tmp\net45\AutumnBox.Core.xml" target="lib/net45"/> | ||
|
||
<file src="tmp\netcore31\AutumnBox.STDCore.dll" target="lib/netcoreapp3.1"/> | ||
<file src="tmp\netcore31\AutumnBox.STDCore.xml" target="lib/netcoreapp3.1"/> | ||
</files> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Import-Module $([System.IO.Path]::Combine($PSScriptRoot,"sdk.psm1")) | ||
Build-SDK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Import-Module $([System.IO.Path]::Combine($PSScriptRoot,"sdk.psm1")) | ||
Push-SDK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
$NetCoreSDK = [System.IO.Path]::Combine($PSScriptRoot,"../../src/AutumnBox.STDCore"); | ||
$NetFxSDK = [System.IO.Path]::Combine($PSScriptRoot,"../../src/AutumnBox.Core"); | ||
$TmpDir = [System.IO.Path]::Combine($PSScriptRoot,"tmp"); | ||
$NugetExe = [System.IO.Path]::Combine($PSScriptRoot,"nuget.exe") | ||
$Nuspec = [System.IO.Path]::Combine($PSScriptRoot,"AutumnBox.SDK.nuspec") | ||
$NugetPackOutputDir = [System.IO.Path]::Combine($PSScriptRoot,"packages") | ||
$API_KEY_FILE = [System.IO.Path]::Combine($PSScriptRoot,"API_KEY") | ||
|
||
Write-Output $CacheDirectory | ||
function Build-SDK(){ | ||
dotnet build $NetCoreSDK -o "$TmpDir/netcore31" -c SDK | ||
dotnet build $NetFxSDK -o "$TmpDir/net45" -c SDK | ||
&$NugetExe pack $Nuspec -OutputDirectory $CacheDirectory | ||
} | ||
function Push-SDK($version){ | ||
$CacheDirPath = $([System.IO.Path]::Combine($PSScriptRoot,[System.Guid]::NewGuid().ToString())) | ||
$CacheDirectory = [System.IO.DirectoryInfo]::new($CacheDirPath); | ||
$API_KEY = [System.IO.File]::ReadAllText($API_KEY_FILE); | ||
try{ | ||
&$NugetExe pack $Nuspec -OutputDirectory $CacheDirectory.FullName | ||
&$NugetExe push "$($CacheDirectory.FullName)\*" $API_KEY -Source https://api.nuget.org/v3/index.json | ||
$CacheDirectory.Delete($true); | ||
}catch{ | ||
|
||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#Define constants | ||
$OutDir = $($args[0]) | ||
$ConfigurationName = $($args[1]) | ||
|
||
#Copy adb binaries | ||
$ADBBinariesDirectoryPath = [System.IO.Path]::Combine($PSScriptRoot, "../../adb_binary") | ||
Copy-Item -Force -Recurse $ADBBinariesDirectoryPath $OutDir -Exclude .git | ||
|
||
#Build extensions | ||
$ExtensionsOutputDir = [System.IO.Path]::Combine($OutDir, "extensions"); | ||
$StdExt = [System.IO.Path]::Combine($PSScriptRoot, "../AutumnBox.Extensions.DNCStandard") | ||
$EssExt = [System.IO.Path]::Combine($PSScriptRoot, "../AutumnBox.Extensions.DNCEssentials") | ||
|
||
if (![System.IO.Directory]::Exists($ExtensionsOutputDir)) { | ||
[System.IO.Directory]::CreateDirectory($ExtensionsOutputDir); | ||
} | ||
dotnet build -c $ConfigurationName $StdExt -o $ExtensionsOutputDir | ||
dotnet build -c $ConfigurationName $EssExt -o $ExtensionsOutputDir | ||
|
||
Remove-Item $([System.IO.Path]::Combine($ExtensionsOutputDir, "*")) -Exclude "AutumnBox.Extensions.*.dll" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.