How Do I Make An Executable File For Windows?


#21

I don’t know why I’m having so much trouble with this.


#22

You cd-ed to the wrong directory and drive. Your game folder is in C drive,
so the command line should be executed at “C”, not at “D”:

C:\WINDOWS\system32>cd\ <— (cd backslash will throw you back to C:\)

when at C:\ root, type:
cd Users\Leon Corbett\Desktop\GameTest\TestNumberOne

edit: took out the space derivative command line, windows 10 should have no problem with space in folder names.


#23

Not trying to hijack this thread, but is that how the remote build option in GDevelop works, too?


#24

Got the game directory correct. Thanks. I think it’s just a problem with yarn now, I typed “yarn add electron-build —dev” but it says yarn isn’t recognized.


#25

Yes, i believe this is the same method used when you do a GDevelop remote build for download. The file size for the exe distro i got from the remote build and self-build is about the same.


#26

It should be “yarn add electron-builder --dev”


#27

Thanks @audze! I run Fedora, so I was just curious.


#28

I had a friend test this on his linux rig, from what i was told is that the cmdlines are more or less the same. The AppImage also matches, so i think it should be same :slightly_smiling_face:


#29

I figured as much since the tools used have been ported to every OS under the sun. If I find myself needing build locally, I’ll be sure to document it for a tutorial.


#30

That’s what I meant that I typed. Still it doesn’t recognize yarn.


#31

@LonelyVariety - I believe your problem is due to the space in your username.

Try wrapping the C:\Users…\TestNumberOne in double quotes.


#32

Nevermind everybody I think it worked, Turns out while I had yarn downloaded, I didn’t realize it wasn’t installed.


#33

Yeah, that’ll do it, too :wink:


#34

I’m at the step where I type “npx build”. It says “Please specify “name” in package.json”
and “Please specify “version” in package.json”.


#35

That’s because you hadn’t entered the required fields in your game in GDevelop.
Before you manually export the game:

  1. Go to GDevelop --> View --> Show Project Manager
  2. Go to Game Settings and fill out all the required fields there.
  3. Export your game to your gamefolder.

#36

I got it done now. I’ll post the demo later. For some reason it doesn’t have sound. And yes I made sure my volume was up and so were my speakers.


#37

Thanks for helping the people :slight_smile: @audze


#38

Hi Nilarjun,

There appears to be some changes to the build command for singular electron-builder install.
The npx command line appears to be no longer valid for “build”.

Update it to: “npx electron-builder build .” instead of “npx build .” in the wiki.


#39

@audze Yes, I talked to 4ian about it. I tested the “yarn run build” command and it is recommended since we are using Yarn in the first step. “npx” is a module for “npm”, so that’s why I converted it to use yarn instead.


#40

Thanks, that’s even better! See what i mean about node js?
Those guys never seems to be able to make up their mind about anything. :man_facepalming: