mirror of https://github.com/odrling/Aegisub
Generate Win portable.zip (#124)
* [git] ignore IDE setting, Meson subprojects * [win_installer] rename *.mo -> *.gmo * [win_installer] only add aeg translations * [win_installer] split aeg/wx translations * [win_installer] gen & pack translations * [git] ignore hunspell source dir * [git] ignore uchardet source dir * [win_installer\portable] add new target `meson win-portable` + meson install copy `include/unicode-monkeypatch.lua` * [win_installer\portable] make aegisub-portable-64.zip + remove WinRAR deps * [win_installer\portable] using powershell * [git] upload portable.zip * [win_installer\portable] rm freetype * [repo] remove Optional dependencies: WinRAR * [repo] Update README.md, add cmd to gen zip file * [repo] use recommended build command * [git] remove IDE dir * [ci] add Windows portable installer build step
This commit is contained in:
parent
761194025f
commit
52c8fef28c
|
@ -103,9 +103,20 @@ jobs:
|
|||
if: matrix.config.os == 'windows-latest'
|
||||
run: meson compile win-installer -C build
|
||||
|
||||
- name: Upload artifacts
|
||||
- name: Generate Windows portable installer
|
||||
if: matrix.config.os == 'windows-latest'
|
||||
run: cd build && ninja win-portable
|
||||
|
||||
- name: Upload artifacts - win_installer
|
||||
uses: actions/upload-artifact@v2
|
||||
if: matrix.config.os == 'windows-latest'
|
||||
with:
|
||||
name: ${{ matrix.config.name }}
|
||||
name: ${{ matrix.config.name }} - installer
|
||||
path: build/Aegisub-*.exe
|
||||
|
||||
- name: Upload artifacts - portable.zip
|
||||
uses: actions/upload-artifact@v2
|
||||
if: matrix.config.os == 'windows-latest'
|
||||
with:
|
||||
name: ${{ matrix.config.name }} - portable
|
||||
path: build/aegisub-portable-64.zip
|
||||
|
|
|
@ -22,10 +22,9 @@ Prerequisites:
|
|||
There are a few optional dependencies that must be installed and on your PATH:
|
||||
|
||||
1. msgfmt, to build the translations
|
||||
2. WinRAR, to build the portable installer
|
||||
3. InnoSetup, to build the regular installer
|
||||
4. 7zip, to build the regular installer
|
||||
5. Moonscript, to build the regular installer
|
||||
2. InnoSetup, to build the regular installer
|
||||
3. 7zip, to build the regular installer
|
||||
4. Moonscript, to build the regular installer
|
||||
|
||||
All other dependencies are either stored in the repository or are included as submodules.
|
||||
|
||||
|
@ -41,6 +40,8 @@ Installer:
|
|||
|
||||
You can generate the installer with `ninja win-installer` after a successful build. This assumes a working internet connection and installation of the optional dependencies.
|
||||
|
||||
You can generate the portable zip with `ninja win-portable` after a successful build.
|
||||
|
||||
### OS X
|
||||
|
||||
A vaguely recent version of Xcode and the corresponding command-line tools are required.
|
||||
|
|
|
@ -27,6 +27,7 @@ install_data(
|
|||
'include/moonscript.lua',
|
||||
'include/re.lua',
|
||||
'include/unicode.lua',
|
||||
'include/unicode-monkeypatch.lua',
|
||||
'include/utils-auto4.lua',
|
||||
'include/utils.lua',
|
||||
install_dir: automation_dir / 'include')
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
conf_pkg = configuration_data()
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
installer_setup = find_program(meson.project_source_root() / 'tools/win-installer-setup.ps1', )
|
||||
installer_setup = find_program(meson.project_source_root() / 'tools/win-installer-setup.ps1')
|
||||
run_target('win-installer',
|
||||
command: [installer_setup, meson.project_build_root(), meson.project_source_root()])
|
||||
portable_setup = find_program(meson.project_source_root() / 'packages/win_installer/portable/create-portable.ps1')
|
||||
run_target('win-portable', command: [portable_setup, meson.project_build_root(), meson.project_source_root()])
|
||||
elif host_machine.system() == 'darwin'
|
||||
fontconfig_conf = run_command('pkg-config', '--variable=confdir', 'fontconfig').stdout().strip()
|
||||
run_target('osx-bundle',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"App" : {
|
||||
"Local Config" : true,
|
||||
"Local Config" : true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
@echo off
|
||||
|
||||
echo Gathering files
|
||||
xcopy ..\..\..\automation\autoload\*.lua aegisub-portable\automation\autoload\ > NUL
|
||||
xcopy ..\..\..\automation\demos\*.lua aegisub-portable\automation\demos\ > NUL
|
||||
xcopy ..\..\..\automation\include\*.lua aegisub-portable\automation\include\ > NUL
|
||||
xcopy ..\..\..\bin\aegisub64.exe aegisub-portable\ > NUL
|
||||
xcopy ..\..\..\bin\ffms2_64.dll aegisub-portable\ > NUL
|
||||
xcopy ..\src\ASSDraw3.chm aegisub-portable\ > NUL
|
||||
xcopy ..\src\ASSDraw3.exe aegisub-portable\ > NUL
|
||||
xcopy ..\src\dictionaries\en_US.aff aegisub-portable\dictionaries\ > NUL
|
||||
xcopy ..\src\dictionaries\en_US.dic aegisub-portable\dictionaries\ > NUL
|
||||
xcopy ..\src\vsfilter-aegisub64.dll aegisub-portable\csri\ > NUL
|
||||
xcopy ..\src\x64\Microsoft.VC90.CRT\* aegisub-portable\Microsoft.VC90.CRT\ > NUL
|
||||
xcopy config.json aegisub-portable\ > NUL
|
||||
|
||||
echo Creating SFX
|
||||
del ..\output\aegisub-3.1.0-portable-64.exe
|
||||
WinRAR a -sfx -s -m5 -ep1 -r -zportable-comment.txt -iimgside-logo.bmp -iiconicon.ico ..\output\aegisub-3.1.0-portable-64.exe aegisub-portable\
|
||||
|
||||
echo Removing temp dir
|
||||
rmdir /S /Q aegisub-portable > NUL
|
|
@ -0,0 +1,86 @@
|
|||
#!/usr/bin/env powershell
|
||||
|
||||
param (
|
||||
[Parameter(Position = 0)]
|
||||
[string]$BuildRoot,
|
||||
[Parameter(Position = 1)]
|
||||
[string]$SourceRoot
|
||||
)
|
||||
|
||||
function Copy-New-Item {
|
||||
$SourceFilePath = $args[0]
|
||||
$DestinationFilePath = $args[1]
|
||||
|
||||
If (-not (Test-Path $DestinationFilePath)) {
|
||||
New-Item -ItemType Directory -Path $DestinationFilePath -Force
|
||||
}
|
||||
Copy-Item -Path $SourceFilePath -Destination $DestinationFilePath
|
||||
}
|
||||
|
||||
function Copy-New-Items {
|
||||
$SourceFilePath = $args[0]
|
||||
$DestinationFilePath = $args[1]
|
||||
|
||||
If (-not (Test-Path $DestinationFilePath)) {
|
||||
New-Item -ItemType Directory -Path $DestinationFilePath -Force
|
||||
}
|
||||
Copy-Item -Path $SourceFilePath -Destination $DestinationFilePath -Recurse
|
||||
}
|
||||
|
||||
|
||||
Write-Output BUILD_ROOT=$BuildRoot
|
||||
Write-Output SOURCE_ROOT=$SourceRoot
|
||||
$InstallerDir = Join-Path $BuildRoot "install"
|
||||
$InstallerDepsDir = Join-Path $BuildRoot "installer-deps"
|
||||
$PortableOutputDir = Join-Path $BuildRoot "aegisub-portable"
|
||||
|
||||
|
||||
Write-Output Goto building dir
|
||||
Set-Location $BuildRoot
|
||||
|
||||
|
||||
Write-Output 'Removing old temp dir'
|
||||
Remove-Item -LiteralPath "$PortableOutputDir" -Force -Recurse
|
||||
Remove-Item -LiteralPath "install" -Force -Recurse
|
||||
|
||||
|
||||
Write-Output 'Make install'
|
||||
meson install --no-rebuild --destdir $InstallerDir
|
||||
Write-Output 'Gathering files'
|
||||
Copy-New-Item $InstallerDir\bin\aegisub.exe $PortableOutputDir
|
||||
|
||||
Write-Output 'Copying - translations'
|
||||
Copy-New-Items "$InstallerDir\share\locale\*" "$PortableOutputDir\locale" -Recurse
|
||||
Write-Output 'Copying - codecs'
|
||||
Write-Output 'Copying - codecs\Avisynth'
|
||||
Copy-New-Item $InstallerDepsDir\AvisynthPlus64\x86-64\DevIL.dll $PortableOutputDir
|
||||
Copy-New-Item $InstallerDepsDir\AvisynthPlus64\x86-64\AviSynth.dll $PortableOutputDir
|
||||
Copy-New-Item $InstallerDepsDir\AvisynthPlus64\x86-64\plugins\DirectShowSource.dll $PortableOutputDir
|
||||
Write-Output 'Copying - codecs\VSFilter'
|
||||
Copy-New-Item $InstallerDepsDir\VSFilter\x64\VSFilter.dll $PortableOutputDir\csri
|
||||
Write-Output 'Copying - runtimes\MS-CRT'
|
||||
Copy-New-Item $InstallerDepsDir\VC_redist\VC_redist.x64.exe $PortableOutputDir\Microsoft.CRT
|
||||
|
||||
Write-Output 'Copying - automation'
|
||||
Copy-New-Items "$InstallerDir\share\aegisub\automation\*" "$PortableOutputDir\automation\" -Recurse
|
||||
Write-Output 'Copying - automation\DEPCTRL'
|
||||
Copy-New-Items "$InstallerDepsDir\DependencyControl\modules\*" "$PortableOutputDir\automation\include\l0\" -Recurse
|
||||
Copy-New-Items "$InstallerDepsDir\DependencyControl\macros\*" "$PortableOutputDir\automation\autoload\" -Recurse
|
||||
Copy-New-Item $InstallerDepsDir\Yutils\src\Yutils.lua $PortableOutputDir\automation\include
|
||||
Copy-New-Items "$InstallerDepsDir\luajson\lua\*" "$PortableOutputDir\automation\include\" -Recurse
|
||||
|
||||
Copy-New-Item $InstallerDepsDir\ffi-experiments\build\requireffi\requireffi.lua $PortableOutputDir\automation\include\requireffi
|
||||
Copy-New-Item $InstallerDepsDir\ffi-experiments\build\bad-mutex\BadMutex.dll $PortableOutputDir\automation\include\BM\BadMutex
|
||||
Copy-New-Item $InstallerDepsDir\ffi-experiments\build\bad-mutex\BadMutex.lua $PortableOutputDir\automation\include\BM
|
||||
Copy-New-Item $InstallerDepsDir\ffi-experiments\build\precise-timer\PreciseTimer.dll $PortableOutputDir\automation\include\PT\PreciseTimer
|
||||
Copy-New-Item $InstallerDepsDir\ffi-experiments\build\precise-timer\PreciseTimer.lua $PortableOutputDir\automation\include\PT
|
||||
Copy-New-Item $InstallerDepsDir\ffi-experiments\build\download-manager\DownloadManager.dll $PortableOutputDir\automation\include\DM\DownloadManager
|
||||
Copy-New-Item $InstallerDepsDir\ffi-experiments\build\download-manager\DownloadManager.lua $PortableOutputDir\automation\include\DM
|
||||
|
||||
Write-Output 'Copying - portable-config'
|
||||
Copy-New-Item $SourceRoot\packages\win_installer\portable\config.json $PortableOutputDir
|
||||
|
||||
|
||||
Write-Output 'Creating portable zip'
|
||||
Remove-Item aegisub-portable-64.zip
|
||||
7z a aegisub-portable-64.zip aegisub-portable\
|
Loading…
Reference in New Issue