Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submit to Windows Store #3883

Open
gjsman opened this Issue Nov 10, 2017 · 13 comments

Comments

Projects
None yet
5 participants
@gjsman
Copy link

gjsman commented Nov 10, 2017

Description of the Issue

Notepad++ would be a great addition to the Windows Store.

With the Desktop Converter bridge, you just take a copy of an installer exe for Notepad++ and it converts it into a Windows 10 APPX file, which can be uploaded to the Windows Store easily.

I have done this myself successfully, and could help out with the submission if needed.

image

image

image

@gjsman

This comment has been minimized.

Copy link
Author

gjsman commented Nov 10, 2017

I made several improvements:

image

image

@gjsman

This comment has been minimized.

Copy link
Author

gjsman commented Nov 10, 2017

image

@gjsman

This comment has been minimized.

Copy link
Author

gjsman commented Nov 10, 2017

To install a testing build:

  1. Unzip notepad++-appx-rev6.zip to a folder.
  2. Enable Sideloading in Windows 10 > Settings > Update & Security > For Developers > Sideloading. You can use either Windows 10 Home or Pro, but you cannot do this in Windows 10 S.
  3. Double-click gjsman.cer, click "Install Certificate", "Local Machine", Certificate Store: "Trusted People" (NOT Automatic or "Trusted Publishers") > Finish.
  4. Double-click Notepad++.appx, click "Install."

Old, Rev 0 build
notepad++-appx.zip

New, Rev 6 build
notepad++-appx-rev6.zip

NOTE: The revision 0 build only has file-extension associations for .txt, .rtf, and .xml. To try this out, make a blank text file, right click it, and choose "Open With" and you will see Notepad++ in the list. I can add more extensions on request.

UPDATE: Revision 6 (just released) has ALL extensions supported EXCEPT .hta, .bat, and .cmd, which Windows 10 does not allow any UWP apps to use.

NOTE 2: You know the whole add-certificate thing, unzip this, and double-click that? This will not happen when submitted to Store (obviously). When uploaded to the Store, it will just be navigating to the entry, and clicking "Install."

NOTE 3: If upgrading to Revision 6 from Revision 0, you don't need to install the certificate again. Just double-click it, and "Install". Due to some modifications to the XML, it will install both simultaneously instead of updating, so I would recommend removing Rev 0 manually.

@strollingHeifer

This comment has been minimized.

Copy link

strollingHeifer commented Nov 10, 2017

@donho is on it. See issue #1896. I'm sure any improvements you made will be welcome.

@gjsman

This comment has been minimized.

Copy link
Author

gjsman commented Nov 11, 2017

@strollingHeifer I hope so. :)

I just released Revision 6, which supports ALL extensions Notepad++ supports except for .hta, .bat, and .cmd, which Windows does not allow UWP apps to use (it gives me an error if I attempt to use them).

Revision 6 also removes the updater using the /noUpdater install flag.

@gjsman

This comment has been minimized.

Copy link
Author

gjsman commented Nov 12, 2017

Instructions:

  1. Make sure a proper base image is installed, run DesktopAppConverter app as Admin.
  2. In this example, directory system looks like:
  • Downloads
    • npp.7.5.1.Installer.exe
    • notepad++ (folder)
      • npp.build (folder, always use for current build)
        • cert.pfx
        • mynamehere.cer
        • PackageFiles (folder)
          • Assets (folder)
          • localization (folder)
          • plugins (folder)
          • VFS (folder)
          • notepad++.exe
          • AppxManifest.xml
          • [Various other system-generated files...]
      • npp.build.11.10.2017 [...]
      • npp.build.11.09.2017 [...]
  1. Always rename a build, once completed, to have the date added at the end. This is important - the "npp.build" folder should only be used for latest build.
  2. Run command similar to this from Downloads folder:
