Build standalone windows exe without dependency on unityplayer.dll and Data folder? - unity3d

I'm trying to publish my game on itch using butler but I cant see how to generate an actual standalone windows executable rather than the default game exe, unityplayer.dll and _data folder.
I can zip all the required and upload that for the itch web store, but the itch windows app doesn't support these.

you can make an installer into a seperate exe, or just self extracting zip file, but data folder and unity.dll are parts of the engine, as far as I know you need them present

Even shipping games work this way; for example, I checked my Steam folder, and there's a ton of unityplayer.dll and data folders.
3/02/2019 12:57 <DIR> steam_shader_cache
6/06/2018 21:25 <DIR> ArizonaSunshine_Data
5/25/2018 2:50 <DIR> MonoBleedingEdge
5/25/2018 2:31 22,281,152 UnityPlayer.dll
5/25/2018 2:31 1,426,880 UnityCrashHandler64.exe
5/25/2018 2:29 648,704 ArizonaSunshine.exe
6/26/2017 20:27 <DIR> _CommonRedist
I know why you want to do this, I'm assuming to hide the fact you're using Unity, and to make everything 'simple' for people to run. The former is tough, the latter is absolutely required. I sent a .zip file to a friend who swore that he had unzipped the file and put it on his desktop. The "myapp.exe" kept asking for Unity and a license.
He was double-clicking on the .exe inside the .zip file, which looks like a folder on Vanilla Windows.
So, after having said that, I highly recommend using a real installer program.
A "real" installer, like http://www.jrsoftware.org/isinfo.php, will make it easier for people to just load your program like a 'real' program, and hide the .dll file and associated mess.

Related

With Unity version 2020 and onwards, how to build for Windows to a single file?

I'm struggling to find any method that works with current Unity.
This for a conventional Windows build (not a Windows Universal via VS).
So, there's the separate data, dll, etc files of a build: how to create a civilian-usable "single exe" for Windows, with current Unity??
As said afaik this was actually always the case.
See e.g. Windows standalone Player build binaries to see a list of resulting output of a build. It exists back until version 2017.2.
So the short answer is:
It is how it is. You will always get multiple files and the data folder as output.
What you can do however is using a pack tool which simply packs all your folder content into one single exe file.
One example is Appacker
=>
BUT unfortunately there is one known issue: Windows Defender recognizes it and every exe created with it as malware. The reason for that is actually mentioned by the author in the link
Spoiler: A self-extracting .exe file? Windows Defender hates that trick!
So either with this tool or any similar one there is no real way around that except you need to trust the tool and your users need to trust you ^^
(The icon is also only used for the process window, not for the exe file itself ^^)
The long and correct way would probably be to create an actual installer for your final app which is then allowed to extract all the files to a certain location.
So in the end the user anyway will again have an exe and according data and dll files e.g. in the Programs folder but get a registered shortcut to the Start Menu which is just how any other application on Windows usually works like.
Just to add to the answer.
In 2020 if it's a game you should just use Steam. Making auto-update way easier for your users.
https://partner.steamgames.com/doc/gettingstarted

script to auto move a folder with movie file

I have a download folder that is the destination for all torrent download files. I want a script which monitors that folder and then automatically only copy, moves the complete folder containing the movie file (mkv,avi,mp4...etc) and ignores everything else in the download folder. Is it possible
Thanks and Regards
Sammy
Which scripting language would you like to use? What OS are you on? It is quite possible, and if you chose Python as your scripting language, you would be able to find many useful scripts that do what you want.

Deploy files in the localState folder during installation of a store app

I am building an app for windows store and I need some default and example data to be in the localstate folder (Windows.Storage.ApplicationData.current.localFolder) when the app run the first time.
The folder and files structure is a bit complex and I tryed to copy the files at the start of the application, but I can't manage that way.
Is it possible to have files being copied automatically from the installation folder to the localstate folder during the store app installation?
Unfortunately, customization of the app install process isn't currently supported. You have to do this as part of your first run processing.
One possibility is that you include the data in your package as a .ZIP or other compressed file and use an appropriate library to expand that file into a folder structure on startup. That could simplify your logic considerably. (I don't have a library to recommend; it's just an idea.)

Can I extract my apk file to retrieve lost files?

I've been working on a mobile game in Unity for over a month, saving all my work to OneDrive. Today I restarted my computer and when it loaded back up I tried opening my project and it failed. I looked through my OneDrive and half my files are missing! I've been on the phone with Microsoft support all day and I can't get those files back.
I have the apk file for the game loaded onto my phone. Is there anyway to reverse build this thing back onto Unity or just get the files back from the apk file ?
If by APK you mean Android's APK file you can just 'unzip' it and get at least you xml files and other resources such as images. All classes will be packed to classes.dex file, which can be converted to Java's JAR by dex2jar tool. However JAR will give you only Java's binaries. You could further de-compile them to Java files, but they are not going to look pretty or very readable.
Well, at least you can recover you XML layouts.
Are the files in your recycle bin on the OneDrive website or locally? Often times when OneDrive files go missing they can be found there.

Deploy Click once as a single file?

I am looking to use click once to deploy an application for internal use, When publishing to the network share it creates several files and folders. (manifest, ApplicationFiles etc)
Is there a way to bundle this up as a single file, I do not fancy the idea of allowing other users access to the application Files folder that is created, I would rather just give them the exe and have it take care of everything else.
Does anyone have experience with this, or am I stuck with the application Folder, Application Manifest, and setup file all being in the same directory for installation.
There is not a way to package the whole application folder and files into one file, like an MSI with ClickOnce.
You could code something on your own to have a shell app that use ClickOnce and its only file would be your app compressed. The shell would download that compressed file to the client's machine and would unzip etc.
You could also InstallShield Limited Edition that comes with VS 2012/2013 in the Other Projects, Setup and Deployment but that does give you the ClickOnce easy of deployment features. You could use the InstallShield setup to be your compress file in your shell clickonce app and then just use Process.Start to launch the InstallShield setup. It should work.