소스 검색

Merge branch 'image-formats-association' into thumbnail-provider-integration

Equbuxu 2 년 전
부모
커밋
b319e85654

+ 10 - 2
src/Installer/installer-setup-x64-light.iss

@@ -385,11 +385,19 @@ Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChang
 
 [Registry]
 
-Root: HKCR; Subkey: ".pixi";                             ValueData: "{#MyAppName}";          Flags: uninsdeletevalue; ValueType: string;  ValueName: ""
+// add PixiEditor into registry
 Root: HKCR; Subkey: "{#MyAppName}";                     ValueData: "Program {#MyAppName}";  Flags: uninsdeletekey;   ValueType: string;  ValueName: ""
-Root: HKCR; Subkey: "{#MyAppName}\DefaultIcon";             ValueData: "{app}\{#MyAppExeName},0";               ValueType: string;  ValueName: ""
+Root: HKCR; Subkey: "{#MyAppName}\DefaultIcon";         ValueData: "{app}\{#MyAppExeName},0";               ValueType: string;  ValueName: ""
 Root: HKCR; Subkey: "{#MyAppName}\shell\open\command";  ValueData: """{app}\{#MyAppExeName}"" ""%1""";  ValueType: string;  ValueName: ""
 
+// associate the added PixiEditor progid with various file formats
+Root: HKCR; Subkey: ".pixi";                             ValueData: "";          Flags: uninsdeletevalue; ValueType: string;  ValueName: "{#MyAppName}"
+Root: HKCR; Subkey: ".png\OpenWithProgids";              ValueData: "";          Flags: uninsdeletevalue; ValueType: string;  ValueName: "{#MyAppName}"
+Root: HKCR; Subkey: ".jpg\OpenWithProgids";              ValueData: "";          Flags: uninsdeletevalue; ValueType: string;  ValueName: "{#MyAppName}"
+Root: HKCR; Subkey: ".jpeg\OpenWithProgids";             ValueData: "";          Flags: uninsdeletevalue; ValueType: string;  ValueName: "{#MyAppName}"
+Root: HKCR; Subkey: ".bmp\OpenWithProgids";              ValueData: "";          Flags: uninsdeletevalue; ValueType: string;  ValueName: "{#MyAppName}"
+Root: HKCR; Subkey: ".gif\OpenWithProgids";              ValueData: "";          Flags: uninsdeletevalue; ValueType: string;  ValueName: "{#MyAppName}"
+
 // lospec-palette URL protocol association
 Root: HKCR; Subkey: "lospec-palette";                   ValueData: "{#MyAppName}";  Flags: uninsdeletevalue; ValueType: string;  ValueName: ""
 Root: HKCR; Subkey: "lospec-palette";                   ValueData: "";  Flags: uninsdeletekey;   ValueType: string;  ValueName: "URL Protocol"

+ 10 - 2
src/Installer/installer-setup-x86-light.iss

@@ -384,11 +384,19 @@ Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChang
 
 [Registry]
 
-Root: HKCR; Subkey: ".pixi";                             ValueData: "{#MyAppName}";          Flags: uninsdeletevalue; ValueType: string;  ValueName: ""
+// add PixiEditor progid into registry
 Root: HKCR; Subkey: "{#MyAppName}";                     ValueData: "Program {#MyAppName}";  Flags: uninsdeletekey;   ValueType: string;  ValueName: ""
-Root: HKCR; Subkey: "{#MyAppName}\DefaultIcon";             ValueData: "{app}\{#MyAppExeName},0";               ValueType: string;  ValueName: ""
+Root: HKCR; Subkey: "{#MyAppName}\DefaultIcon";         ValueData: "{app}\{#MyAppExeName},0";               ValueType: string;  ValueName: ""
 Root: HKCR; Subkey: "{#MyAppName}\shell\open\command";  ValueData: """{app}\{#MyAppExeName}"" ""%1""";  ValueType: string;  ValueName: ""
 