DesktopAppConverter.exe -Installer npp.7.5.1.Installer.exe -InstallerArguments "/S /noUpdater" -Destination notepad++ -PackageName "npp.build" -Publisher "CN=GJSMan" -Version 7.5.1.0
cd notepad++\np.build\PackageFiles
  1. Now, copy the AppxManifest.xml file from the previous build, overwriting the AppxManifest.xml that is in the current folder. If this is your first build, don't do this, and edit AppxManifest.xml to match the file listed at the bottom of this post.
cp ../../npp.build.11.10.2017/AppxManifest.xml AppxManifest.xml
  1. Edit the newly-copied AppxManifest.xml file, updating the version number on line 3. Don't make any other modifications.

  2. Make the AppX:

cd ..
MakeAppx pack /v /h SHA256 /d "PackageFiles" /p Notepad++.appx

NOTE: When doing this for the first time, you must add C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x86 to the Path attribute in Environment Variables for this to work, and restart PowerShell.
If you are using a different build than 16299, you should open the folder in File Explorer and adjust accordingly.

  1. Sign the AppX, so you can install and test:
    A) Copy the certificate already generated (see below if this is your first time) from your previous build into the npp.build folder.
    B) Run:
signtool sign /fd SHA256 /a /f mycert.pfx /p MYSECRETPASSWORDHERE MyPackage.appx

If doing this for the first time, you must generate a private certificate on your computer, then copy the .pfx and .cer files into the npp.build folder, then use that to sign.

  • To clarify, the .cer is the public key (the exported one), whereas the .pfx is used for signing and is private.
  • You must have the Environment Variable in Step 7 set for this to work.
  • You only need to generate the certificate one time. After this, again, just copy-and-paste the certificate from the previous build into the new one.

To generate the certificate (if this is your first build):
A) New-SelfSignedCertificate -Type Custom -Subject "CN=<YourNameHere>" -KeyUsage DigitalSignature -FriendlyName <Your Friendly Name> -CertStoreLocation "Cert:\LocalMachine\My"
B) Set-Location Cert:\LocalMachine\My
C) Get-ChildItem | Format-Table Subject, FriendlyName, Thumbprint
D) $pwd = ConvertTo-SecureString -String <Your Password> -Force -AsPlainText
E) Export-PfxCertificate -cert "Cert:\LocalMachine\My\<Certificate Thumbprint>" -FilePath C:\Users\myname\Downloads\notepad++\npp.build\cert.pfx -Password $pwd
F) cd C:\Users\myname\Downloads\notepad++\npp.build
G) Open "Manage Computer Certificates" from Search box in Windows 10.
H) Double click "Personal" > "Certificates"
I) Right click, "All Tasks" > Export
J) Next, "No, I do not want to export the private key", "DER Encoded Binary", and save to C:\Users\myname\Downloads\notepad++\npp.build\mynamehere.cer. "Next", "Finish."
K) Update your AppxManifest.xml file to use "CN=YourNameHere" and update your publisher names in that file.
L) Go to the top, part B above this. Run signtool using your newly-generated .pfx.

  1. Double click the .cer once signed, and Install it to "Trusted People."
  2. Double click the .appx just generated, and click Install.

Additional Notes:

This is the default AppX. When building a build for the first time, you must copy and paste this AppX over the generated one.

