mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
build: move build scripts and resources from src
to build
This commit is contained in:
parent
0f3e670dd4
commit
b67cd693cd
11 changed files with 73 additions and 67 deletions
19
.gitignore
vendored
19
.gitignore
vendored
|
@ -1,9 +1,18 @@
|
||||||
|
# IDE / System
|
||||||
.idea
|
.idea
|
||||||
.vs
|
.vs
|
||||||
.vscode
|
.vscode
|
||||||
bin
|
|
||||||
build
|
|
||||||
obj
|
|
||||||
*.user
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
publish
|
|
||||||
|
# Output folders.
|
||||||
|
bin/
|
||||||
|
obj/
|
||||||
|
build/SourceGit/
|
||||||
|
build/SourceGit.app/
|
||||||
|
|
||||||
|
# Files
|
||||||
|
*.user
|
||||||
|
SourceGit.win-x64.zip
|
||||||
|
SourceGit.linux-x64.tar.gz
|
||||||
|
SourceGit.osx-x64.zip
|
||||||
|
SourceGit.osx-arm64.zip
|
||||||
|
|
|
@ -37,8 +37,8 @@ You can download the latest stable from [Releases](https://github.com/sourcegit-
|
||||||
|
|
||||||
For **macOS** users:
|
For **macOS** users:
|
||||||
|
|
||||||
* Download `SourceGit.macOS.zip` from Releases.
|
* Download `SourceGit.osx-x64.zip` or `SourceGit.osx-arm64.zip` from Releases. `x64` for Intel and `arm64` for Apple Silicon.
|
||||||
* Choose the app that fits your system's CPU architecture and copy it to Applications. `x64` for Intel and `arm64` for Apple Silicon.
|
* Move `SourceGit.app` to `Applications` folder.
|
||||||
* Make sure your mac trusts all software from anywhere. For more information, search `spctl --master-disable`.
|
* Make sure your mac trusts all software from anywhere. For more information, search `spctl --master-disable`.
|
||||||
* You may need to run `sudo xattr -cr /Applications/SourceGit.app` to make sure the software works.
|
* You may need to run `sudo xattr -cr /Applications/SourceGit.app` to make sure the software works.
|
||||||
|
|
||||||
|
|
6
build/build.linux.sh
Normal file
6
build/build.linux.sh
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rm -rf SourceGit
|
||||||
|
dotnet publish ../src/SourceGit.csproj -c Release -r linux-x64 -o SourceGit -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
||||||
|
tar -zcvf SourceGit.linux-x64.tar.gz SourceGit --exclude=en --exclude=zh --exclude="*.dbg"
|
||||||
|
rm -rf SourceGit
|
17
build/build.osx.command
Normal file
17
build/build.osx.command
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rm -rf SourceGit.app
|
||||||
|
|
||||||
|
mkdir -p SourceGit.app/Contents/Resources
|
||||||
|
cp resources/App.plist SourceGit.app/Contents/Info.plist
|
||||||
|
cp resources/App.icns SourceGit.app/Contents/Resources/App.icns
|
||||||
|
|
||||||
|
mkdir -p SourceGit.app/Contents/MacOS
|
||||||
|
dotnet publish ../src/SourceGit.csproj -c Release -r osx-arm64 -o SourceGit.app/Contents/MacOS -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
||||||
|
zip SourceGit.osx-arm64.zip -r SourceGit -x "*/en/*" -x "*/zh/*" -x "*/*\.dsym/*"
|
||||||
|
|
||||||
|
rm -rf SourceGit.app/Contents/MacOS
|
||||||
|
|
||||||
|
mkdir -p SourceGit.app/Contents/MacOS
|
||||||
|
dotnet publish ../src/SourceGit.csproj -c Release -r osx-x64 -o SourceGit.app/Contents/MacOS -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
||||||
|
zip SourceGit.osx-arm64.zip -r SourceGit -x "*/en/*" -x "*/zh/*" -x "*/*\.dsym/*"
|
5
build/build.windows.bat
Normal file
5
build/build.windows.bat
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
rmdir /S /Q SourceGit
|
||||||
|
dotnet publish ..\src\SourceGit.csproj -c Release -r win-x64 -o SourceGit -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
||||||
|
resources\7z.exe a SourceGit.win-x64.zip SourceGit "-xr!en/" "-xr!zh/" "-xr!*.pdb"
|
||||||
|
rmdir /S /Q SourceGit
|
BIN
build/resources/7z.exe
Normal file
BIN
build/resources/7z.exe
Normal file
Binary file not shown.
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
dotnet publish -c Release -r linux-x64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
|
|
@ -1,27 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
dotnet publish -c Release -r osx-x64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
|
||||||
dotnet publish -c Release -r osx-arm64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
|
||||||
|
|
||||||
rm -rf build
|
|
||||||
|
|
||||||
mkdir -p build/SourceGit
|
|
||||||
mkdir -p build/SourceGit/x64/SourceGit.app/Contents/MacOS
|
|
||||||
mkdir -p build/SourceGit/arm64/SourceGit.app/Contents/MacOS
|
|
||||||
mkdir -p build/SourceGit/x64/SourceGit.app/Contents/Resources
|
|
||||||
mkdir -p build/SourceGit/arm64/SourceGit.app/Contents/Resources
|
|
||||||
|
|
||||||
cp App.plist build/SourceGit/x64/SourceGit.app/Contents/Info.plist
|
|
||||||
cp App.plist build/SourceGit/arm64/SourceGit.app/Contents/Info.plist
|
|
||||||
|
|
||||||
cp App.icns build/SourceGit/x64/SourceGit.app/Contents/Resources/App.icns
|
|
||||||
cp App.icns build/SourceGit/arm64/SourceGit.app/Contents/Resources/App.icns
|
|
||||||
|
|
||||||
cp -r bin/Release/net8.0/osx-x64/publish/* build/SourceGit/x64/SourceGit.app/Contents/MacOS/
|
|
||||||
cp -r bin/Release/net8.0/osx-arm64/publish/* build/SourceGit/arm64/SourceGit.app/Contents/MacOS/
|
|
||||||
|
|
||||||
rm -rf build/SourceGit/x64/SourceGit.app/Contents/MacOS/SourceGit.dsym
|
|
||||||
rm -rf build/SourceGit/arm64/SourceGit.app/Contents/MacOS/SourceGit.dsym
|
|
||||||
|
|
||||||
cd build
|
|
||||||
zip SourceGit.macOS.zip -r SourceGit
|
|
|
@ -1 +0,0 @@
|
||||||
dotnet publish -c Release -r win-x64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
|
Loading…
Reference in a new issue