diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f2a6ed822..ebd6d3128 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -14,4 +14,6 @@ jobs: uses: actions/upload-artifact@v4 with: name: friction-ci-windows-x64 - path: build\output\*.7z + path: | + build\output\friction-*.7z + build\output\friction-*.exe diff --git a/.gitignore b/.gitignore index 18946b202..87f2f1646 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ distfiles backup CHANGES.md friction-distfiles +svgo-linux diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 3bf3e6d0f..d7a66f09a 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -96,6 +96,10 @@ if(WIN32) ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${FRICTION_NAME}.rc @ONLY ) + configure_file(${FRICTION_NAME}.iss + ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${FRICTION_NAME}.iss + @ONLY + ) configure_file(icons/${FRICTION_NAME}.ico ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${FRICTION_NAME}.ico COPYONLY diff --git a/src/app/friction.iss b/src/app/friction.iss new file mode 100644 index 000000000..5379cf24d --- /dev/null +++ b/src/app/friction.iss @@ -0,0 +1,203 @@ +#define MyAppName "Friction" +#define MyAppVersion "@PROJECT_VERSION@" +#define MyAppPublisher "Friction" +#define MyAppURL "https://friction.graphics" +#define MyAppExeName "friction.exe" +#define MyAppAssocName MyAppName + " Project" +#define MyAppAssocExt ".friction" +#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt + +[Setup] +AppId={{12D25577-88FD-4C5A-AF69-CCA597CAC44E} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={commonpf64}\{#MyAppName} +ChangesAssociations=yes +DisableProgramGroupPage=yes +LicenseFile=LICENSE.md +PrivilegesRequiredOverridesAllowed=dialog +OutputDir=setup +OutputBaseFilename=friction +SetupIconFile=friction.ico +Compression=lzma +SolidCompression=yes +WizardStyle=modern +WizardSmallImageFile=friction.bmp +WizardImageStretch=yes + +[Components] +Name: "friction"; Description: "Friction"; Types: full compact custom; Flags: fixed +Name: "ffmpeg"; Description: "FFmpeg"; Types: full compact custom; Flags: fixed +Name: "qt"; Description: "Qt"; Types: full compact custom; Flags: fixed +Name: "svgo"; Description: "SVG Optimizer"; Types: full + +[Files] +Source: "{#MyAppExeName}"; DestDir: "{app}"; Components: friction ; Flags: ignoreversion +Source: "frictioncore.dll"; DestDir: "{app}"; Components: friction ; Flags: ignoreversion +Source: "frictionui.dll"; DestDir: "{app}"; Components: friction ; Flags: ignoreversion + +Source: "svgo-win.exe"; DestDir: "{app}"; Components: svgo ; Flags: ignoreversion +Source: "svgo-license.txt"; DestDir: "{app}"; Components: svgo ; Flags: ignoreversion + +Source: "avcodec-58.dll"; DestDir: "{app}"; Components: ffmpeg ; Flags: ignoreversion +Source: "avdevice-58.dll"; DestDir: "{app}"; Components: ffmpeg ; Flags: ignoreversion +Source: "avformat-58.dll"; DestDir: "{app}"; Components: ffmpeg ; Flags: ignoreversion +Source: "avutil-56.dll"; DestDir: "{app}"; Components: ffmpeg ; Flags: ignoreversion +Source: "swresample-3.dll"; DestDir: "{app}"; Components: ffmpeg ; Flags: ignoreversion +Source: "swscale-5.dll"; DestDir: "{app}"; Components: ffmpeg ; Flags: ignoreversion + +Source: "qscintilla2_qt5.dll"; DestDir: "{app}"; Components: qt ; Flags: ignoreversion +Source: "Qt5Core.dll"; DestDir: "{app}"; Components: qt ; Flags: ignoreversion +Source: "Qt5Gui.dll"; DestDir: "{app}"; Components: qt ; Flags: ignoreversion +Source: "Qt5Multimedia.dll"; DestDir: "{app}"; Components: qt ; Flags: ignoreversion +Source: "Qt5Network.dll"; DestDir: "{app}"; Components: qt ; Flags: ignoreversion +Source: "Qt5OpenGL.dll"; DestDir: "{app}"; Components: qt ; Flags: ignoreversion +Source: "Qt5PrintSupport.dll"; DestDir: "{app}"; Components: qt ; Flags: ignoreversion +Source: "Qt5Qml.dll"; DestDir: "{app}"; Components: qt ; Flags: ignoreversion +Source: "Qt5Widgets.dll"; DestDir: "{app}"; Components: qt ; Flags: ignoreversion +Source: "Qt5Xml.dll"; DestDir: "{app}"; Components: qt ; Flags: ignoreversion +Source: "audio\*"; DestDir: "{app}\audio"; Components: qt ; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "platforms\*"; DestDir: "{app}\platforms"; Components: qt ; Flags: ignoreversion recursesubdirs createallsubdirs + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked + +[Registry] +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0" +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1""" +Root: HKA; Subkey: "Software\Classes\Applications\{#MyAppExeName}\SupportedTypes"; ValueType: string; ValueName: ".friction"; ValueData: "" + +[Icons] +Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon + +[Run] +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent + +; Track all files installed since first release (never break upgrades!) +[InstallDelete] +Type: files; Name: {app}\friction.exe +Type: files; Name: {app}\frictioncore.dll +Type: files; Name: {app}\frictionui.dll +Type: files; Name: {app}\avcodec-58.dll +Type: files; Name: {app}\avdevice-58.dll +Type: files; Name: {app}\avformat-58.dll +Type: files; Name: {app}\avutil-56.dll +Type: files; Name: {app}\qscintilla2_qt5.dll +Type: files; Name: {app}\Qt5Concurrent.dll +Type: files; Name: {app}\Qt5Core.dll +Type: files; Name: {app}\Qt5Gui.dll +Type: files; Name: {app}\Qt5Multimedia.dll +Type: files; Name: {app}\Qt5Network.dll +Type: files; Name: {app}\Qt5OpenGL.dll +Type: files; Name: {app}\Qt5PrintSupport.dll +Type: files; Name: {app}\Qt5Qml.dll +Type: files; Name: {app}\Qt5Svg.dll +Type: files; Name: {app}\Qt5Widgets.dll +Type: files; Name: {app}\Qt5Xml.dll +Type: files; Name: {app}\swresample-3.dll +Type: files; Name: {app}\swscale-5.dll +Type: files; Name: {app}\audio\qtaudio_wasapi.dll +Type: files; Name: {app}\audio\qtaudio_windows.dll +Type: files; Name: {app}\imageformats\qgif.dll +Type: files; Name: {app}\imageformats\qicns.dll +Type: files; Name: {app}\imageformats\qico.dll +Type: files; Name: {app}\imageformats\qjpeg.dll +Type: files; Name: {app}\imageformats\qsvg.dll +Type: files; Name: {app}\imageformats\qtga.dll +Type: files; Name: {app}\imageformats\qtiff.dll +Type: files; Name: {app}\imageformats\qwbmp.dll +Type: files; Name: {app}\imageformats\qwebp.dll +Type: files; Name: {app}\platforms\qdirect2d.dll +Type: files; Name: {app}\platforms\qminimal.dll +Type: files; Name: {app}\platforms\qoffscreen.dll +Type: files; Name: {app}\platforms\qwindows.dll +Type: files; Name: {app}\presets\expressions\easing\easeInBack.js +Type: files; Name: {app}\presets\expressions\easing\easeInBounce.js +Type: files; Name: {app}\presets\expressions\easing\easeInCirc.js +Type: files; Name: {app}\presets\expressions\easing\easeInCubic.js +Type: files; Name: {app}\presets\expressions\easing\easeInElastic.js +Type: files; Name: {app}\presets\expressions\easing\easeInExpo.js +Type: files; Name: {app}\presets\expressions\easing\easeInOutBack.js +Type: files; Name: {app}\presets\expressions\easing\easeInOutBounce.js +Type: files; Name: {app}\presets\expressions\easing\easeInOutCirc.js +Type: files; Name: {app}\presets\expressions\easing\easeInOutCubic.js +Type: files; Name: {app}\presets\expressions\easing\easeInOutElastic.js +Type: files; Name: {app}\presets\expressions\easing\easeInOutExpo.js +Type: files; Name: {app}\presets\expressions\easing\easeInOutQuad.js +Type: files; Name: {app}\presets\expressions\easing\easeInOutQuart.js +Type: files; Name: {app}\presets\expressions\easing\easeInOutQuint.js +Type: files; Name: {app}\presets\expressions\easing\easeInOutSine.js +Type: files; Name: {app}\presets\expressions\easing\easeInQuad.js +Type: files; Name: {app}\presets\expressions\easing\easeInQuart.js +Type: files; Name: {app}\presets\expressions\easing\easeInQuint.js +Type: files; Name: {app}\presets\expressions\easing\easeInSine.js +Type: files; Name: {app}\presets\expressions\easing\easeOutBack.js +Type: files; Name: {app}\presets\expressions\easing\easeOutBounce.js +Type: files; Name: {app}\presets\expressions\easing\easeOutCirc.js +Type: files; Name: {app}\presets\expressions\easing\easeOutCubic.js +Type: files; Name: {app}\presets\expressions\easing\easeOutElastic.js +Type: files; Name: {app}\presets\expressions\easing\easeOutExpo.js +Type: files; Name: {app}\presets\expressions\easing\easeOutQuad.js +Type: files; Name: {app}\presets\expressions\easing\easeOutQuart.js +Type: files; Name: {app}\presets\expressions\easing\easeOutQuint.js +Type: files; Name: {app}\presets\expressions\easing\easeOutSine.js +Type: files; Name: {app}\docs\LICENSE.md +Type: files; Name: {app}\docs\README-easing.md +Type: files; Name: {app}\docs\README.md +Type: files; Name: {app}\docs\ffmpeg\COPYING.GPLv3 +Type: files; Name: {app}\docs\ffmpeg\CREDITS +Type: files; Name: {app}\docs\ffmpeg\gcc\COPYING.LIB +Type: files; Name: {app}\docs\ffmpeg\gcc\COPYING.RUNTIME +Type: files; Name: {app}\docs\ffmpeg\l-smash\LICENSE +Type: files; Name: {app}\docs\ffmpeg\lame\COPYING +Type: files; Name: {app}\docs\ffmpeg\lame\LICENSE +Type: files; Name: {app}\docs\ffmpeg\lame\README +Type: files; Name: {app}\docs\ffmpeg\libaom\AUTHORS +Type: files; Name: {app}\docs\ffmpeg\libaom\LICENSE +Type: files; Name: {app}\docs\ffmpeg\libaom\PATENTS +Type: files; Name: {app}\docs\ffmpeg\libde265\AUTHORS +Type: files; Name: {app}\docs\ffmpeg\libde265\COPYING +Type: files; Name: {app}\docs\ffmpeg\libde265\README +Type: files; Name: {app}\docs\ffmpeg\libheif\COPYING +Type: files; Name: {app}\docs\ffmpeg\libheif\README.md +Type: files; Name: {app}\docs\ffmpeg\libogg\AUTHORS +Type: files; Name: {app}\docs\ffmpeg\libogg\COPYING +Type: files; Name: {app}\docs\ffmpeg\libogg\README.md +Type: files; Name: {app}\docs\ffmpeg\libtheora\AUTHORS +Type: files; Name: {app}\docs\ffmpeg\libtheora\COPYING +Type: files; Name: {app}\docs\ffmpeg\libtheora\LICENSE +Type: files; Name: {app}\docs\ffmpeg\libtheora\README +Type: files; Name: {app}\docs\ffmpeg\libvorbis\AUTHORS +Type: files; Name: {app}\docs\ffmpeg\libvorbis\COPYING +Type: files; Name: {app}\docs\ffmpeg\libvpx\AUTHORS +Type: files; Name: {app}\docs\ffmpeg\libvpx\LICENSE +Type: files; Name: {app}\docs\ffmpeg\libvpx\PATENTS +Type: files; Name: {app}\docs\ffmpeg\libvpx\README +Type: files; Name: {app}\docs\ffmpeg\x265\COPYING +Type: files; Name: {app}\docs\ffmpeg\x265\readme.rst +Type: files; Name: {app}\docs\ffmpeg\xvidcore\AUTHORS +Type: files; Name: {app}\docs\ffmpeg\xvidcore\LICENSE +Type: files; Name: {app}\docs\ffmpeg\xvidcore\README +Type: files; Name: {app}\docs\ffmpeg\zlib\LICENSE +Type: files; Name: {app}\docs\ffmpeg\zlib\README +Type: files; Name: {app}\docs\qscintilla\LICENSE +Type: files; Name: {app}\docs\qscintilla\README.doc +Type: files; Name: {app}\docs\qt\LICENSE +Type: files; Name: {app}\docs\qt\LICENSE.GPL3-EXCEPT +Type: files; Name: {app}\docs\qt\LICENSE.txt +Type: files; Name: {app}\docs\qt\ThirdPartySoftware_Listing.txt +Type: files; Name: {app}\docs\skia\AUTHORS +Type: files; Name: {app}\docs\skia\LICENSE +Type: files; Name: {app}\docs\skia\README +Type: files; Name: {app}\svgo-win.exe +Type: files; Name: {app}\svgo-license.txt diff --git a/src/scripts/build.bat b/src/scripts/build.bat index 648790b3b..cd3d33e31 100644 --- a/src/scripts/build.bat +++ b/src/scripts/build.bat @@ -56,7 +56,9 @@ if "%REL%" == "OFF" ( set VERSION="%VERSION%-%COMMIT%" ) -set OUTPUT_DIR="%CWD%\build\output\friction-%VERSION%" +set BUILD_OUTPUT="%CWD%\build\output" +set OUTPUT_DIR="%BUILD_OUTPUT%\friction-%VERSION%" + mkdir "%OUTPUT_DIR%" mkdir "%OUTPUT_DIR%\audio" mkdir "%OUTPUT_DIR%\platforms" @@ -89,15 +91,26 @@ copy "%SDK_DIR%\bin\avutil-56.dll" "%OUTPUT_DIR%\" copy "%SDK_DIR%\bin\swresample-3.dll" "%OUTPUT_DIR%\" copy "%SDK_DIR%\bin\swscale-5.dll" "%OUTPUT_DIR%\" -copy "%SDK_DIR%\bin\svgo-win.exe" "%CWD%\build\output\" - echo "Delete this file if you want to disable portable mode" > "%OUTPUT_DIR%\portable.txt" -cd "%CWD%\build\output" +cd "%BUILD_OUTPUT%" +copy "%SDK_DIR%\bin\svgo-win.exe" "%BUILD_OUTPUT%\" if not exist "svgo-license.txt" ( curl -OL "https://raw.githubusercontent.com/friction2d/friction-svgo/main/svgo-license.txt" ) 7z a -mx9 friction-svgo-windows-x64.7z svgo-win.exe svgo-license.txt 7z a -mx9 friction-%VERSION%-windows-x64.7z friction-%VERSION% + +copy "%CWD%\build\src\app\%BDIR%\friction.iss" "%OUTPUT_DIR%\" +copy "%CWD%\src\app\icons\friction.ico" "%OUTPUT_DIR%\" +copy "%CWD%\src\app\icons\friction.bmp" "%OUTPUT_DIR%\" +copy "%CWD%\LICENSE.md" "%OUTPUT_DIR%\" +copy "%BUILD_OUTPUT%\svgo-win.exe" "%OUTPUT_DIR%\" +copy "%BUILD_OUTPUT%\svgo-license.txt" "%OUTPUT_DIR%\" + +cd "%OUTPUT_DIR%" + +iscc friction.iss +copy "setup\friction.exe" "%BUILD_OUTPUT%\friction-%VERSION%-setup-win64.exe"