+// associate the added PixiEditor progid with various file formats
+Root: HKCR; Subkey: ".pixi";                             ValueData: "";          Flags: uninsdeletevalue; ValueType: string;  ValueName: "{#MyAppName}"
+Root: HKCR; Subkey: ".png\OpenWithProgids";              ValueData: "";          Flags: uninsdeletevalue; ValueType: string;  ValueName: "{#MyAppName}"
+Root: HKCR; Subkey: ".jpg\OpenWithProgids";              ValueData: "";          Flags: uninsdeletevalue; ValueType: string;  ValueName: "{#MyAppName}"
+Root: HKCR; Subkey: ".jpeg\OpenWithProgids";             ValueData: "";          Flags: uninsdeletevalue; ValueType: string;  ValueName: "{#MyAppName}"
+Root: HKCR; Subkey: ".bmp\OpenWithProgids";              ValueData: "";          Flags: uninsdeletevalue; ValueType: string;  ValueName: "{#MyAppName}"
+Root: HKCR; Subkey: ".gif\OpenWithProgids";              ValueData: "";          Flags: uninsdeletevalue; ValueType: string;  ValueName: "{#MyAppName}"
+
 // lospec-palette URL protocol association
 Root: HKCR; Subkey: "lospec-palette";                   ValueData: "{#MyAppName}";  Flags: uninsdeletevalue; ValueType: string;  ValueName: ""
 Root: HKCR; Subkey: "lospec-palette";                   ValueData: "";  Flags: uninsdeletekey;   ValueType: string;  ValueName: "URL Protocol"

+ 5 - 0
src/PixiEditor.MSIX/Package.appxmanifest

@@ -50,6 +50,11 @@
           <uap:FileTypeAssociation Name="pixieditor.pixifile">
             <uap:SupportedFileTypes>
               <uap:FileType>.pixi</uap:FileType>
+              <uap:FileType>.png</uap:FileType>
+              <uap:FileType>.jpg</uap:FileType>
+              <uap:FileType>.jpeg</uap:FileType>
+              <uap:FileType>.bmp</uap:FileType>
+              <uap:FileType>.gif</uap:FileType>
             </uap:SupportedFileTypes>
             <uap:DisplayName>PixiEditor</uap:DisplayName>
             <uap:InfoTip>A file used to save art made in PixiEditor</uap:InfoTip>

+ 5 - 0
src/SteamBuildScripts/.gitignore

@@ -0,0 +1,5 @@
+/buildoutput
+/content_x64
+/content_x86
+/output_x64
+/output_x86

+ 45 - 0
src/SteamBuildScripts/BuildScript.vdf

@@ -0,0 +1,45 @@
+"AppBuild"
+{
+	"AppID" "2218560" // PixiEditor AppID
+	"Desc" "PixiEditor build" // internal description for this build
+
+	"ContentRoot" ".\\" // root content folder, relative to location of this file
+
+	"Depots"
+	{
+		"2218561" // PixiEditor - x64
+		{
+			"BuildOutput" ".\\output_x64\\" // build output folder for build logs and build cache files
+			"InstallScript" "..\\InstallScript.vdf"
+			"FileMapping"
+			{
+				"LocalPath" ".\\content_x64\\*" // all files from content_x64 folder
+				"DepotPath" "." // mapped into the root of the depot
+				"recursive" "1" // include all subfolders
+			}
+			"FileMapping"
+			{
+				// copy install script into depot root folder
+				"LocalPath" ".\\InstallScript.vdf"
+				"DepotPath" "."
+			}
+		}
+		"2218562" // PixiEditor - x86
+		{
+			"BuildOutput" ".\\output_x86\\" // build output folder for build logs and build cache files
+			"InstallScript" "..\\InstallScript.vdf"
+			"FileMapping"
+			{
+				"LocalPath" ".\\content_x86\\*" // all files from content_x86 folder
+				"DepotPath" "." // mapped into the root of the depot
+				"recursive" "1" // include all subfolders
+			}
+			"FileMapping"
+			{
+				// copy install script into depot root folder
+				"LocalPath" ".\\InstallScript.vdf"
+				"DepotPath" "."
+			}
+		}
+	}
+}

+ 81 - 0
src/SteamBuildScripts/InstallScript.vdf