<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:rescap3="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/3" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" xmlns:desktop2="http://schemas.microsoft.com/appx/manifest/desktop/windows10/2" xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10" xmlns:wincap3="http://schemas.microsoft.com/appx/manifest/foundation/windows10/windowscapabilities/3" IgnorableNamespaces="uap4 wincap3 rescap3 desktop2 com">
  <Identity Name="npp.build" ProcessorArchitecture="x86" Publisher="CN=GJSMan" Version="7.5.1.6" />
  <Properties>
    <DisplayName>Notepad++</DisplayName>
    <PublisherDisplayName>GJSMan</PublisherDisplayName>
    <Logo>Assets\StoreLogo.png</Logo>
  </Properties>
  <Resources>
    <Resource Language="en-us" />
    <Resource uap:Scale="100" />
    <Resource uap:Scale="125" />
    <Resource uap:Scale="150" />
    <Resource uap:Scale="200" />
    <Resource uap:Scale="400" />
  </Resources>
  <Dependencies>
    <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="10.0.16299.15" />
  </Dependencies>
  <Capabilities>
    <rescap:Capability Name="runFullTrust" />
    <Capability Name="internetClient" />
  </Capabilities>
  <Applications>
    <Application Id="npp.build" Executable="notepad++.exe" EntryPoint="Windows.FullTrustApplication">
      <uap:VisualElements DisplayName="Notepad++" Description="npp.build" BackgroundColor="transparent" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png">
        <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" Square310x310Logo="Assets\Square310x310Logo.png" Square71x71Logo="Assets\Square71x71Logo.png">
          <uap:ShowNameOnTiles>
            <uap:ShowOn Tile="square150x150Logo" />
            <uap:ShowOn Tile="wide310x150Logo" />
            <uap:ShowOn Tile="square310x310Logo" />
          </uap:ShowNameOnTiles>
        </uap:DefaultTile>
      </uap:VisualElements>
      <Extensions>
        <uap3:Extension Category="windows.appExecutionAlias" Executable="notepad++.exe" EntryPoint="Windows.FullTrustApplication">
          <uap3:AppExecutionAlias>
            <desktop:ExecutionAlias Alias="notepad++.exe" />
          </uap3:AppExecutionAlias>
        </uap3:Extension>
		<uap:Extension Category="windows.fileTypeAssociation">
          <uap3:FileTypeAssociation Name="npp.build">
		   <uap:SupportedFileTypes>
              <uap:FileType>.txt</uap:FileType>
              <uap:FileType>.log</uap:FileType>
			  <uap:FileType>.ini</uap:FileType>
			  <uap:FileType>.inf</uap:FileType>
			  <uap:FileType>.h</uap:FileType>
			  <uap:FileType>.hh</uap:FileType>
			  <uap:FileType>.hpp</uap:FileType>
			  <uap:FileType>.hxx</uap:FileType>
			  <uap:FileType>.c</uap:FileType>
			  <uap:FileType>.cpp</uap:FileType>
			  <uap:FileType>.cxx</uap:FileType>
			  <uap:FileType>.cc</uap:FileType>
			  <uap:FileType>.m</uap:FileType>
			  <uap:FileType>.mm</uap:FileType>
			  <uap:FileType>.vcxproj</uap:FileType>
			  <uap:FileType>.vcproj</uap:FileType>
			  <uap:FileType>.props</uap:FileType>
			  <uap:FileType>.vsprops</uap:FileType>
			  <uap:FileType>.manifest</uap:FileType>
			  <uap:FileType>.java</uap:FileType>
			  <uap:FileType>.cs</uap:FileType>
			  <uap:FileType>.pas</uap:FileType>
			  <uap:FileType>.pp</uap:FileType>
			  <uap:FileType>.inc</uap:FileType>
			  <uap:FileType>.html</uap:FileType>
			  <uap:FileType>.htm</uap:FileType>
			  <uap:FileType>.shtml</uap:FileType>
			  <uap:FileType>.shtm</uap:FileType>
			  <uap:FileType>.htaccess</uap:FileType>
			  <uap:FileType>.asp</uap:FileType>
			  <uap:FileType>.aspx</uap:FileType>
			  <uap:FileType>.css</uap:FileType>
			  <uap:FileType>.js</uap:FileType>
			  <uap:FileType>.json</uap:FileType>
			  <uap:FileType>.jsm</uap:FileType>
			  <uap:FileType>.jsp</uap:FileType>
			  <uap:FileType>.php</uap:FileType>
			  <uap:FileType>.php3</uap:FileType>
			  <uap:FileType>.php4</uap:FileType>
			  <uap:FileType>.php5</uap:FileType>
			  <uap:FileType>.phps</uap:FileType>
			  <uap:FileType>.phpt</uap:FileType>
			  <uap:FileType>.phtml</uap:FileType>
			  <uap:FileType>.xml</uap:FileType>
			  <uap:FileType>.xhtml</uap:FileType>
			  <uap:FileType>.xht</uap:FileType>
			  <uap:FileType>.xul</uap:FileType>
			  <uap:FileType>.kml</uap:FileType>
			  <uap:FileType>.xaml</uap:FileType>
			  <uap:FileType>.xsml</uap:FileType>
			  <uap:FileType>.sh</uap:FileType>
			  <uap:FileType>.bsh</uap:FileType>
			  <uap:FileType>.bash</uap:FileType>
			  <uap:FileType>.nsi</uap:FileType>
			  <uap:FileType>.nsh</uap:FileType>
			  <uap:FileType>.lua</uap:FileType>
			  <uap:FileType>.pl</uap:FileType>
			  <uap:FileType>.pm</uap:FileType>
			  <uap:FileType>.py</uap:FileType>
			  <uap:FileType>.rc</uap:FileType>
			  <uap:FileType>.as</uap:FileType>
			  <uap:FileType>.mx</uap:FileType>
			  <uap:FileType>.vb</uap:FileType>
			  <uap:FileType>.vbs</uap:FileType>
			  <uap:FileType>.f</uap:FileType>
			  <uap:FileType>.for</uap:FileType>
			  <uap:FileType>.f90</uap:FileType>
			  <uap:FileType>.f95</uap:FileType>
			  <uap:FileType>.f2k</uap:FileType>
			  <uap:FileType>.tex</uap:FileType>
			  <uap:FileType>.sql</uap:FileType>
			  <uap:FileType>.nfo</uap:FileType>
			  <uap:FileType>.mak</uap:FileType>
            </uap:SupportedFileTypes>
            <uap2:SupportedVerbs>
              <uap3:Verb Id="Edit" Parameters="&quot;%1&quot;">Edit with Notepad++</uap3:Verb>
            </uap2:SupportedVerbs>
          </uap3:FileTypeAssociation>
        </uap:Extension>
      </Extensions>
    </Application>
  </Applications>
