Community
    • Login

    Notepad++ UWP package in Windows store - almost there

    Scheduled Pinned Locked Moved Announcements
    61 Posts 14 Posters 87.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Claudia FrankC
      Claudia Frank @donho
      last edited by

      @donho

      maybe this does the trick.

      Cheers
      Claudia

      donhoD 1 Reply Last reply Reply Quote 1
      • donhoD
        donho @Claudia Frank
        last edited by

        @Claudia-Frank
        Unfortunately, no.
        The ink for downloading img in the link you provided is not available.
        I think there are some problems in Microsoft regarding this issue. :(

        Claudia FrankC 1 Reply Last reply Reply Quote 0
        • Claudia FrankC
          Claudia Frank @donho
          last edited by

          @donho

          oh, didn’t try the link and yes, seems that MS corrupted it.
          The base images can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=56049.

          Cheers
          Claudia

          donhoD 1 Reply Last reply Reply Quote 0
          • johnmurphy01J
            johnmurphy01
            last edited by

            @donho What base image are you using to run the DesktopAppConverter?

            donhoD 1 Reply Last reply Reply Quote 0
            • donhoD
              donho @Claudia Frank
              last edited by

              @Claudia-Frank
              Thank you, The image has been downloaded. However, when I try to clean my old image, the error happened:

              C:\WINDOWS\system32>DesktopAppConverter -Cleanup "ExpandedImage" -Verbose
              COMMENTAIRES : Log file can be found in C:\Users\donh_000\AppData\Local\Temp\DesktopAppConverterCleanup.log
              COMMENTAIRES : Desktop App Converter 2.0.2.release_2017-04-20_15-32_d5d861e622cd5bd166242b726909575b22b31f27
              COMMENTAIRES : --------------------------------------------------
              
              
              Checking Prerequisites
              
              COMMENTAIRES : Checking Windows Version to ensure it meets minimum requirements
              COMMENTAIRES : Minimum Windows Version requirement is met.
              COMMENTAIRES : Testing for required feature enabled...
              COMMENTAIRES : Version de l’image cible 10.0.15063.0
              COMMENTAIRES : Required feature is enabled. Checking if reboot is required
              COMMENTAIRES : Version de l’image cible 10.0.15063.0
              COMMENTAIRES : Required feature is enabled.
              COMMENTAIRES : Version de l’image cible 10.0.15063.0
              COMMENTAIRES : Version de l’image cible 10.0.15063.0
              COMMENTAIRES : --------------------------------------------------
              
              
              Running Expanded image cleanup
              
              COMMENTAIRES : An error occurred converting your application. Here is the full error record:
              COMMENTAIRES :
              
              PowerShell Error Record:
              Impossible de trouver le chemin d'accès
              « C:\ProgramData\Microsoft\Windows\Images\BaseImage-15063\version.json », car il n'existe pas.
              PowerShell Stack Trace:
              à Remove-ExpandedBaseImage, C:\Program
              Files\WindowsApps\Microsoft.DesktopAppConverter_2.0.2.0_x64__8wekyb3d8bbwe\converter_util\BaseImageOps.ps1 :
              ligne 207
              à <ScriptBlock>, C:\Program
              Files\WindowsApps\Microsoft.DesktopAppConverter_2.0.2.0_x64__8wekyb3d8bbwe\converter_util\BaseImageOps.ps1 :
              ligne 246
              à Remove-AllExpandedBaseImages, C:\Program
              Files\WindowsApps\Microsoft.DesktopAppConverter_2.0.2.0_x64__8wekyb3d8bbwe\converter_util\BaseImageOps.ps1 :
              ligne 246
              à <ScriptBlock>, C:\Program
              Files\WindowsApps\Microsoft.DesktopAppConverter_2.0.2.0_x64__8wekyb3d8bbwe\Cleanup.ps1 : ligne 82
              à <ScriptBlock><Process>, C:\Program
              Files\WindowsApps\Microsoft.DesktopAppConverter_2.0.2.0_x64__8wekyb3d8bbwe\DesktopAppConverter.ps1 : ligne 408
              à <ScriptBlock>, <Aucun fichier> : ligne 1
              
              Inner Exception[0]:
              System.Management.Automation.ItemNotFoundException: Impossible de trouver le chemin d'accès
              « C:\ProgramData\Microsoft\Windows\Images\BaseImage-15063\version.json », car il n'existe pas.
                 à System.Management.Automation.LocationGlobber.ExpandMshGlobPath(String path, Boolean allowNonexistingPaths,
               PSDriveInfo drive, ContainerCmdletProvider provider, CmdletProviderContext context)
                 à System.Management.Automation.LocationGlobber.ResolveDriveQualifiedPath(String path, CmdletProviderContext
              context, Boolean allowNonexistingPaths, CmdletProvider& providerInstance)
                 à System.Management.Automation.LocationGlobber.GetGlobbedMonadPathsFromMonadPath(String path, Boolean
              allowNonexistingPaths, CmdletProviderContext context, CmdletProvider& providerInstance)
                 à System.Management.Automation.LocationGlobber.GetGlobbedProviderPathsFromMonadPath(String path, Boolean
              allowNonexistingPaths, CmdletProviderContext context, ProviderInfo& provider, CmdletProvider&
              providerInstance)
                 à System.Management.Automation.SessionStateInternal.CopyItem(String[] paths, String copyPath, Boolean
              recurse, CopyContainers copyContainers, CmdletProviderContext context)
                 à Microsoft.PowerShell.Commands.CopyItemCommand.ProcessRecord()
              Inner Exception Stack Trace[0]
                 à System.Management.Automation.LocationGlobber.ExpandMshGlobPath(String path, Boolean allowNonexistingPaths,
               PSDriveInfo drive, ContainerCmdletProvider provider, CmdletProviderContext context)
                 à System.Management.Automation.LocationGlobber.ResolveDriveQualifiedPath(String path, CmdletProviderContext
              context, Boolean allowNonexistingPaths, CmdletProvider& providerInstance)
                 à System.Management.Automation.LocationGlobber.GetGlobbedMonadPathsFromMonadPath(String path, Boolean
              allowNonexistingPaths, CmdletProviderContext context, CmdletProvider& providerInstance)
                 à System.Management.Automation.LocationGlobber.GetGlobbedProviderPathsFromMonadPath(String path, Boolean
              allowNonexistingPaths, CmdletProviderContext context, ProviderInfo& provider, CmdletProvider&
              providerInstance)
                 à System.Management.Automation.SessionStateInternal.CopyItem(String[] paths, String copyPath, Boolean
              recurse, CopyContainers copyContainers, CmdletProviderContext context)
                 à Microsoft.PowerShell.Commands.CopyItemCommand.ProcessRecord()
              COMMENTAIRES : The full error record is saved in the logs at C:\Users\donh_000\AppData\Local\Temp
              C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.0.2.0_x64__8wekyb3d8bbwe\DesktopAppConverter.ps1 : Impossible de trouver le chemin d'accès « C:\ProgramData\Microsoft\Windows\Images\BaseImage-15063\version.json », car il n'
              Au caractère Ligne:1 : 1
              + &'C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.0.2.0_ ...
              + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
                  + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DesktopAppConverter.ps1
              

              Any idea?

              Claudia FrankC 1 Reply Last reply Reply Quote 0
              • donhoD
                donho @johnmurphy01
                last edited by donho

                @johnmurphy01
                BaseImage-15063.wim - which I’m trying to remove without success, as I described above.

                1 Reply Last reply Reply Quote 0
                • Claudia FrankC
                  Claudia Frank @donho
                  last edited by

                  @donho said:

                  because of the WriteErrorException, did you run this as administrator?

                  Cheers
                  Claudia

                  donhoD 1 Reply Last reply Reply Quote 0
                  • Claudia FrankC
                    Claudia Frank
                    last edited by

                    @donho

                    doesn’t this file exist? Then it looks like 15063 isn’t correctly installed.

                    C:\ProgramData\Microsoft\Windows\Images\BaseImage-15063\version.json
                    

                    Cheers
                    Claudia

                    donhoD 1 Reply Last reply Reply Quote 0
                    • donhoD
                      donho @Claudia Frank
                      last edited by

                      @Claudia-Frank said:

                      did you run this as administrator?

                      Yes, the console was launched as administrator.

                      Claudia FrankC 1 Reply Last reply Reply Quote 0
                      • Claudia FrankC
                        Claudia Frank @donho
                        last edited by

                        @donho

                        I would give it a try to use option All like

                        DesktopAppConverter -Cleanup "All" -Verbose
                        

                        but to be honest if I were you I would try to go in contact with MS as
                        I’m pretty sure they would love to see npp on the store.

                        Cheers
                        Claudia

                        1 Reply Last reply Reply Quote 3
                        • chcgC
                          chcg
                          last edited by chcg

                          Current version of Desktop App Converter is 2.1.1.0. Maybe this version available via the MS Store fixes your issue. Additionally see this comment https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-run-desktop-app-converter

                          If you’re using build number 15063, and the minor version of that build is equal to or greater than .483 (For example: 15063.540), make sure to download the BaseImage-15063-UPDATE.wim file. If the minor version of that build is less than .483, download the BaseImage-15063.wim file. If you’ve already setup an incompatible version of this base file, you can fix it. This blog post explains how to do that.

                          https://blogs.msdn.microsoft.com/appconsult/2017/08/04/desktop-app-converter-fails-on-windows-10-15063-483-and-later-how-to-solve-it/

                          1 Reply Last reply Reply Quote 0
                          • gjsmanG
                            gjsman
                            last edited by gjsman

                            I did it! I have converted apps before, and did it fairly easily.

                            https://github.com/notepad-plus-plus/notepad-plus-plus/issues/3883

                            My only concern is that the updater program might have to be removed, because updates come from Windows Store and an error would result if it tried to update itself (security reasons).

                            https://user-images.githubusercontent.com/29414519/32677887-ce019db8-c625-11e7-9cfd-0e82aee4fa3a.png

                            1 Reply Last reply Reply Quote 1
                            • gjsmanG
                              gjsman
                              last edited by gjsman

                              I was actually looking at potential open-source desktop apps that would be good for the Windows Store, and came across Notepad++ and figured that would be good. So I did it, posted an issue to support it, only to discover you were already working on it. Perfect. :)

                              Some notes:

                              • I am running Build 16299 (Fall Creator’s Update) of Windows 10 Pro. Windows 10 Home does not work.
                              • I used the 16299 base image from https://www.microsoft.com/en-us/software-download/dac

                              My command:

                              DesktopAppConverter.exe -Installer npp.7.5.1.Installer.exe -InstallerArguments "/S" -Destination notepad++ -PackageName "NotepadPlusPlus" -Publisher "CN=GJSMan" -Version 7.5.1.0 -Sign -MakeAppx
                              

                              When I ran this command, my folder structure was:

                              • Downloads (folder)
                                • npp.7.5.1.Installer.exe (installer file)
                                • notepad++ (folder where install files go on command run)

                              I was running from a PowerShell with this directory, as administrator, and using the “Desktop App Converter” app from the Windows Store.

                              1 Reply Last reply Reply Quote 1
                              • gjsmanG
                                gjsman
                                last edited by

                                @Claudia-Frank said:

                                DesktopAppConverter -Cleanup “All” -Verbose

                                @donho The DesktopAppConverter -Cleanup "All" -Verbose command, I would recommend trying as well.

                                I would give a few recommendations to other points here:

                                • If you are having trouble removing a base image, try the command I just listed from @Claudia-Frank and see if it works.
                                • I would recommend signing the package with -Sign, because then you can install the AppX generated certificate into “Trusted People” area, enable sideloading, and then test the AppX (whereas, if it isn’t signed even with this self-generated certificate, installation will fail)
                                • If you are having particular trouble, do how I did it using a Virtual Machine. You just download VMWare, and then a copy of the latest Windows from https://www.microsoft.com/en-us/software-download/windows10 as an ISO. Believe it or not, you don’t need to activate Windows to have this method work.
                                • Ideally, you would write a small script to run the Desktop App Converter command for you, because you might as well become good at running it (because you will run it every time you make a revision). Similar to .\build-appx.sh 7.0.0.0 or something simple.
                                • When you submit your app, you may need special permission from Microsoft for desktop app submissions. This is free, but you will need to fill out a form at: https://developer.microsoft.com/en-us/windows/projects/campaigns/desktop-bridge They will also help with the process if you need.
                                1 Reply Last reply Reply Quote 1
                                • gjsmanG
                                  gjsman
                                  last edited by gjsman

                                  Well, that is done.

                                  Essentially, I would like to let you know something right now that I have discovered.

                                  The Desktop App Converter makes converting the basic app easy - sure. However, if you want to make really any modifications like changing the Display Name to support the ++ in the name, or you want to support opening .xml files (or any other file extension) from the “Open With” menu, it gets really complicated really quickly.

                                  Nonetheless, I have successfully packaged Notepad++ as appx. It will let you open any file (.xml or .php or whatever), and is signed with my personal certificate.

                                  If you want, I could put out instructions, but I warn you they were not easy to accomplish - took me a few hours experimentation, easily. You essentially have to take the package files, then modify the AppxManifest.xml file to support the file extensions you want, then generate a certificate on your computer (different from the ones -Sign makes), then make an Appx using MakeAppx.exe which is added to your System Environment Variables, then Package that AppX and sign it with signtool.exe. Not easy, but I did it.

                                  You might wonder, wasn’t it working before? It was, but you won’t be able to add extensible features to the package without the long list of complicated steps I just mentioned, for doing things like right-clicking an XML and seeing it under the "Open with " menu, or having a list of default-supported extensions. It will work, but many features that would greatly help out would be missing. You won’t be able to, say, double-click a file in File Explorer and have Notepad++ open it, for example. Desktop App Converter does only the basic stuff - it gets harder, quickly.

                                  If you like, perhaps I could just be the community packager for AppX files… I am here to answer any questions on request, and if you want an instruction guide I will write it.

                                  1 Reply Last reply Reply Quote 0
                                  • gjsmanG
                                    gjsman
                                    last edited by

                                    A few photos, plus improvements to the package I have made:

                                    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/3883

                                    1 Reply Last reply Reply Quote 1
                                    • gjsmanG
                                      gjsman
                                      last edited by

                                      I have a testing build up and with instructions. :)

                                      It is configured to open .rtf, .txt, and .xml files from File Explorer, if installed. You can see it at the bottom of the GitHub issue (link above)

                                      1 Reply Last reply Reply Quote 1
                                      • gjsmanG
                                        gjsman
                                        last edited by

                                        I am on fire today. Sorry for inundating your email boxes!

                                        I released Revision 6 of a build. It supports all extensions except 3 (which I talked about on the GitHub issue). Removed updater as well. It works very well - good enough to publish! :)

                                        This is not a pure Desktop App Converter build. Rather, I take the files Desktop App Converter creates, then modify them to support a few additional, crucial features.

                                        • You can right-click any Notepad++ supported extension (except .cmd, .bat, and .hta) and find Notepad++ under the “Open With” menu, or set it as default. This is important because the conversion bridge does not support the old way of setting supported extensions (in fact, the whole File Extensions settings panel in Notepad++ doesn’t do anything with the UWP Bridge on). If this did not work, you could only open files from within Notepad++, and never from File Explorer.
                                        • Added the “Edit with Notepad++” menu item when right-clicking items. Unfortunately, due to the stronger security model on UWP Bridge apps, Notepad++ must have been set to default for that file extension already for the “Edit with Notepad++” menu item to appear. This makes it a little redundant, but I added it for backward-compatibility sake.

                                        I will make a few more revisions before I am happy with it. After that, I will either

                                        • Make a guide, explaining how the APPX design works best, and how to do this manually OR
                                        • (Hopefully) become a maintainer and submit APPX packages every time a new release comes out to @donho to manually upload to the Windows Store.
                                        donhoD 1 Reply Last reply Reply Quote 1
                                        • Alan KilbornA
                                          Alan Kilborn @donho
                                          last edited by

                                          @donho

                                          I hope that the Windows store (ugh!) won’t be the ONLY way to get Notepad++ moving forward…

                                          donhoD 1 Reply Last reply Reply Quote 2
                                          • gjsmanG
                                            gjsman
                                            last edited by

                                            @Alan-Kilborn No, it shouldn’t be. This takes the .exe file (already generated) that is currently used, and then packages it up. So you would have to make a regular installer anyway to use this method. Which, at that point, why stop supplying it if you are going to do it anyway?

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            The Community of users of the Notepad++ text editor.
                                            Powered by NodeBB | Contributors