Giter VIP home page Giter VIP logo

Comments (8)

sihorton avatar sihorton commented on July 24, 2024

Hi Ivbeck,

The error message is that it cannot find module "deskshell-win-func", so that is probably the problem here. Have you installed the module "deskshell-win-func" in the "node_modules" folder in the directory above the src directory? My guess is that it is sitting in the src/node_modules folder. Move it one level up and both the exe and the none-compiled version can find the node module in that directory.

As to compiling there is a problem in that an exe MUST have an icon, without the icon then the compilation fails. By default I look for the program icon in htdocs/favicon.ico if that file is missing then it won't work. I probably need to improve the compiler to detect this problem as otherwise it is a little confusing. The first time you run the compile it will create app.nsi. You can open that up (it is a simple text file) search for the line:

;icon to use for your executable
Icon "htdocs/favicon.ico"

You can then change that path to be any valid path to an ico file to use as your program icon. Next time you run it will hopefully create an exe for you.

from appjs-deskshell.

lvbeck avatar lvbeck commented on July 24, 2024

hi @sihorton,

I moved node_modules one level up as suggested, the compilation works now, the exe is created successfully, the error log is gone and my app started, but the deskshell-win-func is still not loaded.

and I check my favicon.ico, it's there but not used for the executable file

from appjs-deskshell.

lvbeck avatar lvbeck commented on July 24, 2024

And I found a error msg in chrome console:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:8100/deskShell/clientApi.js

from appjs-deskshell.

sihorton avatar sihorton commented on July 24, 2024

Ok that seems like a strange compilation error (if the favicon is not being used for the executable icon). Maybe the icon is too complex or not complex enough? For windows it needs special sizes so it may be that if your icon is missing an icon at a particular size that something strange happens instead. I had this problem myself and changing the icon (adding more sizes) worked for me. If you comment out the Icon statement:

 ;Icon "htdocs/favicon.ico"

Then it should use a default built in icon instead.

I guess we would need some way to run from the exe in debug mode so you can see any error in a console window. Can you specify exactly how you know the deskshell-win-func is not working and what you expect it to do?

from appjs-deskshell.

lvbeck avatar lvbeck commented on July 24, 2024

may be the node modules are loaded, but deskShell/clientApi.js is not loaded, so the client can not connected to the server via socket?

I use a socket proxy which provide native folder picker

    socket.on('folderPicker',function(params,back) {
        console.log("folder picker called",params);
        winfunc.folderPicker(params ||{},function(folder) {
            console.log("folder picker returned",folder);
            back({folder:folder});
        });
    });

this works for none-compiled version but not for the exe

from appjs-deskshell.

sihorton avatar sihorton commented on July 24, 2024

The /deskShell/clientApi.js is not actually needed it is just a little wrapper I wrote to make the client side code a little simpler. The source code for that file is available: Deskshell\node_modules\deskshell-api\clientApi.js so you could copy that into your htdocs/js directory and then change the script tag to point to the new location. If you do that does it start working again?

from appjs-deskshell.

lvbeck avatar lvbeck commented on July 24, 2024

finally get it works.

I have to put deskshell-win-func into portable-win\deskshell\node_modules instead of upper level of src

and I move clientApi.js into htdocs/scripts and updated my index.html

now the only problem is the size of portable app, it's over 200MB in the end...

I found two very large folder under the portable-win\deskshell\bin\win:

portable-win\deskshell\bin\win\chrome-profile (where my websql database located)

and

portable-win\deskshell\bin\win\DeskshellChrome\Data\profile (over 100MB)

it would be great if there is a way to remove unnecessary files to make the entire package smaller:)

from appjs-deskshell.

sihorton avatar sihorton commented on July 24, 2024

Yes we are working on getting the file size down. It is possible to install a "runtime" that will include the chrome so that you can share it between all applications on a particular machine. I have implemented code that in the exe can detect the runtime and if it is not installed it can ask the user if they want to install.

Unfortunately chrome is always going to be fairly big -- 70 meg or so which means the best approach is probably to install once and then share between all apps.

I am not sure exactly why the clientApi did not work for you in the exe. I will take another look at the code and see what is going wrong.

from appjs-deskshell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.