Build Windows Installer
This commit is contained in:
parent
8f5a0a22b4
commit
dc5ccf4ced
10
.github/workflows/windows_build.yml
vendored
10
.github/workflows/windows_build.yml
vendored
|
@ -44,8 +44,12 @@ jobs:
|
|||
cp -r toonz\build\Tahoma2D artifact
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: Tahoma2D-win
|
||||
name: Tahoma2D-portable-win
|
||||
path: artifact
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: Tahoma2D-install-win.exe
|
||||
path: toonz\build\Tahoma2D-install-win.exe
|
||||
- name: Get Nightly Release Date
|
||||
if: ${{ github.repository_owner == 'tahoma2d' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
run: |
|
||||
|
@ -70,7 +74,7 @@ jobs:
|
|||
with:
|
||||
allowUpdates: true
|
||||
artifactErrorsFailBuild: false
|
||||
artifacts: toonz\build\Tahoma2D-win.zip
|
||||
artifacts: toonz\build\Tahoma2D-portable-win.zip,toonz\build\Tahoma2D-install-win.exe
|
||||
artifactContentType: "raw"
|
||||
body: ${{ github.event.head_commit.message }}
|
||||
name: Latest Nightly ${{ env.NIGHTLYDATE }}
|
||||
|
@ -84,7 +88,7 @@ jobs:
|
|||
with:
|
||||
allowUpdates: true
|
||||
artifactErrorsFailBuild: false
|
||||
artifacts: toonz\build\Tahoma2D-win.zip
|
||||
artifacts: toonz\build\Tahoma2D-portable-win.zip,toonz\build\Tahoma2D-install-win.exe
|
||||
artifactContentType: "raw"
|
||||
body: ${{ github.event.head_commit.message }}
|
||||
name: ${{ env.NIGHTLYDATETIME }}
|
||||
|
|
|
@ -35,10 +35,15 @@ IF EXIST ..\..\thirdparty\libgphoto2\include (
|
|||
REM Remove ILK files
|
||||
del Tahoma2D\*.ilk
|
||||
|
||||
echo ">>> Copying stuff to Tahoma2D\tahomastuff"
|
||||
echo ">>> Configuring Tahoma2D.exe for deployment"
|
||||
|
||||
mkdir Tahoma2D\tahomastuff
|
||||
xcopy /Y /E ..\..\stuff Tahoma2D\tahomastuff
|
||||
REM Setup for local builds
|
||||
set QT_PATH=C:\Qt\5.9.7\msvc2019_64
|
||||
|
||||
REM These are effective when running from Actions/Appveyor
|
||||
IF EXIST D:\a\tahoma2d\tahoma2d\thirdparty\qt\5.9\msvc2019_64 set QT_PATH=D:\a\tahoma2d\tahoma2d\thirdparty\qt\5.9\msvc2019_64
|
||||
|
||||
%QT_PATH%\bin\windeployqt.exe Tahoma2D\Tahoma2D.exe
|
||||
|
||||
del /A- /S Tahoma2D\tahomastuff\*.gitkeep
|
||||
|
||||
|
@ -58,19 +63,28 @@ IF EXIST ..\..\thirdparty\apps\rhubarb (
|
|||
xcopy /Y /E /I ..\..\thirdparty\apps\rhubarb\res "Tahoma2D\rhubarb\res"
|
||||
)
|
||||
|
||||
echo ">>> Configuring Tahoma2D.exe for deployment"
|
||||
echo ">>> Creating Tahoma2D Windows Installer"
|
||||
IF NOT EXIST installer mkdir installer
|
||||
cd installer
|
||||
|
||||
REM Setup for local builds
|
||||
set QT_PATH=C:\Qt\5.9.7\msvc2019_64
|
||||
rmdir /S /Q program
|
||||
rmdir /S /Q stuff
|
||||
|
||||
REM These are effective when running from Actions/Appveyor
|
||||
IF EXIST D:\a\tahoma2d\tahoma2d\thirdparty\qt\5.9\msvc2019_64 set QT_PATH=D:\a\tahoma2d\tahoma2d\thirdparty\qt\5.9\msvc2019_64
|
||||
xcopy /Y /E /I ..\Tahoma2D program
|
||||
|
||||
%QT_PATH%\bin\windeployqt.exe Tahoma2D\Tahoma2D.exe
|
||||
xcopy /Y /E /I ..\..\..\stuff stuff
|
||||
|
||||
echo ">>> Creating Tahoma2D Windows package"
|
||||
python ..\..\installer\windows\filelist_python3.py %cd%
|
||||
ISCC.exe /I. /O.. ..\..\installer\windows\setup.iss
|
||||
|
||||
cd ..
|
||||
|
||||
echo ">>> Creating Tahoma2D Windows Portable package"
|
||||
|
||||
xcopy /Y /E /I ..\..\stuff Tahoma2D\tahomastuff
|
||||
|
||||
IF EXIST Tahoma2D-portable-win.zip del Tahoma2D-portable-win.zip
|
||||
7z a Tahoma2D-portable-win.zip Tahoma2D
|
||||
|
||||
IF EXIST Tahoma2D-win.zip del Tahoma2D-win.zip
|
||||
7z a Tahoma2D-win.zip Tahoma2D
|
||||
|
||||
cd ../..
|
||||
|
|
36
toonz/installer/windows/filelist_python3.py
Normal file
36
toonz/installer/windows/filelist_python3.py
Normal file
|
@ -0,0 +1,36 @@
|
|||
# list up files in program and stuff
|
||||
# for python version 3.x (converted with 2to3.py from filelist.py)
|
||||
|
||||
import os
|
||||
import codecs
|
||||
import sys
|
||||
|
||||
currentPath=""
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
currentPath=sys.argv[1] + "\\"
|
||||
|
||||
fout = codecs.open("files.iss", "w", "utf_8_sig")
|
||||
|
||||
sourceDir=currentPath + 'program'
|
||||
|
||||
for path, dirs, files in os.walk(sourceDir):
|
||||
for file in files:
|
||||
print("""Source: "%s"; DestDir: "{app}%s"; Flags: ignoreversion""" % (
|
||||
os.path.join(path, file),
|
||||
path[len(sourceDir):]), file=fout)
|
||||
|
||||
print()
|
||||
|
||||
sourceDir=currentPath + 'stuff'
|
||||
|
||||
for path, dirs, files in os.walk(sourceDir):
|
||||
for file in files:
|
||||
print("""Source: "%s"; DestDir: "{code:GetStuffDir}%s"; Flags: uninsneveruninstall; Check: IsOverwiteStuffCheckBoxChecked""" % (
|
||||
os.path.join(path, file),
|
||||
path[len(sourceDir):]), file=fout)
|
||||
print("""Source: "%s"; DestDir: "{code:GetStuffDir}%s"; Flags: onlyifdoesntexist uninsneveruninstall; Check: not IsOverwiteStuffCheckBoxChecked""" % (
|
||||
os.path.join(path, file),
|
||||
path[len(sourceDir):]), file=fout)
|
||||
|
||||
fout.close()
|
115
toonz/installer/windows/setup.iss
Normal file
115
toonz/installer/windows/setup.iss
Normal file
|
@ -0,0 +1,115 @@
|
|||
; Script generated by the Inno Setup Script Wizard.
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define MyAppName "Tahoma2D"
|
||||
#define MyAppVersion "1.3"
|
||||
#define MyAppPublisher "Tahoma2D"
|
||||
#define MyAppURL "https://tahoma2d.org/"
|
||||
#define MyAppExeName "Tahoma2D.exe"
|
||||
|
||||
[Setup]
|
||||
; NOTE: The value of AppId uniquely identifies this application.
|
||||
; Do not use the same AppId value in installers for other applications.
|
||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||
AppId={{0BAD1682-048C-4657-82CF-23B98C0B5F33}
|
||||
AppName={#MyAppName}
|
||||
AppVersion={#MyAppVersion}
|
||||
;AppVerName={#MyAppName} {#MyAppVersion}
|
||||
AppPublisher={#MyAppPublisher}
|
||||
AppPublisherURL={#MyAppURL}
|
||||
AppSupportURL={#MyAppURL}
|
||||
AppUpdatesURL={#MyAppURL}
|
||||
DefaultDirName={commonpf}\Tahoma2D
|
||||
DefaultGroupName=Tahoma2D
|
||||
AllowNoIcons=yes
|
||||
;LicenseFile=license.rtf
|
||||
OutputBaseFilename=Tahoma2D-install-win
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
ArchitecturesInstallIn64BitMode=x64
|
||||
UninstallDisplayIcon={app}\{#MyAppExeName}
|
||||
|
||||
[Languages]
|
||||
Name: "en"; MessagesFile: "compiler:Default.isl"
|
||||
|
||||
[Tasks]
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}";
|
||||
|
||||
[Files]
|
||||
#include "files.iss"
|
||||
|
||||
[Dirs]
|
||||
Name: "{code:GetStuffDir}\plugins"; Flags: uninsneveruninstall
|
||||
Name: "{code:GetStuffDir}\toonzfarm"; Flags: uninsneveruninstall
|
||||
Name: "{code:GetStuffDir}\projects"; Flags: uninsneveruninstall
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
||||
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
|
||||
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||
|
||||
[Registry]
|
||||
Root: HKLM; Subkey: "Software\Tahoma2D"; Flags: uninsdeletekeyifempty
|
||||
Root: HKLM; Subkey: "Software\Tahoma2D\Tahoma2D"; Flags: uninsdeletekey
|
||||
Root: HKLM; Subkey: "Software\Tahoma2D\Tahoma2D"; ValueType: string; ValueName: "TAHOMA2DROOT"; ValueData: "{code:GetStuffDir}"
|
||||
Root: HKLM; Subkey: "Software\Tahoma2D\Tahoma2D"; ValueType: string; ValueName: "TAHOMA2DPROJECTS"; ValueData: "{code:GetStuffDir}\projects"
|
||||
Root: HKLM; Subkey: "Software\Tahoma2D\Tahoma2D"; ValueType: string; ValueName: "TAHOMA2DCONFIG"; ValueData: "{code:GetStuffDir}\config"
|
||||
Root: HKLM; Subkey: "Software\Tahoma2D\Tahoma2D"; ValueType: string; ValueName: "TAHOMA2DPROFILES"; ValueData: "{code:GetStuffDir}\profiles"
|
||||
Root: HKLM; Subkey: "Software\Tahoma2D\Tahoma2D"; ValueType: string; ValueName: "TAHOMA2DFXPRESETS"; ValueData: "{code:GetStuffDir}\fxs"
|
||||
Root: HKLM; Subkey: "Software\Tahoma2D\Tahoma2D"; ValueType: string; ValueName: "TAHOMA2DLIBRARY"; ValueData: "{code:GetStuffDir}\library"
|
||||
Root: HKLM; Subkey: "Software\Tahoma2D\Tahoma2D"; ValueType: string; ValueName: "TAHOMA2DSTUDIOPALETTE"; ValueData: "{code:GetStuffDir}\studiopalette"
|
||||
Root: HKLM; Subkey: "Software\Tahoma2D\Tahoma2D"; ValueType: string; ValueName: "FARMROOT"; ValueData: ""
|
||||
|
||||
[Dirs]
|
||||
Name: {code:GetStuffDir}; Flags: uninsneveruninstall
|
||||
|
||||
[CustomMessages]
|
||||
en.StuffDirPageTitle=Choose Destination Location for Stuff Folder
|
||||
en.StuffDirPageDescription=Select the folder where setup will install the Tahoma2D Stuff folder containing various setting files
|
||||
en.StuffDirPageLabel=Install the Tahoma2D Stuff folder to:
|
||||
en.OverwriteStuffCheckBoxLabel=Overwrite all setting files in the Stuff folder except user's personal settings
|
||||
|
||||
[Code]
|
||||
var
|
||||
StuffDirPage: TInputDirWizardPage;
|
||||
OverwriteStuffCheckBox: TNewCheckBox;
|
||||
StuffRoot: String;
|
||||
|
||||
procedure InitializeWizard;
|
||||
begin
|
||||
StuffDirPage := CreateInputDirPage(wpSelectDir,
|
||||
CustomMessage('StuffDirPageTitle'),
|
||||
CustomMessage('StuffDirPageDescription'),
|
||||
CustomMessage('StuffDirPageLabel'),
|
||||
False,
|
||||
'');
|
||||
StuffDirPage.Add('');
|
||||
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\Tahoma2D\Tahoma2D', 'TAHOMA2DROOT', StuffRoot) then
|
||||
begin
|
||||
StuffDirPage.Values[0] := StuffRoot;
|
||||
end
|
||||
else
|
||||
begin
|
||||
StuffDirPage.Values[0] := 'C:\Tahoma2D stuff';
|
||||
end;
|
||||
OverwriteStuffCheckBox := TNewCheckBox.Create(StuffDirPage);
|
||||
OverwriteStuffCheckBox.Caption := CustomMessage('OverwriteStuffCheckBoxLabel');
|
||||
OverwriteStuffCheckBox.Parent := StuffDirPage.Surface;
|
||||
OverwriteStuffCheckBox.Top := ScaleY(70);
|
||||
OverwriteStuffCheckBox.Width := StuffDirPage.SurfaceWidth;
|
||||
OverwriteStuffCheckBox.Checked := True;
|
||||
|
||||
end;
|
||||
|
||||
function GetStuffDir(Param: String): String;
|
||||
begin
|
||||
Result := StuffDirPage.Values[0];
|
||||
end;
|
||||
|
||||
function IsOverwiteStuffCheckBoxChecked: Boolean;
|
||||
begin
|
||||
Result := OverwriteStuffCheckBox.Checked;
|
||||
end;
|
Loading…
Reference in a new issue