mirror of
https://github.com/uroesch/GitPortable.git
synced 2026-08-24 10:04:09 -05:00
Add Git GUI as an icon to the menu
Summary:
* Add a new binary and icon to the build.
* Split the workflow for window and linux as they
have drifted apart to warrant separate files.
* Bump version to beta 7.
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# Build workflow for portable apps
|
||||
# Author: Urs Roesch https://github.com/uroesch
|
||||
# Version: 0.10.0
|
||||
# -----------------------------------------------------------------------------
|
||||
name: build-linux
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- workflow/*
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
if: endsWith(github.repository, 'Portable')
|
||||
timeout-minutes: 15
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Run build script via docker
|
||||
shell: bash
|
||||
run: |2+
|
||||
docker run \
|
||||
--rm \
|
||||
--tty \
|
||||
--env USER_UID=$(id -u) \
|
||||
--env USER_GID=$(id -g) \
|
||||
--mount type=bind,src=$(cd ../; pwd),target=/PortableApps \
|
||||
--workdir=/PortableApps/$(realpath --relative-to=../ .) \
|
||||
uroesch/pa-wine:latest \
|
||||
/usr/bin/pwsh -ExecutionPolicy ByPass Other/Update/Update.ps1 -InfraDir /pa-build
|
||||
timeout-minutes: 10
|
||||
|
||||
- name: Collect logs on failure
|
||||
if: failure()
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir ../artifacts
|
||||
cp ../PortableApps.com*/Data/*Log.txt ../artifacts
|
||||
|
||||
- name: Upload artifacts on failure
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v1.0.0
|
||||
with:
|
||||
name: logs.zip
|
||||
path: ../artifacts
|
||||
@@ -1,96 +0,0 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# Build workflow for portable apps
|
||||
# Author: Urs Roesch https://github.com/uroesch
|
||||
# Version: 0.9.0
|
||||
# -----------------------------------------------------------------------------
|
||||
name: build-package
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- workflow/*
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-package:
|
||||
if: endsWith(github.repository, 'Portable')
|
||||
timeout-minutes: 15
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
env:
|
||||
PA_DOWNLOAD: https://sourceforge.net/projects/portableapps/files/PortableApps.com%%20%s/%s/download
|
||||
PA_INSTALLER: 3.5.18
|
||||
PA_LAUNCHER: 2.2.2
|
||||
|
||||
steps:
|
||||
- name: Download and install PortableApps.comInstaller
|
||||
if: runner.os == 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
name=PortableApps.comInstaller_${PA_INSTALLER}.paf.exe
|
||||
installer=~/downloads/${name}
|
||||
mkdir -p ~/downloads
|
||||
test -f ${installer} ||
|
||||
curl --location -o ${installer} \
|
||||
$(printf "${PA_DOWNLOAD}" Installer ${name})
|
||||
7z x -y -o../PortableApps.comInstaller ${installer}
|
||||
|
||||
- name: Download and install PortableApps.comLauncher
|
||||
if: runner.os == 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
name=PortableApps.comInstaller_${PA_INSTALLER}.paf.exe
|
||||
name=PortableApps.comLauncher_${PA_LAUNCHER}.paf.exe
|
||||
installer=~/downloads/${name}
|
||||
mkdir -p ~/downloads
|
||||
test -f ${installer} ||
|
||||
curl --location -o ${installer} \
|
||||
$(printf "${PA_DOWNLOAD}" Launcher ${name})
|
||||
7z x -y -o../PortableApps.comLauncher ${installer}
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
lfs: true
|
||||
|
||||
- name: Run build script Update.ps1
|
||||
if: runner.os == 'Windows'
|
||||
run: pwsh -ExecutionPolicy ByPass -File Other/Update/Update.ps1
|
||||
timeout-minutes: 10
|
||||
|
||||
- name: Run build script via docker
|
||||
if: runner.os == 'Linux'
|
||||
shell: bash
|
||||
run: |2+
|
||||
docker run \
|
||||
--rm \
|
||||
--tty \
|
||||
--env USER_UID=$(id -u) \
|
||||
--env USER_GID=$(id -g) \
|
||||
--mount type=bind,src=$(cd ../; pwd),target=/PortableApps \
|
||||
--workdir=/PortableApps/$(realpath --relative-to=../ .) \
|
||||
uroesch/pa-wine:latest \
|
||||
/usr/bin/pwsh -ExecutionPolicy ByPass Other/Update/Update.ps1 -InfraDir /pa-build
|
||||
timeout-minutes: 10
|
||||
|
||||
- name: Collect logs on failure
|
||||
if: failure()
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir ../artifacts
|
||||
cp ../PortableApps.com*/Data/*Log.txt ../artifacts
|
||||
|
||||
- name: Upload artifacts on failure
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v1.0.0
|
||||
with:
|
||||
name: logs.zip
|
||||
path: ../artifacts
|
||||
@@ -0,0 +1,63 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# Build workflow for portable apps
|
||||
# Author: Urs Roesch https://github.com/uroesch
|
||||
# Version: 0.10.0
|
||||
# -----------------------------------------------------------------------------
|
||||
name: build-windows
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- workflow/*
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-windows:
|
||||
if: endsWith(github.repository, 'Portable')
|
||||
timeout-minutes: 15
|
||||
runs-on: windows-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Clone PortableApps.comInstaller
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: uroesch/PortableApps.comInstaller
|
||||
ref: master
|
||||
path: PortableApps.comInstaller
|
||||
|
||||
- name: Clone PortableApps.comLauncher
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: uroesch/PortableApps.comLauncher
|
||||
ref: patched
|
||||
path: PortableApps.comLauncher
|
||||
|
||||
- name: Move installer and launcher
|
||||
shell: bash
|
||||
run: mv ./PortableApps.com{Installer,Launcher} ../
|
||||
|
||||
- name: Run build script Update.ps1
|
||||
run: pwsh -ExecutionPolicy ByPass -File Other/Update/Update.ps1
|
||||
timeout-minutes: 10
|
||||
|
||||
- name: Collect logs on failure
|
||||
if: failure()
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir ../artifacts
|
||||
cp ../PortableApps.com*/Data/*Log.txt ../artifacts
|
||||
|
||||
- name: Upload artifacts on failure
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v1.0.0
|
||||
with:
|
||||
name: logs.zip
|
||||
path: ../artifacts
|
||||
@@ -0,0 +1,31 @@
|
||||
[Launch]
|
||||
Name=GitGuiPortable
|
||||
ProgramExecutable=Git\cmd\git-gui.exe
|
||||
WorkingDirectory=%PAL:DataDir%\home
|
||||
WaitForEXE1=wish.exe
|
||||
WaitForEXE2=git-bash.exe
|
||||
WaitForEXE3=gitk.exe
|
||||
WaitForEXE4=git.exe
|
||||
DirectoryMoveOK=yes
|
||||
MinOS=Vista
|
||||
|
||||
[Environment]
|
||||
HOME=%PAL:DataDir%\home
|
||||
|
||||
[FileWrite1]
|
||||
Type=Replace
|
||||
File=%PAL:DataDir%\home\.gitconfig
|
||||
Find=%PAL:LastDrive:ForwardSlash%%PAL:LastPackagePartialDir:ForwardSlash%
|
||||
Replace=%PAL:Drive:ForwardSlash%%PAL:PackagePartialDir:ForwardSlash%
|
||||
|
||||
[FileWrite2]
|
||||
Type=Replace
|
||||
File=%PAL:DataDir%\home\.gitconfig
|
||||
Find=%PAL:LastPortableAppsBaseDir:ForwardSlash%
|
||||
Replace=%PAL:PortableAppsBaseDir:ForwardSlash%
|
||||
|
||||
[FileWrite3]
|
||||
Type=Replace
|
||||
File=%PAL:DataDir%\home\.gitconfig
|
||||
Find=%PAL:LastDrive%/
|
||||
Replace=%PAL:Drive%/
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 105 KiB |
@@ -27,12 +27,14 @@ UsesJava = No
|
||||
UsesDotNetVersion =
|
||||
|
||||
[Control]
|
||||
Icons = 2
|
||||
Icons = 3
|
||||
Start = GitPortable.exe
|
||||
Name1 = Git Bash Portable
|
||||
Start1 = GitPortable.exe
|
||||
Name2 = Git Cmd Portable
|
||||
Start2 = GitCmdPortable.exe
|
||||
Name3 = Git GUI Portable
|
||||
Start3 = GitGuiPortable.exe
|
||||
|
||||
[Associations]
|
||||
FileTypes =
|
||||
@@ -49,5 +51,5 @@ ShellCommand =
|
||||
[FileTypeIcons]
|
||||
|
||||
[Version]
|
||||
PackageVersion = 2.35.1.2
|
||||
DisplayVersion = 2.35.1.2-beta5-uroesch
|
||||
PackageVersion = 2.35.1.4
|
||||
DisplayVersion = 2.35.1.2-beta7-uroesch
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[Version]
|
||||
Upstream = 2.35.1
|
||||
Package = 2.35.1.3
|
||||
Display = 2.35.1.2-beta6-uroesch
|
||||
Package = 2.35.1.4
|
||||
Display = 2.35.1.2-beta7-uroesch
|
||||
|
||||
[Archive]
|
||||
URL1 = https://github.com/git-for-windows/git/releases/download/v2.35.1.windows.2/PortableGit-2.35.1.2-32-bit.7z.exe
|
||||
|
||||
+38
-6
@@ -37,7 +37,7 @@ Param(
|
||||
# -----------------------------------------------------------------------------
|
||||
# Globals
|
||||
# -----------------------------------------------------------------------------
|
||||
$Version = "0.0.34-alpha"
|
||||
$Version = "0.0.35-alpha"
|
||||
$Debug = $True
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@@ -221,10 +221,47 @@ Function Postinstall() {
|
||||
}
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
Function Create-AdditionalLaunchers() {
|
||||
$Control = (Read-IniFile -IniFile $AppInfoIni).Section("Control")
|
||||
$Counter = 2
|
||||
$Icons = $Control.Item("Icons")
|
||||
$PALDir = Join-Path $InfraDir "PortableApps.comLauncher"
|
||||
$Nsis = [System.IO.Path]::Combine($PALDir, 'App', 'NSIS', 'makensis.exe')
|
||||
$Script = "$PALDir\Other\Source\PortableApps.comLauncher.nsi"
|
||||
$Options = @(
|
||||
"/O""$(ConvertTo-WindowsPath $PALDir)\Data\PortableApps.comLauncherGeneratorLog.txt""",
|
||||
"/DPACKAGE=""$(ConvertTo-WindowsPath $AppRoot)""",
|
||||
"/DNamePortable=""{0}""",
|
||||
"/DAppID=""{1}""",
|
||||
"/DIconPath=""$(ConvertTo-WindowsPath $AppInfoDir)\appicon{2}.ico"""
|
||||
) -join " "
|
||||
While ($Counter -le $Icons) {
|
||||
$Name = $Control.Item("Name$Counter")
|
||||
$AppId = $Control.Item("Start$Counter").Replace(".exe", "")
|
||||
$Args = $Options -f $Name, $AppId, $Counter
|
||||
|
||||
Switch (Test-Unix) {
|
||||
$True {
|
||||
$Arguments = "$Nsis $Args $(ConvertTo-WindowsPath $Script)"
|
||||
$Command = "wine"
|
||||
break
|
||||
}
|
||||
default {
|
||||
$Arguments = "$Args $(ConvertTo-WindowsPath $Script)"
|
||||
$Command = $Nsis
|
||||
}
|
||||
}
|
||||
Start-Process $Command -ArgumentList $Arguments -NoNewWindow -Wait
|
||||
$Counter++
|
||||
}
|
||||
}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
Function Create-Launcher() {
|
||||
Set-Location $AppRoot
|
||||
$AppPath = (Get-Location)
|
||||
Create-AdditionalLaunchers
|
||||
Try {
|
||||
$Command = Assemble-PAExec `
|
||||
-Name 'PortableApps.comLauncher' `
|
||||
@@ -280,11 +317,6 @@ Function Invoke-Helper() {
|
||||
}
|
||||
}
|
||||
|
||||
#If ($Sleep) {
|
||||
# Debug info "Waiting for filsystem cache to catch up"
|
||||
# Start-Sleep $Sleep
|
||||
#}
|
||||
|
||||
Debug info "Run PA $Command $Arguments"
|
||||
Start-Process $Command -ArgumentList $Arguments -NoNewWindow -Wait
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user