</Package>

Copy and paste this in to AppxManifest.xml for the first build.
To clarify, you must copy this over the AppxManifest.xml file on your first build, then copy the AppxManifest.xml from the previous build every time you make a new build.

@T3rm1

This comment has been minimized.

Copy link

T3rm1 commented Nov 23, 2017

I think Npp is dead. Last commit is 24 days old and VS Code gets better and better every month. It is already far superior than Npp. I'm still using Npp more than VS Code though.

@gjsman

This comment has been minimized.

Copy link
Author

gjsman commented Nov 23, 2017

@T3rm1 Visual Studio Code is better and getting better every month, sure. Visual Studio is cross-platform, sure. Visual Studio Code just beat out Atom and Brackets and every other open-source text editor in a survey from Ubuntu asking what the default text editor should be.

Still, Notepad++ still should have a place, somewhere...

I wonder how @donho would feel if I managed the Windows Store distribution for him.

@strollingHeifer

This comment has been minimized.

Copy link

strollingHeifer commented Nov 24, 2017

While this has nothing to do with the issue itself, I'm not sure if it is fair to compare Notepad++ with VS Code. Notepad++ for me is a more feature-rich alternative to the pre-installed Windows Notepad, that I use mainly to quickly search through a file or make small changes.
VS Code is not meant for things like that. It takes an eternity just to launch it, in comparison to Notepad++. The used disk space also shows that they serve different needs.

@gjsman

This comment has been minimized.

Copy link
Author

gjsman commented Nov 24, 2017

@strollingHeifer Exactly. I am advocating packaging it for Windows Store because of that... they have their own advantages/disadvantages.

@svp95bos

This comment has been minimized.

Copy link

svp95bos commented Jan 31, 2018

Any news on this issue? I would be very interested in being able to have NPP available in the Store. I'm starting to getting used to have my apps auto-update. I don't bother watching for updates...

@gjsman

This comment has been minimized.

Copy link
Author

gjsman commented Jan 31, 2018

I could @svp95bos be the Windows Store maintainer, but I want @donho approval first.

@VladimirAkopyan

This comment has been minimized.

Copy link

VladimirAkopyan commented Jun 27, 2018

Please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.