@@ -0,0 +1,81 @@
+"InstallScript"
+{
+	"Registry"
+	{
+		"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\PixiEditor\\shell\\open\\command"
+		{
+			"string"
+			{
+				"(default)"		"\"%INSTALLDIR%\\PixiEditor.exe\" \"%1\""
+			}
+		}
+		"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\PixiEditor\\DefaultIcon"
+		{
+			"string"
+			{
+				"(default)"		"%INSTALLDIR%\\PixiEditor.exe,0"
+			}
+		}
+		"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\.pixi"
+		{
+			"string"
+			{
+				"(default)"		"PixiEditor"
+			}
+		}
+		"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\.png\\OpenWithProgids"
+		{
+			"string"
+			{
+				"PixiEditor"		""
+			}
+		}
+		"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\.jpg\\OpenWithProgids"
+		{
+			"string"
+			{
+				"PixiEditor"		""
+			}
+		}
+		"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\.jpeg\\OpenWithProgids"
+		{
+			"string"
+			{
+				"PixiEditor"		""
+			}
+		}
+		"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\.bmp\\OpenWithProgids"
+		{
+			"string"
+			{
+				"PixiEditor"		""
+			}
+		}
+		"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\.gif\\OpenWithProgids"
+		{
+			"string"
+			{
+				"PixiEditor"		""
+			}
+		}
+		"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\lospec-palette"
+		{
+			"string"
+			{
+				"(default)"		"PixiEditor"
+				"URL Protocol"		""
+			}
+		}
+		"HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\lospec-palette\\shell\\open\\command"
+		{
+			"string"
+			{
+				"(default)"		"\"%INSTALLDIR%\\PixiEditor.exe\" \"%1\""
+			}
+		}
+	}
+}
+"kvsignatures"
+{
+	"InstallScript"		"a0ae3ad1777e55111d11bff367dd52a7d6cb1e9cc6b3da8988bcfd28fccc4bbd7ae6f048d0ffa927c896a041751d8de4dce7d6f36b2bc31f893a2b97ad645e395a536f19e47063c7e508bcb834bdc7eb048f7d1c5476aa07ec7341168f89e7b0828b359996b29e745bb48686a3e6080dec53227ac262f260c108b4a77fc7970e"
+}

+ 21 - 0
src/SteamBuildScripts/readme.md

@@ -0,0 +1,21 @@
+# Steam deployment instructions
+
+First, verify that `context_x86` and `content_x64` directories are empty. Then build two versions of PixiEditor (x86 and x64) using PixiEditor.Builder:
+
+```bash
+.\PixiEditor.Builder.exe --project-path "C:\your-own-path-to-repo\PixiEditor\src\PixiEditor" --self-contained -o "C:\your-path-to-repo\PixiEditor\src\SteamBuildScripts\content_x86" --build-configuration Steam --runtime win-x86
+```
+
+```bash
+.\PixiEditor.Builder.exe --project-path "C:\your-own-path-to-repo\PixiEditor\src\PixiEditor" --self-contained -o "C:\your-path-to-repo\PixiEditor\src\SteamBuildScripts\content_x64" --build-configuration Steam --runtime win-x64
+```
+
+Note that the output directories are set to be `content_x64` and `context_x86`. The build results must be in these folders to be picked up by steamcmd (`content_x64` and `context_x86` should directly contain PixiEditor.exe and all the other fluff, don't add a "PixiEditor" subfolder).
+
+After the build had completed, you can change the build description. For that, open BuildScript.vdf and edit the value of "Desc". After that, you are ready to upload the build to steam:
+
+```
+"C:\your-steamsdk-location\sdk\tools\ContentBuilder\builder\steamcmd.exe" +login <your-login> <your-password> +run_app_build "C:\your-path-to-repo\PixiEditor\src\SteamBuildScripts\BuildScript.vdf" +quit
+```
+
+The password is optional, if you entered it before you can omit it, and steamcmd should pull it from cache. After this has finished running, a new build will appear on the [SteamPipe Builds page](https://partner.steamgames.com/apps/builds/2218560) where you can set it live on some branch.